Hi there...
I work with latex and use several figure files that I create with xfig so I have .fig files that need to be converted to .pstex and/or .pstex_t to be included. This is done with "fig2dev". Since I change the figures, I use a Makefile to reconvert them on-demand as needed. However, recently I've found myself creating and deleting several figures a lot, so to maintain the Makefile became not only tedious, but a source of mistakes. I decided to write a perl script to parse the latex file to find the figure inclusions and create the Makefile. So far, everything was ok. The remaining problem was that figures have to be magnified (size-changed), and this information is not in the latex file but depend on how they look: I choose the size manually in the Makefile. Therefore, I need the script first to parse the old Makefile to look for existing definitions and use them to write new ones. This also worked "ok": If I run
Code:
tex2make document.tex
it get the previous definitions and put them in the new file. I'm sending everything to the standard output, hoping to run
Code:
tex2make document.tex > Makefile
but in this case the script fails to read the old Makefile and moreover I get no Makefile. I've tried changing the name of the Makefile inside the script so It opens "Makefile.old", but this does not work either.
Do you have any idea about what could be happening here? Thank you very much in advance...