[Tex/LaTex] How to properly use LM roman fonts in figures


I draw some of my figures using Inkscape. For the text inside the figure I use the Latin Modern fonts because they're ttf and Inkscape finds them. This looks rather good and I do not meet any technical difficulty.

My questions are more about good practices:

  1. I have the fonts LM Roman 5, 6, 7, 8, 9, 10, 12, 17. I can choose
    any of these, and then ask Inkscape to render them with any size.
    It feels dirty. Does the number in the font name correspond to the
    size in points in which it should be rendered?
  2. Which size should I use in my figures? As big as the normal text
    of my article? Smaller to match the size the caption under the figures
    (footnotesize in my case)?
  3. I am a heretic and shouldn't even do that at all?

Best Answer

The short answer is

  1. The LM font sizes are optical sizes (looks best at that size). You should use the same size in Inkscape. Just beware that Latex point size is 1/72.27 inch and the point size the rest of the world use is 1/72 inch or the PostScript point size

  2. The font size in figures are normally smaller but not less that 8pts

  3. Yes you can use it if your main document font is LM roman

Since version 0.48 InkScape has the option to export the text and graphics separate so that the figure then can be processed with Latex to create a pdf. You can imbed Inkscape (SVG) figure in a latex document, see "How to include an SVG image in LATEX".

For free standing graphics the following is a Windows-DOS batch file to do the job. You can insert your local font setup in "texheader.tex"


call inkscape.exe -z -D --file=%1.svg --export-pdf=%1-@temp-src.pdf --export-latex

echo \documentclass[10pt]{article}      > %1-@temp-tex.tex
echo \InputIfFileExists{texheader}{}{} >> %1-@temp-tex.tex
echo \usepackage{graphicx}             >> %1-@temp-tex.tex
echo \usepackage{color}                >> %1-@temp-tex.tex
echo \pagestyle{empty}                 >> %1-@temp-tex.tex
echo \begin{document}                  >> %1-@temp-tex.tex
echo \input{%1-@temp-src.pdf_tex}      >> %1-@temp-tex.tex
echo \end{document}                    >> %1-@temp-tex.tex

call pdflatex %1-@temp-tex.tex
call pdfcrop  %1-@temp-tex.pdf %1.pdf

del %1-@temp-src.*
del %1-@temp-tex.*


enter image description here