# Tag Info

15

Here is one reason one (at least I) would try to avoid TeX Gyre Termes Math and the OpenType version of STIX for now: \documentclass{scrartcl} \usepackage{unicode-math} \setmathfont{TeX Gyre Termes Math} \begin{document} $x(t)=\int_{-B}^B X(f)e^{j2\pi ft} df$ \end{document} Termes Math: \setmathfont{TeX Gyre Termes Math} Integral sign too small, ...

10

The affected characters seem to be D, X and Y. It's a bug in the font, as it happens both with LuaTeX and XeLaTeX, but not with other math fonts. \documentclass{article} \usepackage{unicode-math} \setmainfont{TeX Gyre Pagella} \setmathfont{TeX Gyre Pagella Math} %\setmathfont{Asana Math} \begin{document} How to centre the dot over the character? $\dot{\... 9 I haven't done with the svmono but I just had to tweak another publisher class to use lualatex and so after a quick look at svmono I would say I would prefer lualatex over xelatex due to the microtype capabilities and better graphic (pgf) support (and it is now faster than last year due to changes in expl3 and in the font loader). I would expect 2-4 hours ... 8 Simply adjust the DisplayOperatorMinHeight font parameter. That also indicates that the font is broken. \documentclass{article} \usepackage{unicode-math} \setmathfont{TeX Gyre Pagella Math} \everydisplay{\Umathoperatorsize\displaystyle=5ex} \begin{document} $\int_\gamma\frac{f(x)}{z-a}$ \end{document} 8 The glyph corresponding to U+2605 is not available in TeX Gyre Termes (text and math). You can use the glyph from another font: \documentclass{article} \usepackage[math-style=ISO]{unicode-math} \setmainfont[Numbers=OldStyle, Ligatures=TeX]{TeX Gyre Termes} \setmathfont[Numbers=Lining]{TeX Gyre Termes Math} \setmathfont[range=\bigstar]{XITS Math} \... 6 XeLaTeX and LuaLaTeX use a completely different paradigm for fonts, because everything is available in a single output encoding, namely TU. Thus substitutefont does nothing sensible here. You could use \babelfont as suggested in the other answer, but you will get several spurious warnings: support for fonts in babel is still in development. With ... 5 Load amssymb in advance of unicode-math. \documentclass{article} \usepackage{amsmath,amssymb} \usepackage{fontspec} \usepackage{unicode-math} \setmainfont{TeX Gyre Termes} \setmathfont{TeX Gyre Termes Math} \begin{document}$x=2 + \square + \Diamond$\end{document} Alternatively, use symbols available in the font: \documentclass{article} \usepackage{... 5 If you are using XeTeX or LuaTex you should use other ways of switching fonts. One nice way is offered by babel with its \babelfont command: \documentclass{article} \usepackage[russian,main=english]{babel} \usepackage{amsmath} % load here to avoid \dddot clash \babelfont{rm}[Ligatures=TeX]{TeX Gyre Pagella} \babelfont[russian]{rm}[Ligatures=TeX]{PT Serif} \... 5 \Uhextensible seems to work: \documentclass{article} \usepackage{unicode-math} \setmathfont{TeX Gyre Pagella Math} \begin{document} $\int _\gamma\frac{f(x)}{z-a}$ $\Uhextensible width 2ex "0 "00222B_\gamma\frac{f(x)}{z-a}$ \end{document} But I have no idea why and which width is sensible. After a bit digging in the context code I found also an (... 5 with xelatex you get but with lualatex you get from \documentclass{article} \usepackage{unicode-math} \setmathfont{TeX Gyre Pagella Math} \setmathfont{TeX Gyre Pagella Math}[range=\int,Scale=2] \begin{document} $\int_\gamma\frac{f(x)}{z-a}$ \end{document} I'm not sure if the difference is in unicode-math or the underlying luatex math rendering, the ... 5 Two possible workarounds: load the dcolumn package use polyglossia instead of babel For various reasons, babel-italian started to mess with commas in order to emulate the behavior of icomma. There is apparently no way to disable this without loading dcolumn, that avoids the mess to even start. Also issuing \AtBeginDocument{\NoIntelligentComma} doesn't ... 4 The Greek lowercase letter chosen for TeX Gyre Schola Math are, in my opinion, not matching the main font: they are too thin and, of course, some of them are too tall. You have some strategies available. First, scaling down all the Greek lowercase letters: \documentclass[12pt]{article} \usepackage{fontspec} \usepackage{unicode-math} \setmainfont{TeX Gyre ... 4 You're doing things more complicated than they should be. The package titlesec shouldn't be used with KOMA-Script classes and sectsty is not to be used along with titlesec (nor with KOMA-Script classes). If you want to change the appearance of the chapter header font, just do \setkomafont{chapter}{<font specifications>} In order that TeX Gyre Heros ... 3 \newcommand\degree{\text{\textdegree}} provides universal (text/math) \degree. Needs \usepackage{amsmath}. 3 You want, I think, \symbf. However, I can't get this to work correctly with Asana Math, even when I load it by filename as XeLaTeX wants. Here's what it looks like with Latin Modern Math for comparison purposes: \documentclass{article} \usepackage{amsmath} \usepackage{unicode-math} \usepackage{parskip} \defaultfontfeatures{Scale=MatchLowercase} \... 3 classically ! is mathclose but unicode math sets it as mathpunct which makes two adjacent ones have \thinmuskip between them. You can use {!}{!} to avoid that. Unicode has a !! character which unicode-math makes available as \Exclam but unfortunately it's not in this font, the log shows Missing character: There is no ‼ (U+203C) in font TeXGyreTermesMath:... 3 Care needs to be taken when identifying the source/cause of the difference in output. For sure, \documentclass{standalone} \begin{document}$v_{\mathrm{eff}}$\end{document} can be compiled with both pdfLaTeX and LuaLaTeX. Importantly, it produces identical results with respect of the relative position of the subscript term, irrespective of whether ... 3 I've now solved the problem with adding auto-pst-pdf to the code \documentclass{article} \usepackage{auto-pst-pdf} \usepackage{fontenc,unicode-math} \setmainfont[Ligatures=TeX]{TeX Gyre Pagella} \setmathfont[Ligatures=TeX]{TeX Gyre Pagella Math} \begin{document} Test in Pagella $\sum_{k=1}^n k=\frac{n(n+1)}{2}$ \end{document} And compiling it with ... 2 Eventually I was able to find the reason with the great help of the comments to my question. For those observing similar problems, I post an answer here. The missing \partial comes from reassigning unicode ranges to different fonts. Don't do it unless you know what the side effects are. I didn't and therefore another problem was hidden by this wrong ... 2 I have downloaded the template for SVMono from the link you provided in the question. Looking through the class file it doesn't look like anything needs special adaption for XeLaTeX. Only the main template file book.tex has to be adjusted. Fonts The following lines load fonts which won't work with Xe/LuaLaTeX. \usepackage{type1cm} \usepackage{newtxtext} ... 2 The effect is also visible with standard LaTeX and mathpazo. You can “fix” this by enlarging the leading, which is something I learn always to do when the text font is Palatino. \documentclass[a4paper, 12pt]{scrartcl} \usepackage{unicode-math} \setmainfont{TeX Gyre Pagella} \setmathfont{TeX Gyre Pagella Math} \setmathfont[range=\sqrt]{Asana Math} % better ... 2 Note that the TeX Gyre Termes math fonts, which are OpenType, are only available for Xe(La)TeX or Lua(La)TeX (yet?). You have to switch to one of these engines if you want to use them. \documentclass[12pt]{article} \usepackage{unicode-math} \setmainfont{TeX Gyre Termes} \setmathfont{TeX Gyre Termes Math} \begin{document} The$\pi$number. \end{document} 2 You don't need to load tgtermes separately, I don't think, as newtxtext uses those fonts anyway. But you do need to tell newtxmath that you want upright Greek: \documentclass[a4paper,12pt]{article} \usepackage{newtxtext} \usepackage[uprightGreek]{newtxmath} \pagestyle{empty} \begin{document} This is text:$\inty$,$\pi$. $\int y \pi$ \end{document} ... 2 Another way of installing fonts on macOS is through homebrew. Open a terminal and execute: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" then call: brew cask install font-tex-gyre-pagella font-tex-gyre-pagella-math et voilà, the fonts are on your system. Anyway. As a rule of thumb: If you are using ...

2

If you select the font by file name rather than font name you won't run into the problem. On the other hand, it's certainly nice to use the font name so you can create a symbolic link of /Library/TeX/Root/texmf-dist/fonts/opentype in ~/Library/Fonts; e.g. ln -s /Library/TeX/Root/texmf-dist/fonts/opentype ~/Library/Fonts/TeXOTFFonts (all on one line of course)...

2

One side note: on many systems, Cambria Math will be in the file cambria_01.ttf or cambria.ttc. Therefore, the only portable way to select it is by its display name. That’s not the cause of your error, but it’s something I needed to change to get your MWE to compile. It’s a bug in unicode-math that range=\backtick and range="2035 don’t work. As of August ...

1

If you find a font where you like the y glyph, then you can setup the math font in your document to use this secondary font for this single character only. Note that this usually does not produce good results, because it is generally quite visible that the character is from a different font. The substitution can be done using the range option for \...

1

You can use the unicode characters directly, i.e., ♢ and □ (code points U+2662 and U+25A1), by typing them in your document or by defining a \newcommand (for using the symbols in isolation) or \DeclareMathOperator (for using them as, well, math operators). See for example http://www.gust.org.pl/projects/e-foundry/tg-math/gust_e-foundry-math_fonts-...

1

A package like siunitx gives also access to the universal degree symbol, in math mode as well as in text mode. Note that you have to use XeLaTeX or LuaLaTeX if you want to use the TeX Gyre Pagella math fonts: they are only available in the OpenType format. \documentclass{article} \usepackage{siunitx} \usepackage{unicode-math} \setmainfont{TeX Gyre ...

Only top voted, non community-wiki answers of a minimum length are eligible