2

I have a problem with misaligned \tilde accents in bold math using the newtxmath with the libertine option. It seems that the \tilde accent is slightly left-aligned when using \bm (compared to when not using \bm). The following code and image demonstrate this. Is there an easy way to re-align the accent when using \bm in my setting?

By the way, I am using TeX Live 2019 on mac.

\documentclass[11pt]{article}
\usepackage{libertine}
\RequirePackage[libertine]{newtxmath}
\usepackage{bm}
\begin{document}
$\tilde{\bm{g}}$ $\tilde{g}$
\end{document}

enter image description here

2
  • 1
    Is there a reason for not updating your system's TeX distribution to MacTeX2021?
    – Mico
    Commented Sep 27, 2021 at 5:33
  • Updating it now to see what I get... still downloading. In any case, the left-alignment seems also present in Nasser's output (although less than in my case), and he is using TeXLive 2021. Commented Sep 27, 2021 at 6:02

1 Answer 1

2

Using pdflatex with latest TeXLive 2021 on Linux, I see no problem

>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.

Here is the PDF output

enter image description here

Using lualatex gives warning

(/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.

)

and it gives this in PDF

enter image description here

I do not know which compiler or tex distribution you used since you did not mention it.

Update

Thanks to comment by Mico, Loading bm before gives this output

\documentclass[11pt]{article}
\usepackage{bm} %moved this here
\usepackage{libertine}
\RequirePackage[libertine]{newtxmath}

\begin{document}
$\tilde{\bm{g}}$ $\tilde{g}$
\end{document}

enter image description here

5
  • Thanks! I am using Tex Live 2019 on Mac. By the way, the tilde in your first example is still slightly left-aligned when using \bm, albeit less visibly than in my case. Is there a way to fix this? Commented Sep 27, 2021 at 4:44
  • 1
    Is there a way to fix this? since you are using 2019 TexLive, I would suggest to first update your TL to current one and try with that. This looks like something that was corrected since.
    – Nasser
    Commented Sep 27, 2021 at 4:45
  • @user6952886 you can also try $\bm{\tilde{g}}$ instead. It seems this makes the tilde move a little to the right. i.e. move tilde inside the \bm
    – Nasser
    Commented Sep 27, 2021 at 4:56
  • 2
    @Nasser - You might load bm before, rather than after, newtxmath.
    – Mico
    Commented Sep 27, 2021 at 5:40
  • Updating to TexLive 2021 made the left alignment less visible (as in your output). Thanks! Commented Sep 27, 2021 at 6:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .