Reputation: 1346
I am trying to change the font size of the message text in a questdlg
. I have been able to get some TeX to work (subscript, greek letters), but I can't figure out how to change the font. Here's what I've tried:
test_str = '\fontsize{10}{12}\selectfont Words go here';
options.Default = 'yes';
options.Interpreter = 'tex';
questdlg(test_str,'title','yes','no',options)
And I get the warning message:
Warning: Error updating Text.
String must have valid interpreter syntax:
\fontsize{10}{12}\selectfont Words go here
> In defaulterrorcallback (line 12)
In questdlg (line 314)
I am pretty certain that the text I am using is valid TeX syntax, but I don't know why it's not working. Is there something I'm missing, or is there a list of supported features for this particular interpreter?
Upvotes: 2
Views: 2271
Reputation: 198
The proper Tex syntax for the display string would simply be
'test_str = '\fontsize{10} Words go here';
The full list of available Tex markup options can be found on this page.
Upvotes: 2
Reputation: 14316
Actually, the \fontsize
command is not TeX - it is LaTeX! So, change the interpreter from tex
to latex
, and it works:
test_str = 'Normal size, \fontsize{18}{24}\selectfont other size';
options.Default = 'yes';
options.Interpreter = 'latex';
questdlg(test_str,'title','yes','no',options)
Upvotes: 4