diff options
author | Karl Berry <karl@freefriends.org> | 2022-06-06 20:30:44 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-06-06 20:30:44 +0000 |
commit | d66c6db555242a17b7039104ea50a2a5f391723b (patch) | |
tree | 3013d6cbd64367596e5c5535729b6f23020517e6 /Master/texmf-dist/doc/plain/pwebmac/makeall | |
parent | 64aea0294b8d9a307b05d1545c71fb02301e1aed (diff) |
pwebmac (6jun22)
git-svn-id: svn://tug.org/texlive/trunk@63501 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/plain/pwebmac/makeall')
-rw-r--r-- | Master/texmf-dist/doc/plain/pwebmac/makeall | 40 |
1 files changed, 26 insertions, 14 deletions
diff --git a/Master/texmf-dist/doc/plain/pwebmac/makeall b/Master/texmf-dist/doc/plain/pwebmac/makeall index 2a058c5c6f4..eeed9c76bc4 100644 --- a/Master/texmf-dist/doc/plain/pwebmac/makeall +++ b/Master/texmf-dist/doc/plain/pwebmac/makeall @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh PROG=$(basename $0) @@ -18,7 +18,7 @@ Options are (--long options only with GNU getopt): -n, --new Use 'pwebmac' instead of 'webmac' -o, --outdir ARG Create tarballs in path ARG -p, --pdftocfront Place TOC page at the front (PDF only) - -t, --tex ARG Use TeX variant ARG={tex,{hi,pdf,xe}tex} + -t, --tex ARG Use TeX variant ARG=[(hi|pdf|xe)]tex Public domain. Originally written by Andreas Scherer, 2020. HELP @@ -87,14 +87,14 @@ CWEAVE="cweave -f +lX" CTWILL="ctwill -f +lpdf" PAX="pax -wvzf" SED_I="sed -i" # non-GNU-sed requires an extra '' argument for '-i' option. -PDF=pdf +PDF=pdf # default extension for 'knuth-pdf' +HITEX="hitex --compress" # HINT format if [ hitex = $TEX ] then - $TEX -ini -jobname=hitex tex.ini - TEX="hitex --compress" - PDF=hnt + TEX="$HITEX" + PDF=hnt # default extension for 'knuth-hint' fi # WEB and CWEB programs we want to get formatted @@ -231,12 +231,21 @@ FI # FIX: pdfTeX uses '\pdfTeX' in section names; these should # appear correctly in the bookmarks, too. pdftex ) - if $NEW && [ tex != "$TEX" ] && [[ ! $TEX =~ hitex ]] + if $NEW && [ tex != "$TEX" ] && [ "$HITEX" != "$TEX" ] then $SED_I -e "s/\(\\\\def\\\\pdfTeX{pdf\\\\TeX}\)/\1 \\\\sanitizecommand\\\\pdfTeX{pdfTeX}\\\\sanitizecommand\\\\eTeX{e-TeX}/" \ $f.tex fi ;; + # FIX: weave uses '\max' in name of module 173; this should + # appear correctly in the bookmarks, too. + weave ) + if $NEW && [ tex != "$TEX" ] && [ "$HITEX" != "$TEX" ] + then + $SED_I -e "s/\(\\\\def\\\\({}\)/\\\\sanitizecommand\\\\max{max}\n\1/" \ + $f.tex + fi ;; + # FIX: purge obsolete macros from XeTeX. xetex ) $SED_I -e "/\\\\input xewebmac/d" $f.tex ;; esac @@ -264,11 +273,9 @@ FI then $f $f elif [ ctwill = $f ] then - if [[ $TEX =~ hitex ]] - then - CTWILLTEX=pdftex - else - CTWILLTEX="$TEX" + if [ "$HITEX" = "$TEX" ] + then CTWILLTEX=pdftex + else CTWILLTEX="$TEX" fi $CTWILLTEX $f # sort mini-indexes @@ -280,7 +287,7 @@ FI fi done -if ( $PDFTOCFRONT || [[ $TEX =~ hitex ]] ) && ! $FILESELECT +if ( $PDFTOCFRONT || [ "$HITEX" = "$TEX" ] ) && ! $FILESELECT then # create tarballs w/o changes for publication if $CHANGES @@ -292,7 +299,7 @@ then esac mv $f $(basename $f .$PDF)-changes.$PDF done - if [[ $TEX =~ hitex ]] + if [ "$HITEX" = "$TEX" ] then rm -f xetex-changes.pdf mv xetex.pdf xetex-changes.pdf @@ -349,6 +356,11 @@ then # Prepare 'cwebman' with footnotes describing the extended CWEB. f=$(kpsewhich -engine tex cwebman) tie -m $(basename $f) $f $(basename $f .tex)-w2c.ch + if [ "$HITEX" = "$TEX" ] + then + $SED_I -e "s/\(\\\\input cwebmac\)/\1\n\\\\input hiplainpage/" \ + cwebman.tex + fi touch pages.tex # let 'manmac' produce output at all |