Re: configure mathjax for less common commands and text in math

2022-01-27 Thread Patrice Dumas
On Fri, Jan 21, 2022 at 01:23:14PM -0800, Raymond Toy wrote:
> On Thu, Jan 20, 2022 at 3:01 PM Patrice Dumas  wrote:
> 
> > Hello,
> >
> > There are some constructs that are not correctly formatted by mathjax,
> > uncommon commands that can be in math and other constructs, for
> > instance:
> >
> >   \mathord{\text{\l{}}} \textsl{\c{\'{C}}} \copyright{} \mathsterling{}
> >
> > Does anybody knows how to get those to work?  I tried to load amsmath
> > using the ams package for mathjax, but it didn't change anything and I
> > think that it is already loaded.
> >
> 
> I didn't try this, but according to
> https://docs.mathjax.org/en/latest/search.html?q=mathsterling_keywords=yes=default#,
> Mathjax 3 doesn't support mathsterling.  It does support mathord, though.

Ok.  I guess that it supports mathord, but not \text{\l{}} in argument
to \mathord, which is somewhat expected, as \text{} can be anything
LaTeX accepts in text, but mathjax needs to be able to convert to svg,
so it makes sense to concentrate on true math.

I guess that there is nothing that can be done, except to make sure that
with --enable-encoding set characters are directly output encoded.

-- 
Pat



Re: configure mathjax for less common commands and text in math

2022-01-21 Thread Raymond Toy
On Thu, Jan 20, 2022 at 3:01 PM Patrice Dumas  wrote:

> Hello,
>
> There are some constructs that are not correctly formatted by mathjax,
> uncommon commands that can be in math and other constructs, for
> instance:
>
>   \mathord{\text{\l{}}} \textsl{\c{\'{C}}} \copyright{} \mathsterling{}
>
> Does anybody knows how to get those to work?  I tried to load amsmath
> using the ams package for mathjax, but it didn't change anything and I
> think that it is already loaded.
>

I didn't try this, but according to
https://docs.mathjax.org/en/latest/search.html?q=mathsterling_keywords=yes=default#,
Mathjax 3 doesn't support mathsterling.  It does support mathord, though.


> Those constructs are ok when in a LaTeX document with preamble
>
> \documentclass{book}
> \usepackage{imakeidx}
> \usepackage{amsfonts}
> \usepackage{amsmath}
> \usepackage[gen]{eurosym}
> \usepackage[T1]{fontenc}
> \usepackage{textcomp}
> \usepackage{graphicx}
> \usepackage{needspace}
> \usepackage{etoolbox}
> \usepackage{array}
> \usepackage{mdframed}
> \usepackage{enumitem}
> \usepackage{titleps}
> \usepackage{float}
> % use hidelinks to remove boxes around links to be similar with Texinfo TeX
> \usepackage[hidelinks]{hyperref}
> \usepackage[utf8]{inputenc}
>
> (as a side note, these is some LaTeX used to format some Texinfo
> @-commands, but it does not matter, users may want to use those commands
> in @math/@displaymath in any case).
>
> --
> Pat
>
>

-- 
Ray


configure mathjax for less common commands and text in math

2022-01-20 Thread Patrice Dumas
Hello,

There are some constructs that are not correctly formatted by mathjax,
uncommon commands that can be in math and other constructs, for
instance:

  \mathord{\text{\l{}}} \textsl{\c{\'{C}}} \copyright{} \mathsterling{}

Does anybody knows how to get those to work?  I tried to load amsmath
using the ams package for mathjax, but it didn't change anything and I
think that it is already loaded.

Those constructs are ok when in a LaTeX document with preamble

\documentclass{book}
\usepackage{imakeidx}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage[gen]{eurosym}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{graphicx}
\usepackage{needspace}
\usepackage{etoolbox}
\usepackage{array}
\usepackage{mdframed}
\usepackage{enumitem}
\usepackage{titleps}
\usepackage{float}
% use hidelinks to remove boxes around links to be similar with Texinfo TeX
\usepackage[hidelinks]{hyperref}
\usepackage[utf8]{inputenc}

(as a side note, these is some LaTeX used to format some Texinfo
@-commands, but it does not matter, users may want to use those commands
in @math/@displaymath in any case).

-- 
Pat