//\message{LyX LaTeX Extensions (LLE v0.2) of 11-Jan-1996.}
static docstring const lyx_def = from_ascii(
- "\\providecommand{\\LyX}{L\\kern-.1667em\\lower.25em\\hbox{Y}\\kern-.125emX\\@}");
-
-static docstring const lyx_hyperref_def = from_ascii(
- "\\providecommand{\\LyX}{\\texorpdfstring%\n"
- " {L\\kern-.1667em\\lower.25em\\hbox{Y}\\kern-.125emX\\@}\n"
- " {LyX}}");
+ "{%\n L\\kern-.1667em\\lower.25em\\hbox{Y}\\kern-.125emX\\@}");
static docstring const noun_def = from_ascii(
"\\newcommand{\\noun}[1]{\\textsc{#1}}");
}
}
+
+bool LaTeXFeatures::hasRTLLanguage() const
+{
+ if (params_.language->rightToLeft())
+ return true;
+ for (auto const & lang : UsedLanguages_)
+ if (lang->rightToLeft())
+ return true;
+ return false;
+}
+
+
namespace {
char const * simplefeatures[] = {
"units",
"framed",
"soul",
- "textcomp",
- "pmboxdraw",
+ "dingbat",
"bbding",
"ifsym",
"txfonts",
// "cancel",
"ascii",
"url",
- "covington",
"csquotes",
"enumitem",
"endnotes",
"todonotes",
"forest",
"varwidth",
- "footnote",
"tablefootnote",
"afterpage",
"tabularx",
- "xltabular"
+ "xltabular",
+ "chessboard",
+ "xskak"
};
char const * bibliofeatures[] = {
// The rest of these packages are somewhat more complicated
// than those above.
+ if (mustProvide("footnote")) {
+ if (isRequired("hyperref"))
+ packages << "\\usepackage{footnotehyper}\n";
+ else
+ packages << "\\usepackage{footnote}\n";
+ }
+
// [pdf]lscape is used to rotate longtables
if (mustProvide("lscape")) {
if (runparams_.flavor == OutputParams::LATEX
}
if (mustProvide("LyX")) {
+ macros << "\\providecommand{\\LyX}";
+ // open conditional wrappers
+ if (runparams_.use_polyglossia && hasRTLLanguage())
+ macros << "{\\@ensure@LTR";
if (isRequired("hyperref"))
- macros << lyx_hyperref_def << '\n';
- else
- macros << lyx_def << '\n';
+ macros << "{\\texorpdfstring";
+ if (useBabel())
+ macros << "{\\textlatin";
+ // main definition
+ macros << lyx_def;
+ // close conditional wrappers
+ if (useBabel())
+ macros << '}';
+ if (isRequired("hyperref"))
+ macros << "{LyX}}";
+ if (runparams_.use_polyglossia && hasRTLLanguage())
+ macros << '}';
+ macros << '\n';
}
if (mustProvide("noun"))