Closed amael-ls closed 1 month ago
Note that if you choose the mathastext
solution, then:Always load amsmath before mathastext (page 41 of the doc, Package version: 1.3zb 2023/12/29)
Ok, so actually nothing to do, just use the unicode-math command for boldface equations, symbf
:
---
title: "Test"
keep-tex: true
pdf-engine: lualatex
format:
html: default
pdf:
mathspec: true
include-in-header:
- text: |
\usepackage{unicode-math}
---
$$\symbf{F}^* = \symbf{I} + \begin{bmatrix} \lambda & 0 \\ 0 & \lambda \end{bmatrix}$$
And given that unicode-math
is loaded by default there is even no need to put it in the include-in-header, although I think it is always good practice to put what we need in case of the default changes!
So in short: Do not use \bm
from bm package, do not use \boldsymbol
, just use symbf
when using lualatex engine. It probably works too with xelatex.
Bug description
I already wrote this message in #4403 , but then noticed that it is closed. Therefore I open a new issue as it appears only when the pdf-engine is set to lualatex.
When using the code from @dragonstyle (in bug #4403) and adding
pdf-engine: lualatex
, then it fails again in my case. The code to reproduce is specified in the 'Steps to reproduce' field.When I do not specify the pdf-engine it works (see bug #4403). Unfortunately, I need lualatex... I checked and the intermediate tex files are the same whether
pdf-engine
is specified or not. As specified by @XiangyunHuang (in bug #4403),\usepackage{unicode-math}
is the problem., but it is still in use with lualatex. When I change in the intermediate tex file (see at the end for the whole file), lines 17 to 25by
then it works. Note that
mathfont
is actually working for both lualatex and xelatex. There is also the packagemathastext
, but compatibility with Unicode engines and OpenType fonts is partial.Is it possible to change that? Sorry for the double post, as said I did not see the issue #4403 was closed...
Here is the whole file (exactly the same whether
pdf-engine
is set to lualatex or not specified, i.e., xelatex by default):Steps to reproduce
Expected behavior
Mathematical symbols should be bold
Actual behavior
The
\boldsymbol
command is ignoredYour environment
OS: Mac OS Sonoma 14.2.1
Quarto check output