From 4f20a928b2a2c849ebdad8121a231419b69f157d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Wed, 1 Jun 2022 18:02:00 +0200 Subject: Add detokenzie for includepdf. --- do.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/do.py b/do.py index 5ddc592..eb63ea7 100755 --- a/do.py +++ b/do.py @@ -40,7 +40,9 @@ def includepdf(mode, addr, full_file): arg += f',pagecommand={{{pagecommand}}}' arg += ',width=\\textwidth' before = f'\\rhead{{Bilaga \\Alph{{section}}.\\arabic{{subsection}} {texify_filename(addr)} }}\n' - return before + f'\\phantomsection\\stepcounter{{subsection}}\n\\includepdf[{arg}]{{{full_file}}}\n' + before += f'\\phantomsection\\stepcounter{{subsection}}\n' + before += f'\\includepdf[{arg}]{{\\detokenize{{{full_file}}}}}\n' + return before elif mode == 'txt': return f"Se pdf {addr}\n" -- cgit v1.2.3