mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-22 16:37:28 +00:00
Amend 2987530434105
This is more readable (and fixes a thinko)
This commit is contained in:
parent
2987530434
commit
da1d6d03eb
@ -1923,10 +1923,16 @@ bool BufferParams::writeLaTeX(otexstream & os, LaTeXFeatures & features,
|
|||||||
// Babel (as of 2017/11/03) loads fontspec itself
|
// Babel (as of 2017/11/03) loads fontspec itself
|
||||||
// However, it does so only if a non-default font is requested via \babelfont
|
// However, it does so only if a non-default font is requested via \babelfont
|
||||||
// Thus load fontspec if this is not the case and we need fontspec features
|
// Thus load fontspec if this is not the case and we need fontspec features
|
||||||
|
bool const babel_needfontspec =
|
||||||
|
!features.isAvailableAtLeastFrom("babel", 2017, 11, 3)
|
||||||
|
|| (fontsRoman() == "default"
|
||||||
|
&& fontsSans() == "default"
|
||||||
|
&& fontsTypewriter() == "default"
|
||||||
|
// these need fontspec features
|
||||||
|
&& (features.isRequired("textquotesinglep")
|
||||||
|
|| features.isRequired("textquotedblp")));
|
||||||
if (!features.isProvided("fontspec")
|
if (!features.isProvided("fontspec")
|
||||||
&& !(features.useBabel() && features.isAvailableAtLeastFrom("babel", 2017, 11, 3)
|
&& (!features.useBabel() || babel_needfontspec))
|
||||||
&& (fontsRoman() != "default" || fontsSans() != "default" || fontsTypewriter() != "default")
|
|
||||||
&& !features.isRequired("textquotesinglep") && !features.isRequired("textquotedoublep")))
|
|
||||||
os << "\\usepackage{fontspec}\n";
|
os << "\\usepackage{fontspec}\n";
|
||||||
if (features.mustProvide("unicode-math")
|
if (features.mustProvide("unicode-math")
|
||||||
&& features.isAvailable("unicode-math"))
|
&& features.isAvailable("unicode-math"))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user