mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Allow to use XeTeX and LuaTeX with tex fonts.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36537 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
0ff09a4e49
commit
ff20f7ebe9
@ -3630,9 +3630,11 @@ vector<string> Buffer::backends() const
|
||||
vector<string> v;
|
||||
v.push_back(bufferFormat());
|
||||
// FIXME: Don't hardcode format names here, but use a flag
|
||||
if (v.back() == "latex")
|
||||
if (v.back() == "latex") {
|
||||
v.push_back("pdflatex");
|
||||
else if (v.back() == "xetex")
|
||||
v.push_back("luatex");
|
||||
v.push_back("xetex");
|
||||
} else if (v.back() == "xetex")
|
||||
v.push_back("luatex");
|
||||
v.push_back("xhtml");
|
||||
v.push_back("text");
|
||||
|
@ -1339,7 +1339,11 @@ bool BufferParams::writeLaTeX(odocstream & os, LaTeXFeatures & features,
|
||||
texrow.newline();
|
||||
// end of \documentclass defs
|
||||
|
||||
if (useNonTeXFonts) {
|
||||
// Fontspec must also be loaded if XeTeX is used with tex fonts
|
||||
// (in order to prevent later loading which overrides the tex
|
||||
// fonts)
|
||||
if (features.runparams().flavor == OutputParams::XETEX
|
||||
|| useNonTeXFonts) {
|
||||
os << "\\usepackage{fontspec}\n";
|
||||
texrow.newline();
|
||||
}
|
||||
@ -1360,9 +1364,9 @@ bool BufferParams::writeLaTeX(odocstream & os, LaTeXFeatures & features,
|
||||
// set font encoding
|
||||
// for arabic_arabi and farsi we also need to load the LAE and
|
||||
// LFE encoding
|
||||
// XeTeX and LuaTeX (isFullUnicode() flavor) work without fontenc
|
||||
// XeTeX and LuaTeX (with OS fonts) work without fontenc
|
||||
if (font_encoding() != "default" && language->lang() != "japanese"
|
||||
&& !features.runparams().isFullUnicode() && !tclass.provides("fontenc")) {
|
||||
&& !useNonTeXFonts && !tclass.provides("fontenc")) {
|
||||
size_t fars = language_options.str().find("farsi");
|
||||
size_t arab = language_options.str().find("arabic");
|
||||
if (language->lang() == "arabic_arabi"
|
||||
@ -1891,16 +1895,13 @@ bool BufferParams::writeLaTeX(odocstream & os, LaTeXFeatures & features,
|
||||
|
||||
os << lyxpreamble;
|
||||
|
||||
// these packages (xunicode, for that matter) need to be loaded at least
|
||||
// after amsmath, amssymb, esint and the other packages that provide
|
||||
// special glyphs
|
||||
// xunicode needs to be loaded at least after amsmath, amssymb,
|
||||
// esint and the other packages that provide special glyphs
|
||||
if (features.runparams().flavor == OutputParams::XETEX) {
|
||||
os << "\\usepackage{xunicode}\n";
|
||||
texrow.newline();
|
||||
os << "\\usepackage{xltxtra}\n";
|
||||
texrow.newline();
|
||||
}
|
||||
// Polyglossia must be loaded after xltxtra
|
||||
// Polyglossia must be loaded last
|
||||
if (use_polyglossia) {
|
||||
// call the package
|
||||
os << "\\usepackage{polyglossia}\n";
|
||||
|
Loading…
Reference in New Issue
Block a user