# Is math style's order effecting output?

In texdoc unicode-math sec 5.2, it says

Note that bold-style is independent of math-style, although if the former is not specified then matching defaults are chosen based on the latter.

It means bold-style and math-style's order doesn't decide output. However I did tests below. Here is the main .tex file:

\documentclass{article}
\usepackage{unicode-math}
\unimathsetup{math-style=TeX, bold-style=ISO}
\begin{document}
$\symbf{a}$
\end{document}


It gives an italic bold "a". When I put bold-style before math-style:

\documentclass{article}
\usepackage{unicode-math}
\unimathsetup{bold-style=ISO, math-style=TeX}
\begin{document}
$\symbf{a}$
\end{document}


It gives an upright bold "a". It makes me confused. Could anyone explain why it behaved like this?

• well I would say that your interpretation is wrong, and that order matters. (keys are normally processed from left to right, so for dependant keys order matters.) Feb 1, 2021 at 9:56
• @UlrikeFischer but if I use bold-style=ISO first, it still doesn't give a ISO style bold letter, or, you means that math-style=TeX covers bold-style=ISO? Feb 1, 2021 at 10:11

## 1 Answer

The passage you quote has not the meaning you claim. It means rather that if bold-style is not specified, then math-style chooses something by default. In fact the code of unicode-math contains

\__um_keys_choices:nn {math-style}
{
{ISO} {
\unimathsetup { nabla=upright, partial=italic,
normal-style=ISO, bold-style=ISO, sans-style=italic }
}
{TeX} {
\unimathsetup { nabla=upright, partial=italic,
normal-style=TeX, bold-style=TeX, sans-style=upright }
}
{french} {
\unimathsetup { nabla=upright, partial=upright,
normal-style=french, bold-style=upright, sans-style=upright }
}
{upright} {
\unimathsetup { nabla=upright, partial=upright,
normal-style=upright, bold-style=upright, sans-style=upright }
}
{literal} {
\unimathsetup { colon=literal, nabla=literal, partial=literal,
normal-style=literal, bold-style=literal, sans-style=literal }
}
}


As options are processed in the order they are given in the code if you want a bold-style which so to say "collides" with math-style (i.e. does not correspond to the default), you must give math-style first.

• Thanks for your answer! It solved my problem. By the way, form the source code, I found I can use normal-style to set the "normal style", even texdoc unicode-math doesn't mention it. Feb 1, 2021 at 10:44