[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: \unset in paper block
From: |
Simon Albrecht |
Subject: |
Re: \unset in paper block |
Date: |
Mon, 5 Aug 2019 15:00:39 +0200 |
Hi Werner,
IIRC these assignments in \paper and \layout and \header blocks are
functionally equivalent to defining a variable in Scheme like
#(define left-margin 100)
(omitting the unit here for simplicity).
The kind of \unset you’re asking for requires the previous value to have
been saved onto some stack, which I doubt exists/is accessible here.
Maybe you could work around by calculating left-margin and right-margin:
\paper {
left-margin = #(/ (- paper-width line-width) 2)
right-margin = #left-margin
}
Best, Simon
On 02.08.19 10:45, Werner LEMBERG wrote:
I wonder whether it is possible to use \unset in the paper block. The
use-case is lyluatex, which sets `left-margin'; I want to unset this
value so that lilypond only takes the line width into account to
automatically center it.
In other words, I would like to have
% from lyluatex
\paper {
left-margin = 100\pt
line-width = 200\pt
}
...
% user code
\paper {
\unset left-margin
}
Werner
_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user
- \unset in paper block, Werner LEMBERG, 2019/08/02
- Re: \unset in paper block, Werner LEMBERG, 2019/08/05
- Re: \unset in paper block, David Kastrup, 2019/08/05
- Re: \unset in paper block, Werner LEMBERG, 2019/08/05
- Re: \unset in paper block, David Kastrup, 2019/08/05
- Re: \unset in paper block, Simon Albrecht, 2019/08/05
- Re: \unset in paper block, David Kastrup, 2019/08/05
- Re: \unset in paper block, Aaron Hill, 2019/08/05
- Re: \unset in paper block, David Kastrup, 2019/08/06
Re: \unset in paper block,
Simon Albrecht <=