195 fi |
195 fi |
196 |
196 |
197 |
197 |
198 # document directory |
198 # document directory |
199 |
199 |
200 #set by configure |
|
201 AUTO_PERL=perl |
|
202 |
|
203 if [ -e document ]; then |
200 if [ -e document ]; then |
204 echo "keeping $PREFIX/document" >&2 |
201 echo "keeping $PREFIX/document" >&2 |
205 else |
202 else |
206 [ -z "$QUIET" ] && echo "creating $PREFIX/document" >&2 |
203 [ -z "$QUIET" ] && echo "creating $PREFIX/document" >&2 |
207 mkdir document || fail "Bad directory: $PREFIX/document" |
204 mkdir document || fail "Bad directory: $PREFIX/document" |
208 |
205 |
209 [ -z "$QUIET" ] && echo "creating $PREFIX/document/root.tex" >&2 |
206 [ -z "$QUIET" ] && echo "creating $PREFIX/document/root.tex" >&2 |
210 TITLE=$(echo "$NAME" | tr _ -) |
207 TITLE=$(echo "$NAME" | tr _ - | tr -d '\\') |
211 # a hack to extract the current user name |
208 AUTHOR=$(echo "By $USER" | tr _ - | tr -d '\\') |
212 PERLLINE='@pw = getpwnam("'$USER'"); $uname = $pw[6]; |
|
213 $uname =~ tr/_/-/; $uname =~ s/^[^\\]*\\//g; $uname =~ s/,S[0-9\-]+$//g; print $uname;' |
|
214 AUTHOR=$("$AUTO_PERL" -e "$PERLLINE") |
|
215 # the perl "getpwnam" function extracts a data entry |
|
216 # from /etc/passwd; the first tr is to replace some characters |
|
217 # undigestible for tex; the two regexp substs eliminate the |
|
218 # windows domain-specific noise as found in /etc/passwd using cygwin |
|
219 cat >document/root.tex <<EOF |
209 cat >document/root.tex <<EOF |
220 \documentclass[11pt,a4paper]{article} |
210 \documentclass[11pt,a4paper]{article} |
221 \usepackage{isabelle,isabellesym} |
211 \usepackage{isabelle,isabellesym} |
222 |
212 |
223 % further packages required for unusual symbols (see also isabellesym.sty) |
213 % further packages required for unusual symbols (see also |
224 % use only when needed |
214 % isabellesym.sty), use only when needed |
225 %\usepackage{amssymb} % for \<leadsto>, \<box>, \<diamond>, |
215 |
226 % \<sqsupset>, \<mho>, \<Join>, |
216 %\usepackage{amssymb} |
227 % \<lhd>, \<lesssim>, \<greatersim>, |
217 %for \<leadsto>, \<box>, \<diamond>, \<sqsupset>, \<mho>, \<Join>, |
228 % \<lessapprox>, \<greaterapprox>, |
218 %\<lhd>, \<lesssim>, \<greatersim>, \<lessapprox>, \<greaterapprox>, |
229 % \<triangleq>, \<yen>, \<lozenge> |
219 %\<triangleq>, \<yen>, \<lozenge> |
230 %\usepackage[greek,english]{babel} % greek for \<euro>, |
220 |
231 % english for \<guillemotleft>, |
221 %\usepackage[greek,english]{babel} |
232 % \<guillemotright> |
222 %option greek for \<euro> |
233 % default language = last |
223 %option english (default language) for \<guillemotleft>, \<guillemotright> |
234 %\usepackage[latin1]{inputenc} % for \<onesuperior>, \<onequarter>, |
224 |
235 % \<twosuperior>, \<onehalf>, |
225 %\usepackage[latin1]{inputenc} |
236 % \<threesuperior>, \<threequarters>, |
226 %for \<onesuperior>, \<onequarter>, \<twosuperior>, \<onehalf>, |
237 % \<degree> |
227 %\<threesuperior>, \<threequarters>, \<degree> |
238 %\usepackage[only,bigsqcap]{stmaryrd} % for \<Sqinter> |
228 |
239 %\usepackage{eufrak} % for \<AA> ... \<ZZ>, \<aa> ... \<zz> |
229 %\usepackage[only,bigsqcap]{stmaryrd} |
240 % (only needed if amssymb not used) |
230 %for \<Sqinter> |
241 %\usepackage{textcomp} % for \<cent>, \<currency> |
231 |
|
232 %\usepackage{eufrak} |
|
233 %for \<AA> ... \<ZZ>, \<aa> ... \<zz> (also included in amssymb) |
|
234 |
|
235 %\usepackage{textcomp} |
|
236 %for \<cent>, \<currency> |
242 |
237 |
243 % this should be the last package used |
238 % this should be the last package used |
244 \usepackage{pdfsetup} |
239 \usepackage{pdfsetup} |
245 |
240 |
246 % urls in roman style, theory text in math-similar italics |
241 % urls in roman style, theory text in math-similar italics |