/// packages that are automatically skipped if loaded by LyX
const char * const known_lyx_packages[] = {"amsbsy", "amsmath", "amssymb",
-"amstext", "amsthm", "array", "booktabs", "calc", "color", "float",
+"amstext", "amsthm", "array", "booktabs", "calc", "color", "float", "fontspec",
"graphicx", "hhline", "ifthen", "longtable", "makeidx", "multirow",
"nomencl", "pdfpages", "rotating", "rotfloat", "splitidx", "setspace",
-"subscript", "textcomp", "ulem", "url", "varioref", "verbatim", "wrapfig", 0};
+"subscript", "textcomp", "ulem", "url", "varioref", "verbatim", "wrapfig",
+"xunicode", 0};
// codes used to remove packages that are loaded automatically by LyX.
// Syntax: package_beg_sep<name>package_mid_sep<package loading code>package_end_sep
if (is_known(name, known_xetex_packages)) {
xetex = true;
h_use_non_tex_fonts = "true";
+ registerAutomaticallyLoadedPackage("fontspec");
if (h_inputencoding == "auto")
p.setEncoding("utf8");
}
h_default_output_format = "pdf4";
h_use_non_tex_fonts = "true";
xetex = true;
+ registerAutomaticallyLoadedPackage("xunicode");
if (h_inputencoding == "auto")
p.setEncoding("utf8");
}
else if (t.cs() == "pagestyle")
h_paperpagestyle = p.verbatim_item();
- else if (t.cs() == "setdefaultlanguage")
+ else if (t.cs() == "setdefaultlanguage") {
+ // FIXME: we don't yet care about the option because LyX doesn't
+ // support this yet, see bug #8214
+ p.hasOpt() ? p.getOpt() : string();
h_language = p.verbatim_item();
+ }
- else if (t.cs() == "setotherlanguage")
- ;
+ else if (t.cs() == "setotherlanguage") {
+ // FIXME: we don't yet care about the option because LyX doesn't
+ // support this yet, see bug #8214
+ p.hasOpt() ? p.getOpt() : string();
+ p.verbatim_item();
+ // FIXME: there can be multiple occurences of
+ // \setotherlanguage, we need to handle them all not only the
+ // first one
+ }
else if (t.cs() == "setmainfont") {
// we don't care about the option
-%% LyX 2.1.0svn created this file. For more info, see http://www.lyx.org/.
-%% Do not edit unless you really know what you are doing.
\documentclass[albanian]{article}
\usepackage{fontspec}
\setmainfont[Mapping=tex-text]{Aharoni}
\setdefaultlanguage{coptic}
\setotherlanguage{albanian}
\setotherlanguage{divehi}
-\setotherlanguage{greek}
+\setotherlanguage[variant=monotonic]{greek}
\setotherlanguage{syriac}
\begin{document}
\part{df}
-1 Coptic \textgreek{Greek} Coptic
+1 Coptic \textgreek[variant=ancient]{ancient Greek} Coptic
\begin{albanian}%
else if (is_known(t.cs().substr(4, string::npos), polyglossia_languages)) {
// scheme is \textLANGUAGE{text} where LANGUAGE is in polyglossia_languages[]
string const lang = polyglossia2lyx(t.cs().substr(4, string::npos));
- parse_text_attributes(p, os, FLAG_ITEM, outer,
+ // FIXME: we have to output the whole command if it has an option
+ // because lyX doesn't support this yet, see bug #8214
+ if (p.hasOpt())
+ handle_ert(os, t.asInput() + p.getOpt(), context);
+ else
+ parse_text_attributes(p, os, FLAG_ITEM, outer,
context, "\\lang",
context.font.language, lang);
}