The Translator

I have provided a translation program, gnut2p, to convert gnutex files to gnuplot files. This program does its best, but is not perfect. Most of gnutex will translate directly, some things will translated easily (such as set size), but some things cannot be translated (such as set style). This program moves plot commands down past the label and key commands (which change into set label and set key commands). This may move it past other commands. If it moves past variable or function definitions, set commands, or other commands which affect the plot command's execution, then the new version will be incorrect. I expect this case to be rare; indeed, I generally expect the last lines in GnuTEX input files used with LATEX to consist of plot, label, and key commands.

The usage of this program is simple:

   gnut2p infile outfile
infile is an existing GnuTEX file, and outfile will be created as the GNUPLOT equivalent. The errors, warnings, and explanatory comments appear on stderr. Any use of line continuation will be lost, and some instances of the input style (, white space) may be changed.