From fc8208e8bc5e9be95dea38e230f88cb2c803c9b9 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 6 Feb 2017 10:50:36 +0100 Subject: [PATCH] Use unicode-math by default in default.latex template. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mathspec will be used in xelatex if the `mathspec` variable is set; otherwise unicode-math will be used. Thanks to Václav Haisman. --- MANUAL.txt | 29 ++++++++++++++++------------- data/templates | 2 +- test/lhs-test.latex | 6 +----- test/lhs-test.latex+lhs | 6 +----- test/writer.latex | 6 +----- test/writers-lang-and-dir.latex | 6 +----- 6 files changed, 21 insertions(+), 34 deletions(-) diff --git a/MANUAL.txt b/MANUAL.txt index 3d5555a92..0762c3814 100644 --- a/MANUAL.txt +++ b/MANUAL.txt @@ -182,21 +182,23 @@ By default, pandoc will use LaTeX to convert it to PDF: Production of a PDF requires that a LaTeX engine be installed (see `--latex-engine`, below), and assumes that the following LaTeX packages -are available: [`amsfonts`], [`amsmath`], [`lm`], +are available: [`amsfonts`], [`amsmath`], [`lm`], [`unicode-math`], [`ifxetex`], [`ifluatex`], [`eurosym`], [`listings`] (if the `--listings` option is used), [`fancyvrb`], [`longtable`], -[`booktabs`], [`graphicx`] and [`grffile`] (if the -document contains images), [`hyperref`], [`ulem`], -[`geometry`] (with the `geometry` variable set), [`setspace`] (with -`linestretch`), and [`babel`] (with `lang`). The use of `xelatex` or -`lualatex` as the LaTeX engine requires [`fontspec`]; `xelatex` uses -[`mathspec`], [`polyglossia`] (with `lang`), [`xecjk`], and -[`bidi`] (with the `dir` variable set). The [`upquote`] and -[`microtype`] packages are used if available, and [`csquotes`] will -be used for [smart punctuation] if added to the template or included in -any header file. The [`natbib`], [`biblatex`], [`bibtex`], and [`biber`] -packages can optionally be used for [citation rendering]. These are -included with all recent versions of [TeX Live]. +[`booktabs`], [`graphicx`] and [`grffile`] (if the document +contains images), [`hyperref`], [`ulem`], [`geometry`] (with the +`geometry` variable set), [`setspace`] (with `linestretch`), and +[`babel`] (with `lang`). The use of `xelatex` or `lualatex` as +the LaTeX engine requires [`fontspec`]. `xelatex` uses +[`polyglossia`] (with `lang`), [`xecjk`], and [`bidi`] (with the +`dir` variable set). If the `mathspec` variable is set, +`xelatex` will use [`mathspec`] instead of [`unicode-math`]. +The [`upquote`] and [`microtype`] packages are used if +available, and [`csquotes`] will be used for [smart punctuation] +if added to the template or included in any header file. The +[`natbib`], [`biblatex`], [`bibtex`], and [`biber`] packages can +optionally be used for [citation rendering]. These are included +with all recent versions of [TeX Live]. Alternatively, pandoc can use ConTeXt or `wkhtmltopdf` to create a PDF. To do this, specify an output file with a `.pdf` extension, @@ -228,6 +230,7 @@ will affect the output, as will `--css`. [`babel`]: https://ctan.org/pkg/babel [`bidi`]: https://ctan.org/pkg/bidi [`mathspec`]: https://ctan.org/pkg/mathspec +[`unicode-math`]: https://ctan.org/pkg/unicode-math [`polyglossia`]: https://ctan.org/pkg/polyglossia [`fontspec`]: https://ctan.org/pkg/fontspec [`upquote`]: https://ctan.org/pkg/upquote diff --git a/data/templates b/data/templates index ab6b3f060..1ae92a53c 160000 --- a/data/templates +++ b/data/templates @@ -1 +1 @@ -Subproject commit ab6b3f060dd1559381dcba05aca1669f4cbe8e0e +Subproject commit 1ae92a53c0bf0739a7875542d6895d28cd1e8774 diff --git a/test/lhs-test.latex b/test/lhs-test.latex index d1ad9db69..bc02b6ae5 100644 --- a/test/lhs-test.latex +++ b/test/lhs-test.latex @@ -7,11 +7,7 @@ \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \else % if luatex or xelatex - \ifxetex - \usepackage{mathspec} - \else - \usepackage{fontspec} - \fi + \usepackage{unicode-math} \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase} \fi % use upquote if available, for straight quotes in verbatim environments diff --git a/test/lhs-test.latex+lhs b/test/lhs-test.latex+lhs index c781e79b3..64271b415 100644 --- a/test/lhs-test.latex+lhs +++ b/test/lhs-test.latex+lhs @@ -7,11 +7,7 @@ \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \else % if luatex or xelatex - \ifxetex - \usepackage{mathspec} - \else - \usepackage{fontspec} - \fi + \usepackage{unicode-math} \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase} \fi % use upquote if available, for straight quotes in verbatim environments diff --git a/test/writer.latex b/test/writer.latex index 5cf39c9c3..8f834df8f 100644 --- a/test/writer.latex +++ b/test/writer.latex @@ -7,11 +7,7 @@ \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \else % if luatex or xelatex - \ifxetex - \usepackage{mathspec} - \else - \usepackage{fontspec} - \fi + \usepackage{unicode-math} \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase} \fi % use upquote if available, for straight quotes in verbatim environments diff --git a/test/writers-lang-and-dir.latex b/test/writers-lang-and-dir.latex index f79984feb..1c705399b 100644 --- a/test/writers-lang-and-dir.latex +++ b/test/writers-lang-and-dir.latex @@ -7,11 +7,7 @@ \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \else % if luatex or xelatex - \ifxetex - \usepackage{mathspec} - \else - \usepackage{fontspec} - \fi + \usepackage{unicode-math} \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase} \fi % use upquote if available, for straight quotes in verbatim environments