LaTeX forum ⇒ XeTeXHow to get text-mode \checkmark in xelatex or lualatex?

Information and discussion about XeTeX, an alternative for pdfTeX based on e-Tex
Posts: 81
Joined: Wed Apr 17, 2019 12:51 pm

How to get text-mode \checkmark in xelatex or lualatex?

Postby user49915 » Wed May 13, 2020 2:47 pm

Feeding the code

%\usepackage{amssymb}%%% Useless here.
\setmainfont[Ligatures=TeX]{TeX Gyre Termes}%%% we need Times or a Times clone.
\setsansfont{TeX Gyre Heros}[Scale=0.88]%%% Somewhat ok.
\setmonofont{TeX Gyre Cursor}%%% No explicit turning on ligatures for the monospaced font.
\setmathfont[Ligatures=TeX]{TeX Gyre Termes Math}
\usepackage{amsmath}%%% or mathtools, no difference
%\usepackage{amssymb}%%% Won't compile if placed here.
Text: \checkmark. Math: \(\checkmark\).

to xelatex or lualatex results in

mwe.jpg (20.35 KiB) Viewed 5284 times

As you see, the text-mode \checkmark is not displayed, probably because TeX Gyre Termes doesn't have ✓ (U+2713). With pdflatex, we would have included amssymb to get the symbol ✓ when writing \checkmark. However, with xelatex/lualatex, using amssymb doesn't lead anywhere to the best of my attempts so far.

So, what do we do with xelatex/lualatex? I checked ... upport.htm, but I have no idea which fonts are Times clones and would visibly jive properly with TeX Gyre Termes. Moreover, even if we knew a suitable font, how do we redefine \checkmark such that it uses another font in text mode while leaving the font used in math mode as it is?

Recommended reading 2021: •
LaTeX Beginner's Guide LaTeX Cookbook

Return to “XeTeX”

Who is online

Users browsing this forum: No registered users and 1 guest