* scm/output-tex.scm (header): kludge: hard code linewidth.
@itemize @bullet
+@item A new block, @code{\bookpaper} has been introduced to
+hold settings for paper size and output scaling.
+
@item Support for fret diagrams has been contributed by Carl
D. Sorensen. @file{input/test/fret-diagram.ly} contains an example.
@item The @code{--safe} mode has been revisited: it makes the basic
-ly: interface available, and stops malicious @TeX{} code.
+@code{ly:} interface available, and stops malicious @TeX{} code.
@item Music syntax can now be extended seamlessly. As an example,
here is the new implementation @code{\applymusic},
}
- int p = 0;
+ SCM prev_acc = scm_int2num (0);
for (int i= 0; i < prev_idx; i++)
{
if (accbarnum < 0
|| (ly_c_number_p (lazyness)
&& curbarnum > accbarnum + ly_scm2int (lazyness)))
{
- p = ly_scm2int (ly_cdr (prevs[i]));
+ prev_acc = ly_cdr (prevs[i]);
break;
}
}
+ /*
+ UGH. prev_acc can be #t in case of ties. What is this for?
+
+ */
+ int p = ly_c_number_p (prev_acc) ? ly_scm2int (prev_acc) : 0;
+
+
int num;
- if (a == p)
+ if (a == p && ly_c_number_p (prev_acc))
num = 0;
else if ( (abs (a)<abs (p) || p*a<0) && a != 0 )
num = 2;
int n = pitch->get_notename ();
int o = pitch->get_octave ();
int a = pitch->get_alteration ();
- SCM on_s = scm_cons (scm_int2num (o), scm_int2num (n));
+ SCM key = scm_cons (scm_int2num (o), scm_int2num (n));
while (origin && origin->where_defined (ly_symbol2scm ("localKeySignature")))
{
that of the tied note and of the key signature.
*/
localsig = ly_assoc_front_x
- (localsig, on_s, scm_cons (SCM_BOOL_T, scm_int2num (barnum)));
+ (localsig, key, scm_cons (SCM_BOOL_T, scm_int2num (barnum)));
change = true;
}
noteheads with the same notename.
*/
localsig = ly_assoc_front_x
- (localsig, on_s, scm_cons (scm_int2num (a), scm_int2num (barnum)));
+ (localsig, key, scm_cons (scm_int2num (a), scm_int2num (barnum)));
change = true;
}
SCM ly_parser_scorify (SCM, SCM);
Music_output_def *get_paper (My_lily_parser *parser);
+Book_paper_def *get_bookpaper (My_lily_parser *parser);
#endif /* MY_LILY_PARSER_HH */
DECLARE_SMOBS (Page, );
public:
+ Paper_def *paper_; // todo: make private?
+ Book_paper_def * bookpaper () const;
static int page_count_;
static Real MIN_COVERAGE_;
- Paper_def *paper_;
int number_;
int line_count_;
SCM lines_;
#include "paper-line.hh"
#include "stencil.hh"
#include "warn.hh"
+#include "book-paper-def.hh"
int Page::page_count_ = 0;
Real Page::MIN_COVERAGE_ = 0.66;
+Book_paper_def *
+Page::bookpaper () const
+{
+ return paper_->bookpaper_;
+}
+
Page::Page (Paper_def *paper, int number)
{
copyright_ = SCM_EOL;
Page *p = (Page*) SCM_CELL_WORD_1 (smob);
scm_gc_mark (p->header_);
scm_gc_mark (p->footer_);
+
+ if (p->paper_)
+ {
+ scm_gc_mark (p->paper_->self_scm ());
+ if (p->bookpaper ())
+ {
+ scm_gc_mark (p->bookpaper ()->self_scm ());
+ }
+ }
+
scm_gc_mark (p->copyright_);
scm_gc_mark (p->tagline_);
//scm_gc_mark (p->lines_);
Score *score = $2;
Book *book = new Book;
book->scores_.push (score);
-
+
Music_output_def *paper = get_paper (THIS);
+ book->bookpaper_ = get_bookpaper (THIS);
+
SCM s = book->to_stencil (paper, THIS->header_);
scm_gc_unprotect_object (score->self_scm ());
scm_gc_unprotect_object (book->self_scm ());
"\\lilypondspecial\n"
"\\lilypondpostscript\n"))
-; why paper?
-(define (header creator time-stamp paper page-count classic?)
+(define (header creator time-stamp bookpaper page-count classic?)
(string-append
"% Generated by " creator "\n"
"% at " time-stamp "\n"