7

I currently try to find a good way to include images that were creaded with xfig in a LaTeX document which will be compiled to a PDF.

So I currently try to get to know the difference between the following export options:

  • LaTeX picture
  • LaTeX picture + epic macros
  • LaTeX picture + eepic macros
  • LaTeX picture + eepicemu macros

I tried those export options with a simple example and they gave the following results:

LaTeX picture

\setlength{\unitlength}{4144sp}%
%
\begingroup\makeatletter\ifx\SetFigFont\undefined%
\gdef\SetFigFont#1#2#3#4#5{%
  \reset@font\fontsize{#1}{#2pt}%
  \fontfamily{#3}\fontseries{#4}\fontshape{#5}%
  \selectfont}%
\fi\endgroup%
\begin{picture}(2505,1824)(76,-1423)
\thinlines
{\color[rgb]{0,0,0}\put(631,-61){\line( 1, 0){360}}
}%
{\color[rgb]{0,0,0}\put(631,-1051){\line( 1, 0){360}}
}%
{\color[rgb]{0,0,0}\put(2341,-331){\line( 1, 0){180}}
}%
{\color[rgb]{0,0,0}\put(991,-1411){\framebox(1350,1800){}}
}%
\put( 91,-151){\makebox(0,0)[lb]{\smash{{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}\$a\_i\$}%
}}}}
\put(136,-1141){\makebox(0,0)[lb]{\smash{{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}\$b\_i\$}%
}}}}
\put(2566,-376){\makebox(0,0)[lb]{\smash{{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}\$s\_i\$}%
}}}}
\put(1936,-1231){\makebox(0,0)[lb]{\smash{{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}CO}%
}}}}
\put(1306,164){\makebox(0,0)[lb]{\smash{{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}\$Sigma\$}%
}}}}
\end{picture}%

LaTeX picture + epic macros

\setlength{\unitlength}{0.00087489in}
%
\begingroup\makeatletter\ifx\SetFigFont\undefined%
\gdef\SetFigFont#1#2#3#4#5{%
  \reset@font\fontsize{#1}{#2pt}%
  \fontfamily{#3}\fontseries{#4}\fontshape{#5}%
  \selectfont}%
\fi\endgroup%
{\renewcommand{\dashlinestretch}{30}
\begin{picture}(2966,1839)(0,-10)
\drawline(555,1362)(915,1362)
\drawline(555,372)(915,372)
\drawline(2265,1092)(2445,1092)
\drawline(915,1812)(2265,1812)(2265,12)
    (915,12)(915,1812)
\put(15,1272){\makebox(0,0)[lb]{\smash{{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\updefault}\$a\_i\$}}}}
\put(60,282){\makebox(0,0)[lb]{\smash{{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\updefault}\$b\_i\$}}}}
\put(2490,1047){\makebox(0,0)[lb]{\smash{{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\updefault}\$s\_i\$}}}}
\put(1860,192){\makebox(0,0)[lb]{\smash{{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\updefault}CO}}}}
\put(1230,1587){\makebox(0,0)[lb]{\smash{{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\updefault}\$$\backslash$Sigma\$}}}}
\end{picture}
}

LaTeX picture + eepic macros and LaTeX picture + eepicemu macros

\setlength{\unitlength}{0.00087489in}
%
\begingroup\makeatletter\ifx\SetFigFont\undefined%
\gdef\SetFigFont#1#2#3#4#5{%
  \reset@font\fontsize{#1}{#2pt}%
  \fontfamily{#3}\fontseries{#4}\fontshape{#5}%
  \selectfont}%
\fi\endgroup%
{\renewcommand{\dashlinestretch}{30}
\begin{picture}(2966,1839)(0,-10)
\path(555,1362)(915,1362)
\path(555,372)(915,372)
\path(2265,1092)(2445,1092)
\path(915,1812)(2265,1812)(2265,12)
    (915,12)(915,1812)
\put(15,1272){\makebox(0,0)[lb]{\smash{{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\updefault}\$a\_i\$}}}}
\put(60,282){\makebox(0,0)[lb]{\smash{{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\updefault}\$b\_i\$}}}}
\put(2490,1047){\makebox(0,0)[lb]{\smash{{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\updefault}\$s\_i\$}}}}
\put(1860,192){\makebox(0,0)[lb]{\smash{{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\updefault}CO}}}}
\put(1230,1587){\makebox(0,0)[lb]{\smash{{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\updefault}\$$\backslash$Sigma\$}}}}
\end{picture}
}

Some differences

I compared some of them with meld and got these results

  • latex <-> epic: epic seems to be a lot shorter. The coordinates change. epic uses \drawline
  • epic <-> eepic: \drawline <-> \path
  • eepic <-> eepicemu: No diffences, I've combined them above

1 Answer 1

7

They are all very old. I'm not sure when epic started but the extended eepic manual is dated 1988. epic is an extended latex picture mode, but like picture mode uses TeX fonts and rules for drawing so is a bit limited and slow. eepic uses tpic specials to draw lines and circles eepicemu is an emulation package taking eepic syntax and falling back on epic drawing if the specials required are nit supported on the driver being used.

Really since native scalable backed formats such as PostScript an PDF have been available since the 1990's there isn't really a lot of justification for using them on new documents.

xfig for example has been able to generate eps or eps+latex for years which gives a far more direct representation of the vector drawing.

3
  • I would like to use math mode in xfig. So I can't simply export it to PDF only. I've just tried to include "Combined PDF/LaTeX" but the result is ugly: i.imgur.com/13dhJYr.png Apr 18, 2013 at 15:41
  • It works with PS/LaTeX export and \input{figure/exampleImage.pstex_t}, but then I have to change from pdflatex to latex :-/ Apr 18, 2013 at 15:45
  • @moose Not really: Just convert the eps to pdf and use pdflatex Apr 18, 2013 at 16:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .