1@echo off 2Rem This script runs groff without requiring that it be installed. 3Rem The current directory must be the build directory. 4 5test -d ./src/roff/groff 6if not errorlevel 1 goto dirOk 7echo this batch file must be run with the build directory as the current directory 8goto end 9:dirOk 10test -x ./src/roff/groff/groff 11if not errorlevel 1 goto groffOk 12echo this batch file must be run with the build directory as the current directory 13goto end 14:groffOk 15Rem chdir to src, to avoid overflowing the DOS limits with a long PATH. 16cd src 17set GROFF_FONT_PATH=..;../font 18set GROFF_TMAC_PATH=../tmac 19set PATH1=%PATH% 20set PATH=roff\troff;preproc\pic;preproc\eqn;preproc\tbl;preproc\grn;preproc\refer;preproc\soelim;devices\grotty;%PATH1% 21Rem 22echo I will use this command to format a document and print it on the screen: 23roff\groff\groff -V -e -s -t -p -R -m ttchar -me -Tascii ../doc/meintro.me 24pause 25Rem Make the following command pipe to Less if you have Less installed: 26roff\groff\groff -e -s -t -p -R -m ttchar -me -Tascii ../doc/meintro.me 27Rem 28set PATH=roff\troff;preproc\pic;preproc\eqn;preproc\tbl;preproc\grn;preproc\refer;preproc\soelim;devices\grops;%PATH1% 29echo I will use this command to format a document and print it on PS printer: 30roff\groff\groff -V -e -s -t -p -R -me -Tps ../doc/meintro.me 31pause 32Rem Uncomment the following command if you have a PostScript printer: 33REM roff\groff\groff -e -s -t -p -R -me -Tps ../doc/meintro.me >>prn 34Rem 35set PATH=roff\troff;preproc\pic;preproc\eqn;preproc\tbl;preproc\grn;preproc\refer;preproc\soelim;devices\grolj4;%PATH1% 36echo I will use this command to format a document and print it on LJ4 printer: 37roff\groff\groff -V -e -s -t -p -R -me -Tlj4 ../doc/meintro.me 38pause 39Rem Uncomment the following command if you have a LaserJet4 printer: 40REM roff\groff\groff -e -s -t -p -R -me -Tlj4 ../doc/meintro.me >>prn 41Rem 42set PATH=roff\troff;preproc\pic;preproc\eqn;preproc\tbl;preproc\grn;preproc\refer;preproc\soelim;devices\grodvi;%PATH1% 43echo I will use this command to format a document into a DVI format: 44roff\groff\groff -V -e -s -t -p -R -me -Tdvi ../doc/meintro.me 45pause 46roff\groff\groff -e -s -t -p -R -me -Tdvi ../doc/meintro.me > meintro.dvi 47set PATH=roff\troff;preproc\pic;preproc\eqn;preproc\tbl;preproc\grn;preproc\refer;preproc\soelim;devices\grohtml;%PATH1% 48echo I will use this command to format a document into HTML format: 49roff\groff\groff -V -e -s -t -p -R -me -Thtml ../doc/meintro.me 50pause 51roff\groff\groff -e -s -t -p -R -me -Thtml ../doc/meintro.me > meintro.html 52set PATH=roff\troff;preproc\pic;preproc\eqn;preproc\tbl;preproc\grn;preproc\refer;preproc\soelim;devices\grolbp;%PATH1% 53echo I will use this command to format a document and print it on an LBP printer: 54roff\groff\groff -V -e -s -t -p -R -me -Tlbp ../doc/meintro.me 55pause 56Rem Uncomment the following if you have a Canon CAPSL LBP-4 or LBP-8 printer: 57REM roff\groff\groff -e -s -t -p -R -me -Tlbp ../doc/meintro.me >>prn 58Rem 59set PATH=%PATH1% 60set GROFF_FONT_PATH= 61set GROFF_TMAC_PATH= 62set PATH1= 63cd .. 64:exit 65