Wednesday, March 23, 2016

sed Converter for LaTeX Math Modes

In jupyter/iPython LaTeX markdown, I have many files that use the "$" and "$$" tags for math mode.

Sometimes, I liked to cut and paste stuff from there into Blogger. I have set my Blogger MathJax preferences to "slash-parentheses" and "slash-square-brackets" for "$" and "$$", respectively.

The following sed script lets me quickly do the conversion:

As as example consider the following:

No comments:

Post a Comment