home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 5 Edit
/
05-Edit.zip
/
cpp2tex.zip
/
C++2ltx.zip
/
C++2ps.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1997-01-28
|
1KB
|
41 lines
/* REXX script (mostly for OS/2) for transforming C/C++ file to PostScript
using the program C++2ltx.awk
This script overcomes the problem of emTeX and input TeX files with many
dots: program tex386 changes e.g. myunits.cpp.tex -> myunits.dvi
(middle part taken away) instead of myunits.cpp.dvi
Requirements: your AWKPATH environmental variable must point to
a directory where the file C++2ltx.awk is located
*/
parse arg FILE
if (FILE="") then do
say
say "Syntax: C++2ps _file_"
say
say "This script converts a C/C++ file to a .ps file. It uses C++2ltx.cmd."
say "The C/C++ extended comments are denoted by /*+ ... */ and //+ ..."
exit
end
NEWFILE=translate(FILE,"_",".") /* replace dots by underscores */
'@echo off'
'call C++2ltx 'FILE'>'NEWFILE'.tex'
'call latex 'NEWFILE
'call dvips 'NEWFILE
say 'Preview by dvipm? [Y=yes]'
pull answer .
if answer='Y' then 'start dvipm @dvipm.cnf 'NEWFILE
say 'Preview by GhostView? [Y=yes]'
pull answer .
if answer='Y' then 'start gvpm 'NEWFILE'.ps'
say 'Clean the garbage except 'NEWFILE'.ps [N=no]?'
pull answer .
if answer<>'N' then
'rm 'NEWFILE'.tex ' NEWFILE'.log ' NEWFILE'.aux' NEWFILE'.dvi'