# TeX interpreter in x tick and y tick labels 6

Posted by **Doug Hull**,

Writing a file that solves a problem that gets called into our tech support team is a very good way of becoming Pick Of The Week. This week a MATLAB user wanted to know how to use the TeX interpreter on x and y ticks. This is not supported, but if you download this file, you will be able to.

**Category:**- Video promotion

## 6 CommentsOldest to Newest

**1**of 6

As much as I want to use Matlab’s built-in TeX interpreters, they tend to increase the file size (in postscript) to an astounding level, which then causes some scientific journals and the arxiv.org preprint server to reject the files as too big. A workaround is to put plain text in my figures, and ten modify the .eps files with the LaTeX package psfragThis gives much smaller .eps files, but is very inconvenient. Obviously I’d like to do everything in Matlab, but at this point, that doesn’t seem like it’s feasible.

**2**of 6

I went to the LaTeX guru here at The MathWorks. He had this to say:

“When MATLAB saves a LaTeX-interpreted string to an .eps file, it embeds Postscript definition files for each Computer Modern font needed to display the string. MATLAB does this because it does not know which Postscript fonts may be defined on a destination machine that may load the .eps file later.

In Example 4 from Doug’s video, MATLAB embeds font definitions for CMR10, CMR7, CMR10, CMR7, CMSY7, in that order, into the .eps file. I think it is unnecessary for MATLAB to embed CMR10 and CMR7 twice — this may be a bug. Also, in some future release, we may want to find a way to integrate with psfrag-like apps more efficiently.”

**3**of 6

Doug,

Thanks for seeking out an answer for me. This issue has been bugging me for a long time.

Roy

**4**of 6

Thank you so much!!

This is what I really want!!!

**5**of 6

Is there a way to control the font used in LaTeX strings?

**6**of 6

@ariel,

http://www.mathworks.com/access/helpdesk/help/techdoc/ref/text_props.html#String

The /fontname command is what you want.

Doug

## Recent Comments