[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ePiX-devel] Automatic format detection
From: |
Andrew D. Hwang |
Subject: |
[ePiX-devel] Automatic format detection |
Date: |
Thu, 30 Aug 2007 22:04:10 -0400 (EDT) |
Given the choice of output formats, it seems convenient to have elaps and
flix automatically detect the LaTeX packages they need from an eepic file.
(Currently, elaps automatically loads epic, eepic, xcolor, and pstricks;
this is ugly and seems potentially error-prone.)
One approach is to have each ePiX output format write a line of the form
%% usepackage <latex package(s)>
in the comment block of the output file, then to have the shell scripts
read this line when they process the file, something like:
LATEX_PKGS=$(grep "%% usepackage " <infile>.eepic)
ELAPS_PKGS="$ELAPS_PKGS,${LATEX_PKGS#%% usepackage }"
Pleasantly, this requires no maintenance changes to the scripts when a new
format is introduced, just the initial lines of code. However, I have only
two test platforms, both GNU-ish. Are there portability problems with this
scheme?
On a tangent, eepic is no longer the sole (or even preferred) output
format. Does it make sense to:
1. Change the output file extension to ".tex"? Something else...?
2. Make the default format tikz or pstricks? (That is, in the absence of a
"pst_format() or tikz_format() command in the input file, write the
output file using something other than eepic macros.)
Thanks,
Andy
Andrew D. Hwang address@hidden
Department of Math and CS http://mathcs.holycross.edu/~ahwang
College of the Holy Cross (508) 793-2458 (Office: 320 Swords)
Worcester, MA, 01610-2395 (508) 793-3530 (fax)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [ePiX-devel] Automatic format detection,
Andrew D. Hwang <=