-
Notifications
You must be signed in to change notification settings - Fork 414
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
LaTeX in markdown #1156
Comments
I think it's worth exploring; Xcode quick help doesn't support it so the main use might be in guides rather than API documentation? Were you thinking render at client or 'server' (jazzy runtime)? Might be easier to do client-side rather than try and express the tooling dependency. Would need an optout flag to avoid adding more JS dependencies. Brief thought on syntax: I would probably go for hooking the backticks/code generation so you'd write markdown |
I was thinking of client side rendering (way easier). Rather than having an optout flag, I think it's worth considering an opt-in flag (so it's disabled by default). const regex = /^\`\$.*\$\`$/gm; // Check for your syntax
document.querySelectorAll('code').forEach((block) => {
const content = block.innerHTML
if (regex.test(content)) {
const eq = content.slice(2, -1)
katex.render(eq, block)
}
}); |
👍 for client-side. The jazzy change I'm suggesting gives control over generating the |
As I'm not a Ruby developer, I have no idea how to do that. For me it seems easier to do all with KaTeX (as I know JavaScript well). I'll probably create a PR later this week, and you'll be able to help me with that |
As the new PR is likely to be merged very soon, I close this issue |
As Apple works on SwiftNumerics and Google on Tensorflow for Swift, many math libraries will start to appear.
In order to make life easier for developers and newcomers alike, support for LaTex equations would be welcome.
I propose to use the following syntax (as for StackOverflow or others):
$<insert equation>$
for inline equations and$$<insert equation>$$
for centered equations.I think it won't be a challenge to implement since javascript libraries like KaTex and MathJax do that very well.
I'm submitting this issue before working on a PR to discuss about the implementation (so I don't waste my time and your time).
The text was updated successfully, but these errors were encountered: