diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /support/proof |
Initial commit
Diffstat (limited to 'support/proof')
-rw-r--r-- | support/proof/README | 81 | ||||
-rwxr-xr-x | support/proof/edit | 22 | ||||
-rw-r--r-- | support/proof/example.mf | 141 | ||||
-rw-r--r-- | support/proof/example.mp | 86 | ||||
-rw-r--r-- | support/proof/example.tex | 262 | ||||
-rwxr-xr-x | support/proof/install | 71 | ||||
-rwxr-xr-x | support/proof/proof | 427 | ||||
-rw-r--r-- | support/proof/proof.1 | 122 | ||||
-rw-r--r-- | support/proof/proofrc | 138 |
9 files changed, 1350 insertions, 0 deletions
diff --git a/support/proof/README b/support/proof/README new file mode 100644 index 0000000000..003346d656 --- /dev/null +++ b/support/proof/README @@ -0,0 +1,81 @@ +$Id: README,v 1.2 2002/09/30$ + +################################################################# +# proof v1.2 readme file # +################################################################# + + +DESCRIPTION + Proof is a shell based auxiliary program that's able to + process and view TeX, LaTeX, METAFONT and MetaPost sources + and thus can be used to quickly produce snapshots of TeX + related documents whenever necessary. Its main purpose + however is to act as a completion to an ordinary word pro- + cessing program which normally lacks appropriate facili- + ties to process TeX sources within a common TeX/LaTeX + environment. Here, Proof completely relieves the author of + doing shell related work and thus simplifies the process + of preparing PostScript/PDF documents particularly in + those cases where various different sources are involved. + Besides Proof offers a handy control mechanism that may be + accessed from within the editor being used, an interface + to common METAFONT font test algorithms and a simple back- + up facility ensuring that sourcefiles can easily be + restored when accidentally overwritten or deleted. For + further information on how to use this program see section + EXAMPLE please. + + +INSTALLATION + To install Proof to your system, simply type './install'. + This will install the files proof (shellscript), .proofrc + (config file) and proof.1.gz (manual page) and hence + should be done by the system admin unless you want to + change the default locations for the files referred to. + ('install' will prompt you, if you want to do so.) When + successfully installed, you should take a look at your + Proof configuration file .proofrc, located in your home + directory, which you may wish to modify to suit it to your + own needs. Finally, to ensure that the program works fine + in this environment, you should try to process the sample + files example.tex, example.mf and example.mp which are + also part of the distribution. (Use the sample editing + script 'edit' if you like. To do so, simply type "edit + example.tex", "edit example.mf" etc. on the commandline. + You may enter the name of your favourite word processing + program into the script prior to that.) Please consult + Proof manual page for further information on how to use + this program. + + +REQUIREMENTS + Proof should work properly on UNIX conformable platforms + (i. e. Linux, BSD etc.) provided that there's an intact + TeX/LaTeX environment (http://www.ctan.org) and GNU bash + (Bourne Again Shell), version 2.03 or later + (http://www.gnu.org/software/bash/bash.html). The install + script provided with Proof will show some useful informa- + tion on this topic. See also this list of auxiliary pro- + grams Proof is known to work fine with: TeX (Web2C 7.3.1) + 3.14159, e-TeX (Web2C 7.3.1) 3.14159-2.1, pdfTeX (Web2C + 7.3.1) 3.14159-0.13d, pdfeTeX (Web2C 7.3.1) + 3.14159-0.13d-2.1, Metafont (Web2C 7.3.1) 2.7182, MetaPost + (Web2C 7.3.1) 0.641, dvips v5.86, dvipdfm version 0.13.2c, + GNU ghostscript 7.05, gv 3.5.8, ghostview v1.5, xdvi(k) + version 22.05d-k, RCS version 5.7. + + +COPYRIGHT + Copyright (C) 2002 Klaus Bosau + + This program can be redistributed and/or modified under + the terms of the GNU General Public License as published + by the Free Software Foundation. (The exact wording can be + found at http://www.gnu.org/copyleft/gpl.html.) + + +Happy TeX'ing! + + +Klaus Bosau <kbosau@web.de> + diff --git a/support/proof/edit b/support/proof/edit new file mode 100755 index 0000000000..bb3f03c6c5 --- /dev/null +++ b/support/proof/edit @@ -0,0 +1,22 @@ +#!/bin/bash + +# $Id: edit,v 1.2 2002/09/30$ + +# +# Sample editing script (Usage: edit sourcefile) +# + +editor=${EDITOR:-vi} # <-- Enter your favourite editor here! +XOFF=0 # <-- Enter Proof's x-term window x offset here! +YOFF=0 # <-- Enter Proof's x-term window y offset here! + +[ $TERM != 'xterm' ] && { echo 'No graphical user interface!'; exit 1; } + +xterm -geometry "80x15+$XOFF+$YOFF" \ + -title 'Proof' \ + -e proof -P $1 & + +$editor $1 + +proof -T $1 + diff --git a/support/proof/example.mf b/support/proof/example.mf new file mode 100644 index 0000000000..de7194c990 --- /dev/null +++ b/support/proof/example.mf @@ -0,0 +1,141 @@ +% Sample METAFONT sourcefile () + +% Routines for the METAFONT logo, as found in The METAFONTbook +% Extended to characters P and S for John Hobby's METAPOST + +% 10-point METAFONT logo +font_size 10pt#; % the "design size" of this font +ht#:=6pt#; % height of characters +xgap#:=0.6pt#; % horizontal adjustment +u#:=4/9pt#; % unit width +s#:=0; % extra space at the left and the right +o#:=1/9pt#; % overshoot +px#:=2/3pt#; % horizontal thickness of pen + + +mode_setup; +if unknown slant: slant:=0 else: currenttransform:= + identity slanted slant yscaled aspect_ratio fi; + +ygap#:=(ht#/13.5u#)*xgap#; % vertical adjustment +ho#:=o#; % horizontal overshoot +leftstemloc#:=2.5u#+s#; % position of left stem +barheight#:=.45ht#; % height of bar lines +py#:=.9px#; % vertical pen thickness + +define_pixels(s,u); +define_whole_pixels(xgap); +define_whole_vertical_pixels(ygap); +define_blacker_pixels(px,py); +pickup pencircle xscaled px yscaled py; +logo_pen:=savepen; +define_good_x_pixels(leftstemloc); +define_good_y_pixels(barheight); +define_corrected_pixels(o); +define_horizontal_corrected_pixels(ho); + +def beginlogochar(expr code, unit_width) = + beginchar(code,unit_width*u#+2s#,ht#,0); + pickup logo_pen enddef; + +def super_half(suffix i,j,k) = + draw z.i{0,y.j-y.i} + ... (.8[x.j,x.i],.8[y.i,y.j]){z.j-z.i} + ... z.j{x.k-x.i,0} + ... (.8[x.j,x.k],.8[y.k,y.j]){z.k-z.j} + ... z.k{0,y.k-y.j} enddef; + +def super_crescent(suffix i,j,k) = + draw z.i{x.j-x.i,0} + ... (.8[x.i,x.j],.8[y.j,y.i]){z.j-z.i} + ... z.j{0,y.k-y.i} + ... (.8[x.k,x.j],.8[y.j,y.k]){z.k-z.j} + ... z.k{x.k-x.j,0} enddef; + +beginlogochar("M",18); +x1=x2=leftstemloc; x4=x5=w-x1; x3=w-x3; +y1=y5; y2=y4; bot y1=-o; +top y2=h+o; y3=y1+ygap; +draw z1--z2--z3--z4--z5; +labels(1,2,3,4,5); endchar; + +beginlogochar("E",14); +x1=x2=x3=leftstemloc; +x4=x6=w-x1+ho; x5=x4-xgap; +y1=y6; y2=y5; y3=y4; +bot y1=0; top y3=h; y2=barheight; +draw z6--z1--z3--z4; draw z2--z5; +labels(1,2,3,4,5,6); endchar; + +beginlogochar("T",13); +italcorr ht#*slant + .5u#; +if .5w<>good.x .5w: change_width; fi +lft x1=-eps; x2=w-x1; x3=x4=.5w; +y1=y2=y3; top y1=h; bot y4=-o; +draw z1--z2; draw z3--z4; +labels(1,2,3,4); endchar; + +beginlogochar("A",15); +x1=.5w; x2=x4=leftstemloc; x3=x5=w-x2; +top y1=h+o; y2=y3=barheight; +bot y4=bot y5=-o; +draw z4--z2--z3--z5; super_half(2,1,3); +labels(1,2,3,4,5); endchar; + +beginlogochar("F",14); +x1=x2=x3=leftstemloc; +x4=w-x1+ho; x5=x4-xgap; +y2=y5; y3=y4; bot y1=-o; +top y3=h; y2=barheight; +draw z1--z3--z4; draw z2--z5; +labels(1,2,3,4,5); endchar; + +beginlogochar("P",14); +x1=x2=x3=leftstemloc; +x4=x5=.618[x1,w-x1]; +y2=y5; y3=y4; bot y1=-o; +top y3=h; y2=barheight; +draw z1--z3--z4; draw z2--z5; +x6=.5[w-x1,lft w]; y6=.5[y4,y5]; +super_crescent(4,6,5); +labels(1,2,3,4,5,6); endchar; + +beginlogochar("S",14); +x3=x8=leftstemloc; +x1=w-x3; +x2=x4=.382[x3,x1]; +x5=x7=.9[x3,x1]; +x6=.5[x1,w]; +top y1=h; y4=barheight; bot y8=0; +y1=y2; y3=.6[y2,y4]; y4=y5; y6=.3[y5,y7]; y7=y8; +draw z1--z2; draw z4--z5; draw z7--z8; +super_crescent(2,3,4); +super_crescent(5,6,7); +labels(1,2,3,4,5,6,7,8); endchar; + +beginlogochar("O",15); +x1=x4=.5w; top y1=h+o; bot y4=-o; +x2=w-x3=good.x(1.5u+s); y2=y3=barheight; +super_half(2,1,3); super_half(2,4,3); +labels(1,2,3,4); endchar; + +beginlogochar("N",15); +x1=x2=leftstemloc; x3=x4=x5=w-x1; +bot y1=bot y4=-o; +top y2=top y5=h+o; y3=y4+ygap; +draw z1--z2--z3; draw z4--z5; +labels(1,2,3,4,5); endchar; + +ligtable "T": "A" kern -.5u#; +ligtable "F": "O" kern -u#; +ligtable "P": "O" kern u#; + +font_quad:=18u#+2s#; +font_normal_space:=6u#+2s#; +font_normal_stretch:=3u#; +font_normal_shrink:=2u#; +font_identifier:="MFLOGO" if slant<>0: & "SL" fi; +font_coding_scheme:="AEFMNOPST only"; + +bye + diff --git a/support/proof/example.mp b/support/proof/example.mp new file mode 100644 index 0000000000..ab38972393 --- /dev/null +++ b/support/proof/example.mp @@ -0,0 +1,86 @@ +% Sample MetaPost sourcefile () + + +beginfig(1); +a=.7in; b=0.5in; +z0=(0,0); z1=(a,0); z2=(0,b); +z0=.5[z1,z3]=.5[z2,z4]; +draw z1..z2..z3..z4..cycle; +drawarrow z0..z1; +drawarrow z0..z2; +label.top(btex $a$ etex, .5[z0,z1]); +label.lft(btex $b$ etex, .5[z0,z2]); +endfig; + + +beginfig(2); + +h=2in; w=2.7in; +path p[], q[], pp; +for i=1.5,2,4: + ii := i**2; + p[i] = (w/ii,h){1/ii,-1}...(w/i,h/i)...(w,h/ii){1,-1/ii}; +endfor +for i=.5,1.5: + q[i] = origin..(w,i*h) cutafter p1.5; +endfor + +pp = buildcycle(q0.5, p2, q1.5, p4); + +fill pp withcolor .8white; +z0=center pp; +picture lab; lab=thelabel(btex $f>0$ etex, z0); +unfill bbox lab; draw lab; +draw q0.5; draw p2; draw q1.5; draw p4; +makelabel.top(btex $P$ etex, p2 intersectionpoint q0.5); +makelabel.rt(btex $Q$ etex, p2 intersectionpoint q1.5); +endfig; + + +beginfig(3); + +3.2scf = 2.4in; +path fun; +# = .1; % Keep the function single-valued +fun = ((0,-1#)..(1,.5#){right}..(1.9,.2#){right}..{curl .1}(3.2,2#)) + scaled scf yscaled(1/#); + +vardef vertline primary x = (x,-infinity)..(x,infinity) enddef; +primarydef f atx x = (f intersectionpoint vertline x) enddef; +primarydef f whenx x = xpart(f intersectiontimes vertline x) enddef; + +z1a = (2.5scf,0); +z1 = fun atx x1a; +y2a=0; z1-z2a=whatever*direction fun whenx x1 of fun; +z2 = fun atx x2a; +y3a=0; z2-z3a=whatever*direction fun whenx x2 of fun; + +draw fun withpen pencircle scaled 1pt; +drawarrow (0,0)..(3.2scf,0); + +label.bot(btex $x_1$ etex, z1a); +draw z1a..z1 dashed evenly; +makelabel(nullpicture, z1); +draw z1..z2a withpen pencircle scaled .3; +label.bot(btex $x_2$ etex, z2a); +draw z2a..z2 dashed evenly; +makelabel(nullpicture, z2); +draw z2..z3a withpen pencircle scaled .3; +label.bot(btex $x_3$ etex, z3a); +endfig; + + +beginfig(4); +for i=0 upto 2: + z[i]=(0,40i); z[i+3]-z[i]=(100,30); +endfor +pickup pencircle scaled 18; +def gray = withcolor .8white enddef; +draw z0..z3 gray; +linecap:=butt; draw z1..z4 gray; +linecap:=squared; draw z2..z5 gray; +labels.top(0,1,2,3,4,5); +endfig; linecap:=rounded; + +end + diff --git a/support/proof/example.tex b/support/proof/example.tex new file mode 100644 index 0000000000..6434672017 --- /dev/null +++ b/support/proof/example.tex @@ -0,0 +1,262 @@ +% Sample LaTeX sourcefile () + +\documentclass[a4paper,twoside]{article} +\begin{document} + +\begin{verbatim} +PROOF(1) TeX Typesetting Tools PROOF(1) + + +NAME + proof - a simple but smart editor interface to common TeX, + LaTeX, METAFONT and MetaPost processing tasks + + +SYNOPSIS + proof [-P] [-abfp123xyzs] [-u routine] file + proof -T file + proof [-hv] + + +DESCRIPTION + Proof is a shell based auxiliary program that's able to + process and view TeX, LaTeX, METAFONT and MetaPost sources + and thus can be used to quickly produce snapshots of TeX + related documents whenever necessary. Its main purpose + however is to act as a completion to an ordinary word pro- + cessing program which normally lacks appropriate facili- + ties to process TeX sources within a common TeX/LaTeX + environment. Here, Proof completely relieves the author of + doing shell related work and thus simplifies the process + of preparing PostScript/PDF documents particularly in + those cases where various different sources are involved. + Besides Proof offers a handy control mechanism that may be + accessed from within the editor being used, an interface + to common METAFONT font test algorithms and a simple back- + up facility ensuring that sourcefiles can easily be + restored when accidentally overwritten or deleted. For + further information on how to use this program see section + EXAMPLE please. + + +OPTIONS + -P Enter preview mode - Use this option to start Proof + in its preview mode. When given on the commandline, + the file referred to is periodically checked + whether changes were made. If this is the case, + Proof will attempt to compile your document and + subsequently call the viewer to show its current + state. This previewing facility is completed by + other TeX related features you may select by + including one or more of the following options in + your command: + + -a Leave auxiliary files untouched - Auxiliary + files like .aux, .log, .idx and so on are + normally deleted when Proof terminates. This + option switches off this default behaviour. + + -b Create back-up file - Each time Proof termi- + nates, it creates a new back-up copy of the + current sourcefile. Alternatively you can + use Walter Tichy's "Revision Control System" + (RCS) to save your document, which might be + useful when editing larger documents. (see + your .proofrc file for further information + on RCS please) + + -f Use formatfile mylatex - A suitable format- + file can be obtained by running initex over + the current LaTeX source. ("initex \&latex + mylatex.ltx sourcefile" should work properly + on most platforms.) The newly created for- + matfile mylatex should then be moved to the + appropriate location in order to make it + accessible to Proof. (see your .proofrc file + on where this is) Alternatively you may have + Proof create a formatfile of your own, which + is the default behaviour if the -f option is + set and a suitable formatfile is not yet + available. + + -p Use PostScript-Type-1-fonts - Selects + PostScript-Type-1-fonts to process dvi- + files. The default is to use TeX's own font + family Computer Modern. (This option is in + effect only if you use Tomas Rokicki's + 'dvips' driver to process dvi-files!) + + -n METAFONT proofing mode n, where n can be 1, + 2 or 3 - This option takes effect only when + processing METAFONT files. In this case it + serves to select one out of three possible + methods sourcecode is processed and viewed. + Just try out which method fits best to your + needs. + + -x Generate dvi-file + + -y Generate ps-file (default) + + -z Generate pdf-file + + -u Call userdefined conversion routine - You + may define a conversion routine of your own + if you need a particular output file format + Proof does not provide. (see your .proofrc + file on how to do this) + + -s Skip viewing - Using this option causes that + Proof won't call the viewer to show changes. + Only the target file requested will be gen- + erated. + + Each of the options listed above may be handed over also + in the sourcecode itself. (A valid sourcecode entry has to + be in the form of a LaTeX comment string and must be + placed on the first line, for example like this in LaTeX + documents + + "\documentclass{article} % (-ab -u A5)" + + or this in METAFONT/MetaPost sourcecode + + "% (-ab2)".) + + Proof looks for this entry each time a new preview cycle + is lauched, so there's no need to start Proof anew if you + wish to alter the settings you made at startup. Simply + enter the right option in the first line of your document + prior to saving the buffer content and Proof will show a + different image of your document! This method's also rec- + ommended if you intend to work on more than one file at + the same time, since it ensures that each document is pro- + cessed automatically in the right manner, even if you + don't remember the original settings any more. However, if + you'd like to make use of this feature, keep in mind that + this would make both additional small letter commandline + options (except -h and -v) and existing environmental set- + tings ineffective. + + -T Leave preview mode and exit - Use this option to + close your editing session! Proof will check + whether the options -a and -b are set. You'll also + see a short list showing Proof's output. + + -h Print help message + + -v Print version information + + +NOTE + Omitting option -P when calling Proof haves the program + immediately terminate after the viewer is called. Use this + to create snapshots! It's also possible to view or convert + target files. "proof text.ps" for instance would simply + call the viewer needed to show the file's content, whereas + "proof -z text.ps" would prior to that create the corre- + sponding PDF version of the file referred to. (See your + .proofrc file on how to adjust a particular conversion + mechanism Proof uses.) + + +ENVIRONMENT + You may wish to use the environment variable PROOFOPTS to + adjust Proof's startup behaviour if neither commandline + options, nor sourcecode options are present. To do so, you + just have to build a string of those options you'd like to + be activated on startup. So "export PROOFOPTS='-P -fp'; + proof text.tex" for instance would do exactly the same as + "proof -P -fp text.tex" when given on the commandline. + + +EXAMPLE + To prepare your PostScript document, let's say text.ps, + you might proceed as follows: + + At first tell Proof which file to process, for instance by + typing "proof -P -fb text.tex" on the commandline. Proof + will then attempt to compile your sourcecode using your + formatfile mylatex as requested by handing over option -f, + and, if this worked out, call the viewer to show the com- + piler output. When this is done, call your favourite word + processing program and prepare your document as you nor- + mally would do. + + Now, if your document has grown and you'd like to see a + snapshot of its current state, just save the editor's + buffer content to disk. Proof will notice when this hap- + pens and immediately update the image if the viewer's + still running respectively start the viewer anew if it has + been stopped by user intervention. (There are a few view- + ing programs however, like T. Theisen's 'Ghostview' for + instance, which don't support reopen requests sent by + external programs, so maybe you have to reopen the file by + hand in order to make recent changes visible.) + + Finally, if your document has reached a definite state, + either type "proof -T text.tex" or simply hit 'Ctrl-C' in + Proof's active window. This tells Proof to save your + sourcefile text.tex according to the instructions fixed in + your .proofrc file and delete each of the auxiliary files + made during compilation. (To disable both commandline + options -f and -b (and any environmental settings too), + you would have to insert string "% (-)" in the first line + of your document.) Your PostScript document text.ps, + located in the current working directory, will be left + untouched. + + The method of procedure's just the same as above described + when processing METAFONT and MetaPost sources instead. + Option -z however, causing Proof to produce PDF output, + will be in effect only when processing TeX sources. + + +FILES + proof Shellscript. + + proofrc + Configuration file. + + proof.1 + Manual page. + + +REQUIREMENTS + Proof should work properly on UNIX conformable platforms + (i. e. Linux, BSD etc.) provided that there's an intact + TeX/LaTeX environment (http://www.ctan.org) and GNU bash + (Bourne Again Shell), version 2.03 or later + (http://www.gnu.org/software/bash/bash.html). The install + script provided with Proof will show some useful informa- + tion on this topic. See also this list of auxiliary pro- + grams Proof is known to work fine with: TeX (Web2C 7.3.1) + 3.14159, e-TeX (Web2C 7.3.1) 3.14159-2.1, pdfTeX (Web2C + 7.3.1) 3.14159-0.13d, pdfeTeX (Web2C 7.3.1) + 3.14159-0.13d-2.1, Metafont (Web2C 7.3.1) 2.7182, MetaPost + (Web2C 7.3.1) 0.641, dvips v5.86, dvipdfm version 0.13.2c, + GNU ghostscript 7.05, gv 3.5.8, ghostview v1.5, xdvi(k) + version 22.05d-k, RCS version 5.7. + + +REPORTING BUGS + Please send bug reports or suggestions to kbosau@web.de. + + +COPYRIGHT + Copyright (C) 2002 Klaus Bosau + + This program can be redistributed and/or modified under + the terms of the GNU General Public License as published + by the Free Software Foundation. (The exact wording can be + found at http://www.gnu.org/copyleft/gpl.html.) + + +SEE ALSO + tex(1), etex(1), pdftex(1), pdfetex(1), dvi2pdfm(1), + dvipdf(1), mf(1), mpost(1), rcsintro(1), mpman.pdf, mpin- + tro.pdf, metafp.ps, mylatex.ltx, fontsmpl.dvi +\end{verbatim} + +\end{document} + diff --git a/support/proof/install b/support/proof/install new file mode 100755 index 0000000000..d4d73fa3db --- /dev/null +++ b/support/proof/install @@ -0,0 +1,71 @@ +#!/bin/bash -e + +# $Id: install,v 1.2 2002/09/30$ + +# +# Proof install script +# + +# show system configuration! +function list_progs +{ + cmds=('bash --version' 'xterm -version' 'tex --version' \ + 'etex --version' 'pdftex --version' 'pdfetex --version' \ + 'mf --version' 'mpost --version' 'dvips --version' \ + 'dvipdfm --version' 'gs --version' 'rcs -V') + names=('GNU bash ' 'XFree86 ' 'TeX ' 'e-TeX '\ + 'pdfTeX ' 'pdf-e-TeX ' 'METAFONT ' 'MetaPost ' \ + 'dvips ' 'dvipdfm ' 'Ghostscript' 'RCS ') + + local i=0 cmd + until [ $i = 12 ]; do + cmd=${cmds[$i]} + echo -n "${names[$i]}: " + if type ${cmd% *} >/dev/null 2>&1; then + ver=$(echo "$(eval $cmd | sed '/^$/d;s/-release//g' | head -1)" | \ + sed 's/.*\ \([0-9]\+\.[0-9]\+[^\ ,]*\).*/\1/') + echo "${ver:+version $ver }found" + else + echo "<-- not installed!" + fi + i=$((i+1)) + done +} + +echo -e "You'll see a short list of those applications now Proof expects\nto be installed on your system. 'install' will complain if a\nparticular program cannot be found...\n" + +list_progs; echo + +read -p 'Install Proof? (y/n) ' +[ "$REPLY" = 'n' ] && { echo 'Ok, aborting...'; exit 0; } + +# copy Proof files! +inst_dirs=(/usr/local/bin ~ /usr/man/man1) +files=(proof .proofrc proof.1.gz) +types=(shellscript 'configuration file' 'manual page') + +function _cp +{ +sed ' +/^\.SH FILES/,/^$/{ + s:^\.I proof$:\.I '${inst_dirs[0]}'/proof: + s:^\.I proofrc$:\.I ~/\.proofrc: + s:^\.I proof\.1$:\.I '${inst_dirs[2]}'/proof\.1\.gz: +}' $1 | gzip -c >$2 +} + +echo +for i in 0 2; do + read -p "Install ${types[$i]} ${files[$i]} to ${inst_dirs[$i]}? (y/n) " + if [ "$REPLY" = 'n' ]; then + read -p 'Path? ' + eval inst_dirs[$i]=$REPLY + fi +done + +cp proof ${inst_dirs[0]}/${files[0]} +cp proofrc ${inst_dirs[1]}/${files[1]} +_cp proof.1 ${inst_dirs[2]}/${files[2]} + +echo -e '\nProof is now installed.' + diff --git a/support/proof/proof b/support/proof/proof new file mode 100755 index 0000000000..0af73fc017 --- /dev/null +++ b/support/proof/proof @@ -0,0 +1,427 @@ +#!/bin/bash + +# $Id: proof,v 1.2 2002/09/30$ + +################################################################################ +# Proof - A simple but smart editor interface to common # +# TeX/LaTeX and METAFONT/MetaPost processing tasks # +# # +# (Copyright (C) 2002 Klaus Bosau) # +################################################################################ + +function info +{ +echo \ +"Usage: proof [-P] [-abfp123xyzs] [-u routine] file + or: proof -T file + or: proof [-hv] + +Process and view TeX, LaTeX, METAFONT and MetaPost sourcecode + + -P enter preview mode + -T leave preview mode and exit + + -a leave auxiliary files untouched + -b create back-up file + -f use formatfile 'mylatex' + -p use PostScript-Type-1 fonts + -n METAFONT proofing mode n, where n can be 1, 2 or 3 + -x generate dvi-file + -y generate ps-file (default) + -z generate pdf-file + -u call userdefined conversion routine + -s don't call viewer + + -h print this help message + -v print version information + +Options -abfp123xyzus may be handed over also in the sourcecode itself. +(see Proof manual page on how to do this) However, if you'd like to make +use of this feature, you should keep in mind that this would make both ad- +ditional small letter commandline options (except -h and -v) and existing +environmental settings ineffective. + +Please send bug reports or suggestions to kbosau@web.de." +} + +configfile=~/.proofrc # default configuration file + +function error +{ + echo -e "--> ${0##*/}: $1" + [ "$2" ] && { [ "$action" = 'watch' ] && read; exit 1; } +} + +[ ! -e $configfile ] && error "Can't find configuration file!" halt + +# global initializations + +. $configfile + +optionlist=':PTfbap123xyzu:sv' # 'getopts' option list +nfsscmd='\table' # 'nfssfont' test command +FORMATFILEDIR=$(eval echo $FORMATFILEDIR) # assign absolute path + +# dvips +if [ "${DVI2PS%% *}" = 'dvips' ]; then + PDF_OPT='-P pdf -G0' # enable distilling to PDF + PSFONTS_OPT='-P cmz -P amz' # use PostScript-Type-1 fonts +fi + +# TeX +comp='tex' +init='tex --ini &latex mylatex.ltx' +virt='virtex --fmt latex' +myvirt='virtex --fmt mylatex' +formatfile='latex.fmt' +myformatfile='mylatex.fmt' +if [ "$USE_ETEX" = 'yes' ]; then + comp='etex' + init='etex --ini &elatex mylatex.ltx' + virt='evirtex --efmt elatex' + myvirt='evirtex --efmt mylatex' + formatfile='elatex.efmt' + myformatfile='mylatex.efmt' +fi + +# pdfTeX +pdfcomp='pdftex' +pdfvirt='pdfvirtex --fmt pdflatex' +if [ "$USE_ETEX" = 'yes' ]; then + pdfcomp='pdfetex' + pdfvirt='pdfevirtex --efmt pdfelatex' +fi + + +function option # checks if option is set +{ + local opt + + function opts + { + local line + + if line=$(head -1 $_source$_ext | grep '(-'); then + echo $line | sed 's/^.*(\(-[^)]*\)).*/\1/' # document + elif [ "$OPTS" ]; then + echo $OPTS # commandline + else + echo $PROOFOPTS # environment + fi + } + + [ ! -e $_source$_ext ] && return 1 + + if [ "$1" = 'y' ]; then + ! option x && ! option z && return 0 # enables default output filetype + else + OPTIND=1 + while getopts $optionlist opt $(opts); do + [ $opt = $1 ] && return 0 + done + fi + return 1 +} + + +function tex2dvi +{ + local cmd=$comp fdir=${FORMATFILEDIR:-$PWD} + + function _mv + { + [ $2 = $PWD ] && return 0 + mv $1 $2 + } + + if grep '^\(\\documentclass\|\\documentstyle\)' >/dev/null; then + cmd=$virt # LaTeX source + if option f; then + if [ ! -e $fdir/$myformatfile ]; then + echo "${0##*/}: Building formatfile..." + [ ! -d $fdir ] && \ + { error "Can't find directory $fdir!"; return 1; } + $init $_source && _mv $myformatfile $fdir || \ + { error 'Unable to install formatfile!'; return 1; } + rm -f mylatex.log; new_ff=yes + fi + cmd=$myvirt # read formatfile + fi + fi + $cmd --interaction=$REPORTMODE $1 +} <$_source$_ext + + +function tex2pdf +{ + local cmd=$pdfcomp + grep '^\(\\documentclass\|\\documentstyle\)' >/dev/null && cmd=$pdfvirt + $cmd --interaction=$REPORTMODE $1 +} <$_source$_ext + + +function pid # returns PID's matching given pattern +{ + $PROCSTAT | grep -v 'grep' | grep "$*" | sed 's/^\ *\([0-9]*\)\ .*$/\1/' +} + + +function view_file +{ + local cmd + + function tell # starts process only if not yet running (untested) + { + # force reread + [ -n "$(pid ghostview $2)" ] && return 0 + kill -SIGUSR1 $(pid xdvi.bin $2) >/dev/null 2>&1 && return 0 + kill -SIGHUP $(pid gv $2) >/dev/null 2>&1 && return 0 + + # start anew + $* & + } + + case "${1##*.}" in + dvi) cmd=$DVI_VIEWER; last=x;; + ps ) cmd=$PS_VIEWER; last=y;; + pdf) cmd=$PDF_VIEWER; last=z;; + esac + option s || tell $cmd $1 +} + + +function view # conversion and viewing +{ + + local dvi2ps=$DVI2PS + +function mk_test +{ +$virt --interaction=$REPORTMODE $1 <<EOF + $(echo $2 | tr ':' '\012') +EOF +if option x; then + view_file $1.dvi +else + $dvi2ps $1.dvi && \ + view_file $1.ps +fi +} + + [ $TERM != 'xterm' ] && { error 'No graphical user interface!'; return 1; } + + [ "$last" ] && { option $last || cleanup; } + + option p && dvi2ps="$dvi2ps $PSFONTS_OPT" + + if option u; then + if type $OPTARG &>/dev/null; then + $OPTARG $_source && view_file $_source.${ftypes##*->} + else + error "Can't find conversion routine $OPTARG!" + fi + return + fi + + case $_ext in + + .mf ) if option 2; then + mk_test nfssfont "${_source}:${nfsscmd}:\bye" + ftypes='*pk,tfm->' + elif option 3; then + mk_test fontsmpl "${_source}" + else + $MF --interaction=$REPORTMODE "\mode=proof; input $_source;" && \ + gftodvi $_source.*gf && \ + if option x; then + view_file $_source.dvi + ftypes='log,*gf,*pk,tfm,dvi->' + else + $dvi2ps $_source.dvi && \ + view_file $_source.ps + ftypes='log,*gf,*pk,tfm,dvi,ps->' + fi + fi;; + + .mp ) $MP --interaction=$REPORTMODE $_source && \ + tex2dvi "mproof $(ls $_source.[0-9]*)" && \ + if option x; then + view_file mproof.dvi + else + $dvi2ps mproof.dvi && \ + view_file mproof.ps + fi + ftypes='log,mpx->[0-9]';; + + .tex) if option x; then + tex2dvi $_source.tex && \ + view_file $_source.dvi + ftypes='log,aux->dvi' + elif option z; then + case "$TEXPDFMODE" in + 2) tex2dvi $_source.tex && \ + $DVI2PDF $_source.dvi + ftypes='log,aux,dvi->pdf';; + 3) tex2dvi $_source.tex && \ + $DVI2PS $PDF_OPT $_source.dvi && \ + $PS2PDF $_source.ps + ftypes='log,aux,dvi->pdf';; + *) tex2pdf $_source.tex + ftypes='log,aux->pdf';; + esac && view_file $_source.pdf + else + tex2dvi $_source.tex && \ + $dvi2ps $_source.dvi && \ + view_file $_source.ps + ftypes='log,dvi,aux,idx->ps' + fi;; + + .dvi) if option y; then + $dvi2ps $_source.dvi && \ + view_file $_source.ps + ftypes='->ps' + elif option z; then + case "$DVIPDFMODE" in + 2) $DVI2PS $PDF_OPT $_source.dvi && \ + $PS2PDF $_source.ps + ftypes='ps->pdf';; + *) $DVI2PDF $_source.dvi + ftypes='->pdf';; + esac && view_file $_source.pdf + else + view_file $_source.dvi + fi;; + + .ps ) if option z; then + $PS2PDF $_source.ps && \ + view_file $_source.pdf + ftypes='->pdf' + else + view_file $_source.ps + fi;; + + .pdf) view_file $_source.pdf;; + + esac + +} + + +function cleanup +{ + local aux all ign="\($_ext\|,v\|~\)$" files + + # clean up! + aux=${ftypes%->*} + ! option a && [ "$aux" ] && eval rm -f "$_source.{$aux,zzz}" + rm -f {fontsmpl,nfssfont,mproof}.* tmp* + + # list files! + all="\($(echo $ftypes | tr -d '*' | sed 's/->/,/g' | \ + sed 's/\(^,\|,$\)//;s/,/\\\|/g')\)$" + if [ "$ftypes" ] && files=$(ls $_source.* | grep -v "$ign" | grep "$all"); then + echo "${0##*/}: $PWD <-- "$files + else + echo "${0##*/}: no output" + fi + [ "$new_ff" ] && echo "${0##*/}: ${FORMATFILEDIR:-$PWD} <-- $myformatfile" + + # ftypes='aux,dvi->ps' --> + # --> delete {aux,dvi} if requested and show {aux,dvi,ps} if found +} + + +function backup +{ + function backup_file + { + declare -i n=$BACKUP_FILES + + cp $1 $1.0~ + until [ -e $1.$n~ ]; do + n=$((n-1)) + done + n=$((n+1)) + + declare -i i=$n + while [ $i -gt 0 ]; do + mv $1.$((i-1))~ $1.$i~ + i=$((i-1)) + done + + [ $n -gt $BACKUP_FILES ] && rm -f $1.$n~ + } + + if [ "$USE_RCS" = 'yes' ] && type 'ci' &>/dev/null; then + # call RCS + echo "${0##*/}: RCS:"; ci -l $_source$_ext + else + # default back-up method + [ "$USE_RCS" = 'yes' ] && \ + error "Can't find RCS! Using default back-up procedure instead..." + backup_file $_source$_ext + echo "${0##*/}: $PWD <-- $_source$_ext.1~" + fi +} + + +function terminate # log out procedure +{ + cleanup + option b && backup + [ "$action" = 'watch' ] && read +} + + +# process options! +while getopts $optionlist opt; do + case $opt in + P ) action=watch;; + T ) action=quit;; + v ) echo 'proof v1.2'; exit 0;; + \? ) info; exit 1;; + esac + OPTS=$* +done +OPTS="${OPTS% *}" +shift $(($OPTIND - 1)) + +# check syntax! +[ -z "$1" ] && error 'Please specify your document!' halt +! echo $1 | grep '\(.mf\|.mp\|.tex\|.dvi\|.ps\|.pdf\)$' >/dev/null && \ + error "Unknown file type!" halt +[ "$action" != 'quit' ] && [ ! -e "$1" ] && error "Can't find file $1!" halt + +# go! +case "$action" in + + quit ) kill -TERM $(pid "${0##*/}"'.*'-P'.*'"$1") >/dev/null 2>&1;; + + * ) # set shell variables! + cd $(dirname $1) || exit 1 + _ext=".${1##*.}" + _source=$(basename $1 $_ext) + current=/tmp/proof-$$ # preserves st_mtime + + # set signal trap! + trap 'rm -f $current; terminate; exit 0' INT TERM + + # wait until file exists! + [ ! -e "$1" ] && until [ -e $_source$_ext ]; do sleep 1; done + + view + + # view only? + [ -z "$action" ] && { terminate; exit 0; } + + # watch! + echo >$current + while :; do + until [ $_source$_ext -nt $current ]; do + sleep 1 + done + view; echo >$current + done;; + +esac + diff --git a/support/proof/proof.1 b/support/proof/proof.1 new file mode 100644 index 0000000000..06a5cb993e --- /dev/null +++ b/support/proof/proof.1 @@ -0,0 +1,122 @@ +.TH PROOF 1 "Sep 2002" proof "TeX Typesetting Tools" +." $Id: proof.1,v 1.2 2002/09/30$ +." Process this file with "groff -man -Tascii proof.1" + +.SH NAME +proof \- a simple but smart editor interface to common TeX, LaTeX, METAFONT and MetaPost processing tasks + +.SH SYNOPSIS +.B proof +[\fI-P\fR] [\fI-abfp123xyzs\fR] [\fI-u\fR routine] \fIfile\fR +.br +.B proof +\fI-T\fR \fIfile\fR +.br +.B proof +[\fI-hv\fR] + +.SH DESCRIPTION +\fBProof\fR is a shell based auxiliary program that's able to process and view TeX, LaTeX, METAFONT and MetaPost sources and thus can be used to quickly produce snapshots of TeX related documents whenever necessary. Its main purpose however is to act as a completion to an ordinary word processing program which normally lacks appropriate facilities to process TeX sources within a common TeX/LaTeX environment. Here, \fBProof\fR completely relieves the author of doing shell related work and thus simplifies the process of preparing PostScript/PDF documents particularly in those cases where various different sources are involved. Besides \fBProof\fR offers a handy control mechanism that may be accessed from within the editor being used, an interface to common METAFONT font test algorithms and a simple back-up facility ensuring that sourcefiles can easily be restored when accidentally overwritten or deleted. For further information on how to use this program see section \fBEXAMPLE\fR please. + +.SH OPTIONS +.TP +\fB-P\fR +Enter preview mode - Use this option to start \fBProof\fR in its preview mode. When given on the commandline, the file referred to is periodically checked whether changes were made. If this is the case, \fBProof\fR will attempt to compile your document and subsequently call the viewer to show its current state. This previewing facility is completed by other TeX related features you may select by including one or more of the following options in your command: +.RS +.TP +\fB\-a\fR +Leave auxiliary files untouched - Auxiliary files like \fI.aux\fR, \fI.log\fR, \fI.idx\fR and so on are normally deleted when \fBProof\fR terminates. This option switches off this default behaviour. +.TP +\fB\-b\fR +Create back-up file - Each time \fBProof\fR terminates, it creates a new back-up copy of the current sourcefile. Alternatively you can use Walter Tichy's "Revision Control System" (RCS) to save your document, which might be useful when editing larger documents. (see your \fI.proofrc\fR file for further information on RCS please) +.TP +\fB\-f\fR +Use formatfile \fImylatex\fR - A suitable formatfile can be obtained by running initex over the current LaTeX source. ("initex \e&latex mylatex.ltx sourcefile" should work properly on most platforms.) The newly created formatfile \fImylatex\fR should then be moved to the appropriate location in order to make it accessible to \fBProof\fR. (see your \fI.proofrc\fR file on where this is) Alternatively you may have \fBProof\fR create a formatfile of your own, which is the default behaviour if the \fB\-f\fR option is set and a suitable formatfile is not yet available. +.TP +\fB\-p\fR +Use PostScript-Type-1-fonts - Selects PostScript-Type-1-fonts to process dvi-files. The default is to use TeX's own font family Computer Modern. (This option is in effect only if you use Tomas Rokicki's 'dvips' driver to process dvi-files!) +.TP +\fB\-n\fR +METAFONT proofing mode n, where n can be 1, 2 or 3 - This option takes effect only when processing METAFONT files. In this case it serves to select one out of three possible methods sourcecode is processed and viewed. Just try out which method fits best to your needs. +.TP +\fB\-x\fR +Generate dvi-file +.TP +\fB\-y\fR +Generate ps-file (default) +.TP +\fB\-z\fR +Generate pdf-file +.TP +\fB\-u\fR +Call userdefined conversion routine - You may define a conversion routine of your own if you need a particular output file format \fBProof\fR does not provide. (see your \fI.proofrc\fR file on how to do this) +.TP +\fB\-s\fR +Skip viewing - Using this option causes that \fBProof\fR won't call the viewer to show changes. Only the target file requested will be generated. +.RE +.PP +Each of the options listed above may be handed over also in the sourcecode itself. (A valid sourcecode entry has to be in the form of a LaTeX comment string and must be placed on the first line, for example like this in LaTeX documents +.RS +.TP +"\edocumentclass{article} % (\fB-ab -u\fR A5)" +.RE +.PP +or this in METAFONT/MetaPost sourcecode +.RS +.TP +"% (\fB-ab2\fR)".) +.RE +.PP +\fBProof\fR looks for this entry each time a new preview cycle is lauched, so there's no need to start \fBProof\fR anew if you wish to alter the settings you made at startup. Simply enter the right option in the first line of your document prior to saving the buffer content and \fBProof\fR will show a different image of your document! This method's also recommended if you intend to work on more than one file at the same time, since it ensures that each document is processed automatically in the right manner, even if you don't remember the original settings any more. However, if you'd like to make use of this feature, keep in mind that this would make both additional small letter commandline options (except \fB-h\fR and \fB-v\fR) and existing environmental settings ineffective. +.TP +\fB\-T\fR +Leave preview mode and exit - Use this option to close your editing session! \fBProof\fR will check whether the options \fB-a\fR and \fB-b\fR are set. You'll also see a short list showing \fBProof\fR's output. +.TP +\fB\-h\fR +Print help message +.TP +\fB\-v\fR +Print version information + +.SH NOTE +Omitting option \fB-P\fR when calling \fBProof\fR haves the program immediately terminate after the viewer is called. Use this to create snapshots! It's also possible to view or convert target files. "\fBproof\fR \fItext.ps\fR" for instance would simply call the viewer needed to show the file's content, whereas "\fBproof -z\fR \fItext.ps\fR" would prior to that create the corresponding PDF version of the file referred to. (See your \fI.proofrc\fR file on how to adjust a particular conversion mechanism \fBProof\fR uses.) + +.SH ENVIRONMENT +You may wish to use the environment variable \fBPROOFOPTS\fR to adjust \fBProof\fR's startup behaviour if neither commandline options, nor sourcecode options are present. To do so, you just have to build a string of those options you'd like to be activated on startup. So "export \fBPROOFOPTS\fR='\fB-P -fp\fR'; \fBproof\fR \fItext.tex\fR" for instance would do exactly the same as "\fBproof\fR \fB-P -fp\fR \fItext.tex\fR" when given on the commandline. + +.SH EXAMPLE +To prepare your PostScript document, let's say \fItext.ps\fR, you might proceed as follows: + +At first tell \fBProof\fR which file to process, for instance by typing "\fBproof -P -fb\fR \fItext.tex\fR" on the commandline. \fBProof\fR will then attempt to compile your sourcecode using your formatfile \fImylatex\fR as requested by handing over option \fB-f\fR, and, if this worked out, call the viewer to show the compiler output. When this is done, call your favourite word processing program and prepare your document as you normally would do. + +Now, if your document has grown and you'd like to see a snapshot of its current state, just save the editor's buffer content to disk. \fBProof\fR will notice when this happens and immediately update the image if the viewer's still running respectively start the viewer anew if it has been stopped by user intervention. (There are a few viewing programs however, like T. Theisen's 'Ghostview' for instance, which don't support reopen requests sent by external programs, so maybe you have to reopen the file by hand in order to make recent changes visible.) + +Finally, if your document has reached a definite state, either type "\fBproof -T\fR \fItext.tex\fR" or simply hit 'Ctrl-C' in \fBProof\fR's active window. This tells \fBProof\fR to save your sourcefile \fItext.tex\fR according to the instructions fixed in your \fI.proofrc\fR file and delete each of the auxiliary files made during compilation. (To disable both commandline options \fB-f\fR and \fB-b\fR (and any environmental settings too), you would have to insert string "% (\fB-\fR)" in the first line of your document.) Your PostScript document \fItext.ps\fR, located in the current working directory, will be left untouched. + +The method of procedure's just the same as above described when processing METAFONT and MetaPost sources instead. Option \fB-z\fR however, causing \fBProof\fR to produce PDF output, will be in effect only when processing TeX sources. + +.SH FILES +.TP +.I proof +Shellscript. +.TP +.I proofrc +Configuration file. +.TP +.I proof.1 +Manual page. + +.SH REQUIREMENTS +\fBProof\fR should work properly on UNIX conformable platforms (i. e. Linux, BSD etc.) provided that there's an intact TeX/LaTeX environment (\fIhttp://www.ctan.org\fR) and GNU bash (Bourne Again Shell), version 2.03 or later (\fIhttp://www.gnu.org/software/bash/bash.html\fR). The install script provided with \fBProof\fR will show some useful information on this topic. See also this list of auxiliary programs \fBProof\fR is known to work fine with: TeX (Web2C 7.3.1) 3.14159, e-TeX (Web2C 7.3.1) 3.14159-2.1, pdfTeX (Web2C 7.3.1) 3.14159-0.13d, pdfeTeX (Web2C 7.3.1) 3.14159-0.13d-2.1, Metafont (Web2C 7.3.1) 2.7182, MetaPost (Web2C 7.3.1) 0.641, dvips v5.86, dvipdfm version 0.13.2c, GNU ghostscript 7.05, gv 3.5.8, ghostview v1.5, xdvi(k) version 22.05d-k, RCS version 5.7. + +.SH "REPORTING BUGS" +Please send bug reports or suggestions to kbosau@web.de. + +.SH COPYRIGHT +Copyright (C) 2002 Klaus Bosau + +This program can be redistributed and/or modified under the terms of the GNU General Public License as published by the Free Software Foundation. (The exact wording can be found at \fIhttp://www.gnu.org/copyleft/gpl.html\fR.) + +.SH "SEE ALSO" +\fBtex\fR(1), \fBetex\fR(1), \fBpdftex\fR(1), \fBpdfetex\fR(1), \fBdvi2pdfm\fR(1), \fBdvipdf\fR(1), \fBmf\fR(1), \fBmpost\fR(1), \fBrcsintro\fR(1), \fImpman.pdf\fR, \fImpintro.pdf\fR, \fImetafp.ps\fR, \fImylatex.ltx\fR, \fIfontsmpl.dvi\fR + diff --git a/support/proof/proofrc b/support/proof/proofrc new file mode 100644 index 0000000000..24b4148a1a --- /dev/null +++ b/support/proof/proofrc @@ -0,0 +1,138 @@ +# $Id: proofrc,v 1.2 2002/09/30$ + +################################################################################ +# Proof configuration file # +################################################################################ + +USE_ETEX=no +# Causes that e-TeX is called to compile TeX sources. Default is to call +# the original TeX binary designed by D. E. Knuth. (Take care when changing +# this entry, for e-TeX would be called in extended mode by default, where +# it's not fully compatible to TeX!) + +TEXPDFMODE=1 +# Tells Proof how to process tex-files in order to end up with a pdf-file. +# Three different methods are currently implemented. Choose the one that fits +# best to your needs! +# 1 : call Han The Thanh's 'pdftex' (.tex ===================> .pdf) +# 2 : call Mark A. Wicks's 'dvipdfm' (.tex --> .dvi ==========> .pdf) +# 3 : call L. Peter Deutsch's 'Ghostscript' (.tex --> .dvi --> .ps ==> .pdf) + +DVIPDFMODE=1 +# Tells Proof how to process dvi-files in order to end up with a pdf-file. +# Two different methods are currently implemented. Choose the one that fits +# best to your needs! +# 1 : call Mark A. Wicks's 'dvipdfm' (.dvi ==========> .pdf) +# 2 : call L. Peter Deutsch's 'Ghostscript' (.dvi --> .ps ==> .pdf) + +REPORTMODE=errorstopmode +# This entry provides an interface to TeX's error reporting facilities. +# Suitable values are 'errorstopmode', 'scrollmode', 'nonstopmode' and +# 'batchmode'. (see TeX's manual page on what this exactly means...) + +#FORMATFILEDIR='~/.TeX' +# This variable denotes the location where Proof expects to find the current +# formatfile 'mylatex'. The default is to put it in the current working di- +# rectory. Uncomment this line if you want your formatfile to be unique for +# all documents you work on. + +USE_RCS=no +# Causes that RCS (Revision Control System) software (if available) is used +# to save your document. This is useful especially when editing larger +# documents where the need to restore an elder, well defined revision might +# arise. A second advantage of this method lies in the fact that it saves +# diskspace cause only file changes are saved to disk and not whole files. +# (For further information, please take a look at 'rcsintro' manual page!) + +BACKUP_FILES=7 +# This option takes effect only if you don't use RCS to backup your docu- +# ment. In this case, each time you exit, a new back-up copy of your +# sourcefile would be created, where BACKUP_FILES denotes the maximum +# number of back-up files, that are simultaniously kept in the working +# directory. Back-up files are marked by a filename suffix showing their +# chronological origin, i. e. larger file indices denote elder files. + +PROCSTAT='ps aw' +# This command is used for process status reporting. (Depends on the sys- +# tem you are running! On Linux platforms the default setting should work +# properly. System V and BSD might need a slightly different setting.) + + +# The sections below need to be modified only if you wish to adjust the +# startup behaviour of a particular auxiliary program Proof calls. + + +############################### driver section ################################# + +DVI2PS=dvips +# .dvi --> .ps (Tomas Rokicki) + +DVI2PDF=dvipdfm +# .dvi --> .pdf (Mark A. Wicks) + +PS2PDF=ps2pdf +# .ps --> .pdf (Ghostscript, L. Peter Deutsch) + +MF=mf +# .mf --> .gf (METAFONT, D. E. Knuth) + +MP=mpost +# .mp --> .ps (MetaPost, John Hobby) + + +############################### viewer section ################################# + +DVI_VIEWER='xdvi -keep -paper a4 -geometry 550x580' +# Viewer command for .dvi-files with default options + +PS_VIEWER='ghostview -title -magstep -2' +# Viewer command for .ps-files with default options + +PDF_VIEWER='gv -spartan -monochrome -watch -center -resize' +# Viewer command for .pdf-files with default options + + +############################# conversion section ############################### + +# You may enter a conversion routine of your own here if you need a particular +# output file format Proof does not provide. To do so, simply put your code in +# an ordinary shell function and use positional parameter $1 to access the +# sourcecode you'd like to process. Proof expects the target file to wear the +# same basename. Its filename suffix however is derived from a string variable +# called 'ftypes', which thus has to be declared within the shell function +# referred to! +# The meaning of 'ftypes' is very straightforward. The left hand entries +# denote the filename suffices of less important files that should be deleted +# when Proof exits (this entry is optional), whereas the right hand side +# denotes the filename suffix of the target file being produced. So +# ftypes='log,aux->dvi' for instance would have Proof treat $1.log, $1.aux +# like auxiliary files (These files are deleted when Proof exits, unless +# the '-a' option is given!) and $1.dvi like the target file that has to be +# left untouched. If you need temporary files, make sure that the filename +# prefix is 'tmp'! Those files are deleted too on exit. Use Proof's '-u' +# option to call conversion routine you added! + +# Two sample conversion routines: + +function A5 # generates DIN A5 booklet +{ + ftypes='log,aux,dvi->ps' + + latex $1 + dvips -o tmp-in.ps $1.dvi + psresize -Pa4 -pa5 tmp-in.ps tmp.ps + psbook -s16 tmp.ps tmp-sorted.ps + pstops '4:0L(21cm,0)+1L(21cm,14.85cm),2R(0,29.7cm)+3R(0,14.85cm)' \ + tmp-sorted.ps $1.ps +} + +function A4toA5 # scales DIN A4 documents down to DIN A5 +{ + ftypes='log,aux,dvi->ps' + + latex $1 + dvips -t landscape -x 707 -o tmp.ps $1.dvi + psbook -s16 tmp.ps tmp-sorted.ps + pstops '2:0(.744cm,.744cm)+1(.744cm,-14.106cm)' tmp-sorted.ps $1.ps +} + |