Hi,
I think there are two bugs in xfig/fig2dev when exporting to "TeX/LaTeX + tikz macros":
- fig with default font with TeX flag does not use the default LaTeX font of the including document
- items with black (not default) color in fig use the default (not black) color in the LaTeX document
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:
Both fig2dev and xfig generate a tikz failing to obey the "default" values of LaTeX documents.
I attach a zip with several files to reproduce the error (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)
There is unfortunately a grim mixture of default / black. When using xelatex, all text appears black. The reverse is true for pdflatex: All text appears in the color of the surrounding document.
There are two "default" fonts: One for Postscript fonts, one for LaTeX fonts. To obtain the font of the surrounding text in a tex-document, first "Use LaTeX fonts", then "default" must be chosen. Please. also note that "TeX text" and "Postscript/LaTeX" fonts are orthogonal to each other: One chooses the text encoding, such that, e.g, $x$ prints as an italic "x", the other chooses the font for display. The pict2e- and tikz drivers are happy to insert Postscript fonts into the export document.
Thanks for your response.
Using fig2dev with some options enables the generation of the desired tikz file. Especifically, -F unsets font family and the .tex default is used. Also, -C 1 unsets color one, so the default .tex color is used. I am still puzzled about the -C parameter, since the color list of help description with -h "(0=black, 1=red, etc.)" differs from that of the description in the fig2dev man page. Moreover, the color set to LaTeX default with "-C 1" seems to correspond with the xfig default color.
The incorrect tikz in the attached files can be correctly generated by
fig2dev -L tikz -i crono/ -F -C 1 crono.fig crono.tikz.The issue regarding the wrong colors and the erroneous help text is fixed in the development version of fig2dev. The
-C numoption should now be unneccesary. I would be grateful if you were able to build fig2dev from sources and test the expected behavior. Thanks again for reporting this issue.Works! -C is no longer needed.
There is no ./configure when downloading a snapshot. I've generated it with
autoreconf, without any options.Thank you for testing. Sorry, I did not mention that the development sources come without the configure script.
Fixed with release 3.2.7b.