def recursive_inline(f, input_name, depth):
assert depth < 10, "probably found an [[!inline]]-loop"
+ skip = False # found the pattern <!-- hide -->
for line in f.readlines():
+ # skip hide/show
+ if skip:
+ if line.startswith("<!-- show -->"):
+ skip = False
+ continue
+ elif line.startswith("<!-- hide -->"):
+ skip = True
+ continue
+ # fix separation in comparison table
if input_name.endswith("comparison_table.tex") and \
line.startswith("\begin{itemize}"):
o.write(line)
o.write("\\itemsep -0.3em\n")
continue
+ # find actual inlines
if not line.startswith("[[!inline"):
o.write(line)
continue