Skip to content

Conversation

@chrisjsewell
Copy link
Member

@chrisjsewell chrisjsewell commented May 2, 2020

Adds extension to specifically capture top-level amsmath latex environments

cc @choldgraf @phaustin for comment

@phaustin
Copy link

phaustin commented May 2, 2020

@chrisjsewell do I need to do anything special to activate the extension from myst_nb?

@chrisjsewell
Copy link
Member Author

do I need to do anything special to activate the extension from myst_nb?

Few more steps until you can use it in myst-nb I'm afraid: executablebooks/MyST-NB#126 (comment)

@phaustin
Copy link

phaustin commented May 2, 2020

this set looks great -- is there a reason that the vertical, bracketed and parenthetical matrix environments (bmatrix, pmatrix, vmatrix) are missing? Those would be at the top of the next tier of my own list of most commonly used mathjax environments from the bottom section of https://docs.mathjax.org/en/v2.7-latest/tex.html

@chrisjsewell
Copy link
Member Author

chrisjsewell commented May 2, 2020

bmatrix, pmatrix, vmatrix

Ah yes, I missed these in section 4.1 of http://anorien.csc.warwick.ac.uk/mirrors/CTAN/macros/latex/required/amsmath/amsldoc.pdf. That's why I asked for your comment 😄
Added in a30e069

@phaustin
Copy link

phaustin commented May 2, 2020

just to flag the comment:

# eqnarray is another math environment, but is not part of amsmath, # and it is better to use align or equation+split instead 

Note that eqnarray is the default way to write systems of equations in latex. It's definitely not recommended -- i.e. http://tug.org/TUGboat/tb33-1/tb103madsen.pdf, but unfortunately it's going to be present in a lot of jupyter notebooks, and in all standard latex manuals. AMS evidently decided that simply deprecating it in mathjax wasn't worth the struggle -- I think forcing users to take their medicine isn't a bad thing, but I'd anticipate a lot of bug reports from new users, which will need to be redirected to a standard doc snippet.

@phaustin
Copy link

phaustin commented May 2, 2020

One other thing, I see flalign on your list, but it doesn't look like it's an environment either mathjax or katex support. That would be something that would work for the latex builder, but revert to regular align for html?

@chrisjsewell
Copy link
Member Author

Note that eqnarray is the default way to write systems of equations in latex

Added in 9d22992, for users who want to be stupid 😉

@chrisjsewell
Copy link
Member Author

chrisjsewell commented May 3, 2020

I see flalign on your list, but it doesn't look like it's an environment either mathjax or katex support.

Yeh strange that they don't. I think it should be kept here, since the goal is to capture all top-level amsmath environments, then handle it in some way as you mention upstream in myst-parser.
There are open issue for it on both repos:

Note another thing to consider, which again mathjax and katex don't currently support but are good for latex PDF, would be the environments in http://mirror.ox.ac.uk/sites/ctan.org/macros/latex/contrib/breqn/breqn.pdf. Probably add this as an enhancement issue somewhere in executablebooks, for later consideration

@phaustin
Copy link

phaustin commented May 3, 2020

Makes sense. How much effort will it be to handle something like https://mhchem.github.io/MathJax-mhchem ?

Well we already capture $ math, so this should just be a case of loading the extension javascript in the HTML pages(?)

@choldgraf
Copy link
Member

way to go!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants