From ab2bce21ac83e6ad6cc649ef09cd4bae334e4417 Mon Sep 17 00:00:00 2001 From: Ulrich Müller Date: Tue, 27 Dec 2022 22:35:14 +0100 Subject: Makefile: Use guessable names for section references in HTML output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This replaces the "x1*" fragment identifiers by more predictable ones with a "chapter", "section", or "appendix" prefix. This is possible because our section numbers are unique. Signed-off-by: Ulrich Müller --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 89fd7a2..c882534 100644 --- a/Makefile +++ b/Makefile @@ -54,6 +54,11 @@ pms.html: $(LATEXFILES) pms.bbl $(COMMITINFO) @# remove redundant span elements LC_ALL=C sed -Ei ':x;/]*)?$$/{N;bx;};'\ ':y;s,(]*>)([^<]*)\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) -- cgit v1.2.3-65-gdbad