home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 5 Edit
/
05-Edit.zip
/
cpp2tex.zip
/
C++2ltx.zip
/
C++2dvi.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1997-01-28
|
1KB
|
40 lines
/* REXX script for transforming C/C++ file to .dvi using c2ps.awk */
/* This is optimized for OS/2 Warp */
/*
This script overcomes the problem of emTeX: tex386 changes
myunits.cpp.tex -> myunits.dvi 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: c2dvi _file_"
say
say "This script converts a C/C++ file to a .dvi file. It uses C++2ltx.awk."
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
/* NO:
say 'Preview by dvipm? [Y=yes]'
pull answer .
if answer='Y' then 'start dvipm @dvipm.cnf 'NEWFILE
*/
/* NO:
say 'Clean the garbage except 'NEWFILE'.ps [N=no]?'
pull answer .
if answer<>'N' then
'rm 'NEWFILE'.tex ' NEWFILE'.log ' NEWFILE'.aux' NEWFILE'.dvi'
*/