Giter Site home page Giter Site logo

Comments (4)

gcushen avatar gcushen commented on September 7, 2024

Unfortunately, this behaviour is related to how Hugo parses the file.

However, we can workaround this by adding an extra backslash before each LaTeX backslash in the abstract. I will try to document this in the README file.

For example, I just tested $\\rm \\LaTeX$ in the abstract and it is working fine 😃 .

For speed, math is only enabled on a per page basis in the page +++ preamble. If you wish to also use it in titles, then math would need to be enabled for the whole site (if you wish the LaTeX to render correctly on the homepage and list pages like /publications/). Do you have many publications with math in the title? I will consider adding a global math parameter.

from hugo-blox-builder.

ssemigr avatar ssemigr commented on September 7, 2024

I see. One possibility is, as you say, to escape , the other is to remove markdownify when including abstract and title. It really depends on the use case.

I have a few titles with math formulas. If there is not much math, mathjax is quite fast. The speed would be an issue on a page with more than hundred formulas which is not realistic for the home page, so I see no reason for not having a global math parameter.

from hugo-blox-builder.

gcushen avatar gcushen commented on September 7, 2024

Good to hear about your experience with mathjax 😄

I took another look at some major online scientific publishers. For the abstract field, it appears they allow LaTeX math and disallow the author to use custom formatting.

So I have gone ahead and removed markdownify from the abstract field and added a global math parameter in the example config.toml. Thus, LaTeX math can now be easily added to both titles and abstracts, and rendered correctly with the new global math = true option set. See commits 9d44054 and e1faa26.

from hugo-blox-builder.

ssemigr avatar ssemigr commented on September 7, 2024

Great, thanks!

from hugo-blox-builder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.