commit:     c8bef70af0223ec814c9a16fec0a1d8895c71336
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Wed Oct  1 18:44:07 2025 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Wed Oct  1 18:44:07 2025 +0000
URL:        https://gitweb.gentoo.org/proj/pms.git/commit/?id=c8bef70a

Makefile: Replace mk4ht with make4ht

Use the modern interface recommended by upstream. As a welcome
side-effect, postprocessing with sed is no longer necessary.

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 Makefile | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/Makefile b/Makefile
index 422dac9..1850adf 100644
--- a/Makefile
+++ b/Makefile
@@ -50,21 +50,10 @@ pms.dvi: $(LATEXFILES) pms.bbl $(COMMITINFO)
 pms.html: $(LATEXFILES) pms.bbl $(COMMITINFO)
        set -e; sum=''; \
        while true; do \
-         mk4ht xhlatex pms 'xhtml,fn-in,charset=utf-8' ' -cunihtf -utf8'; \
+         make4ht -f xhtml pms fn-in; \
          oldsum=$${sum}; sum=$$(cksum $@); \
          test "$${sum}" != "$${oldsum}" || break; \
        done
-       @# replace ligatures by their component letters
-       LC_ALL=C sed -i "$$(printf 's/\\xef\\xac\\x8%s/%s/g;' \
-         0 ff 1 fi 2 fl 3 ffi 4 ffl)" $@
-       @# remove redundant span elements
-       LC_ALL=C sed -Ei ':x;/<span(\s+[^>]*)?$$/{N;bx;};'\
-       ':y;s,(<span\s+[^>]*>)([^<]*)</span>\1,\1\2,;ty' $@
-       @# guessable names for sections
-       LC_ALL=C sed -Ei \
-         -e 's/("#?)x1-[0-9]*00+([1-9][0-9]?")/\1chapter-\2/g' \
-         -e 's/("#?)x1-[0-9]*00+([1-9][0-9]?(\.[0-9]+)+")/\1section-\2/g' \
-         -e 's/("#?)x1-[0-9]*00+([A-Z](\.[0-9]+)*")/\1appendix-\2/g' $@
 
 pms.bbl: pms.bib $(LATEXFILES) $(COMMITINFO)
        $(aux-clean)

Reply via email to