Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?
share|improve this question
add comment

1 Answer

up vote 7 down vote accepted

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"

---svgtopdf.bat----

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.*

Example

enter image description here

share|improve this answer
    
Since I have Inkscape 0.48 I tried exporting as eps+latex. It mostly works for me. My problem is that the drawing and the text are not scaled by the same factor: the distance between the text element is half what it should be while the scaling of the drawing is correct. Any idea ? –  Niriel Jan 19 '12 at 15:40
    
@Niriel: The documentation says that EPS output might work, but i could never get it to work properly. It is not a problem for me because I always use PdfLatex or XeLatex. If I need an EPS I convert it with Adobe Pro from the PDF file. –  Danie Els Jan 19 '12 at 15:45
    
I think I actually stumbled upon a documented bug. Any text that appears outside the bounding box of the rest of the drawing is likely to confuse the thing. I will experiment a bit more! –  Niriel Jan 19 '12 at 15:53
1  
I read the following bug report that helped me finding a reasonable workaround for exporting to eps+latex: bugs.launchpad.net/inkscape/+bug/595821 In short: use a rectangle filled with white as a background, large enough to cover the drawing and the latex-rendered text. –  Niriel Jan 19 '12 at 16:18
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.