Thanks for the background info - I figured you had handcoded it. It looks great - however, since this needs to be a COMPLETELY automated process, and in the interests of minimizing major changes (eiiminating enscript just for this purpose seems a major and perhaps premature step) we might look at embedding sets of codes in the text to be swapped for PostScript code using sed or the equivalent, to delimit the tabular text from the text to be postscripted?Likely replace enscript as it allows formatting text using just script commands to build up a printer/PDF-ready PostScript file. Probably akin to what enscript is doing for ya, only this is customized to this project and intended to be 'editable' by anyone (though any code can be intimidating... and I'm a bit, er, 'over-experienced' at times).
(No experience with enscript, though. No reason to since first hand coded PostScript, uh, 24 years ago - initially with no books/instruction, just raw print files and guessed operators - all while limited to two $%^# blinking LEDs on an Apple Laserwriter II NTX for feedback (as it was 'custom' wired, to a non-serial port on an IBM, so no bi-directional feedback) ... those were the days! )Paging, initial and continuing page numbering and headers could be handled with/within the PostScript file in a number of easy ways. It handles selectively typesetting (tab layout, italics, bold) based on content and should be fairly easy for others to change. That facilitates 'dropping' it into a script setup - with easily handled minor exceptions... Any parenthesis and backslashes require a backslash pre-pended. So, simple search and replace parsing for those exceptions would be in order for each line prior to appending to 'output.ps'. The PostScript code handles the rest - ex: replacing the header with a 'cannon' version; and, shortening long weapon codes.
Or perhaps hand-coded tab stops in the text (at the top of each column), or the equivalent...?
As a long-term PostScript user myself, I admire your hard-earned PostScript kung-fu (I was a PageMaker/Quark/Illustrator operator in the late 80's - 90's) and am very familiar w/its idiosyncrasies and its capabilities - but I am wary at the prospect of replacing enscript and having to re-solve all the problems enscript solved or avoids) solely to achieve this single design goal (tab-delimited tables of Univers rather than monospace Courier).
As an aside, it's true that monospace fonts work better in some other ways (eg one can check for the length in characters of a monospace line of text more easily than a proportional font), but this is a minor consideration.
Overall, to me rewriting so much of the code for this single reason (Courier tables) was beyond the threshold of the 'cost-benefit' - but it would be the kind of thing I'd love to see someone other than me struggle with successfully. If it could be achieved it would be a nice 'upgrade' to the existing script.
Last edited: