summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-05-19 16:01:59 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2022-05-19 16:14:38 +0200
commit8f62477dad1daee79bdf2650aa8cca9bdd372e9c (patch)
treeba007b5bd6c2bf4b2de8ba40b700e6e6b4ea896c
parentBettre inclusion of attachements, +local url type. (diff)
downloadvimwiki-scripts-8f62477dad1daee79bdf2650aa8cca9bdd372e9c.tar.gz
vimwiki-scripts-8f62477dad1daee79bdf2650aa8cca9bdd372e9c.tar.xz
Bettre inclusion of attachements, +local url type.
-rwxr-xr-xdo.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/do.py b/do.py
index 7ee4986..76a8fdb 100755
--- a/do.py
+++ b/do.py
@@ -198,8 +198,11 @@ def resolve_file(mode, source_file_name, addr, frag, comment):
full_file = path.join(path_base, addr)
if extension == 'pdf':
- s = '\\stepcounter{section}\n'
- s += '\\phantomsection\n'
+ s = ''
+ if mode == 'tex':
+ s += '\\stepcounter{section}\n'
+ s += '\\phantomsection\n'
+ # TODO header for txt mode?
# s += f'\\addcontentsline{{toc}}{{chapter}}{{{texify_filename(addr)}}}\n'
# s = f'\\includepdf[pages={{1}},width=\\textwidth]{{{full_file}}}\n'
s += includepdf(mode, addr, full_file)