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

[-- Attachment #1: Type: text/plain, Size: 790 bytes --]

Dear Rudolf,

Please accept my thanks for your kind and prompt reply.

I still have some queries, which I provide inline as well as in the end.

Rudolf Adamkovič <salutis@me.com> writes:

> 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.
>

Thanks; this suggestion worked --- at least the xymatrix figure came
out; however, the arrow was almost not present:

[-- Attachment #2: test output --]
[-- Type: text/html, Size: 9336 bytes --]

[-- Attachment #3: Type: text/plain, Size: 2236 bytes --]


I believe this is a rendering problem. Also the mathematics symbols get
/tiny/; could rendering of mathematics made bigger, a little bolder, and
xymatrix diagram arrows made visible?

>> 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.
>

Thanks, I am on 28.2, the latest on Linux Mint archive; I think I shall
have to download and compile from gnu archives for the latest one. 

>> \Arr{f}{A}{B}
>

This is a problem; please see also below.

> 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

I have a huge amount of macros which are constantly used, especially
because the area of my work (Category Theory) demands use of plenty of
inline diagrams as well as displayed diagrams; for inline diagrams it is
best to have macros to speed up the typing. I believe you are saying
that while these are recognised by LaTeX for PDF documents, the html
converter just neglects them.

Firstly, is it possible to convert these macros to a form which is
acceptable by hrml converter?

I believe the answer is _Yes_, since the same commands between "$", "$"
works; but can this be automated? The suggestion is: would it be
possible to write some quick code to be used by the converter before
starting the process of conversion, so that a list of macros used is
made up, each of such macros automatically converted in a form usable
for html, and then used in the conversion disregarding the actual macro
file; the converted macros could then be placed somewhere in the header
of the converted html file.

With my regards and all the very best wishes,

partha


  parent reply	other threads:[~2023-01-28 20:08 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č
2023-01-28  6:57       ` tomas
2023-01-28 19:53       ` Partha Pratim Ghosh [this message]
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=871qnee82v.fsf@unisa.ac.za \
    --to=ghosh.parthapratim.unisa@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=salutis@me.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).