File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 1
1
"""Tasks for compiling the paper and presentation(s)."""
2
2
3
+ import os
3
4
import shutil
5
+ from pathlib import Path
4
6
5
7
import pytask
8
+ import pytask_latex .path
6
9
from pytask_latex import compilation_steps as cs
7
10
8
11
from template_project .config import BLD , DOCUMENTS , ROOT
9
12
13
+
14
+ def new_relative_to (path : Path , relative_to_ : Path ) -> str :
15
+ if relative_to_ .is_absolute ():
16
+ return relative_to_ .as_posix ()
17
+ return Path (os .path .relpath (relative_to_ , path .parent )).as_posix ()
18
+
19
+
20
+ pytask_latex .path .relative_to = new_relative_to
21
+
22
+
10
23
documents = ["paper" , "presentation" ]
11
24
12
25
for document in documents :
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ python = "~=3.13"
78
78
jupyterlab = " *"
79
79
pre-commit = " *"
80
80
pytask = " >=0.5.0"
81
- pytask-latex = " >=0.4.2 "
81
+ pytask-latex = " >=0.4.3 "
82
82
pytask-parallel = " >=0.5.0"
83
83
pytest = " *"
84
84
pytest-cov = " *"
You can’t perform that action at this time.
0 commit comments