Browse Source

Gestion des chemins de fichiers pour LaTeX

pull/55/head
Luthaf 10 years ago
parent
commit
624211c3b3
  1. 2
      patacrep/data/templates/layout.tex
  2. 2
      patacrep/data/templates/songs.tex
  3. 4
      patacrep/files.py

2
patacrep/data/templates/layout.tex

@ -28,7 +28,7 @@
\makeatletter
\def\input@path{(* for dir in datadir *)
{((dir))/latex/} %
{(( dir.replace("\\", "/") ))/latex/} %
(* endfor *)
}
\makeatother

2
patacrep/data/templates/songs.tex

@ -86,7 +86,7 @@
\usepackage{graphicx}
\graphicspath{(* for dir in datadir *)
{((dir))/img/} %
{(( dir.replace("\\", "/") ))/img/} %
(* endfor *)
}

4
patacrep/files.py

@ -23,6 +23,6 @@ def relpath(path, start=None):
if start is None:
start = os.curdir
if os.path.abspath(path).startswith(os.path.abspath(start)):
return os.path.relpath(path, start)
return os.path.relpath(path, start).replace("\\", "/")
else:
return os.path.abspath(path)
return os.path.abspath(path).replace("\\", "/")

Loading…
Cancel
Save