From 1e03774d3451c1efd2edae98e6357d1fdd322de5 Mon Sep 17 00:00:00 2001 From: Vaclav Haisman Date: Wed, 11 Jan 2017 23:07:41 +0100 Subject: Use `unicode-math`. Use `mathspec` with only XeLaTeX on request. --- default.latex | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/default.latex b/default.latex index 128f79d8d..635c278d7 100644 --- a/default.latex +++ b/default.latex @@ -21,11 +21,17 @@ $if(euro)$ \usepackage{eurosym} $endif$ \else % if luatex or xelatex +$if(mathspec)$ \ifxetex \usepackage{mathspec} \else \usepackage{fontspec} + \usepackage{unicode-math} \fi +$else$ + \usepackage{fontspec} + \usepackage{unicode-math} +$endif$ \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase} $for(fontfamilies)$ \newfontfamily{$fontfamilies.name$}[$fontfamilies.options$]{$fontfamilies.font$} @@ -43,7 +49,14 @@ $if(monofont)$ \setmonofont[Mapping=tex-ansi$if(monofontoptions)$,$for(monofontoptions)$$monofontoptions$$sep$,$endfor$$endif$]{$monofont$} $endif$ $if(mathfont)$ +$if(mathspec)$ + \ifxetex \setmathfont(Digits,Latin,Greek)[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} + \else + \setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} + \fi +$else$ + \setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} $endif$ $if(CJKmainfont)$ \usepackage{xeCJK} -- cgit v1.2.3 From 6205ac4b94736e185b97f8b7c3077d9a217ba07d Mon Sep 17 00:00:00 2001 From: Vaclav Haisman Date: Sat, 28 Jan 2017 16:22:31 +0100 Subject: LaTeX: Don't load `fontspec` before `unicode-math` The `unicode-math` package loads `fontspec` so explict loading of `fontspec` before `unicode-math` is not necessary. --- default.latex | 2 -- 1 file changed, 2 deletions(-) diff --git a/default.latex b/default.latex index 635c278d7..f9b89b471 100644 --- a/default.latex +++ b/default.latex @@ -25,11 +25,9 @@ $if(mathspec)$ \ifxetex \usepackage{mathspec} \else - \usepackage{fontspec} \usepackage{unicode-math} \fi $else$ - \usepackage{fontspec} \usepackage{unicode-math} $endif$ \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase} -- cgit v1.2.3 From b2aa9f0d0e9167d51dd7b814432faaed84b7c693 Mon Sep 17 00:00:00 2001 From: Vaclav Haisman Date: Sat, 28 Jan 2017 16:32:07 +0100 Subject: LaTeX: Add missing $endif$ after rebase. --- default.latex | 1 + 1 file changed, 1 insertion(+) diff --git a/default.latex b/default.latex index f9b89b471..030ab90f1 100644 --- a/default.latex +++ b/default.latex @@ -56,6 +56,7 @@ $if(mathspec)$ $else$ \setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} $endif$ +$endif$ $if(CJKmainfont)$ \usepackage{xeCJK} \setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$} -- cgit v1.2.3