Graphics, Figures & Tables ⇒ Correct font to use in Xfig
Correct font to use in Xfig
I am currently working on a set of figures for a book (though I am no where cool enough to say it's for my own book! lol). I was told that the figures need to be in the .eps file format, but found out recently you cannot embed LaTeX code for any text used in the figure (i.e. number/axis labeling). The source of this discovery is here, under "Type B":
http://epb.lbl.gov/xfig/frm_miscellaneous.html
So per their advice at this link, is to use a font in Xfig that matches or most closely matches the font used in LaTeX. Like my previous dilemma, I am not sure what the name of the default font is that is used for text and math symbols in LaTeX.
If anyone knows, that would be great. Thanks!
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Correct font to use in Xfig
1. Run this command to start xfig:
Code: Select all
xfig -specialtext -latexfonts -startlatexFont default3. Go to File --> Export, then in the Language option select "Combined PS/LaTeX (both parts)". Save your file with a .pstex extension, e.g. myfigure.pstex. This will create two files: myfigure.pstex and myfigure_t.pstex. The first is the EPS figure and the second is a LaTeX file that handles the text for the EPS figure.
4. In your LaTeX document you input the myfigure_t.pstex file where you want the figure to appear:
Code: Select all
\input{myfigure_t.pstex}Correct font to use in Xfig
I created a triangle with the Pythagorean Theorem under it along with "This is triangle $ABC$", and exported it as triangle.pstex; after exporting I had the triangle.pstex file, but instead of the triangle_t.pstex file, I instead had a triangle.pstex_t.
In my LaTeX document, I put in as the code,
\input{triangle.pstex_t}and am able to compile it (into DVI or through PS into PDF), except I get an undefined control sequence warning (for each line of text). As for the actual figure, the figure shows up, the text shows up the way it should be, except along with it there are the symbols "[rbg]0,0,0" at the beginning of each block of text.
I admit I am not familiar with operating systems outside of Windows, so I do very much appreciate the help. Also, I am using TeXnic Center as my compiler, so maybe the issue is also there. It was suggested to me that I try TeX Studio.
Thanks again!
Correct font to use in Xfig
Code: Select all
\documentclass{article}
\usepackage{xcolor}
\usepackage{graphicx}
\begin{document}
\begin{center}
\input{triangle.pstex_t}
\end{center}
\end{document}Code: Select all
latex test.tex
dvips -Ppdf -G0 -z test.dvi
ps2pdf test.ps