Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

new option: between-system-space

  • Loading branch information...
commit 1ba82af49e49c283be00e42314fcc68687c1908a 1 parent 6e4bd08
@Stemby authored
Showing with 21 additions and 6 deletions.
  1. +6 −0 lilypond.sty
  2. +15 −6 lilytex
View
6 lilypond.sty
@@ -5,7 +5,11 @@
\RequirePackage{graphicx}
\newlength{\lilypond@staffsize}
+\newlength{\lilypond@betweensystemspace}
+ \setlength{\lilypond@betweensystemspace}{20mm}
\DeclareOptionX{staffsize}[0]{\setlength{\lilypond@staffsize}{#1pt}}
+\DeclareOptionX{between-system-space}[20]{%
+ \setlength{\lilypond@betweensystemspace}{#1mm}}
\ProcessOptionsX
\newcommand{\lilypondfile}[1]{%
@@ -17,6 +21,8 @@
\immediate\write\conffile{}
\immediate\write\conffile{[Options]}
\immediate\write\conffile{staffsize: \the\lilypond@staffsize}
+ \immediate\write%
+ \conffile{between-system-space: \the\lilypond@betweensystemspace}
\immediate\closeout\conffile
\par
\IfFileExists{#1.eps}{\noindent\includegraphics{#1}}{}
View
21 lilytex
@@ -18,20 +18,27 @@ def main():
Staffsize = '''
#(set-global-staff-size %s)
''' % staffsize
+ betweensystemspace = lil.get('Options', 'between-system-space')[:-2]
config = Template(
'''%% Automatically generated by lilytex
-$Staffsize
+%% staff size: set by option
%% no indent
%% line-width = LaTeX \columnwidth
%% no titles
+%% between-system-space (distance between systems): set by option
+%% betweeb-system-padding: ???
+%%
+$Staffsize
\paper {
- indent=0\mm
- line-width=$columnwidth\pt
- oddFooterMarkup=##f
- oddHeaderMarkup=##f
+ indent = 0\mm
+ line-width = $columnwidth\pt
+ oddFooterMarkup = ##f
+ oddHeaderMarkup = ##f
bookTitleMarkup = ##f
scoreTitleMarkup = ##f
+ between-system-space = $bss\pt
+ between-system-padding = #1
}
@@ -47,7 +54,8 @@ $Staffsize
f = open(os.path.join(dirname, 'config.ly'), 'w')
f.write(config.substitute(
columnwidth=columnwidth,
- Staffsize=Staffsize))
+ Staffsize=Staffsize,
+ bss=betweensystemspace))
f.close()
# See:
# http://lilypond.org/doc/v2.13/Documentation/usage/lilypond-output-in-other-programs
@@ -61,3 +69,4 @@ $Staffsize
if __name__ == '__main__':
main()
+
Please sign in to comment.
Something went wrong with that request. Please try again.