Partha Pratim Ghosh <[email protected]> writes:
> #-*- mode: org -*-
FYI: You do not need this line if the file has an '.org' extension.
> #+TITLE: test
> #+AUTHOR: Partha
> #+latex_header:\usepackage{Documents/tex/essentials/symbols}
Note that this header applies to LaTeX and will not work with MathJax.
You can make Org to use actual LaTeX in HTML by adding
#+OPTIONS: tex:dvisvgm
to your document.
> Can I use \LaTeX ? Let us try: $f: A\rightarrow B$ is a function
MathJax ignores \LaTeX but renders the function correctly.
(I tried with plain 'emacs -Q' on Emacs 30.)
> $\xymatrix{ {A} \ar@{o->}[r] & {B} }$
MathJax does not recognize this, hence the "Misplaced &" error.
You have two options here: either (1) install the MathJax extension you
mentioned or (2) make Org to use LaTeX for HTML.
If you decide to go the MathJax/JavaScript route, please note that you need to
use Emacs 29 or later, where Org uses MathJax 3 and not 2.
> \Arr{f}{A}{B}
MathJax does not recognize this either.
> 2. The file exports perfectly to pdf:
That happens because Org always uses LaTeX for PDF documents. If you want it to
use LaTeX for HTML too, see the OPTIONS above.
Rudy
--
"Chop your own wood and it will warm you twice."
-- Henry Ford; Francis Kinloch, 1819; Henry David Thoreau, 1854
Rudolf Adamkovič <[email protected]> [he/him]
Studenohorská 25
84103 Bratislava
Slovakia