'\" t .\" ** The above line should force tbl to be a preprocessor ** .\" Man page for fig2ps, based on the one from ctioga(1) .\" .\" Copyright 2004,2005,2006,2009 by Vincent Fourmond .\" .\" You may distribute under the terms of the GNU General Public .\" License as specified in the file GPL.txt that comes with the .\" fig2ps program. .\" .pc .TH FIG2PS 1 "2009-01-01" "Version 1.4" "Conversion from XFig to PS/EPS/PDF" .SH NAME fig2ps, fig2eps,fig2pdf \- Convert xfig files in ps|pdf, processing all the text marked as special with LaTeX. .SH SYNOPSIS .B fig2ps \fR[\fB\-h\fR|\fB\-\-help\fR] .B fig2ps [\fI options \fR] .I file1.fig \fR[\fIfile2.fig ...\fR] .B fig2pdf [\fI options \fR] .I file1.fig \fR[\fIfile2.fig ...\fR] .SH DESCRIPTION .B fig2ps converts figures produced by XFig into postscript or PDF, processing the text with LaTeX. It takes advantage of the .I pstex and .I pstext_t export formats of .BR fig2dev . .B fig2ps converts successively all the files given as arguments. It's behaviour is governed by quite a few options. In all the options, the .B = sign is optional, so that .I fig2ps \-\-bbox=dvips file.fig and .I fig2ps \-\-bbox dvips file.fig are equivalent. .SH EXAMPLES To convert .I file.fig to PS: .I fig2ps file.fig To convert it to PDF: .I fig2pdf file.fig or .I fig2ps --pdf file.fig If the XFig file you want to convert to PDF contains included images, you might want to try: .I fig2pdf --manual-ps2pdf file.fig .SH OPTIONS .TP 4 .B \-\-gv, \-\-nogv If on, .B fig2ps runs .B gv on every file just after they are produced. On by default if .B fig2ps thinks it is talking to a terminal (ie not from a pipe). You might want to switch that off when processing lots of files. .TP .B \-\-xpdf Views produced files with .B xpdf rather than .B gv\fR. Obviously, that won't be really useful if you are producing PS files, you've been warned. .TP .B \-\-viewer\fI=command Runs .I command rather than .B gv on the produced files. .TP .B \-\-keep Tells .B fig2ps to keep the temporary directory in which temporary files are created. Useful for debugging. If this option is on, .B fig2ps prints the name of the directory when it has finished its job, so you know where to look. .TP .B \-\-packages\fI=pack1,pack2,... Sets the package list to be used to .I pack1,pack2,...\fR. Resets any package given by the .B --add command-line option. For more information about packages, see the section .B PREAMBLE below. .TP .B \-\-add\fI=pack1,pack2,... Adds .I pack1,pack2,... to the existing list of packages. See the section .B PREAMBLE below. This option is cumulative. .TP .B \-\-bbox\fI=dvips|gs|a,b,c,d Chooses the method to determine the bounding box of the files. See the section .B BOUNDING BOX below for more information. .TP .B \-\-input\fI=file Uses file as a template for the LaTeX file. More information about that can be found in the section .B PREAMBLE below. This option was written for a private use, though you can of course profit from it. However, most of the times, what you really want is .IR --add=file . .I file will be looked for using .BR kpsewhich . .TP .B \-\-pdf, \-\-nopdf Whether the final output of .B fig2ps will be PDF or postscript. This option is automatically when called as .BR fig2pdf . Note that in any case, .B fig2ps has to go through Postscript output to produce a PDF file. .TP .B \-\-eps Change the output default extension from .I .ps to .IR .eps . This is on by default when the program is called as .BR fig2eps . It has no other effects. .TP .B \-\-manual\-ps2pdf When producing PDF files, .B fig2ps uses .B epstopdf to perform the conversion. This may lead to bad quality output with embedded pictures. The use of this option disables PDF production by .B epstopdf and lets .B ps2pdf produce the final output PDF (but after tweaking the PS file using .B epstopdf\fR). In general, this produces much better results. .TP .B \-\-ps2pdf\-options When .I "--manual-ps2pdf" does not produce output of decent quality, you can use this option to manually feed options to .B ps2pdf\fR. The use of this option implies .I \-\-manual\-ps2pdf\fR. .TP .B \-\-keepps When producing a PDF file, asks .B fig2ps to keep the intermediary Postscript file. .TP .B \-\-forcespecial, \-\-noforcespecial .B fig2ps only processes with LaTeX text which is marked as .I special in the Fig file. When this option is on, all text is treated as if it was marked with the .I special flag. .TP .B \-\-dvips\fI=string Passes .I string as options for .BR dvips . .TP .B \-\-fig2dev\fI=string Passes .I string as options for .BR fig2dev . .TP .B \-\-preamble\fI=string Adds .I string in the preamble of the LaTeX file generated, just before the .I \ebegin{document} stanza. Effects are cumulative. .TP .B \-V\fR, \fB \-\-version Prints the version of .B fig2ps and exits. .SH CONFIGURATION FILES Many of the command-line options can be set in either the system-wide (in .I /etc\fR) or the user configuration file (in the user's home directory). Some more details can be configured in the configuration files. Global configuration is overridden by users' configuration which in turn is overridden by the command line options. Here is a list of the variables you can define: .TP 4 .B PACKAGES\fI=pack1,pack2... Defines the basic list of packages. See the .B PREAMBLE section. .TP .B ADD\fI=pack1,pack2 Has the same effect as the .B --add command-line option. Does not make too much sense in the global configuration file, but you might want to use it in a personal one. .TP .B DOC_CLASS\fI=class Sets the document class used by LaTeX. .TP .B DOC_OPTIONS\fI=Ioptions Sets the options for the document class. .TP .B FORCE_SPECIAL\fI=0\fR|\fI1 Sets the default for option .B \-\-forcespecial\fR. .TP .B GV\fI=0\fR|\fI1 Sets the default for option .B \-\-gv\fR. .TP .B GV\fI=file Has the same effect as the .B \-\-input command-line option. .TP .B PREAMBLE\fI=string Identical to the .B \-\-preamble option, with the slight difference that the in configuration files, it is not cumulative: the last assignment seen is the only taken into account. .TP .B KEEP_PS\fI=0\fR|\fI1 Sets the default for option .B \-\-keepps\fR. .SH PREAMBLE The preamble of the LaTeX file is built as such: .TP 2 .B * if a .B \-\-input file is specified, it will be used directly with a .I \einput statement. A .I \edocumentclass statement will be added if the input file does not contain any. .TP .B * else, a preamble is made based on the values of .B DOC_CLASS\fR, .B DOC_OPTIONS\fR, and .B PACKAGES (the latter is overridden by the .B \-\-packages command-line option). See below for the format of the package variables. .P Then, the packages specified using the .B ADD variable and the .B \-\-add command-line options are added to the preamble, followed by the .I geometry package that deals with setting the size of the output (tweaked for .B fig2ps\fR's purposes) and finally the contents of the .B PREAMBLE variable and the .B \-\-preamble command-line options. .P The .B \-\-packages and .B \-\-add options, and the corresponding variables, take a comma separated list of packages. Options for the packages can be specified in two ways: .TP 4 .I [option]package in which you can only specify one option; .TP .I option1:option2:...:package in which you can specify an arbitrary number of options, as long as you don't need a comma inside an option. Should the need arise, use .B \-\-preamble\fR. .SH BOUNDING BOX One of the delicate jobs of .B fig2ps is to set the bounding box of the produced file, that is the rectangle that holds the figure. There are basically three ways for .B fig2ps to get them: .TP 4 .I dvips In this mode, .B fig2ps runs .B dvips with the .I \-E option. It works reasonably fine most of the time, but it will produce incorrect results if you have rotated text near the edge of the graph. .TP .I gs Asks .B gs to tell the bounding box of the figure. It used to produce systematically perfect results, but the quality has degraded somehow recently. It still works in most of the cases, and that is why it is the default. It fails on very large pictures. .TP .I a,b,c,d Specify your bounding box by hand. .P The benefits of using the last two methods is that .B fig2ps tells you how big the picture is (in centimeters). .SH FILES .I /etc/fig2ps/fig2ps.rc\fR, .I $HOME/.fig2ps.rc The .I examples/ directory in the source tarball contains some examples. Check .B fig2ps on them to see if it works fine, but keep in mind that .B fig2ps will choke on .I examples/Large-example.fig ! .SH SEE ALSO .B xfig\fR(1), .B fig2dev\fR(1), .B latex\fR(1), .B gv\fR(1), .B gs\fR(1), .B kpsewhich\fR(1) The Sourceforge project page at: .I http://sourceforce.net/projects/fig2ps .SH AUTHOR This script was written by Vincent Fourmond, from an original idea of Seb Desreux (the first script is for private use, and used the eepic export of xfig, which is severely limitated), improved by a few others... .SH BUG REPORT AND FEATURE REQUESTS Please use the tracker from the Sourceforge project page: .I https://sourceforge.net/tracker/?group_id=125824