Browse Source

Gestion des chemins de fichiers pour LaTeX

pull/55/head
Luthaf 11 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 \makeatletter
\def\input@path{(* for dir in datadir *) \def\input@path{(* for dir in datadir *)
{((dir))/latex/} % {(( dir.replace("\\", "/") ))/latex/} %
(* endfor *) (* endfor *)
} }
\makeatother \makeatother

2
patacrep/data/templates/songs.tex

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

4
patacrep/files.py

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

Loading…
Cancel
Save