![libertine + newtxmath = 粗体数学中未对齐的重音符号](https://linux22.com/image/440004/libertine%20%2B%20newtxmath%20%3D%20%E7%B2%97%E4%BD%93%E6%95%B0%E5%AD%A6%E4%B8%AD%E6%9C%AA%E5%AF%B9%E9%BD%90%E7%9A%84%E9%87%8D%E9%9F%B3%E7%AC%A6%E5%8F%B7.png)
使用带有 libertine 选项的 newtxmath 时,我遇到了粗体数学中 \tilde 重音未对齐的问题。使用 \bm 时,\tilde 重音似乎略微左对齐(与不使用 \bm 时相比)。以下代码和图像演示了这一点。在我的设置中使用 \bm 时,有没有一种简单的方法可以重新对齐重音?
顺便说一句,我在 Mac 上使用 TeX Live 2019。
\documentclass[11pt]{article}
\usepackage{libertine}
\RequirePackage[libertine]{newtxmath}
\usepackage{bm}
\begin{document}
$\tilde{\bm{g}}$ $\tilde{g}$
\end{document}
答案1
在 Linux 上使用 pdflatex 和最新的 TeXLive 2021,我没有发现任何问题
>pdflatex foo.tex
This is pdfTeX, Version 3.141592653-2.6-1.40.23 (TeX Live 2021) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./foo.tex
LaTeX2e <2021-06-01> patch level 1
L3 programming layer <2021-08-27>
(/usr/local/texlive/2021/texmf-dist/tex/latex/base/article.cls
Document Class: article 2021/02/12 v1.4n Standard LaTeX document class
(/usr/local/texlive/2021/texmf-dist/tex/latex/base/size11.clo))
(/usr/local/texlive/2021/texmf-dist/tex/latex/libertine/libertine.sty
(/usr/local/texlive/2021/texmf-dist/tex/generic/iftex/ifxetex.sty
(/usr/local/texlive/2021/texmf-dist/tex/generic/iftex/iftex.sty))
(/usr/local/texlive/2021/texmf-dist/tex/generic/iftex/ifluatex.sty)
(/usr/local/texlive/2021/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/usr/local/texlive/2021/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/local/texlive/2021/texmf-dist/tex/generic/xkeyval/xkvutils.tex
(/usr/local/texlive/2021/texmf-dist/tex/generic/xkeyval/keyval.tex))))
(/usr/local/texlive/2021/texmf-dist/tex/latex/base/textcomp.sty)
(/usr/local/texlive/2021/texmf-dist/tex/latex/base/fontenc.sty)
(/usr/local/texlive/2021/texmf-dist/tex/latex/fontaxes/fontaxes.sty)
(/usr/local/texlive/2021/texmf-dist/tex/latex/libertine/LinLibertine_I.tex))
(/usr/local/texlive/2021/texmf-dist/tex/latex/newtx/newtxmath.sty
`newtxmath' v1.655, 2021/06/01 Math macros based originally on txfonts (msharpe
) (/usr/local/texlive/2021/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/local/texlive/2021/texmf-dist/tex/latex/amsmath/amstext.sty
(/usr/local/texlive/2021/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/usr/local/texlive/2021/texmf-dist/tex/latex/amsmath/amsbsy.sty)
(/usr/local/texlive/2021/texmf-dist/tex/latex/amsmath/amsopn.sty))
(/usr/local/texlive/2021/texmf-dist/tex/latex/base/ifthen.sty)
(/usr/local/texlive/2021/texmf-dist/tex/latex/etoolbox/etoolbox.sty)
(/usr/local/texlive/2021/texmf-dist/tex/latex/oberdiek/centernot.sty)
(/usr/local/texlive/2021/texmf-dist/tex/generic/kastrup/binhex.tex))
(/usr/local/texlive/2021/texmf-dist/tex/latex/tools/bm.sty)
(/usr/local/texlive/2021/texmf-dist/tex/latex/libertine/OT1LinuxLibertineT-TLF.
fd)
(/usr/local/texlive/2021/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def)
(./foo.aux) (/usr/local/texlive/2021/texmf-dist/tex/latex/newtx/omlnxlmi.fd)
(/usr/local/texlive/2021/texmf-dist/tex/latex/newtx/untxexa.fd)
(/usr/local/texlive/2021/texmf-dist/tex/latex/newtx/lmsntxsy.fd)
(/usr/local/texlive/2021/texmf-dist/tex/latex/newtx/lmxntxexx.fd)
(/usr/local/texlive/2021/texmf-dist/tex/latex/newtx/untxmia.fd)
(/usr/local/texlive/2021/texmf-dist/tex/latex/newtx/untxsym.fd)
(/usr/local/texlive/2021/texmf-dist/tex/latex/newtx/untxsyc.fd) [1{/usr/local/t
exlive/2021/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] (./foo.aux) ){/usr/l
ocal/texlive/2021/texmf-dist/fonts/enc/dvips/libertine/lbtn_oexx6f.enc}</usr/lo
cal/texlive/2021/texmf-dist/fonts/type1/public/newtx/LibertineMathBMI.pfb></usr
/local/texlive/2021/texmf-dist/fonts/type1/public/newtx/LibertineMathMI.pfb></u
sr/local/texlive/2021/texmf-dist/fonts/type1/public/libertine/LinLibertineT.pfb
>
Output written on foo.pdf (1 page, 82381 bytes).
Transcript written on foo.log.
以下是 PDF 输出
使用lualatex
给出警告
(/usr/local/texlive/2021/texmf-dist/tex/latex/newtx/lmxntxexx.fd)
LaTeX Font Warning: Font shape `OT1/LinLibertine(0)/m/n' undefined
(Font) using `OT1/cmr/m/n' instead on input line 7.
(/usr/local/texlive/2021/texmf-dist/tex/latex/newtx/untxmia.fd)
(/usr/local/texlive/2021/texmf-dist/tex/latex/newtx/untxsym.fd)
(/usr/local/texlive/2021/texmf-dist/tex/latex/newtx/untxsyc.fd)
LaTeX Font Warning: Font shape `OT1/LinLibertine(0)/sb/n' undefined
(Font) using `OT1/LinLibertine(0)/m/n' instead on input line 7.
[1{/usr/local/texlive/2021/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
(./foo.aux)
LaTeX Font Warning: Some font shapes were not available, defaults substituted.
)
它以 PDF 格式给出
由于您没有提及,所以我不知道您使用了哪个编译器或 tex 发行版。
更新
感谢 Mico 的评论,加载bm
之前给出此输出
\documentclass[11pt]{article}
\usepackage{bm} %moved this here
\usepackage{libertine}
\RequirePackage[libertine]{newtxmath}
\begin{document}
$\tilde{\bm{g}}$ $\tilde{g}$
\end{document}