Hi,
I think xfig should use relative paths when exporting to tikz.
If absolute paths are used (as xfig currently does), an exported tikz is valid for the exporting computer only. If relative paths were used, the tikz file would be valid for any computer, as long as the referenced pictures are stored in the same relative path.
MACHINE/OS:
Linux 4.19.0-1-amd64 #1 SMP Debian 4.19.12-1 (2018-12-22) x86_64 GNU/Linux
VERSIONS:
transfig(fig2dev) Version 3.2.7a
pdfTeX 3.14159265-2.6-1.40.19 (TeX Live 2019/dev/Debian)
DESCRIPTION:
I attach a zip with several files to reproduce the reported behavior (same file than previous report). It contains:
- example.tex (main tex file loading both a pdf_t and a tikz exported from a fig)
- example.pdf (pdf version of example.tex, generated with pdflatex)
- crono/crono.fig (fig file, including several image files)
- crono/crono.pdf,pdf_t (exported pdftex files)
- crono/crono.tikz (exported tikz file. Warning: full paths will no longer be valid)
- crono/* (several included jpeg/png images)
Thanks for your observation. The matter is indeed even worse: When exporting from xfig, absolute path names are used in the output files. In contrast, when using the fig2dev backend program directly, relative path names are used. For the time being, I recommend to create figures with xfig, and to convert the figures by invoking fig2dev from the command line. This will also allow to set options that are not accessible from within xfig. Recent versions of fig2dev output help text specific for a given output language, e.g.,
fig2dev -L tikz -h.Thanks for your response.
Effectively, fig2dev uses relative paths, and the -i option allows tuning the desired paths.
The incorrect tikz in the attached files can be correctly generated by
fig2dev -L tikz -i crono/ -F -C 1 crono.fig crono.tikz.With xfig 3.2.9, relative paths of embedded images are written to the fig file. If absolute paths are desired, an absolute path can be entered as picture filename (and must be entered manually).
Strangely, if the absolute path to an eps file that resides in the directory where xfig was started is given, the absolute path gets lost.
With 3.2.9a, relative files names are exported. Absolute paths also work.