0

I desire to have an upright partial. I wrote the following code.

\documentclass{article}

\usepackage{fontsetup}
\unimathsetup{partial=upright}
\usepackage{fontsetup}

\begin{document}
    \[\partial\]
\end{document}

The unicode-math documentation says that some package options affect how maths is initialised and changing an option such as math-style will not take effect until a new maths font is set up. So I have loaded the fontsetup package once again after the \unimath command to so that the maths fonts are loaded. But this doesn't work and I get an italic partial. Why is this happening and how do I rectify it? I would prefer not to manually load the unicode-math and all the fonts separately.

3
  • Loading a package twice will do nothing. Commented Jun 5, 2022 at 20:09
  • \PassOptionsToPackage{partial=upright}{unicode-math}\usepackage{fontsetup} (just once) should suffice. Commented Jun 6, 2022 at 3:54
  • @frabjous Ah, that works! Can you please add that as an answer so that I can accept it? Commented Jun 6, 2022 at 7:42

1 Answer 1

3

(Elaborating slightly on my comment to make it an "answer"…)

As @egreg pointed out in the comments, when packages are loaded more than once, they are not processed again.

In this particular use case, the \PassOptionsToPackage command comes in handy: you can use it so that when fontsetup loads unicode-math, it'll do so with the option(s) you pre-select.

So you can just use:

\PassOptionsToPackage{partial=upright}{unicode-math}
\usepackage{fontsetup}

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.