Skip to content

Commit ea357f8

Browse files
committed
Use updated pytask-latex.
1 parent 7c02eda commit ea357f8

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

documents/task_documents.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,25 @@
11
"""Tasks for compiling the paper and presentation(s)."""
22

3+
import os
34
import shutil
5+
from pathlib import Path
46

57
import pytask
8+
import pytask_latex.path
69
from pytask_latex import compilation_steps as cs
710

811
from template_project.config import BLD, DOCUMENTS, ROOT
912

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+
1023
documents = ["paper", "presentation"]
1124

1225
for document in documents:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ python = "~=3.13"
7878
jupyterlab = "*"
7979
pre-commit = "*"
8080
pytask = ">=0.5.0"
81-
pytask-latex = ">=0.4.2"
81+
pytask-latex = ">=0.4.3"
8282
pytask-parallel = ">=0.5.0"
8383
pytest = "*"
8484
pytest-cov = "*"

0 commit comments

Comments
 (0)