alshedivat / al-folio

A beautiful, simple, clean, and responsive Jekyll theme for academics
https://alshedivat.github.io/al-folio/
MIT License
10.55k stars 10.94k forks source link

Issue with LaTeX math mode from bibliography #357

Closed mbarbetti closed 2 years ago

mbarbetti commented 3 years ago

Acknowledge the following

Describe the bug MathJax partially fails in rendering LaTeX math mode of abstracts content in papers.bib. Issues identified:

To Reproduce Steps to reproduce the behavior:

  1. Go to _bibliography/papers.bib
  2. Add a new article like what follows
    @article{Aaij:2021lxk,
    abbr={arXiv},
    title={Angular analysis of the rare decay \(B_s^0 \to \phi \mu^+ \mu^-\)},
    collaboration={LHCb Collaboration},
    author={Aaij, R. and others},
    abstract={An angular analysis of the rare decay \(B_s^0 \to \phi \mu^+ \mu^-\) is presented,
            using proton-proton collision data collected by the LHCb experiment at centre-of-mass 
            energies of \(7\), \(8\) and \(13~\mbox{TeV}\), corresponding to an integrated luminosity 
            of \(8.4~\mbox{fb}^{−1}\). The observables describing the angular distributions of the 
            decay \(B_s^0 \to \phi \mu^+ \mu^-\) are determined in regions of \(q^2\), the square of 
            the dimuon invariant mass. The results are consistent with Standard Model predictions.},
    journal={arXiv preprint},
    year={2021},
    month={July},
    arxiv={2107.13428},
    selected={true}
    }
  3. Open the corresponding abstract on the publications page
  4. See error

Expected behavior Adding the abstract text directly within the bib.html file, MathJax is able to render correctly the LaTeX content desidered. How can I obtain the same result from papers.bib?

Screenshots issue_pic

System:

alshedivat commented 3 years ago

@mbarbetti, thanks for the detailed bug report. Could you double check that the math you are trying to render works when used outside of bibliography? E.g., does the same math render correctly when you use in a post (like this one)?

mbarbetti commented 3 years ago

@alshedivat, I have checked that before opening this issue, and I can confirm that the LaTeX content attached is correctly rendered within MD and HTML files. I fear that is an issue related to the conversion from BibTeX, it is possible?

alshedivat commented 3 years ago

Overriding the behavior of latex-decode instead of entirely turning off bibtex_filters might be the best solution to this: https://github.com/inukshuk/jekyll-scholar/issues/2#issuecomment-205472207.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.