Skip to content

Commit 327b83c

Browse files
committed
fixing followup error
1 parent 9c0b22c commit 327b83c

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

scripts/ebook/hpmor-ebook.tex

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@
77

88
\input{layout/hp-intro}
99

10-
\renewenvironment{headlines}{}{}
11-
\renewenvironment{writtenNote}{}{}
12-
\renewenvironment{playdialog}{}{}
13-
1410
\newcommand{\writtenNoteA}[1]{\par\textcolor{writtenNote}{#1}}
1511
\renewcommand{\parsel}[1]{\textcolor{parsel}{#1}}
1612
\renewcommand{\McGonagallWhiteBoard}[1]{\textcolor{McGonagallWhiteBoard}{\par#1}}

scripts/ebook/step_3.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,16 @@
2525
date_str = dt.datetime.now(dt.UTC).date().strftime("%d.%m.%Y")
2626
cont = cont.replace("\\today{}", date_str)
2727

28+
# empty the newenvironments: headlines, writtenNote, playdialog
29+
# to prevent implications on other cleanup scripts
30+
cont = re.sub(
31+
r"\\newenvironment\{(headlines|writtenNote|playdialog)\}.*?\n\n",
32+
r"\\newenvironment{\1}{}{}\n\n",
33+
cont,
34+
flags=re.DOTALL,
35+
count=3,
36+
)
37+
2838
# writtenNote env -> \writtenNoteA
2939
cont = re.sub(
3040
r"\s*\\begin\{writtenNote\}\s*(.*?)\s*\\end\{writtenNote\}",

0 commit comments

Comments
 (0)