-
-
Notifications
You must be signed in to change notification settings - Fork 96
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 Integration and Equation Numbering #142
Comments
Markdown writers just pass the latex through to Mathjax and xelatex and they are slightly inconsistent in this case. Markdown to html writer is Weave and if you have ideas how to change it you can open a pull request. (See:) https://github.com/mpastell/Weave.jl/blob/246f7eef62102d985332722034877511ccf8e16c/src/Markdown2HTML.jl#L158 For Latex Weave uses the writer in stdlib https://github.com/JuliaLang/julia/blob/master/stdlib/Markdown/src/render/latex.jl , if needed we could also add a custom Latex writer to Weave. I think splatting the code works as expected, it is parsed as a paragraph and special characters are escaped from output. You may also want to check whether |
Thanks for investigating. Will experiment and get back to you. The equation numbers are a key feature for us, so hopefully we can get this to work. |
You can actually get the equation numbers by adding
|
Perfect, thank you. |
I think it actually would make sense to always output Going further it could also make sense to parse raw Latex so that you wouldn't need to escape equations. |
Aye. I was using Pandoc to get the citations to work properly with the |
There has been some discussion on citations in Discourse https://discourse.julialang.org/t/citations-in-docs/5066/35 , it would be great if there was Julia package for working with citations. Julia markdown parser is relatively straightforward to extend in order to parse citations from text. |
Does #143 fix this issue or is something more needed? |
Will test rn and get back to you. |
Getting an error when I run (and looks like the Travis build for the
|
The error you got is due to a deprecation in parsing inline code and also exists in master, I fixed it in align branch. Travis failure is expected as I haven't updated tests for new format. |
Perfect, thanks. |
@mpastell This works great/fixes our issues. Thanks for being so on top of this. |
Thanks, glad that it works and it was very minor fix. I'll tag a release with this patch. |
FYI: Weave no longer adds align to math blocks automatically so you need to do it yourself from now on. See: #182 . |
We're (cc: @jlperla, @Nosferican) looking into using Weave, and the system looks great except for a few snags with LaTeX:
\equation
or\align
. When we try to refer to them (by labeling and calling the label) we get a???
. We can get around this by manually numbering equations with\tag{}
, but that feels hacky.For example:
Sometimes we have redundant math-wrapping. For example, we need the math tags above for HTML output, but these tags render into LaTeX as something like
$$\begin{align} ... \end{align}$$
.If you just splat the code and forget about HTML, there seem to be some parsing errors, e.g.
{\textbackslash}begin\{align\}...
We are calling Weave in Julia 0.7 as such:
Let me know if there's anything different we should be doing, or if you have any thoughts.
The text was updated successfully, but these errors were encountered: