-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems with \renewcommand{\vec}[1]{\mathbf{#1}} #463
Comments
I looked further into it and I turned out that explicitly setting \setmathfont{Latin Modern Math} as the math font solves the issue as can be shown by the following two test cases. CaseC (not working)\documentclass{scrartcl}
\usepackage{fontspec}
\usepackage{unicode-math}
% \setmathfont{Latin Modern Math}
\renewcommand{\vec}[1]{\mathbf{#1}}
\begin{document}
$ \vec{a} $
\end{document} CaseD (working)\documentclass{scrartcl}
\usepackage{fontspec}
\usepackage{unicode-math}
\setmathfont{Latin Modern Math}
\renewcommand{\vec}[1]{\mathbf{#1}}
\begin{document}
$ \vec{a} $
\end{document} Attached files |
I forgot the mention that all files were compiled by LuaTeX-1.0.4. |
unicode-math waits until \begin{document} to setup the default font and the default definitions. So if you don't use \setmathfont, you should delay your redefinition. I would also recommend to use \symbf instead of \mathbf:
|
Thanks for the fast response. I couldn't find the information that the definitions were defined with the \begin{document} command so that really got me on the wrong foot, I have to admit. It still seems a bit odd to me, so perhaps you could mention it for future users in your manual. |
Description
I tried to redefine the vector definition with
\usepackage{unicode-math}
statement in the preamble but I could not get it working.Check/indicate
\setmainlanguage{german}
)A not working minimal example (CaseA.tex) demonstrating the issue
A working minimal example (CaseB.tex) demonstrating the issue
Further details
As the two files only differ in the import of the
unicode-math
I would suspect the error within theunicode-math
error.Also
newcommand
work as expected:Log and PDF files are attached below
CaseA.log
CaseA.pdf
CaseB.log
CaseB.pdf
The text was updated successfully, but these errors were encountered: