Is it possible to display text in the console using latex expressions ?
Show older comments
Hello,
I would like to display in the console grec letters using the latex syntaxe. Is there a way do this ?
For exemple I can do this with the title() function :
title('\theta_{\lambda/4}=20°')
But
disp('\theta_{\lambda/4}=20°')
displays literally \theta_{\lambda/4}.
I saw that disp('λ') works but you need to ctrl c - ctrl v the λ from somewhere to do so. Since latex interpretation works in title() I guess there must be a way to write latex in a prompt.
Thank you
6 Comments
Lorenzo
on 1 Feb 2023
Hello Matt,
The reason why this work with functions such as "title", is that title has the property "interpreter" where you can select latex as an option (I think in your case it is selected by default).
I am not sure that it is possible to do the same on the command window. May I know why you want to output the promt in the command window? Maybe we can find another workaround that is still useful for you.
Best,
Lorenzo
Matt
on 1 Feb 2023
Mario Malic
on 1 Feb 2023
The command window supports some sort of HTML, maybe it's possible to do so, however, the effort might not be worth it.
The output of head function is an example.
Lorenzo
on 1 Feb 2023
Hello Matt,
Is there a reason why you want to debug with text promt and not with the standard debug functionalities?
Best,
Lorenzo
Matt
on 6 Feb 2023
Matt
on 6 Feb 2023
Accepted Answer
More Answers (0)
Categories
Find more on Labels and Annotations 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!