mikemahoney218 / quarto-arxiv

Quarto template for arXiv preprints
https://mike.quarto.pub/quarto-arxiv-template/template.pdf
MIT License
91 stars 4 forks source link

math bold letters are not bolded in the arxiv-pdf #5

Closed huizezhang-sherry closed 1 year ago

huizezhang-sherry commented 1 year ago

Thanks for the arxiv template! I'm trying to use Math bold letters in the template qmd with the following:

This is what rendered by \mathbf{v}: $\mathbf{v}$

but the v is not bolded in the rendered pdf:

Screen Shot 2022-11-21 at 2 28 11 pm

Maybe I'm missing something obvious here!

mikemahoney218 commented 1 year ago

Hmm, not 100% sure what's going on here. That said, any chance the \symbf{} command works?

image

Based off a thread in the Pandoc discussion group, if you like the output from \symbf then I think that's the ideal way to do this -- I think (but am not sure) that \mathbf has challenges with certain latex rendering engines.

mikemahoney218 commented 1 year ago

(Also: hi Sherry! Not sure if you remember, but I believe we spoke in the same timeslot at useR 2021 -- hope you're well :smile: )

mikemahoney218 commented 1 year ago

One last note: I think (based off this StackExchange: https://tex.stackexchange.com/a/38631 ) that the core issue comes from the unicode-math package, which is attached by the default Pandoc template: https://github.com/jgm/pandoc/blob/4b4771f062a227153109d0ba2f9d125c82f411a8/data/templates/default.latex#L94-L102

huizezhang-sherry commented 1 year ago

\symbf{} is good enough for me at this stage.

I reckon one issue with \mathbf{} is that Latin Modern Math doesn't have a bold typeface.

And yes! I remember you and I think we both speak at useR 2022 as well!

mikemahoney218 commented 1 year ago

Ah, that's it! In version 0.2.1 (which I'm about to release), \mathbf now works as expected:

image

Thanks for pointing out the missing bold typeface -- wouldn't have caught that.

Doktorandahl commented 5 months ago

Hi Mike, Thanks so much for this quarto template, it's really great and easy to use!

I'm still having problem with boldface math letters though, specifically greek letters. I've tried a wide range of combinations of options with \mathbf{\beta}, \symbf{\beta}, adding the bm package to the prelude and \bm{\beta} etc, but can't seem to find a solution. Any suggestions?

mikemahoney218 commented 5 months ago

@Doktorandahl -- have you tried using pmb? I also seem to get a (subtly) bolded output from \symbf:

image

Doktorandahl commented 1 month ago

Thanks Mike, \pmb{} worked