We can embed pure html inside org mode before exporting to a webpage using begin_export html (the html snippet was taken from https://alligator.io/css/collapsible)

#+begin_export html
<div class="wrap-collabsible">
  <input id="collapsible" class="toggle" type="checkbox">
  <label for="collapsible" class="lbl-toggle">More Info</label>
  <div class="collapsible-content">
    <div class="content-inner">
        QUnit is by calling one of the object that are embedded in JavaScript, 

However, I will need to be able to embed Latex code inside such blocks. If I include LaTeX outside the #+begin_export block, then Latex gets rendered properly by appropriate calls to MathJax. (Org takes care of this behind the scenes when exporting to html)

Is it possible for me to defined custom org blocks for the wrap-collapsible class such that org mode will first call mathjax to render the latex within it and then export to the html blob above.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.