org-roam / org-roam-server

A Web Application to Visualize the Org-Roam Database
MIT License
635 stars 51 forks source link

Question : use mathjax to render latex fragments in served org files #153

Open deb75 opened 3 years ago

deb75 commented 3 years ago

This post is related to #151 , I think a better idea would be to render the latex fragments with mathjax. What say you ?

If I am not mistaken, org files are export in html ? Is it the org-html exporter ?

I tried to set org-html-mathjax-options as follows

(setq org-html-mathjax-options
      '((path "http://127.0.0.1:8080/mathjax/es5/tex-chtml.js")
        (scale "100")
        (align "center")
        (font "TeX")
        (linebreaks "false")
        (autonumber "AMS")
        (indent "0em")
        (multlinewidth "85%")
        (tagindent ".8em")
        (tagside "right")))

The key value is the path which points to the org-roam server. I installed mathjax locally at the root of the org-roam directory, because I cannot access the web, but it does not work.

Where should I put mathjax ?

Regards

deb75 commented 3 years ago

Answering to myself.

I tested the org html export with org-html-mathjax-options path pointing to a local mathjax installation.

It works nicely.

I tried then to do the same with org-roam files, but latex fragments are displayed like this

\(\infty = \iny_{0}^{1}\)

on the org-roam server just as if mathjax was not active.

In order to investigate the issue, how could I access the raw html pages which are served when you use the preview mode ?

Any hints ? Perhaps it works better with org-roam v2 ?

Regards