What is the exact syntax to make the publish function recognize the <latex> markup ?

2 views (last 30 days)
Hello, I have troubles using the latex markup in a .m file that is supposed to be parsed by the publish function. Apparently, it only works if you use it exactly the way it is used in the Documentation, i.e. if you add a new %% section, then a line of text (apparently no LaTeX formula), then a blank commented line, then the latex markup.
Anyway, it looks like every time you use latex, you have 50 % chance that it is not parsed correctly by the publish function. A workaround I use is an additional parsing in a script that fixes the LaTeX commands:
text = regexprep(text, '\\begin{verbatim}\nlatex\n\\end{verbatim} (.*?) \\begin{verbatim}\n/latex\n\\end{verbatim} ', '$1');
(because when publish messes up with the latex markup, it produces the code I test in my regex)
Do I miss something with the behavior of the publish function regarding latex ? Or should I keep on applying my regex as a second parsing ?
In the second case, it would be nice to see this issue fixed in the next release.
Best regards,
Renan Goupil

Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!