I have been using org-mode to keep a personal maths notes wiki for the past several weeks. I chose HTML for this project as I wanted to be able to

  1. Format the entries without having to worry about loading PDFs or how things would look on a page
  2. Navigate between entries seamlessly
  3. Edit all of the entries from within org-mode with support for org-publish
  4. Share individual entries if need be
  5. View these files on a wide range of devices

However, I am unable to figure out a way to get theorem, proof, and other environments to export to my .html wiki files. As was addressed in this Stack Exchange post mathjax doesn't seem to be the right tool for the job here.

With #+LaTeX_HEADER: \usepackage{amsthm} in the relevant org-files and attempted to use latexml to process the LaTeX in my .org file using.

`(setq org-latex-to-mathml-convert-command
   "latexmlmath \"%i\" --presentationmathml=%o")

However, this still doesn't provide the required result. I am able to use hevea outside of emacs on tex files, which yields the required result with theorem and proof environments rendering as intended when defined using \newtheorem{theorem}[]. However, I don't know how I would export using hevea and org-publish without creating a new export backend.

Any ideas on how to get either hevea to work with org-publish or get amsthm environment support in HTML (preferably with numbering)? Thank you!

EDIT: Thanks to Nick for the suggestion to add example inputs and outputs!

Say I was working with a file projectfile.org with the content

#+ LaTeX_HEADER: \usepackage{amsthm}
#+ LaTeX_HEADER: \newtheorem{theorem}{Theorem}
* Heading 1

#+BEGIN_theorem
The statement of a theorem.
#+BEGIN_proof
Proof of a theorem
#+END_proof
#+END_theorem

If I run C-c C-e h h on the file I get an projectfile.html that looks like this

output 1

If I run C-c C-e l l' (which producesprojectfile.tex) and then runhevea projectfile.texmyprojectfile.html` looks like this

output 2

I have a dozen or so org files in my wiki folder and so when I run org-publish-project I would like to get html output that is similar to the the second result (theorem numbering, proof formatting, and so on).

  • I suggest you provide an example of the input and output that you want. Some people know about org, some people know about latex, some people know about \newtheorem, some people know about hevea, but as you add more and more of these, the intersection gets smaller and smaller: you may be the only one left in it :-) – NickD Sep 19 '17 at 1:53
  • @Nick Thank you! I have added some more information. – Ryan J.C. Sep 19 '17 at 12:22

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.