Hi Alexis, At 2024-04-08T15:10:55+0200, Alexis (surryhill) wrote: > On Thu, Apr 04, 2024 at 08:26:44PM -0500, G. Branden Robinson wrote: > > Alexis, would you like to look into this more deeply, and maybe find a > > solution that will enable us to use ps2ps after all? > > Of course, Branden. Just to be sure I use the same code-path as you > did which command(s) did you use to build the HTML versions groff of > man pages?
Sure thing. This is the script I use to inspect groff's man pages (and a couple of other documents) for regressions before each push I do. It's saved me from embarrassment countless times. (So naturally I find other ways to embarrass myself.) To make it fully useful for regression testing, I keep a cached copy of the files it creates as of my last push, and then diff the cached and new directories. But you shouldn't need that additional infrastructure to reproduce the problem--if in fact you can, and it's not somehow an artifact of my environment. Regards, Branden
#!/bin/bash
set -e
if [ $# -ne 1 ]
then
echo "need a directory argument (e.g., \"old\", \"new\")" >&2
exit 1
fi
if ! [ -x ./build/test-groff ]
then
echo "./build/test-groff does not exist or is not executable" >&2
exit 2
fi
groff () {
../build/test-groff "$@"
}
BFLAG=
#BFLAG=-b
DIR=$1
MANS=(
./src/utils/lkbib/lkbib.1.man
./src/utils/tfmtodit/tfmtodit.1.man
./src/utils/hpftodit/hpftodit.1.man
./src/utils/pfbtops/pfbtops.1.man
./src/utils/afmtodit/afmtodit.1.man
./src/utils/lookbib/lookbib.1.man
./src/utils/addftinfo/addftinfo.1.man
./src/utils/xtotroff/xtotroff.1.man
./src/utils/indxbib/indxbib.1.man
./src/roff/nroff/nroff.1.man
./src/roff/troff/troff.1.man
./src/roff/groff/groff.1.man
./src/utils/grog/grog.1.man
./src/devices/grodvi/grodvi.1.man
./src/devices/grolbp/grolbp.1.man
./src/devices/grops/grops.1.man
./src/devices/grohtml/grohtml.1.man
./src/devices/grolj4/grolj4.1.man
./src/devices/grotty/grotty.1.man
./src/devices/gropdf/gropdf.1.man
./src/devices/gropdf/pdfmom.1.man
./src/devices/xditview/gxditview.1.man
./src/preproc/preconv/preconv.1.man
./src/preproc/tbl/tbl.1.man
./src/preproc/soelim/soelim.1.man
./src/preproc/eqn/eqn.1.man
./src/preproc/eqn/neqn.1.man
./src/preproc/pic/pic.1.man
./src/preproc/refer/refer.1.man
./src/preproc/grn/grn.1.man
./contrib/pic2graph/pic2graph.1.man
./contrib/hdtbl/groff_hdtbl.7.man
./contrib/mm/groff_mm.7.man
./contrib/mm/mmroff.1.man
./contrib/grap2graph/grap2graph.1.man
./contrib/pdfmark/pdfroff.1.man
./contrib/rfc1345/groff_rfc1345.7.man
./contrib/eqn2graph/eqn2graph.1.man
./contrib/gpinyin/gpinyin.1.man
./contrib/mom/groff_mom.7.man
./contrib/gdiffmk/gdiffmk.1.man
./contrib/glilypond/glilypond.1.man
./contrib/chem/chem.1.man
./contrib/gperl/gperl.1.man
./man/groff_tmac.5.man
./man/groff_out.5.man
./man/groff_diff.7.man
./man/groff_char.7.man
./man/groff.7.man
./man/roff.7.man
./man/groff_font.5.man
./tmac/groff_trace.7.man
./tmac/groff_me.7.man
./tmac/groff_ms.7.man
./tmac/groff_man.7.man
./tmac/groff_man_style.7.man
./tmac/groff_mdoc.7.man
./tmac/groff_www.7.man
)
MANS_SV=(
./contrib/mm/groff_mmse.7.man
)
mkdir "$DIR"
pushd "$DIR" >/dev/null
# the change logs, so we know approximately where we are
cp ../ChangeLog .
for d in chem gdiffmk glilypond gperl gpinyin hdtbl mm mom pdfmark rfc1345 \
sboxes
do
cp ../contrib/$d/ChangeLog ./ChangeLog.$d
done
# our Texinfo manual
cp ../build/doc/groff.txt .
# our Texinfo manual via HTML
cp ../build/doc/groff.html .
lynx -dump groff.html > groff.html.txt
# our ms manuals
groff $BFLAG -ww -Tutf8 -ept -ms ../doc/ms.ms > ms.txt
# our me manuals
#groff $BFLAG -ww -Tutf8 -me ../doc/meintro.me > meintro.txt
#groff $BFLAG -ww -Tutf8 -kt -me -mfr ../doc/meintro_fr.me > meintro_fr.txt
#groff $BFLAG -ww -Tutf8 -me ../doc/meref.me > meref.txt
me_pre=../ATTIC/my.me
groff $BFLAG -ww -Tutf8 -me $me_pre ../build/doc/meintro.me > meintro.txt
groff $BFLAG -ww -Tutf8 -kt -me -mfr $me_pre ../build/doc/meintro_fr.me \
> meintro_fr.txt
groff $BFLAG -ww -Tutf8 -me $me_pre ../build/doc/meref.me > meref.txt
for F in ${MANS[*]} ${MANS_SV[*]}
do
G=../build/${F%.man}
if [ -f "$G" ]
then
cp "$G" .
else
echo "warning: \"$G\" missing" >&2
fi
done
: ${AD:=l}
ARGS="$BFLAG -ww -dAD=$AD -rCHECKSTYLE=3 -rU1 -Tutf8 -e -t -mandoc"
NOCR=-rcR=0
LOCALE=
ARGS_HTML="$BFLAG -ww -rCHECKSTYLE=3 -Thtml -e -t -mandoc -P-C -P-G"
for P in *.[157]
do
if [ "$P" = groff_mmse.7 ]
then
LOCALE=-msv
else
LOCALE=
fi
echo $0: $P >&2
echo "groff $ARGS $LOCALE $P" > "$P.cR.txt"
groff $ARGS $LOCALE "$P" >> "$P.cR.txt"
echo "groff $ARGS $LOCALE $NOCR $P" > "$P.no-cR.txt"
groff $ARGS $LOCALE $NOCR "$P" >> "$P.no-cR.txt"
echo "<!-- groff $ARGS_HTML $LOCALE -P-I$P $P -->" > "$P.html"
groff $ARGS_HTML $LOCALE -P-I$P $P >> "$P.html"
rm "$P"
done
popd >/dev/null
# vim:set ai et sw=4 ts=4 tw=80:
signature.asc
Description: PGP signature
