Can LaTeX commands be embedded in LiveScripts?
3 views (last 30 days)
Show older comments
Is there a way to add LaTex code into a LiveScript that gets exported as written? E.g.,
\begin{description}
or
\hspace{1cm}
etc.
I could imagine implementing this under the Insert tab adding a LaTeX option to Code Example. But is there another way?
Thanks!!
0 Comments
Answers (1)
Walter Roberson
on 13 Aug 2023
It depends what you mean by "exported"
If you happen to mean that you want it sent to Report Generator, then my understanding is that you can do that.
If you happen to mean that you want the raw text to be displayed on the screen, then Yes, you can do that.
If you happen to mean that you want to generate latex at run-time, and you want to have the rendered latex displayed in LiveScript, then there is no support for that. The closest you would get to that is that there is some internal support for displaying MathML -- but I have been unable to get anything to display on demand (at most I have been able to put in a breakpoint and modify the MathML of an expression so that the modified version is displayed, but I have never been able to trigger a display myself.)
If you were able to inject latex in LiveScript, you would only be able to affect one single expression, with no ability to affect blocks such as your \begin{description} would want to do. For that kind of work, you need Report Generator.
2 Comments
Walter Roberson
on 13 Aug 2023
As far as I know there is no support for that other than what can be done with Report Generator
See Also
Categories
Find more on MATLAB Report Generator in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!