Browse Source

Correctly (?) include the datadir to allow \import

pull/165/head
Oliverpool 9 years ago
parent
commit
66e2e40901
  1. 5
      patacrep/data/templates/layout.tex
  2. 2
      patacrep/songs/latex/__init__.py

5
patacrep/data/templates/layout.tex

@ -27,9 +27,14 @@
\makeatletter
\def\input@path{ %
% include .sty folders
(* for dir in datadir *)
{(( path2posix(dir) ))/latex/} %
(* endfor *)
% include datadir folders (for \import)
(* for dir in datadir *)
{(( path2posix(dir) ))/} %
(* endfor *)
}
\makeatother

2
patacrep/songs/latex/__init__.py

@ -36,7 +36,7 @@ class Latex2LatexSong(Song):
raise ValueError(self.datadir)
path = files.path2posix(files.relpath(
self.fullpath,
os.path.dirname(self.datadir)
self.datadir
))
return r'\import{{{}/}}{{{}}}'.format(os.path.dirname(path), os.path.basename(path))

Loading…
Cancel
Save