3

I have recently switched from pdfLaTeX to LuaLaTeX in order to use the Tex Gyre fonts with math support. I have fixed several things which did not look right (to me) after switching. However, one issue still remains unsolved: the faktor package does not seem to be working properly anymore. Does anyone have a fix/workaround for this? I really enjoyed this package for centered math. Here is a MWE:

\documentclass[a4paper, 11pt]{article} \usepackage{faktor} \usepackage{amssymb} \begin{document} \(\faktor{A}{B}\) \end{document} 

This is without using the Tex Gyre fonts and produces the expected output.

\documentclass[a4paper, 11pt]{article} \usepackage{faktor} \usepackage{unicode-math} \setmainfont{TeX Gyre Termes} \setmathfont{TeX Gyre Termes Math} \begin{document} \(\faktor{A}{B}\) \end{document} 

This is with using the TeX Gyre Termes font and produces a weird output.

1 Answer 1

5

The log-file tells you that the font is missing the diagup-char:

Missing character: There is no ⟋ (U+27CB) in font "name:TeX Gyre Termes Math 

So you either have to use another math font or import this symbol from another one. E.g.

\documentclass[a4paper, 11pt]{article} \usepackage{faktor} \usepackage{unicode-math} \setmainfont{TeX Gyre Termes} \setmathfont{TeX Gyre Termes Math} \setmathfont[range="27CB]{XITS Math} \setmathfont[range=\int]{TeX Gyre Termes Math} \begin{document} \(\faktor{A}{B}\) \end{document} 

screenshot of output

5
  • Is the line with \int some leftover from testing? Commented Mar 2 at 14:49
  • 1
    @mickep no, it should ensure that all math constants are from the main font. Commented Mar 2 at 16:28
  • Oh, kind of a trick! Commented Mar 2 at 16:32
  • This is perfect, thank you! Do you mind further explaining the line mentioned by mickep? I have read a bit through the unicode-math documentation and to my understanding this line just ensures that the unicode glyph for the integral symbol is taken from the TeX Gyre Termes font (which it already is). I've left it out in my code and it did not seem to significantly change anything (although line spacing looks a bit different now). Commented Mar 2 at 18:45
  • see tex.stackexchange.com/a/386937/2388 Commented Mar 2 at 19:13

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.