strange output with lilypond book

2013-01-18 Thread Stefan Thomas
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"
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: strange output with lilypond book

2013-01-18 Thread Julien Rioux

On 18/01/2013 4:56 PM, Stefan Thomas wrote:

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}


It would help to insert a paragraph break (blank line) here...


\textbf{First exercise:}


and/or here.


\begin{lilypond}
  \relative { c d e f g2 e  g 4 f e d e2 c }
\end{lilypond}
\end{document}





Cheers,
Julien

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: strange output with lilypond book

2013-01-19 Thread Stefan Thomas
Dear Julien,
unfortunately the blank line (do Yoy mean "\\"?) doesn't help!

On 18/01/2013 4:56 PM, Stefan Thomas wrote:
> > 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}
>
> It would help to insert a paragraph break (blank line) here...
>
> >> \textbf{First exercise:}
>
> and/or here.
>
> >> \begin{lilypond}
> >>   \relative { c d e f g2 e  g 4 f e d e2 c }
> >> \end{lilypond}
> >> \end{document}
> >>
> >
>
> Cheers,
> Julien
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: strange output with lilypond book

2013-01-19 Thread Julien Rioux

On 19/01/2013 1:17 PM, Stefan Thomas wrote:

Dear Julien,
unfortunately the blank line (do Yoy mean "\\"?) doesn't help!



I mean a blank, empty line.

%---snippet---
\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}
%---snippet---

Cheers,
Julien

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: strange output with lilypond book

2013-01-20 Thread Stefan Thomas
Dear Julien,
the problem is the input command in latex.
Without it (when I define the commands in the document itself), the pdf
looks good but if the file is included, every bar of the music uses a
single line.
I would like to avoid it an I would like to use the input command in latex.


On 19/01/2013 1:17 PM, Stefan Thomas wrote:
>
> Dear Julien,
> unfortunately the blank line (do Yoy mean "\\"?) doesn't help!
>

I mean a blank, empty line.

%---snippet---
> \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}
> %---snippet---
>
> Cheers,
> Julien
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: strange output with lilypond book

2013-01-21 Thread Julien Rioux

On 20/01/2013 4:35 AM, Stefan Thomas wrote:

Dear Julien,
the problem is the input command in latex.
Without it (when I define the commands in the document itself), the pdf
looks good but if the file is included, every bar of the music uses a
single line.
I would like to avoid it an I would like to use the input command in latex.



Indeed, the automatic line width detection fails because of the included 
file. I'll forward your first message to bug-lilypond.


As a workaround you can specify the line width as option to the lilypond 
snippet:


\begin{lilypond}[line-width=494\pt]
etc.
\end{lilypond}

Cheers,
Julien

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: strange output with lilypond book

2013-01-21 Thread Julien Rioux

On 18/01/2013 4:56 PM, Stefan Thomas wrote:

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"





___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user



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.


Cheers,
Julien
--
Julien

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: strange output with lilypond book

2013-01-23 Thread Marek Klein
Hello,
2013/1/21 Julien Rioux 

> 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.
>
Thank you for the report, it has been added as
http://code.google.com/p/lilypond/issues/detail?id=3136

Marek
bug squad member
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user