Skip to content

Commit fe34bd1

Browse files
committed
build(run-latex2html): workaround for < v2025
1 parent a3aa5eb commit fe34bd1

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

scripts/run-latex2html.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
#!/bin/sh
1+
#!/bin/bash
22
#
33
# @file run-latex2html.sh
44
#
55
# Usage:
66
# run-latex2html.sh main.tex
77
#
8-
set -eu
8+
set -euo pipefail
99

1010
if [ $# -ne 1 ]; then
1111
echo "Usage: $(basename "$0") main.tex" >&2
@@ -41,8 +41,10 @@ LATEX2HTML_INIT=$BINDIR/.latex2html-init
4141
"$LATEX2HTML" -init_file "$LATEX2HTML_INIT" "$MAIN_PATH"
4242

4343
fix_html() {
44-
# HREF="main.html#SECTION..." -> HREF="#SECTION..."
45-
sed "s/$2.html#/#/g" "$1" >"$1.tmp"
44+
# (1) HREF="main.html#SECTION..." -> HREF="#SECTION..."
45+
# (2) workaround for latex2html < v2025
46+
# See: https://github.com/latex2html/latex2html/commit/b77ee98
47+
sed "s/$2.html#/#/g" "$1" | sed 's/&&#x308;#305;/\&iuml;/g' >"$1.tmp"
4648
mv "$1.tmp" "$1"
4749
}
4850

0 commit comments

Comments
 (0)