+2006-02-06 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * {ly,lily,scm}/*: use dashes in \paper and \layout variables
+
+ * python/convertrules.py (lilypond_version_re_str): require
+ only numbers and dots in \version string.
+
2006-02-05 Han-Wen Nienhuys <hanwen@xs4all.nl>
* lily/system-start-delimiter.cc (print): allow style = text too.
PACKAGE_NAME=LilyPond
MAJOR_VERSION=2
MINOR_VERSION=7
-PATCH_LEVEL=31
+PATCH_LEVEL=32
MY_PATCH_LEVEL=
if (pmin < pmax)
{
- Real linethickness = me->layout ()->get_dimension (ly_symbol2scm ("linethickness"))
+ Real linethickness = me->layout ()->get_dimension (ly_symbol2scm ("line-thickness"))
* robust_scm2double (me->get_property ("thickness"), 1.0);
- Real blotdiameter = me->layout ()->get_dimension (ly_symbol2scm ("blotdiameter"));
+ Real blotdiameter = me->layout ()->get_dimension (ly_symbol2scm ("blot-diameter"));
Interval x_extent = 0.5 * linethickness * Interval (-1, 1);
Interval y_extent = Interval (pmin, pmax);
Box line_box (x_extent, y_extent);
heads.unite (iv + ss->relative_coordinate (common, Y_AXIS) - my_y);
}
- Real lt = me->layout ()->get_dimension (ly_symbol2scm ("linethickness"));
+ Real lt = me->layout ()->get_dimension (ly_symbol2scm ("line-thickness"));
Real sp = 1.5 * Staff_symbol_referencer::staff_space (me);
Real dy = heads.length () + sp;
Real x = 0.7;
Real hair = robust_scm2double (me->get_property ("hair-thickness"), 1);
Real fatline = robust_scm2double (me->get_property ("thick-thickness"), 1);
- Real staffline = me->layout ()->get_dimension (ly_symbol2scm ("linethickness"));
+ Real staffline = me->layout ()->get_dimension (ly_symbol2scm ("line-thickness"));
Real staff_space = Staff_symbol_referencer::staff_space (me);
kern *= staffline;
{
Real blot
= rounded
- ? me->layout ()->get_dimension (ly_symbol2scm ("blotdiameter"))
+ ? me->layout ()->get_dimension (ly_symbol2scm ("blot-diameter"))
: 0.0;
return Lookup::round_filled_box (Box (Interval (0, w),
Real gap_length = robust_scm2double (me->get_property ("gap"), 0.0);
Stencil the_beam;
- Real lt = me->layout ()->get_dimension (ly_symbol2scm ("linethickness"));
+ Real lt = me->layout ()->get_dimension (ly_symbol2scm ("line-thickness"));
for (vsize i = 0; i <= stems.size (); i++)
{
if (stem)
w += stem_width / 2;
- Real blot = me->layout ()->get_dimension (ly_symbol2scm ("blotdiameter"));
+ Real blot = me->layout ()->get_dimension (ly_symbol2scm ("blot-diameter"));
Stencil whole = Lookup::beam (slope, w, thick, blot);
Stencil gapped;
return 0;
Paper_book *paper_book = new Paper_book ();
- Real scale = scm_to_double (paper->c_variable ("outputscale"));
+ Real scale = scm_to_double (paper->c_variable ("output-scale"));
Output_def *scaled_bookdef = scale_output_def (paper, scale);
Object_key *key = new Lilypond_general_key (0, user_key_, 0);
Break_algorithm::set_pscore (Paper_score *s)
{
pscore_ = s;
- linewidth_ = s->layout ()->get_dimension (ly_symbol2scm ("linewidth"));
+ linewidth_ = s->layout ()->get_dimension (ly_symbol2scm ("line-width"));
}
std::vector<Column_x_positions>
else
staff_size = 0.0;
- Real blotdiameter = me->layout ()->get_dimension (ly_symbol2scm ("blotdiameter"));
+ Real blotdiameter = me->layout ()->get_dimension (ly_symbol2scm ("blot-diameter"));
/*
* Draw a small vertical line through the uppermost (or, depending
else
staff_size = 0.0;
- Real blotdiameter = me->layout ()->get_dimension (ly_symbol2scm ("blotdiameter"));
+ Real blotdiameter = me->layout ()->get_dimension (ly_symbol2scm ("blot-diameter"));
/*
* Draw a vertical line that is vertically centered in the staff
else
staff_size = 0.0;
- Real blotdiameter = me->layout ()->get_dimension (ly_symbol2scm ("blotdiameter"));
+ Real blotdiameter = me->layout ()->get_dimension (ly_symbol2scm ("blot-diameter"));
// like a "|" type bar
Interval xdim (0, thickness);
else
staff_size = 0.0;
- Real blotdiameter = me->layout ()->get_dimension (ly_symbol2scm ("blotdiameter"));
+ Real blotdiameter = me->layout ()->get_dimension (ly_symbol2scm ("blot-diameter"));
// like a "||" type bar
Interval xdim (0, thickness);
Spanner *me = dynamic_cast<Spanner*> (unsmob_grob (grob));
Real thick =
- me->layout ()->get_dimension (ly_symbol2scm ("linethickness"))
+ me->layout ()->get_dimension (ly_symbol2scm ("line-thickness"))
* robust_scm2double (me->get_property ("thickness"), 1);
Interval spanned;
LY_DEFINE (ly_font_magnification, "ly:font-magnification", 1, 0, 0,
(SCM font),
"Given the font metric @var{font}, return the "
- "magnification, relative to the current outputscale.")
+ "magnification, relative to the current outputs-cale.")
{
Font_metric *fm = unsmob_metrics (font);
SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
LY_DEFINE (ly_font_design_size, "ly:font-design-size", 1, 0, 0,
(SCM font),
"Given the font metric @var{font}, return the "
- "design size, relative to the current outputscale.")
+ "design size, relative to the current output-scale.")
{
Font_metric *fm = unsmob_metrics (font);
SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
Break_node first_node;
optimal_paths.push_back (first_node);
- bool ragged_right = to_boolean (pscore_->layout ()->c_variable ("raggedright"));
+ bool ragged_right = to_boolean (pscore_->layout ()->c_variable ("ragged-right"));
bool ragged_last = to_boolean (pscore_->layout ()->c_variable ("raggedlast"));
Real worst_force = 0.0;
return SCM_EOL;
}
- Real staffline = me->layout ()->get_dimension (ly_symbol2scm ("linethickness"));
+ Real staffline = me->layout ()->get_dimension (ly_symbol2scm ("line-thickness"));
Real thick = robust_scm2double (me->get_property ("thickness"), 1.0)
* staffline;
{
Grob *me = unsmob_grob (smob);
- Real staffline = me->layout ()->get_dimension (ly_symbol2scm ("linethickness"));
+ Real staffline = me->layout ()->get_dimension (ly_symbol2scm ("line-thickness"));
Real thick = robust_scm2double (me->get_property ("thickness"), 1.0)
* staffline;
#include "translator.icc"
-class New_instrument_name_engraver : public Engraver
+class Instrument_name_engraver : public Engraver
{
public:
- TRANSLATOR_DECLARATIONS (New_instrument_name_engraver);
+ TRANSLATOR_DECLARATIONS (Instrument_name_engraver);
protected:
Spanner *text_spanner_;
void process_music ();
};
-New_instrument_name_engraver::New_instrument_name_engraver ()
+Instrument_name_engraver::Instrument_name_engraver ()
{
text_spanner_ = 0;
}
void
-New_instrument_name_engraver::process_music ()
+Instrument_name_engraver::process_music ()
{
if (!text_spanner_)
{
}
void
-New_instrument_name_engraver::acknowledge_axis_group (Grob_info info)
+Instrument_name_engraver::acknowledge_axis_group (Grob_info info)
{
if (text_spanner_
&& dynamic_cast<Spanner *> (info.grob ())
}
void
-New_instrument_name_engraver::finalize ()
+Instrument_name_engraver::finalize ()
{
if (text_spanner_)
{
#include "translator.icc"
-ADD_ACKNOWLEDGER (New_instrument_name_engraver, axis_group);
+ADD_ACKNOWLEDGER (Instrument_name_engraver, axis_group);
-ADD_TRANSLATOR (New_instrument_name_engraver,
+ADD_TRANSLATOR (Instrument_name_engraver,
/* doc */
"Creates a system start text for instrument or vocal names.",
common = common->common_refpoint (right_text, X_AXIS);
common = common->common_refpoint (me->get_bound (RIGHT), X_AXIS);
- Real sl = me->layout ()->get_dimension (ly_symbol2scm ("linethickness"));
+ Real sl = me->layout ()->get_dimension (ly_symbol2scm ("line-thickness"));
extract_grob_set (me, "heads", heads);
}
while (flip (&d) != LEFT);
- Real lt = me->layout ()->get_dimension (ly_symbol2scm ("linethickness"));
+ Real lt = me->layout ()->get_dimension (ly_symbol2scm ("line-thickness"));
Real th = robust_scm2double (me->get_property ("thickness"), 1) * lt;
Real font_size_step = robust_scm2double (me->get_property ("font-size"), 0.0);
Real h = robust_scm2double (me->get_property ("height"), 0.5)
Real thickness
= robust_scm2double (ligature->get_property ("thickness"), 1.4);
thickness
- *= ligature->layout ()->get_dimension (ly_symbol2scm ("linethickness"));
+ *= ligature->layout ()->get_dimension (ly_symbol2scm ("line-thickness"));
Real head_width
= Font_interface::get_default_font (ligature)->
}
Real blotdiameter
- = (me->layout ()->get_dimension (ly_symbol2scm ("blotdiameter")));
+ = (me->layout ()->get_dimension (ly_symbol2scm ("blot-diameter")));
if (primitive & MLP_STEM)
{
Real hair_thick = robust_scm2double (me->get_property ("hair-thickness"), .1);
Real ss = Staff_symbol_referencer::staff_space (me);
- Real slt = me->layout ()->get_dimension (ly_symbol2scm ("linethickness"));
+ Real slt = me->layout ()->get_dimension (ly_symbol2scm ("line-thickness"));
Real y = slt * thick_thick / 2 * ss;
Real ythick = hair_thick * slt * ss;
Box b (Interval (0.0, max (0.0, (width - 2 * ythick))), Interval (-y, y));
LY_DEFINE (ly_paper_outputscale, "ly:paper-outputscale",
1, 0, 0, (SCM bp),
- "Get outputscale for BP.")
+ "Get output-scale for BP.")
{
Output_def *b = unsmob_output_def (bp);
SCM_ASSERT_TYPE (b, bp, SCM_ARG1, __FUNCTION__, "paper");
Interval
line_dimensions_int (Output_def *def, int n)
{
- Real lw = def->get_dimension (ly_symbol2scm ("linewidth"));
+ Real lw = def->get_dimension (ly_symbol2scm ("line-width"));
Real ind = n ? 0.0 : def->get_dimension (ly_symbol2scm ("indent"));
return Interval (ind, lw);
}
Real
output_scale (Output_def *od)
{
- return scm_to_double (od->lookup_variable (ly_symbol2scm ("outputscale")));
+ return scm_to_double (od->lookup_variable (ly_symbol2scm ("output-scale")));
}
SCM
LY_DEFINE (ly_score_embedded_format, "ly:score-embedded-format",
2, 1, 0, (SCM score, SCM layout, SCM key),
"Run @var{score} through @var{layout}, an output definition, "
- "scaled to correct outputscale already, "
+ "scaled to correct output-scale already, "
"return a list of layout-lines. "
"\nTake optional Object_key argument.")
{
/* ugh. */
if (bpd->c_variable ("is-paper") == SCM_BOOL_T)
{
- Real scale = scm_to_double (bpd->c_variable ("outputscale"));
+ Real scale = scm_to_double (bpd->c_variable ("output-scale"));
Output_def *def = scale_output_def (unsmob_output_def (outdef), scale);
Output_def *bdef = scale_output_def (bpd, scale);
Real scale = 1.0;
if (layoutbook && layoutbook->c_variable ("is-paper") == SCM_BOOL_T)
- scale = scm_to_double (layoutbook->c_variable ("outputscale"));
+ scale = scm_to_double (layoutbook->c_variable ("output-scale"));
SCM outputs = SCM_EOL;
SCM *tail = &outputs;
}
staff_space_ = Staff_symbol_referencer::staff_space (me);
- Real lt = me->layout ()->get_dimension (ly_symbol2scm ("linethickness"));
+ Real lt = me->layout ()->get_dimension (ly_symbol2scm ("line-thickness"));
thickness_ = robust_scm2double (me->get_property ("thickness"), 1.0) * lt;
dir_ = get_grob_direction (me);
Grob *st = get_staff_symbol (me);
if (st)
return Staff_symbol::get_line_thickness (st);
- return me->layout ()->get_dimension (ly_symbol2scm ("linethickness"));
+ return me->layout ()->get_dimension (ly_symbol2scm ("line-thickness"));
}
Real
--hwn.
*/
- Real t = me->layout ()->get_dimension (ly_symbol2scm ("linethickness"));
+ Real t = me->layout ()->get_dimension (ly_symbol2scm ("line-thickness"));
t *= robust_scm2double (me->get_property ("thickness"), 1.0);
Direction d = LEFT;
Real
Staff_symbol::get_line_thickness (Grob *me)
{
- Real lt = me->layout ()->get_dimension (ly_symbol2scm ("linethickness"));
+ Real lt = me->layout ()->get_dimension (ly_symbol2scm ("line-thickness"));
return robust_scm2double (me->get_property ("thickness"), 1.0) * lt;
}
Staff_symbol::height (SCM smob)
{
Grob *me = unsmob_grob (smob);
- Real t = me->layout ()->get_dimension (ly_symbol2scm ("linethickness"));
+ Real t = me->layout ()->get_dimension (ly_symbol2scm ("line-thickness"));
t *= robust_scm2double (me->get_property ("thickness"), 1.0);
SCM line_positions = me->get_property ("line-positions");
Real ss = Staff_symbol_referencer::staff_space (me);
Real thick = robust_scm2double (me->get_property ("beam-thickness"), 1);
Real width = robust_scm2double (me->get_property ("beam-width"), 1);
- Real blot = me->layout ()->get_dimension (ly_symbol2scm ("blotdiameter"));
+ Real blot = me->layout ()->get_dimension (ly_symbol2scm ("blot-diameter"));
width *= ss;
thick *= ss;
// URG
Real stem_width = thickness (me);
Real blot
- = me->layout ()->get_dimension (ly_symbol2scm ("blotdiameter"));
+ = me->layout ()->get_dimension (ly_symbol2scm ("blot-diameter"));
Box b = Box (Interval (-stem_width / 2, stem_width / 2),
Interval (stem_y[DOWN] * half_space, stem_y[UP] * half_space));
{
Direction d = get_grob_direction (me);
Real blot
- = me->layout ()->get_dimension (ly_symbol2scm ("blotdiameter"));
+ = me->layout ()->get_dimension (ly_symbol2scm ("blot-diameter"));
Real stem_width = thickness (me);
Real half_space = Staff_symbol_referencer::staff_space (me) * 0.5;
Real y2 = robust_scm2double (me->get_property ("stem-end-position"), 0.0);
System_start_delimiter::line_bracket (Grob *me, Real height)
{
Real thick
- = me->layout ()->get_dimension (ly_symbol2scm ("linethickness"))
+ = me->layout ()->get_dimension (ly_symbol2scm ("line-thickness"))
* robust_scm2double (me->get_property ("thickness"), 1);
Real w = 0.8;
Stencil
System_start_delimiter::simple_bar (Grob *me, Real h)
{
- Real lt = me->layout ()->get_dimension (ly_symbol2scm ("linethickness"));
+ Real lt = me->layout ()->get_dimension (ly_symbol2scm ("line-thickness"));
Real w = lt * robust_scm2double (me->get_property ("thickness"), 1);
return Lookup::round_filled_box (Box (Interval (0, w), Interval (-h / 2, h / 2)),
lt);
= dynamic_cast<Item *> (primitives[0].grob ())->get_column ();
Real join_thickness
- = thickness * column->layout ()->get_dimension (ly_symbol2scm ("linethickness"));
+ = thickness * column->layout ()->get_dimension (ly_symbol2scm ("line-thickness"));
/*
* Amount of extra space two put between some particular
Real thickness = robust_scm2double (me->get_property ("thickness"), 1);
Real line_thickness
- = thickness * me->layout ()->get_dimension (ly_symbol2scm ("linethickness"));
+ = thickness * me->layout ()->get_dimension (ly_symbol2scm ("line-thickness"));
Real blotdiameter
- = (me->layout ()->get_dimension (ly_symbol2scm ("blotdiameter")));
+ = (me->layout ()->get_dimension (ly_symbol2scm ("blot-diameter")));
int pos = Staff_symbol_referencer::get_rounded_position (me);
}
-\version "2.6.0" % necessary for upgrading to future LilyPond versions.
+\version "2.7.32" % necessary for upgrading to future LilyPond versions.
-\version "2.6.0"
+\version "2.7.32"
% Symbols needed to print accordion music
%
% 2' = T
Sven Axelsson, the Murray Pipes & Drums of Gothenburg
(http://www.murrays.nu)
- $Id: bagpipe.ly,v 1.9 2006/01/31 23:52:53 hanwen Exp $
+ $Id: bagpipe.ly,v 1.10 2006/02/06 01:13:58 hanwen Exp $
%}
-\version "2.7.31"
+\version "2.7.32"
% Notes of the scale of the Great Highland Bagpipe. Extra high notes for bombarde.
% Flat notes used mainly in some modern music.
pitchnames = \pitchnamesCatalan
-\version "2.6.0"
+\version "2.7.32"
#(ly:parser-set-note-names parser pitchnames)
-\version "2.6.0"
+\version "2.7.32"
chordmodifiers = #default-chord-modifier-list
-\version "2.6.0"
+\version "2.7.32"
%% < 1.8 compatibility switch
#(ly:set-option 'old-relative)
pitchnames = \pitchnamesDeutsch
-\version "2.6.0"
+\version "2.7.32"
#(ly:parser-set-note-names parser pitchnames)
-\version "2.6.0"
+\version "2.7.32"
drumPitchNames =
#'((acousticbassdrum . acousticbassdrum)
-\version "2.6.0"
+\version "2.7.32"
%
% declare the standard dynamic identifiers.
pitchnames = \pitchnamesEnglish
-\version "2.6.0"
+\version "2.7.32"
#(ly:parser-set-note-names parser pitchnames)
-\version "2.7.14"
+\version "2.7.32"
\context {
\name "Global"
\consists "Rest_collision_engraver"
\consists "Accidental_engraver"
\consists "Piano_pedal_engraver"
- \consists "New_instrument_name_engraver"
+ \consists "Instrument_name_engraver"
\consists "String_number_engraver"
\consists "Axis_group_engraver"
\consists "Staff_symbol_engraver"
\consists "Pitch_squash_engraver"
\consists "Time_signature_engraver"
- \consists "New_instrument_name_engraver"
+ \consists "Instrument_name_engraver"
\consists "Axis_group_engraver"
\accepts "Voice"
\override VerticalAlignment #'self-alignment-Y = #0
\consists "Vertical_align_engraver"
- \consists "New_instrument_name_engraver"
+ \consists "Instrument_name_engraver"
instrument = #'()
instr = #'()
\consists "Extender_engraver"
\consists "Hyphen_engraver"
\consists "Stanza_number_engraver"
- \consists "New_instrument_name_engraver"
+ \consists "Instrument_name_engraver"
\consists "Skip_event_swallow_translator"
\consists "Font_size_engraver"
\consists "Hara_kiri_engraver"
pitchnames = \pitchnamesEspanol
-\version "2.6.0"
+\version "2.7.32"
#(ly:parser-set-note-names parser pitchnames)
-\version "2.6.0"
+\version "2.7.32"
%
% Running LilyPond on this file generates the documentation
-\version "2.6.0"
+\version "2.7.32"
%
% Running LilyPond on this file generates the short interface doc
-\version "2.6.0"
+\version "2.7.32"
startGraceMusic = {
-\version "2.7.31"
+\version "2.7.32"
%%%%%%%%
%%%%%%%% shortcuts common for all styles of gregorian chant notation
#(define-public midi-debug #f)
-\version "2.6.0"
+\version "2.7.32"
\include "declarations-init.ly"
pitchnames = \pitchnamesItaliano
-\version "2.6.0"
+\version "2.7.32"
#(ly:parser-set-note-names parser pitchnames)
-\version "2.6.0"
+\version "2.7.32"
\midi {
\tempo 4=60
\include "performer-init.ly"
% -*-Scheme-*-
-\version "2.6.0"
+\version "2.7.32"
%% need SRFI-1 filter
;;
;; bind voice identifiers to the voices
(map (lambda (voice-id voice)
- (ly:parser-define! parser voice-id
+ (ly:parser-define!! parser voice-id
(make-music 'SequentialMusic
'origin location
'elements voice)))
-\version "2.6.0"
+\version "2.7.32"
%{
common dutch names for notes. es means flat, is means sharp
pitchnames =\pitchnamesNorsk
-\version "2.6.0"
+\version "2.7.32"
#(ly:parser-set-note-names parser pitchnames)
-\version "2.6.0"
+\version "2.7.32"
\paper {
%% This is weird; `everyone' uses LATIN1? How does I select TeX
%% input encoding in EMACS? -- jcn
- %%%%inputencoding = #"TeX"
- inputencoding = #"latin1"
- printpagenumber = ##t
+ %%%%input-encoding = #"TeX"
+ input-encoding = #"latin1"
+ print-page-number = ##t
%%
%% 20pt staff, 5 pt = 1.75 mm
%%
- outputscale = #1.7573
+ output-scale = #1.7573
#(define-public book-title (marked-up-title 'bookTitleMarkup))
#(define-public score-title (marked-up-title 'scoreTitleMarkup))
%% this dimension includes the extent of the
%% staves themselves.
%%
- betweensystemspace = #(* 20 mm)
+ between-system-space = #(* 20 mm)
%%
%% fixed space between systems.
%%
- betweensystempadding = #(* 4 mm)
+ between-system-padding = #(* 4 mm)
- aftertitlespace = 5 \mm
- beforetitlespace = 10 \mm
- betweentitlespace = 2 \mm
+ after-title-space = 5 \mm
+ before-title-space = 10 \mm
+ between-title-space = 2 \mm
%%
%% Small staves are aligned so they come out on the same place on
%% across different pages.
%%
- pagetopspace = #(* 12 mm)
+ page-top-space = #(* 12 mm)
- raggedbottom = ##f
+ ragged-bottom = ##f
%%
%% looks best for shorter scores.
%%
- raggedlastbottom= ##t
+ ragged-last-bottom= ##t
#(define font-defaults
'((font-encoding . fetaMusic)))
\include "titling-init.ly"
+ top-margin = 5 \mm
+ bottom-margin = 6 \mm
+ heap-separation = 4 \mm
+ foot-separation = 4 \mm
+ right-margin = 10 \mm
- topmargin = 5 \mm
- bottommargin = 6 \mm
- headsep = 4 \mm
- footsep = 4 \mm
- rightmargin = 10 \mm
-
- leftmargin = ##f
- firstpagenumber = #1
- printfirstpagenumber =##f
+ left-margin = ##f
+ first-page-number = #1
+ print-first-page-number =##f
}
-\version "2.6.0"
+\version "2.7.32"
-\version "2.7.6"
+\version "2.7.32"
%%
%% setup for Request->Element conversion.
pitchnames = \pitchnamesPortuguese
-\version "2.6.0"
+\version "2.7.32"
#(ly:parser-set-note-names parser pitchnames)
% property-init.ly
-\version "2.7.31"
+\version "2.7.32"
stemUp = \override Stem #'direction = #UP
stemDown = \override Stem #'direction = #DOWN
-\version "2.6.0"
+\version "2.7.32"
major = #`(
-\version "2.6.0"
+\version "2.7.32"
% code char abbreviations
-\version "2.6.0"
+\version "2.7.32"
startGroup = #(make-span-event 'NoteGroupingEvent START)
stopGroup = #(make-span-event 'NoteGroupingEvent STOP)
pitchnames = \pitchnamesSuomi
-\version "2.6.0"
+\version "2.7.32"
#(ly:parser-set-note-names parser pitchnames)
)
pitchnames = \pitchnamesSvenska
-\version "2.6.0"
+\version "2.7.32"
#(ly:parser-set-note-names parser pitchnames)
-\version "2.6.0"
+\version "2.7.32"
slashSeparator = \markup {
\hcenter
#(define (first-page layout props arg)
(if (= (chain-assoc-get 'page:page-number props -1)
- (ly:output-def-lookup layout 'firstpagenumber)) (interpret-markup layout props arg)
+ (ly:output-def-lookup layout 'first-page-number)) (interpret-markup layout props arg)
empty-stencil))
#(define (last-page layout props arg)
#(define (not-first-page layout props arg)
(if (not (= (chain-assoc-get 'page:page-number props -1)
- (ly:output-def-lookup layout 'firstpagenumber)))
+ (ly:output-def-lookup layout 'first-page-number)))
(interpret-markup layout props arg)
empty-stencil))
%% unused
#(define (not-single-page layout props arg)
(if (not (and (= (chain-assoc-get 'page:page-number props -1)
- (ly:output-def-lookup layout 'firstpagenumber))
+ (ly:output-def-lookup layout 'first-page-number))
(chain-assoc-get 'page:last? props -1)))
(interpret-markup layout props arg)
empty-stencil))
#(define (print-page-number layout props arg)
- (if (eq? (ly:output-def-lookup layout 'printpagenumber) #t)
+ (if (eq? (ly:output-def-lookup layout 'print-page-number) #t)
(interpret-markup layout props arg)
empty-stencil))
#(define (print-page-number-check-first layout props arg)
(if (or (not (= (chain-assoc-get 'page:page-number props -1)
- (ly:output-def-lookup layout 'firstpagenumber)))
- (eq? (ly:output-def-lookup layout 'printfirstpagenumber) #t))
+ (ly:output-def-lookup layout 'first-page-number)))
+ (eq? (ly:output-def-lookup layout 'printfirst-page-number) #t))
(print-page-number layout props arg)
empty-stencil))
-\version "2.6.0" %hier stond 2.1.36, mocht ik dat wel veranderen?
+\version "2.7.32" %hier stond 2.1.36, mocht ik dat wel veranderen?
%{
/init-paper {
gsave
clippath pathbbox newpath
- /vsize exch def
- /hsize exch def pop pop pop
+ /paper-height exch def
+ /paper-width exch def pop pop pop
% FIXME
/top-margin 2 def
- hsize line-width sub 2 div /left-margin exch def
+ paper-width line-width sub 2 div /left-margin exch def
grestore
} bind def
conversions = []
error_file = sys.stderr
-lilypond_version_re_str = '\\\\version *\"([^"]+)\"'
+lilypond_version_re_str = '\\\\version *\"[0-9.]+"'
lilypond_version_re = re.compile (lilypond_version_re_str)
str = re.sub (r'([A-Z][a-z_0-9]+::[a-z_0-9]+)',
sub_cxx_id, str)
+ return str
+
+conversions.append (((2, 7, 31), conv,
+ """Foo_bar::bla_bla -> ly:foo-bar::bla-bla"""))
+
+def conv (str):
identifier_subs = [
('inputencoding', 'input-encoding'),
('printpagenumber', 'print-page-number'),
('footsep', 'foot-separation'),
('rightmargin', 'right-margin'),
('leftmargin', 'left-margin'),
- ('firstpagenumber', 'first-page-number'),
('printfirstpagenumber', 'print-first-page-number'),
+ ('firstpagenumber', 'first-page-number'),
('hsize', 'paper-width'),
('vsize', 'paper-height'),
('horizontalshift', 'horizontal-shift'),
('linewidth', 'line-width')
]
+ for (a,b) in identifier_subs:
+ ### for C++:
+ ## str = re.sub ('"%s"' % a, '"%s"' b, str)
+
+ str = re.sub (a, b, str)
return str
-conversions.append (((2, 7, 31), conv,
- """Foo_bar::bla_bla -> ly:foo-bar::bla-bla"""))
-
+conversions.append (((2, 7, 32), conv,
+ """foobar -> foo-bar for \paper, \layout"""))
(middleCPosition ,number? "Place of the middle C, measured in half
-staffspaces. Usually determined by looking at @code{clefPosition} and
+staff-spaces. Usually determined by looking at @code{clefPosition} and
@code{clefGlyph}.")
(chordNameFunction ,procedure?
(verticalExtent ,number-pair? "Hard coded vertical extent. The format
is a pair of dimensions, for example, this sets the sizes of a staff
-to 10 (5+5) staffspaces high.
+to 10 (5+5) staff-spaces high.
@example
\\set Staff.verticalExtent = #'(-5.0 . 5.0)
"An accidental, printed as a suggestion (typically: vertically over a note)"
'())
+
+(ly:add-interface
+ 'bass-figure-interface
+ "A bass figure text"
+ '(implicit))
+
+
(ly:add-interface
'dynamic-interface
"Any kind of loudness sign"
'())
(ly:add-interface
- 'bass-figure-interface
- "A bass figure text"
- '(implicit))
+ 'system-start-text-interface
+ "A text at the beginning of a system."
+ '(text long-text collapse-height style))
;;; todo: this is not typesetting info. Move to interpretation.
(ly:add-interface
"Spacing is based on the shortest notes in a piece. Normally, pieces are spaced as if notes at least as short as this are present.")
(baseline-skip ,ly:dimension? "Distance between base lines of
multiple lines of text.")
- (beam-thickness ,ly:dimension? "thickness, measured in staffspace.")
+ (beam-thickness ,ly:dimension? "thickness, measured in staff-space.")
(beam-width ,ly:dimension? "width of the tremolo sign.")
(beamed-stem-shorten ,list? "How much to shorten beamed stems,
when their direction is forced. It is a list, since the value is different
(grow-direction ,ly:dir? "Crescendo or decrescendo?")
(hair-thickness ,number? "Thickness of the thin line in a bar line.")
- (height ,ly:dimension? "Height of an object in staffspace.")
+ (height ,ly:dimension? "Height of an object in staff-space.")
(height-limit ,ly:dimension? "Maximum slur height: the longer the
slur, the closer it is to this height.")
(springs-and-rods ,boolean? "Dummy variable for triggering spacing routines.")
(stacking-dir ,ly:dir? "Stack objects in which direction?")
(staff-space ,ly:dimension? "Amount of space between staff lines,
-expressed in global staffspace.")
+expressed in global staff-space.")
(staff-position ,number? "Vertical position, measured in half
staff spaces, counted from the middle line.")
words. The default RIGHT is for roman text. Arabic or hebrew should
use LEFT.")
(thick-thickness ,number? "Bar line thickness, measured in
-@code{linethickness}.")
+@code{line-thickness}.")
(thickness ,number? "Bar line thickness, measured in
-@code{linethickness}.")
+@code{line-thickness}.")
(thin-kern ,number? "The space after a hair-line in a bar line.")
(threshold ,number-pair? "(@var{min} . @var{max}), where
;;;; (c) 1998--2006 Han-Wen Nienhuys <hanwen@cs.uu.nl>
;;;; Jan Nieuwenhuizen <janneke@gnu.org>
-;;;; distances are given in linethickness (thicknesses) and
-;;;; staffspace (distances)
+;;;; distances are given in line-thickness (thicknesses) and
+;;;; staff-space (distances)
;;;; WARNING: the meta field should be the last one.
;;;; WARNING: don't use anonymous functions for initialization.
;; Ross. page 151 lists other values, we opt for a leaner look
;;
;; TODO:
- ;; kern should scale with linethickness too.
+ ;; kern should scale with line-thickness too.
(kern . 3.0)
(thin-kern . 3.0)
(hair-thickness . 1.9)
;; Whe have some unreferenced problems here.
;;
- ;; If we shorten beamed stems less than normal stems (1 staffspace),
+ ;; If we shorten beamed stems less than normal stems (1 staff-space),
;; or high order less than 8th beams, patterns like
;; c''4 [c''8 c''] c''4 [c''16 c]
;; are ugly (different stem lengths).
(stencil . ,ly:lyric-extender::print)
- (thickness . 0.8) ; linethickness
+ (thickness . 0.8) ; line-thickness
(minimum-length . 1.5)
(Y-extent . (0 . 0))
(meta . ((class . Spanner)
(font-encoding . fetaNumber)
(Y-offset . ,ly:side-position-interface::y-aligned-side)
(side-axis . ,Y)
- (thickness . 1.6) ;; linethickness
- (edge-height . (2.0 . 2.0)) ;; staffspace;
+ (thickness . 1.6) ;; line-thickness
+ (edge-height . (2.0 . 2.0)) ;; staff-space;
(minimum-space . 5)
(font-size . -4)
(meta . ((class . Spanner)
width (+ (* width slope) (/ thickness -2))
width (+ (* width slope) (/ thickness 2))
0 (/ thickness 2))
- ,(ly:output-def-lookup layout 'blotdiameter)
+ ,(ly:output-def-lookup layout 'blot-diameter)
#t)
(cons 0 width)
(cons (+ (- half) (car yext))
(text-dir (chain-assoc-get 'text-direction props RIGHT))
(word-count (length stencils))
(word-space (chain-assoc-get 'word-space props))
- (line-width (chain-assoc-get 'linewidth props))
+ (line-width (chain-assoc-get 'line-width props))
(fill-space
(cond
((= word-count 1)
(define (wordwrap-markups layout props args justify)
(let*
((baseline-skip (chain-assoc-get 'baseline-skip props))
- (line-width (chain-assoc-get 'linewidth props))
+ (line-width (chain-assoc-get 'line-width props))
(word-space (chain-assoc-get 'word-space props))
(text-dir (chain-assoc-get 'text-direction props RIGHT))
(lines (wordwrap-stencils
(def-markup-command (justify layout props args) (markup-list?)
"Like wordwrap, but with lines stretched to justify the margins.
-Use @code{\\override #'(linewidth . X)} to set linewidth, where X
+Use @code{\\override #'(line-width . X)} to set line-width, where X
is the number of staff spaces."
(wordwrap-markups layout props args #t))
(def-markup-command (wordwrap layout props args) (markup-list?)
- "Simple wordwrap. Use @code{\\override #'(linewidth . X)} to set
-linewidth, where X is the number of staff spaces."
+ "Simple wordwrap. Use @code{\\override #'(line-width . X)} to set
+line-width, where X is the number of staff spaces."
(wordwrap-markups layout props args #f))
(define (wordwrap-string layout props justify arg)
(let*
((baseline-skip (chain-assoc-get 'baseline-skip props))
- (line-width (chain-assoc-get 'linewidth props))
+ (line-width (chain-assoc-get 'line-width props))
(word-space (chain-assoc-get 'word-space props))
(para-strings (regexp-split
(define (gnome-main book name)
(let* ((paper (ly:paper-book-paper book))
- (hsize (ly:output-def-lookup paper 'hsize))
- (vsize (ly:output-def-lookup paper 'vsize))
- (page-width (inexact->exact (ceiling (* OUTPUT-SCALE hsize))))
- (page-height (inexact->exact (ceiling (* OUTPUT-SCALE vsize))))
- ;;(page-width (inexact->exact (ceiling hsize)))
- ;;(page-height (inexact->exact (ceiling vsize)))
+ (paper-width (ly:output-def-lookup paper 'paper-width))
+ (paper-height (ly:output-def-lookup paper 'paper-height))
+ (page-width (inexact->exact (ceiling (* OUTPUT-SCALE paper-width))))
+ (page-height (inexact->exact (ceiling (* OUTPUT-SCALE paper-height))))
+ ;;(page-width (inexact->exact (ceiling paper-width)))
+ ;;(page-height (inexact->exact (ceiling paper-height)))
(screen-width (gdk-screen-width))
(screen-height (gdk-screen-height))
(plain (ps-font-command font))
(designsize (ly:font-design-size font))
(magnification (* (ly:font-magnification font)))
- (ops (ly:output-def-lookup paper 'outputscale))
+ (ops (ly:output-def-lookup paper 'output-scale))
(scaling (* ops magnification designsize)))
;; Bluesky pfbs have UPCASE names (sigh.)
"/lily-output-units "
(number->string mm-to-bigpoint)
" def %% millimeter\n"
- (output-entry "staff-line-thickness" 'linethickness)
- (output-entry "line-width" 'linewidth)
+ (output-entry "staff-line-thickness" 'line-thickness)
+ (output-entry "line-width" 'line-width)
(output-entry "paper-size" 'papersizename)
- (output-entry "staff-height" 'staffheight) ;junkme.
+ (output-entry "staff-height" 'staff-height) ;junkme.
"/output-scale "
- (number->string (ly:output-def-lookup layout 'outputscale))
+ (number->string (ly:output-def-lookup layout 'output-scale))
" def\n"
- (output-entry "page-height" 'vsize)
- (output-entry "page-width" 'hsize)))
+ (output-entry "page-height" 'paper-height)
+ (output-entry "page-width" 'paper-width)))
(define (dump-page outputter page page-number page-count landscape?)
(ly:outputter-dump-string
"")
"%%EndPageSetup\n"
- "gsave 0 vsize translate "
+ "gsave 0 paper-height translate "
"set-ps-scale-to-lily-scale "
"\n"))
(ly:outputter-dump-stencil outputter page)
(page-stencils (map page-stencil (ly:paper-book-pages book)))
(landscape? (eq? (ly:output-def-lookup paper 'landscape) #t))
- (page-number (1- (ly:output-def-lookup paper 'firstpagenumber)))
+ (page-number (1- (ly:output-def-lookup paper 'first-page-number)))
(page-count (length page-stencils))
(port (ly:outputter-port outputter)))
(define-public (dump-stencil-as-EPS paper dump-me filename load-fonts?)
(define (mm-to-bp-box mmbox)
- (let* ((scale (ly:output-def-lookup paper 'outputscale))
+ (let* ((scale (ly:output-def-lookup paper 'output-scale))
(box (map
(lambda (x)
(inexact->exact
(define-public (output-preview-framework basename book scopes fields)
(let* ((paper (ly:paper-book-paper book))
(systems (ly:paper-book-systems book))
- (scale (ly:output-def-lookup paper 'outputscale))
+ (scale (ly:output-def-lookup paper 'output-scale))
(to-dump-systems '()))
;; skip booktitles.
(let* ((paper (ly:paper-book-paper book))
(systems (ly:paper-book-systems book))
- (scale (ly:output-def-lookup paper 'outputscale))
+ (scale (ly:output-def-lookup paper 'output-scale))
(titles (take-while paper-system-title? systems))
(non-title (find (lambda (x)
(not (paper-system-title? x))) systems))
(ly:output-backend)))
(dump (lambda (str) (display str (ly:outputter-port outputter))))
(paper (ly:paper-book-paper book))
- (unit-length (ly:output-def-lookup paper 'outputscale))
+ (unit-length (ly:output-def-lookup paper 'output-scale))
(output-scale (* lily-unit->mm-factor
unit-length))
(page-stencils (map page-stencil (ly:paper-book-pages book)))
(landscape? (eq? (ly:output-def-lookup paper 'landscape) #t))
- (page-number (1- (ly:output-def-lookup paper 'firstpagenumber)))
+ (page-number (1- (ly:output-def-lookup paper 'first-page-number)))
(page-count (length page-stencils))
- (hsize (ly:output-def-lookup paper 'hsize))
- (vsize (ly:output-def-lookup paper 'vsize))
- (page-width (inexact->exact (ceiling (* output-scale hsize))))
- (page-height (inexact->exact (ceiling (* output-scale vsize))))
+ (paper-width (ly:output-def-lookup paper 'paper-width))
+ (paper-height (ly:output-def-lookup paper 'paper-height))
+ (page-width (inexact->exact (ceiling (* output-scale paper-width))))
+ (page-height (inexact->exact (ceiling (* output-scale paper-height))))
(page-set? (or (> page-count 1) landscape?)))
(ly:outputter-output-scheme outputter
(inexact->exact
(round (* 1000
(ly:font-magnification font)
- (ly:paper-outputscale paper)))))))
+ (ly:paper-output-scale paper)))))))
sub-fonts)))))
(define (simple-font-load-command paper font)
(inexact->exact
(round (* 1000
(ly:font-magnification font)
- (ly:paper-outputscale paper))))))
+ (ly:paper-output-scale paper))))))
(define (font-load-command paper font)
(if (pair? (ly:font-sub-fonts font))
(string-append
;; UGH. FIXME.
"\\def\\lilypondpaperunit{mm}%\n"
- (tex-number-def "lilypondpaper" 'outputscale
+ (tex-number-def "lilypondpaper" 'output-scale
(number->string (exact->inexact
- (ly:paper-outputscale paper))))
+ (ly:paper-output-scale paper))))
(tex-string-def "lilypondpaper" 'papersize
(eval 'papersizename (ly:output-def-scope paper)))
;; paper/layout?
- (tex-string-def "lilypondpaper" 'inputencoding
- (eval 'inputencoding (ly:output-def-scope paper)))
+ (tex-string-def "lilypondpaper" 'input-encoding
+ (eval 'input-encoding (ly:output-def-scope paper)))
(apply string-append
(map (lambda (x) (font-load-command paper x))
"{" (sanitize-tex-string str) "}%\n")))
(define (header paper page-count classic?)
- (let ((scale (ly:output-def-lookup paper 'outputscale))
+ (let ((scale (ly:output-def-lookup paper 'output-scale))
(texpaper (string-append
(ly:output-def-lookup paper 'papersizename)
"paper"))
"")
(tex-string-def
- "lilypondpaper" 'linewidth
- (ly:number->string (* scale (ly:output-def-lookup paper 'linewidth))))
+ "lilypondpaper" 'line-width
+ (ly:number->string (* scale (ly:output-def-lookup paper 'line-width))))
"\\def\\lilyponddocumentclassoptions{"
(sanitize-tex-string texpaper)
(if landscape? ",landscape" "")
(default-dot-position (if (eq? finger-code 'in-dot) (- 0.95 default-dot-radius) 0.6)) ; move up to make room for bigger if labeled
(dot-radius (chain-assoc-get 'dot-radius props default-dot-radius)) ; needed for both draw-dots and draw-barre
(dot-position (chain-assoc-get 'dot-position props default-dot-position)) ; needed for both draw-dots and draw-barre
- (th (* (ly:output-def-lookup layout 'linethickness)
+ (th (* (ly:output-def-lookup layout 'line-thickness)
(chain-assoc-get 'thickness props 0.5))) ; needed for both draw-frets and draw-strings
(alignment (chain-assoc-get 'align-dir props -0.4)) ; needed only here
"
(let* ((thick (ly:grob-property beam 'thickness))
(layout (ly:grob-layout beam))
- (lthick (ly:output-def-lookup layout 'linethickness))
+ (lthick (ly:output-def-lookup layout 'line-thickness))
(staff-thick lthick) ; fixme.
(quant->coord (lambda (p q)
(if (= 2 (abs q))
;;
;; - density scoring
;; - separate function for word-wrap style breaking?
-;; - raggedbottom? raggedlastbottom?
+;; - ragged-bottom? ragged-last-bottom?
(define-public (optimal-page-breaks lines paper-book)
"Return pages as a list starting with 1st page. Each page is a 'page Prob."
(prev-penalty (if (null? best-paths)
0.0
(page-penalty (car best-paths))))
- (inter-system-space (ly:output-def-lookup paper 'betweensystemspace))
+ (inter-system-space (ly:output-def-lookup paper 'between-system-space))
(relative-force (/ force inter-system-space))
(abs-relative-force (abs relative-force)))
(define (space-systems page-height lines ragged?)
(let* ((global-inter-system-space
- (ly:output-def-lookup paper 'betweensystemspace))
+ (ly:output-def-lookup paper 'between-system-space))
(top-space
- (ly:output-def-lookup paper 'pagetopspace))
- (global-fixed-dist (ly:output-def-lookup paper 'betweensystempadding))
+ (ly:output-def-lookup paper 'page-top-space))
+ (global-fixed-dist (ly:output-def-lookup paper 'between-system-padding))
(system-vector (list->vector
(append lines
(ideal (+
(cond
((and title2? title1?)
- (ly:output-def-lookup paper 'betweentitlespace))
+ (ly:output-def-lookup paper 'between-title-space))
(title1?
- (ly:output-def-lookup paper 'aftertitlespace))
+ (ly:output-def-lookup paper 'after-title-space))
(title2?
- (ly:output-def-lookup paper 'beforetitlespace))
+ (ly:output-def-lookup paper 'before-title-space))
(else between-space))
fixed))
(hooke (/ 1 (- ideal fixed))))
(rods (map calc-rod (iota (1- system-count))))
;; we don't set ragged based on amount space left.
- ;; raggedbottomlast = ##T is much more predictable
+ ;; ragged-bottomlast = ##T is much more predictable
(result (ly:solve-spring-rod-problem
springs rods space
ragged?))
CURRENT-BEST is the best result sofar, or #f."
(let* ((this-page-num (if (null? best-paths)
- (ly:output-def-lookup paper 'firstpagenumber)
+ (ly:output-def-lookup paper 'first-page-number)
(1+ (page-page-number (car best-paths)))))
(this-page (make-page
'is-last last?
'page-number this-page-num))
- (ragged-all? (eq? #t (ly:output-def-lookup paper 'raggedbottom)))
- (ragged-last? (eq? #t (ly:output-def-lookup paper 'raggedlastbottom)))
+ (ragged-all? (eq? #t (ly:output-def-lookup paper 'ragged-bottom)))
+ (ragged-last? (eq? #t (ly:output-def-lookup paper 'ragged-last-bottom)))
(ragged? (or ragged-all?
(and ragged-last?
last?)))
(ly:number->string y)
s))
-(define (polygon points blotdiameter filled?)
+(define (polygon points blot-diameter filled?)
(string-append
(ly:numbers->string points) " "
(ly:number->string (/ (length points) 2)) " "
- (ly:number->string blotdiameter)
+ (ly:number->string blot-diameter)
(if filled? " true " " false ")
" draw_polygon"))
(define (number->dim x)
(string-append
;;ugh ly:* in backend needs compatibility func for standalone output
- (ly:number->string x) " \\outputscale "))
+ (ly:number->string x) " \\output-scale "))
(define (placebox x y s)
(string-append
(define (resetcolor)
(string-append "\\color[rgb]{0,0,0}\n"))
-(define (polygon points blotdiameter fill)
- (embedded-ps (list 'polygon `(quote ,points) blotdiameter fill)))
+(define (polygon points blot-diameter fill)
+ (embedded-ps (list 'polygon `(quote ,points) blot-diameter fill)))
(define (draw-line thick fx fy tx ty)
(embedded-ps (list 'draw-line thick fx fy tx ty)))
(define (annotate-page layout stencil)
(let*
- ((topmargin (ly:output-def-lookup layout 'topmargin))
- (vsize (ly:output-def-lookup layout 'vsize))
- (bottommargin (ly:output-def-lookup layout 'bottommargin))
+ ((top-margin (ly:output-def-lookup layout 'top-margin))
+ (paper-height (ly:output-def-lookup layout 'paper-height))
+ (bottom-margin (ly:output-def-lookup layout 'bottom-margin))
(add-stencil (lambda (y)
(set! stencil
(ly:stencil-add stencil y))
(add-stencil
(ly:stencil-translate-axis
- (annotate-y-interval layout "vsize"
- (cons (- vsize) 0)
+ (annotate-y-interval layout "paper-height"
+ (cons (- paper-height) 0)
#t)
1 X))
(add-stencil
(ly:stencil-translate-axis
- (annotate-y-interval layout "topmargin"
- (cons (- topmargin) 0)
+ (annotate-y-interval layout "top-margin"
+ (cons (- top-margin) 0)
#t)
2 X))
(add-stencil
(ly:stencil-translate-axis
- (annotate-y-interval layout "bottommargin"
- (cons (- vsize) (- bottommargin vsize))
+ (annotate-y-interval layout "bottom-margin"
+ (cons (- paper-height) (- bottom-margin paper-height))
#t)
2 X))
(cons (min 0 (* dir sep))
(max 0 (* dir sep)))
#t)
- (/ (ly:output-def-lookup layout 'linewidth) 2)
+ (/ (ly:output-def-lookup layout 'line-width) 2)
X)
(if (= dir UP)
(ly:stencil-translate-axis
(annotate-y-interval layout
- "pagetopspace"
+ "page-top-space"
(cons
(- (min 0 (* dir sep))
- (ly:output-def-lookup layout 'pagetopspace))
+ (ly:output-def-lookup layout 'page-top-space))
(min 0 (* dir sep)))
#t)
(+ 7 (interval-center (ly:stencil-extent head-stencil X))) X)
'make-header
'make-footer)
(if (= dir UP)
- 'headsep
- 'footsep)
+ 'heap-separation
+ 'foot-separation)
dir last?)))
(define (page-header page)
(define (layout->page-init layout)
"Alist of settings for page layout"
(let*
- ((vsize (ly:output-def-lookup layout 'vsize))
- (hsize (ly:output-def-lookup layout 'hsize))
+ ((paper-height (ly:output-def-lookup layout 'paper-height))
+ (paper-width (ly:output-def-lookup layout 'paper-width))
- (lmargin (ly:output-def-lookup layout 'leftmargin))
- (leftmargin (if lmargin
+ (lmargin (ly:output-def-lookup layout 'left-margin))
+ (left-margin (if lmargin
lmargin
- (/ (- hsize
- (ly:output-def-lookup layout 'linewidth)) 2)))
-
- (bottom-edge (- vsize
- (ly:output-def-lookup layout 'bottommargin)))
- (top-margin (ly:output-def-lookup layout 'topmargin))
+ (/ (- paper-width
+ (ly:output-def-lookup layout 'line-width)) 2)))
+ (bottom-edge (- paper-height
+ (ly:output-def-lookup layout 'bottom-margin)) )
+ (top-margin (ly:output-def-lookup layout 'top-margin))
)
- `((vsize . ,vsize)
- (hsize . ,hsize)
- (left-margin . ,leftmargin)
+ `((paper-height . ,paper-height)
+ (paper-width . ,paper-width)
+ (left-margin . ,left-margin)
(top-margin . ,top-margin)
(bottom-edge . ,bottom-edge)
)))
(lines (page-lines page))
(number (page-page-number page))
- ;; TODO: naming vsize/hsize not analogous to TeX.
+ ;; TODO: naming paper-height/paper-width not analogous to TeX.
- (system-xoffset (ly:output-def-lookup layout 'horizontalshift 0.0))
+ (system-xoffset (ly:output-def-lookup layout 'horizontal-shift 0.0))
(system-separator-markup (ly:output-def-lookup layout 'systemSeparatorMarkup))
(system-separator-stencil (if (markup? system-separator-markup)
(interpret-markup layout
(page-stencil (ly:make-stencil
'()
- (cons (prop 'left-margin) (prop 'hsize))
+ (cons (prop 'left-margin) (prop 'paper-width))
(cons (- (prop 'top-margin)) 0)))
(last-system #f)
(scopes (ly:paper-book-scopes p-book))
(number (page-page-number page))
(last? (page-property page 'is-last))
- (h (- (ly:output-def-lookup layout 'vsize)
- (ly:output-def-lookup layout 'topmargin)
- (ly:output-def-lookup layout 'bottommargin)))
+ (h (- (ly:output-def-lookup layout 'paper-height)
+ (ly:output-def-lookup layout 'top-margin)
+ (ly:output-def-lookup layout 'bottom-margin)))
(head (page-property page 'head-stencil))
(foot (page-property page 'foot-stencil))
(bbox-extent (paper-system-extent system Y))
(refp-extent (ly:prob-property system 'refpoint-Y-extent))
(next-space (ly:prob-property system 'next-space
- (ly:output-def-lookup layout 'betweensystemspace)
+ (ly:output-def-lookup layout 'between-system-space)
))
(next-padding (ly:prob-property system 'next-padding
- (ly:output-def-lookup layout 'betweensystempadding)
+ (ly:output-def-lookup layout 'between-system-padding)
))
)
(define-public (set-paper-dimension-variables mod)
(module-define! mod 'dimension-variables
- '(pt mm cm in staffheight staff-space
- pagetopspace
- betweensystemspace betweensystempadding
- linewidth indent hsize vsize horizontalshift
- staffspace linethickness ledgerlinethickness
- blotdiameter leftmargin rightmargin)))
+ '(pt mm cm in staff-height staff-space
+ page-top-space
+ between-system-space between-system-padding
+ line-width indent paper-width paper-height horizontal-shift
+ staff-space line-thickness ledgerline-thickness
+ blot-diameter left-margin right-margin)))
(define-public (layout-set-staff-size sz)
"Function to be called inside a \\layout{} block to set the staff size."
(module-define! m 'text-font-size (* 12 (/ sz (* 20 pt))))
- (module-define! m 'outputscale ss)
+ (module-define! m 'output-scale ss)
(module-define! m 'fonts
(if tex-backend?
(make-cmr-tree (/ sz (* 20 pt)))
(make-century-schoolbook-tree
(/ sz (* 20 pt)))))
- (module-define! m 'staffheight sz)
+ (module-define! m 'staff-height sz)
+ (module-define! m 'staff-space ss)
(module-define! m 'staff-space ss)
- (module-define! m 'staffspace ss)
;; !! synchronize with feta-params.mf
- (module-define! m 'linethickness lt)
- (module-define! m 'ledgerlinethickness (+ (* 0.5 pt) (/ ss 10)))
- (module-define! m 'blotdiameter (* 0.4 pt))
+ (module-define! m 'line-thickness lt)
+ (module-define! m 'ledgerline-thickness (+ (* 0.5 pt) (/ ss 10)))
+ (module-define! m 'blot-diameter (* 0.4 pt))
))
(define-safe-public (set-global-staff-size sz)
(define (set-paper-dimensions m w h)
"M is a module (i.e. layout->scope_ )"
(let* ((mm (eval 'mm m)))
- (module-define! m 'hsize w)
- (module-define! m 'vsize h)
- (module-define! m 'linewidth (- w (* 20 mm)))
+ (module-define! m 'paper-width w)
+ (module-define! m 'paper-height h)
+ (module-define! m 'line-width (- w (* 20 mm)))
(module-define! m 'indent (/ w 14))
;; page layout - what to do with (printer specific!) margin settings?
(module-define! scope v
(/ val scale))
- ;; spurious warnings, eg. for hsize, vsize.
+ ;; spurious warnings, eg. for paper-width, paper-height.
;; (ly:warning (_ "not a number, ~S = ~S " v val))
)))
;;;; Han-Wen Nienhuys <hanwen@cs.uu.nl>
(define-public (layout-extract-page-properties layout)
- (list (append `((linewidth . ,(ly:paper-get-number
- layout 'linewidth)))
+ (list (append `((line-width . ,(ly:paper-get-number
+ layout 'line-width)))
(ly:output-def-lookup layout 'text-font-defaults))))
;;;;;;;;;;;;;;;;;;
(last, result) = do_conversion (infile.read (), from_version, to_version)
infile.close ()
-
if last:
newversion = r'\version "%s"' % tup_to_str (last)
if lilypond_version_re.search (result):