Write part of xlabel in LaTeX (not whole label)
    26 views (last 30 days)
  
       Show older comments
    
Hi all,
I am aware that using something like:
xlabel('X-label, $x_{label,LaTeX}$ (W)','Interpreter','latex')
can help to write in LaTeX, however, I was wondering if there's any way I can use LaTeX for only  and write the remaining part of the label in the default font of the MATLAB label - I've seen that the LaTeX interpreter doesn't allow changing font?
 and write the remaining part of the label in the default font of the MATLAB label - I've seen that the LaTeX interpreter doesn't allow changing font?
 and write the remaining part of the label in the default font of the MATLAB label - I've seen that the LaTeX interpreter doesn't allow changing font?
 and write the remaining part of the label in the default font of the MATLAB label - I've seen that the LaTeX interpreter doesn't allow changing font?1 Comment
  Sindar
      
 on 11 May 2020
				There's some info here on changing font: https://www.mathworks.com/matlabcentral/answers/321122-how-to-change-the-fontname-of-axes-labels-when-using-the-latex-interpreter
Accepted Answer
  Payas Bahade
    
 on 19 May 2020
        Hi Minas,
To have part of xlabel in regular MATLAB figure font and remaining in LaTeX font, you can specify font for specific parts inside LaTeX markup as follows:
xlabel('$\textsf{X-Label} \: x_{label,LaTeX} \textsf{(W)}$','Interpreter','latex')
Hope this helps! 
More Answers (1)
See Also
Categories
				Find more on Axis Labels 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!



