207 [ -z "$QUIET" ] && echo "creating $PREFIX/document" >&2 |
206 [ -z "$QUIET" ] && echo "creating $PREFIX/document" >&2 |
208 mkdir document || fail "Bad directory: $PREFIX/document" |
207 mkdir document || fail "Bad directory: $PREFIX/document" |
209 |
208 |
210 [ -z "$QUIET" ] && echo "creating $PREFIX/document/root.tex" >&2 |
209 [ -z "$QUIET" ] && echo "creating $PREFIX/document/root.tex" >&2 |
211 TITLE=$(echo "$NAME" | tr _ -) |
210 TITLE=$(echo "$NAME" | tr _ -) |
212 AUTHOR=$("$AUTO_PERL" -e "@pw = getpwnam(\"$USER\"); print @pw[6]" | tr _ -) |
211 # a hack to extract the current user name |
|
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 |
213 cat >document/root.tex <<EOF |
219 cat >document/root.tex <<EOF |
214 \documentclass[11pt,a4paper]{article} |
220 \documentclass[11pt,a4paper]{article} |
215 \usepackage{isabelle,isabellesym} |
221 \usepackage{isabelle,isabellesym} |
216 |
222 |
217 % further packages required for unusual symbols (see also isabellesym.sty) |
223 % further packages required for unusual symbols (see also isabellesym.sty) |