Skip to content

(Re?)enable LaTeX math in documentation #12989

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
SimonSapin opened this issue Mar 18, 2014 · 4 comments
Closed

(Re?)enable LaTeX math in documentation #12989

SimonSapin opened this issue Mar 18, 2014 · 4 comments
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@SimonSapin
Copy link
Contributor

http://static.rust-lang.org/doc/master/rust.html#machine-types currently has text like $[0, 2^8 - 1]$. It looks like it’s supposed to be rendered as a nicely formatted equation, and maybe was at some point.

@huonw
Copy link
Member

huonw commented Mar 18, 2014

AFAICT neither sundown nor hoedown (#12776) support LaTeX directly (unlike Pandoc). One solution is using MathJax to render it on the client.

@adrientetar
Copy link
Contributor

Well if it's just for pows, we don't need MathJax but we can rather just add <sup> in the Markdown source instead.
There's a regression of the removal of rustdoc exposed here through is that we don't process references anymore (@huonw): ^[this is a reference].
With pandoc they would have arrows with a link to the end of the page but it's not part of standard Markdown and so I don't think it's built-in Sundown/Hoedown.
Supporting it in our wrapper would be cool but removing it shouldn't hurt I think.

@huonw
Copy link
Member

huonw commented Mar 18, 2014

Yes, that's a work-around. Although, there are places where I would like proper rendering (example).

I'm sure other people will wish to use rustdoc with rendered mathematics, so it would still be neat to at least have --include-in-header mathjax-header.template and --include-after-body mathjax-after.template that inserts the contents of those files into the final output, or even a --mathjax flag (or something) that does the mathjax insertion automatically, although that might be regarded as too specialised.

@Hoverbear
Copy link
Contributor

One thing to note using markdown and MathJAX is that underscores need to be escaped from _ to \_ when you compile.

lnicola pushed a commit to lnicola/rust that referenced this issue Aug 16, 2022
internal: Remove incomplete 1.64 ABI

This no longer works for current nightlies and should not be needed any more, since we can use the toolchain's proc macro server instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants