emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: "Rudolf Adamkovič" <salutis@me.com>
Cc: Ihor Radchenko <yantar92@gmail.com>,  emacs-orgmode@gnu.org
Subject: Re: [PATCH] Re: Update Org to MathJax 3
Date: Thu, 10 Nov 2022 02:34:47 +0000	[thread overview]
Message-ID: <87pmdvk054.fsf@localhost> (raw)
In-Reply-To: <m2pmdvlokg.fsf@me.com>

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

>> Are these extensions no longer supported?
>
> MathJax 3+ supports extensions, and one can load them in multiple ways.
> See [1].  It deserves some thinking, for the extensions mirror LaTeX
> extensions.  So, to make both HTML and PDF work, one has:
>
>   Use the Physics package in both LaTeX and MathJax.
>
>   #+latex_header: \usepackage{physics}
>   
>   #+html_head_extra: <div style="display: none">
>   #+html_head_extra:   \(
>   #+html_head_extra:     \require{physics}
>   #+html_head_extra:   \)
>   #+html_head_extra: </div>
>
> (The example taken from my Org notebook.)
>
> [1]: https://docs.mathjax.org/en/latest/input/tex/extensions.html
>
> That said, I do not currently have bandwidth to extend the scope of the
> patch to include MathJax extensions.  (Note that they have never worked
> anyway, so the user loses nothing, and we correct documentation.)

Then, please mention this in the NEWS. Something like "we drop extension
support as it never worked anyway".

> A slight digression, just FYI:
>
> I realized that I should have improved LaTeX to SVG exports instead of
> focusing on MathJax.  Org supports LaTeX environments, but outside of
> PDFs, it does so poorly.  Packages such as TikZ, for example, do not
> work out of the box, so people use Babel to hack around it.  Worse
> still, Org does not even properly adjust baselines for inline math, so
> HTML exports remain barely usable for any mathematical work.
>
> If we fix LaTeX, Org could have fast and good mathematics, with no
> JavaScript, like Wikipedia has.  Then, we could use it by default,
> instead of MathJax.
>
> Having good support for LaTeX would position Org as the king of markup
> editors, because LaTeX can do everything under the sun.  For instance,
> one can typeset a chess game in a couple of lines.  Or sheet music.  Or
> molecules in three dimensions.  No mainstream Markdown editor or web
> authoring tool can do that.  Yet, Org can *almost* do it.

Patches are always welcome ;)

> +                     (append `((,(if (plist-member options 'autonumber)
> +                                     'tags 'autonumber)
> +                                nil)
> +                               (,(if (plist-member options 'linebreaks)
> +                                     'overflow 'linebreaks)
> +                                nil))
> +                             options)))

You may even drop append and use ,@options inside `(...). Not a big deal though.

> +              (`scale
> +               (when (stringp value)
> +                 (setq value (string-to-number value)))
> +               (when (>= value 10)

If value is invalid string (not an actual number), `string-to-number'
will return 0. This may cause very strange export output I think. 

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


  reply	other threads:[~2022-11-10  2:35 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-07 13:36 Update Org to MathJax 3 Rudolf Adamkovič
2022-10-08  7:20 ` Ihor Radchenko
2022-10-08 21:32   ` Rudolf Adamkovič
2022-11-05  0:20     ` [PATCH] " Rudolf Adamkovič
2022-11-05 12:01       ` Ihor Radchenko
2022-11-05 16:56         ` Rudolf Adamkovič
2022-11-05 22:44           ` Rudolf Adamkovič
2022-11-06  3:52             ` Ihor Radchenko
2022-11-06 23:49               ` Rudolf Adamkovič
2022-11-07  3:02                 ` Ihor Radchenko
2022-11-07 20:56                   ` Rudolf Adamkovič
2022-11-08  5:20                     ` Ihor Radchenko
2022-11-08 23:37                       ` Rudolf Adamkovič
2022-11-09  0:05                         ` Rudolf Adamkovič
2022-11-09  5:40                           ` Ihor Radchenko
2022-11-09 23:01                             ` Rudolf Adamkovič
2022-11-10  2:34                               ` Ihor Radchenko [this message]
2022-11-11 12:50                                 ` Rudolf Adamkovič
2022-11-13  4:24                                   ` Ihor Radchenko
2022-11-13 20:52                                     ` Rudolf Adamkovič
2022-11-14  4:33                                       ` Ihor Radchenko
2022-11-19 13:10                                         ` Bastien Guerry
2022-11-21  2:51                                           ` Ihor Radchenko
2022-11-22 20:56                                             ` Rudolf Adamkovič
2022-11-23 11:11                                               ` Ihor Radchenko
2022-11-23 23:08                                                 ` Rudolf Adamkovič
2022-11-09  2:49                         ` 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=87pmdvk054.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=salutis@me.com \
    --cc=yantar92@gmail.com \
    /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).