lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lines or Boxes without reference to score or stave


From: Richard Shann
Subject: Re: Lines or Boxes without reference to score or stave
Date: Thu, 06 Apr 2017 20:05:27 +0100

On Thu, 2017-04-06 at 13:26 -0500, Guy Stalnaker wrote:
> Thanks, Richard, alas, no ... that does nothing that I can discern
> except errors in lilypond 2.19.x
> 
> 
> I'm assuming, therefore, that I don't know what to do with your code.
> Use \bookTitleMarkup somewhere?
> 
No, I was just thinking you might be able to pick out the bit you need.
It looks like the relevant bit is

 \markup 
     { \postscript #"
                    gsave
                    initmatrix
                    1 setlinewidth 40 40 moveto 517 0 rlineto 0 760
rlineto -517 0 rlineto 0 -760 rlineto  stroke
                    0.5 setlinewidth 45 45 moveto 507 0 rlineto 0 750
rlineto -507 0 rlineto 0 -750 rlineto  stroke
                    grestore" }

That is, you can make a markup that draws (in this case two) boxes
around the page independently of the music on the page, using
postscript. That compiles on 2.19.43 I see. 

HTH

Richard


> 
> 
> Guy
> 
> 
> Guy Stalnaker
> address@hidden
> 
> On Thu, Apr 6, 2017 at 10:47 AM, Richard Shann
> <address@hidden> wrote:
>         On Thu, 2017-04-06 at 10:33 -0500, Guy Stalnaker wrote:
>         > All,
>         >
>         >
>         > I've done a search for this in the documentation and list
>         archives,
>         > but because the only terms I can think to search with (line,
>         box,
>         > draw) are so common, I cannot get useful results.
>         >
>         >
>         > What I want to do is put a box, visually, around the
>         engraved score,
>         > but independent of the engraved score. There will be two
>         boxes, one
>         > (dashed or dotted) representing the margins of the document,
>         and
>         > another .25" larger that represents a paper-size (this has
>         to do with
>         > providing engraved music output that will be placed on
>         non-standard
>         > sized paper by another person). The boxes show them where
>         their
>         > margins/paper is on the engraving to allow them a sense for
>         how much
>         > space the score will consume in their final document.
>         >
>         > This is basically four straight lines, two horizontal and
>         two vertical
>         > but with reference to absolute page positioning, e.g.,
>         Line1: start
>         > 1.5" down from top margin and 1" in from left margin and
>         draw
>         > horizontal for 7.5", Line2: start 1.5" down from top margin
>         and 1" in
>         > from left margin and draw down 8.0", etc.. Everything that
>         I've seen
>         > thus far are markup of some kind that are entered in
>         reference to the
>         > score or, with the Notation Reference entries for
>         \draw-hline for
>         > example, only seem to draw a line wherever the markup is
>         place and not
>         > at an absolute position.
>         >
>         >
>         > I can, of course, output to png, open png in image editor
>         and add the
>         > boxes manually, but it would be easier :-) to do this in
>         lilypond.
>         > Maybe.
>         
>         
>         Not sure if it will help, but when creating the book title
>         page for
>         Denemo I cooked up this:
>         
>          bookTitleMarkup = \markup \when-property #'header:title {
>              { \postscript #"
>                             gsave
>                             initmatrix
>                             1 setlinewidth 40 40 moveto 517 0 rlineto
>         0 760
>         rlineto -517 0 rlineto 0 -760 rlineto  stroke
>                             0.5 setlinewidth 45 45 moveto 507 0
>         rlineto 0 750
>         rlineto -507 0 rlineto 0 -750 rlineto  stroke
>                             grestore" }
>         
>         
>         I don't remember much about it now, but the gsave and grestore
>         were
>         things that made the thing work independently of the rest
>         IIRC, so it
>         may be what you need ...
>         
>         
>         Richard
>         
>         
>         
> 
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]