aboutsummaryrefslogtreecommitdiff
path: root/test/lhs-test.latex+lhs
diff options
context:
space:
mode:
authorAndrew Dunning <adunning@users.noreply.github.com>2019-01-12 20:39:47 -0500
committerJohn MacFarlane <jgm@berkeley.edu>2019-01-12 17:39:47 -0800
commit96892ea8d7dd024de36c135845e2981c7f957bc6 (patch)
treea49d9cd9086756cce694bbf0ff397d369b79e3dd /test/lhs-test.latex+lhs
parentfd222b811b584df31651b3b4657941fc8a44eb62 (diff)
downloadpandoc-96892ea8d7dd024de36c135845e2981c7f957bc6.tar.gz
LaTeX template: Simplify fontspec usage (#5218)
Simplify the approach of #5212, ensuring that `mainfont` is used as the base font for scaling and that LuaLaTeX does not display the mono font with TeX ligatures (as it does not use the `Mapping=tex-ansi` option). With a modified version of `\defaultfontfeatures`, fontspec will continue to report scaling against the old default font in the log, but it nonetheless displays main font at the specified size. Using this rather than setting `Scale=MatchLowercase` for each family individually means that users will not lose scaling when upgrading to the new template if they were using other font options. Scaling can be disabled for an individual family by adding the option `Scale=1` to `sansfontoptions`, `monofontoptions`, etc. Remove the `\setromanfont` command added in #4665, as this is not documented in the fontspec manual and appears to be a deprecated alias for `\setmainfont`. For the release notes, I should also add that one can imitate the previous appearance with `-V mainfontoptions="Scale=MatchLowercase"`.
Diffstat (limited to 'test/lhs-test.latex+lhs')
-rw-r--r--test/lhs-test.latex+lhs2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/lhs-test.latex+lhs b/test/lhs-test.latex+lhs
index 9c8797d5e..dc6f2803b 100644
--- a/test/lhs-test.latex+lhs
+++ b/test/lhs-test.latex+lhs
@@ -12,6 +12,8 @@
\usepackage{textcomp} % provides euro and other symbols
\else % if luatex or xelatex
\usepackage{unicode-math}
+ \defaultfontfeatures{Scale=MatchLowercase}
+ \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
\fi
% use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}