# 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 \color{red} instruction saves something to be executed at the end of the current group. If there is no blank line after the display, this has no apparent side effect. But if there is a blank line, the saved tokens make a “rest of paragraph” before the implicit \par instruction is executed. So you get an empty line. Solution: use \textcolor or wrap the ...

6

You can obtain these symbols very simply with Mnsymbol and the stackinset command from stackengine: \documentclass[12pt]{article}%, border=2pt]{standalone} \usepackage{MnSymbol} \usepackage{sansmath} \usepackage{stackengine, amsfonts} % \newcommand{\leftharpoontriangle}{\mathord{\stackMath\stackinset{c}{0pt}{c}{-0.3ex}{\scriptstyle\leftharpoonup}{\...

5

Colors are implemented as switchers-specials (pdfliterals/colorstacks) inserted to the output. This is independent off the TeX grouping mechanism, but users expect that colors will work dependent on TeX grouping mechanism. So, macros use the TeX primitive \aftergroup whenever the color is changed by user in a group in order to restore the previous color ...

5

I'm afraid that the Color option to the font overrides any color specification, because it's applied later. You can define a noncolored font for a different math version and specify it. I added an optional argument to help in case the symbol is not an ordinary one. \documentclass[11pt]{article} \usepackage{xcolor} \usepackage{amsmath} \usepackage{fontspec} \...

4

No, tex adds no extra kerning the wider sidebearings are in the font itself so by design the math italic font can not be used for multi-letter words. That is you can not reasonably do this in TeX, it would of course be possible to (in theory) to make a virtual (or real) font that took the glyphs from a math font and adjusted the metrics to give something ...

2

In unicode-math the upright and italic math alphabets have different Unicode codepoints, and also different macro names. By default, $x$ gives you 𝑥 (U+1D465), which is \mitx, and likewise for \mity and \mitz, as you can look up here. You can use the commands \mitx, \symit{x} or \mathnormal{x} within the body of the document. If you want \mathit to also ...

2

From the chat we can see that the OP had an error in their code. One should never ignore errors in LaTeX In most LaTeX editors LaTeX runs in a mode where it always finish. In this case if there is an error then LaTeX will attempt to make a good guess and move on. These guesses are of course not always right. In the end one can therefore end up with a PDF ...

1

Your options include: Load fontspec This redefines \mathit to represent italicized words in math mode. This is technically not the exact same font as your OML-encoded math letters, but by default the glyphs look identical. Specifically, you get the ItalicFont of the \setmathrm font, which is by default the same as \setmainfont. So long as you set matching ...

1

Use \limits: $\sum\limits_{j=1}^{j=10}2^j$.

1

TeX is able to read more human-readable sources where are less irrelevant braces {}. This may be usable for such complicated equations: \mathchardef\plus=\mathcode+ \catcode+=13 \def+{\penalty0\plus} \catcode+=12 \mathcode+="8000 \mathchardef\minus=\mathcode- \catcode-=13 \def-{\penalty0\minus} \catcode-=12 \mathcode-="8000 \def\sppp#1{\...

1

What you have here is an XY problem. What you really want is not “Bold pzc for mathmode,” but a bold mathematical script alphabet. There are several packages that provide them, but the best are the \symbfcal and \symbfscr alphabets of unicode-math, and the \mathbcal and \mathbscr alphabets of mathalpha. Both provide a comprehensive selection, font samples,...

1

I want to add another solution, because a negative \delimtershortfall can look a bit unpleasant. What I do is declaring a parenthis-function that uses \vphantom with \raisebox to add extra height to the outer delimiter. The solution is not pretty: I use \mathop because else \vphantom does not work and then add negative space to counter the extra space that \...

1

What I do is declaring a parenthis-function that uses \vphantom with \raisebox to add extra height to the outer delimiter. The solution is not pretty: I use \mathop because else \vphantom does not work and then add negative space to counter the extra space that \mathop adds. Also inside \raisebox you need to use  to get into mathmode and \displaystyle ...

1

Just came across your question. Maybe too late, but better later than never. I think https://www.overleaf.com meets your criteria.

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