emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Rudolf Adamkovič" <salutis@me.com>
To: Partha Pratim Ghosh <ghosh.parthapratim.unisa@gmail.com>,
	Ihor Radchenko <yantar92@posteo.net>
Cc: Help Emacs Orgmode <emacs-orgmode@gnu.org>
Subject: Re: Org html conversion with XyJax
Date: Fri, 27 Jan 2023 21:41:59 +0100	[thread overview]
Message-ID: <m27cx7u2ug.fsf@me.com> (raw)
In-Reply-To: <87edrfg6f4.fsf@unisa.ac.za>

Partha Pratim Ghosh <ghosh.parthapratim.unisa@gmail.com> 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č <salutis@me.com> [he/him]
Studenohorská 25
84103 Bratislava
Slovakia


  reply	other threads:[~2023-01-27 20:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-27  8:59 Org html conversion with XyJax Partha Pratim Ghosh
2023-01-27 12:53 ` Ihor Radchenko
2023-01-27 18:38   ` Partha Pratim Ghosh
2023-01-27 20:41     ` Rudolf Adamkovič [this message]
2023-01-28  6:57       ` tomas
2023-01-28 19:53       ` Partha Pratim Ghosh
2023-02-04 14:11         ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m27cx7u2ug.fsf@me.com \
    --to=salutis@me.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=ghosh.parthapratim.unisa@gmail.com \
    --cc=yantar92@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).