[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to set a fixed distance between upper page edge and top line of
From: |
Urs Liska |
Subject: |
Re: How to set a fixed distance between upper page edge and top line of first staff? |
Date: |
Mon, 29 Jul 2019 09:24:07 +0000 |
Hi again,
sorry for the noise (although it might have triggered some thoughts that may
prove useful down the road), but I have just found a pretty simple solution for
your case:
{
\omit Score.SystemStartBar
\override Staff.StaffSymbol.Y-extent = #'(-5 . 15)
c'1
}
will make LilyPond believe that the Staff has an extent of 5 staff spaces below
and 15 above the middle line, and so the middle line will always have a
distance from the top margin of *at least* 15 staff spaces.
I have just tested with this .tex file:
\documentclass{article}
\usepackage[insert=inline,inline-staffsize=20]{lyluatex}
\begin{document}
\begin{lilypond}[insert=inline]
{
\omit Score.SystemStartBar
\override Staff.StaffSymbol.Y-extent = #'(-5 . 20)
c''1
}
\end{lilypond}
\begin{lilypond}[insert=inline]
{
\omit Score.SystemStartBar
\override Staff.StaffSymbol.Y-extent = #'(-5 . 20)
g'''1
}
\end{lilypond}
\begin{lilypond}[insert=inline]
{
\omit Score.SystemStartBar
\override Staff.StaffSymbol.Y-extent = #'(-5 . 20)
c'''1
}
\end{lilypond}
\end{document}
and got the attached result. I'm sure one can wrap this in a usable solution
for your use case.
HTH
Urs
29. Juli 2019 11:10, "Urs Liska" <address@hidden> schrieb:
> Hi Kim (?),
>
> 28. Juli 2019 22:59, "kimfierens" <address@hidden> schrieb:
>
>> Hi everyone, I'm new to LilyPond, and I have a layout question for you. The
>> title says it all basically: how do I get LilyPond to put a fixed distance
>> between the upper page edge and the top line of the first staff, regardless
>> of any stuff (such as notes on ledger lines) that might stick out above the
>> staff?
>
> First: Unfortunately LilyPond doesn't make this too easy because it doesn't
> "think" like that. I
> have often wanted to achieve this in order to get facing pages align
> vertically and produce a more
> consistent "type area", but to no avail.
>
> However, if you are consistently dealing with single-system examples there
> are some options. I'm
> not going into too much detail right now because we need a little more
> information.
>
> Basically what I *think* should be the easiest approach in your case is
> basically "printing" a
> transparent rectangle behind the score that has fixed vertical dimensions and
> which you know goes
> beyond the topmost possible score element. When then the top margin is set to
> zero LilyPond will
> include the transparent rectangle, and you have the fixed vertical spacing.
>
>> The reason why I'm asking this is that I wish to create (in LaTex) a
>> table/array of small musical snippets. For aesthetic reasons, it would be
>> nice if all the staff fragments within a table row were lined up vertically
>> at the same height, like this:
>>
>> <http://lilypond.1069038.n5.nabble.com/file/t5872/Schermafbeelding_2019-07-28_om_22.png>
>>
>> My idea is to create a very small page for each snippet and then export this
>> page as an eps file into LaTeX. Hence my question.
>
> If you are working with LaTeX and don't mind using LuaLaTeX I would
> definitely suggest *not* to do
> all that processing manually or in some external scripts but use lyluatex
> (http://ctan.org/pkg/lyluatex) to directly write the snippets into the LaTeX
> document.
>
> One more question: on the example you attached *nothing* protruded *below*
> the staff lines. I
> assume this is not consistent with every examples you'll have? Because if
> that would be the case
> you could use lyluatex's inline placement with bottom-alignment.
> (I just added an issue with an idea how that question could be handled in
> lyluatex:
> https://github.com/jperon/lyluatex/issues/267)
>
> HTH
> Urs
>
>> Thanks for any tips and/or comments!
>>
>> --
>> Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html
>>
>> _______________________________________________
>> lilypond-user mailing list
>> address@hidden
>> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user
vertical-align.pdf
Description: Adobe PDF document