Skip to content

Commit

Permalink
pandoc -V lang=en
Browse files Browse the repository at this point in the history
  • Loading branch information
entorb committed Mar 26, 2024
1 parent 59bd038 commit 084fc93
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion scripts/ebook/5.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ target_file="tmp/hpmor-epub-5-html-unmod.html"
title=$(grep "pdftitle=" layout/hp-header.tex | awk -F '[{}]' '{print $2}')
author=$(grep "pdfauthor=" layout/hp-header.tex | awk -F '[{}]' '{print $2}')

pandoc --standalone --from=latex+latex_macros $source_file -o $target_file --metadata title="$title" --metadata author="$author"
pandoc --standalone -V lang=en --from=latex+latex_macros $source_file -o $target_file --metadata title="$title" --metadata author="$author"
15 changes: 8 additions & 7 deletions scripts/ebook/6.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,14 @@
count=7,
)

# set language
cont = re.sub(
r'(<html [^>]*) lang="" xml:lang=""',
r'\1 lang="en" xml:lang="en"',
cont,
count=1,
)
# now done via pandoc -V lang=en in 5.sh
# # set language
# cont = re.sub(
# r'(<html [^>]*) lang="" xml:lang=""',
# r'\1 lang="en" xml:lang="en"',
# cont,
# count=1,
# )

# remove training slashes to satisfy https://validator.w3.org
cont = cont.replace("<br />", "<br>")
Expand Down

0 comments on commit 084fc93

Please sign in to comment.