# Tag Info

11

(I updated this answer significantly after learning that modifying \everydisplay can cause serious problems with various display math style environments.) Setting the Color=... option while loading a math font appears to override anything that \textcolor is supposed to do. Instead of setting a Color option at the \setmathfont stage, you may achieve your ...

8

One way to accomplish this is to insert the symbol as text: \documentclass[11pt]{article} \usepackage[svgnames]{xcolor} \usepackage{amsmath,amsthm,verbatim} \usepackage{unicode-math} \pagestyle{empty} % Suppress page numbers in this MWE. \setmainfont{STIX Two Text} \setmathfont[slash-delimiter=frac,Color=Navy]{STIX Two Math} \begin{document} \begin{gather*...

8

The command \Question is defined to represent the double question mark character, along with a whole bunch of other unicode character mapping definitions ("mathtable"), done at begin document. You should choose a non-clashing environment name. I agree it is annoying that \Question isn't defined immediately by unicode-math, so it would be detected by the \...

7

This seems to be a bug (or a missing feature) in XeTeX. The macro \not does a few checks and if a suitable name derived from the following token does not exist (it should be a Unicode defined negated symbol), it uses \notaccent. See https://github.com/wspr/unicode-math/issues/363 This command should overlay the accent on the symbol, but it doesn't in XeTeX....

7


4

The current implementation of \not does essentially the same in pdflatex as in (Xe|Lua)LaTeX with unicode-math. More precisely, \not takes the next token, say \foo and first checks whether \notfoo is defined; if the test succeeds, \notfoo is used. Otherwise the next check is whether \nfoo is defined. Again, if this test succeeds, \nfoo is used. Otherwise ...

4

You used a latin o not an omicron (\omicron) which is particularly noticeable here as it means you get the dejavu math character not latin modern. \omicron is defined in unicode-math. It did not exist in classic TeX, which was limited to 127-character 7-bit encoding, so omitted definitions for anything that looked the same in both Latin and Greek.

4

The amscd package performs \mathcode@="8000 in order to make @ math active. It also executes \CDat when starting a CD environment, where \CDat is defined by \gdef\CDat{\let @=\Iat} in a context where @ is active. It's not important to know what \Iat is, just that it is essential that @ is math active and has the meaning \Iat during processing of the ...

4

\documentclass{article} \usepackage{siunitx} \usepackage[mathrm=sym]{unicode-math} \begin{document} \num{\pi/3} \end{document}

4

The classic TeX double struck font you show in the first code block is not derived from Computer Modern at all it is the AMS symbol font msbm10 (and the first two rows are set in Computer Modern, not Latin Modern) The second block is using a consistent font for all three rows, Latin Modern Math Opentype. There are other Computer Modern inspired OpenType Math ...

4

You found a solution for legacy fonts that isn’t compatible with unicode-math. Since Unicode maps \mathcal and \mathscr to the same characters, you can only set them to different alphabets if you load a new font with the range= option of \setmathfont. For example, this uses New Computer Modern Book for everything but \mathscr and \mathbfscr, which it takes ...

4

By default unicode-math does not assign a mathematical definition or ƛ, but yu can give it a mathcode yourself: You have to decide which class, family and codepoint it should have. Since our font is Unicode encoded, the codepoint is 0x019B. Since ƛ behaves like a greek letter, we can treat is similar to other greek letters and assign it class 7 (variable ...

4

This may not solve your problem, but I can offer some background on the Unicode assignment. While recognizing that some people may wish to create texts using script or fraktur styles, the Unicode committee specifically stated that alternate fonts should be used for that purpose. This is not possible for such letters used in math, as illustrated in Unicode ...

3

You would really want to change the font inside a group, so the font change doesn’t bleed through to the text after it. So, \newcommand{\xmark}{{\xmarkfont\char"2718}} You would define \xmarkfont as you did in your MWE, to a font that has it, probably scaled with Scale=MatchUppercase. In math mode with unicode-math, you can set the font for a specific ...

3

Some comments and observations: It's a good idea to load math font packages such as amssymb, dsfont, mathrsfs and wasysym before loading unicode-math. For sure, if you follow this piece of advice, the ! LaTeX Error: Command \eth' already defined. error messages will cease. The unicode-math package works under both XeLaTeX and LuaLaTeX, and it loads ...

3

As wipet pointed out the placement depends on the height of the operator. You can see a similar effect (but much less pronounced) also with classical tex if you use large enough letters: \documentclass{article} \usepackage{amsmath} \usepackage{tikz} \def\sin{\qopname\relax o{SIN}} \begin{document} \[\tikz[overlay]\draw[red](0,4.4pt)--++(5,0); \sin^{2}...

3

I experimented with LuaTeX, no XeTeX, but the problems are similar. There are many position parameters read from Unicode math font. They are listed at pages 104--108 of LuaTeX manual. Main rules of vertical position of the exponent are controlled by two parameters: \Umathsupshiftup minimal shifting up. (10pt typesetting, Latin Modern math, displaystyle, ...

3

The error you’re getting is completely unrelated to the Greek language. It’s a font issue. The default math font, Latin Modern Math, does not have a \setminus symbol. The default behavior of TeX is to silently log a warning message to the .log file. You can at least get it to print a warning message by adding the command \tracinglostchars=2. You should ...

3

Short version In LuaLaTex, the HarfBuzz renderer is not and probably will not be supported for math fonts. Just use theBase mode instead. Long version As documented in the page you link in your question: HarfBuzz itself does not implement a math layout solution. The functions and types provided can be used by client programs to access the font data ...

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