Hi Alex, At 2025-05-02T14:42:12+0200, Alejandro Colomar wrote: > By default, I prefer keeping adjustment. Often, I want to see changes > in adjustment too as part fo the diff. Maybe I should add an option to > disable adjustment optionally, which could be useful in those cases > where the diff is a bit hard to understand.
For myself, I found that editorial changes to recast wording or otherwise add and remove material led to cascading reports of differences _only_ to spaces in adjusted lines, which usually aren't of interest to me. > > for P in *.[157] > > do > > if [ "$P" = groff_mmse.7 ] > > then > > LOCALE=-msv > > else > > LOCALE= > > fi > > What's -msv? groff_tmac(5): Localization packages For Western languages, an auxiliary package for localization sets the hyphenation mode and loads hyphenation patterns and exceptions. Localization files can also adjust the date format and provide translations of strings used by some of the full‐service macro packages; alter the input encoding (see the next section); and change the amount of additional inter‐sentence space. For Eastern languages, the localization file defines character classes and sets flags on them. By default, troffrc loads the localization file for English. ... sv Swedish; localizes man, me, mm, mom, and ms. Sets the input encoding to Latin‐1 by loading latin1.tmac. Some of the localization of the mm package is handled separately; see groff_mmse(7). > > echo $0: $P >&2 > > echo "groff $ARGS $LOCALE $P" > "$P.cR.txt" > > groff $ARGS $LOCALE "$P" >> "$P.cR.txt" > > ... > > done > > Would you mind sharing the entire script? I might get ideas for > improving diffman-git(1). Sure; it's crude and dumb (like its author?)--I don't generally spend a lot of software engineering effort on stuff I produce only for my own consumption. I've attached it. The script name is revealing of some of my music listening habits. > (And maybe you can drop your script if > diffman-git(1) would be good-enough for you.) If it stops working for the limited purpose I require it, I may look into alternatives. :) > The RE movement is intended to indent the "Since Linux 6.7," para. I'd need to look at more context, and haven't, but `IP` already does that. The interaction of `RS` and `RE` with `IP`, and the erstwhile lack of documentation thereof, is in fact the proximate cause of my involvement with groff development. groff_man_style(7): Notes Some tips on composing and troubleshooting your man pages follow. ... • RS doesn’t indent relative to my indented paragraph. The RS macro determines the inset amount, the position at which an ordinary paragraph (P and its synonyms) is set; the value of the IN register determines its default amount. This register also determines the default indentation used by IP, TP, and the deprecated HP. To create an inset relative to an indented paragraph, call RS repeatedly until an acceptable indentation is achieved, or give RS an indentation argument that is at least as much as the paragraph’s indentation amount relative to an adjacent ordinary (P) paragraph. Another approach to tagged paragraphs places an RS call immediately after the tag; this also forces a break regardless of the tag’s width, which some authors prefer. Follow‐up paragraphs under the tag can then be set with P instead of IP. Remember to use RE to end the indented region before starting the next tagged paragraph (at the appropriate nesting level). 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/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 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