diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-05-19 16:01:59 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-05-19 16:14:38 +0200 |
commit | 8f62477dad1daee79bdf2650aa8cca9bdd372e9c (patch) | |
tree | ba007b5bd6c2bf4b2de8ba40b700e6e6b4ea896c | |
parent | Bettre inclusion of attachements, +local url type. (diff) | |
download | vimwiki-scripts-8f62477dad1daee79bdf2650aa8cca9bdd372e9c.tar.gz vimwiki-scripts-8f62477dad1daee79bdf2650aa8cca9bdd372e9c.tar.xz |
Bettre inclusion of attachements, +local url type.
-rwxr-xr-x | do.py | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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) |