Git Product home page Git Product logo

Comments (4)

kernc avatar kernc commented on May 18, 2024 1

As of #74, you should be able to run pdoc with pdoc --config latex_math=True ... for seamless MathJax support.

Duplicate of #70.

from pdoc.

kernc avatar kernc commented on May 18, 2024 1

@paloha I agree. Care to open a new issue for this to be properly tracked and eventually taken care of?

from pdoc.

kernc avatar kernc commented on May 18, 2024

This use case had been accounted for. You should be able to make a template file head.mako with contents like:

<script async defer src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js"></script>

Then run pdoc with --template-dir pointing to the directory containing this overridden template file (see custom templating documentation).

Afterwards, $$-delimited LaTeX blocks should render in symbols.

from pdoc.

paloha avatar paloha commented on May 18, 2024

Hello @kernc I would like to ask about $ inline math support. I thought this was supported, but now I realized only $$ for blocks of math are supported. I described my situation here in a GitLab issue. The result of this issue is that basically GitLab now finally supports $...$ and $$...$$ for math. This is in sync with GitHub 🎊 It also works in the .pdf output obtained by piping pdoc to pandoc. Unfortunately, it does not work in your html output even with --config latex_math=True. I believe it would be reasonable to have a default which is in sync with the big players like GitHub and GitLab. What do you think?

For those who want a workaround: Copy the head.mako to your desired location, fill it with code from this answer, and then compile your documentation with custom --template-dir as @kernc suggested here, a few comments above.

from pdoc.

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.