[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Lilypond-auto] Issue 3136 in lilypond: lilypond-book - automatic line w
From: |
lilypond |
Subject: |
[Lilypond-auto] Issue 3136 in lilypond: lilypond-book - automatic line width detection fails because of the included file |
Date: |
Wed, 23 Jan 2013 21:59:28 +0000 |
Status: Accepted
Owner: ----
Labels: Type-Ugly
New issue 3136 by address@hidden: lilypond-book - automatic line width
detection fails because of the included file
http://code.google.com/p/lilypond/issues/detail?id=3136
Reported by Stefan Thomas on user list:
http://lists.gnu.org/archive/html/lilypond-user/2013-01/msg00758.html
Dear community,
when I compile the following file with latex and lilypondbook, it looks
quite strange.
There's is a break after every bar of the lilypond example.
I think it has to do with the input-command.
Here is the code of the latex-file:
\documentclass[a4paper,12pt]{article}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[paper=a4paper,left=20mm,right=20mm,top=25mm,bottom=25mm]{geometry}
\input{./semester.tex}
\author{Myself}
\title{Examination \Semester }
\date{ \Datummontag }
\begin{document}
\maketitle
\begin{flushright}
Name, Vorname:
\end{flushright}
\textbf{First exercise:}
\begin{lilypond}
\relative { c d e f g2 e g 4 f e d e2 c }
\end{lilypond}
\end{document}
And this is the code of the file semester.tex
\newcommand{\Semester}{Wintersemester 2012/2013}
\newcommand{\Datummontag}{31.1.2012}
For compilation I use the following code:
#!/bin/bash
TEMP_DIR=temp
CURRENT_DIR=$(pwd)
lilypond-book --pdf \
--include="$CURRENT_DIR"\
--include=/home/stefan/partituren/lilyponds/vorlagen/\
--output="$TEMP_DIR" \
"$1".tex && \
(cd "$TEMP_DIR" && \
pdflatex "$1".tex && \
mv "$1".pdf ..) && \
rm -rf "$TEMP_DIR"
---------------------------
Explanation by Julien Rioux follows later on bug-lilypond:
http://lists.gnu.org/archive/html/bug-lilypond/2013-01/msg00159.html
Indeed, there is a bug here: the automatic line width detection fails
because of the included file. This detection is done by copying the latex
preamble to a temporary file in a temp dir, running latex on this file, and
parsing some output about the line width from latex. When we compile from
the temp dir, any file \input'ed or \include'd within the preamble should
also be made available, otherwise latex will fail.
- [Lilypond-auto] Issue 3136 in lilypond: lilypond-book - automatic line width detection fails because of the included file,
lilypond <=