Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(391)

Side by Side Diff: Documentation/extending/programming-interface.itely

Issue 321620043: EG: a bit of grob-transformer documentation
Patch Set: Created 6 years, 6 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 @c -*- coding: utf-8; mode: texinfo; -*- 1 @c -*- coding: utf-8; mode: texinfo; -*-
2 2
3 @ignore 3 @ignore
4 Translation of GIT committish: FILL-IN-HEAD-COMMITTISH 4 Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
5 5
6 When revising a translation, copy the HEAD committish of the 6 When revising a translation, copy the HEAD committish of the
7 version that you are working on. For details, see the Contributors' 7 version that you are working on. For details, see the Contributors'
8 Guide, node Updating translation committishes.. 8 Guide, node Updating translation committishes..
9 @end ignore 9 @end ignore
10 10
(...skipping 1356 matching lines...) Expand 10 before | Expand all | Expand 10 after
1367 1367
1368 @example 1368 @example
1369 \relative @{ 1369 \relative @{
1370 \override Flag.X-offset = #(lambda (flag) 1370 \override Flag.X-offset = #(lambda (flag)
1371 (let ((default (ly:flag::calc-x-offset flag))) 1371 (let ((default (ly:flag::calc-x-offset flag)))
1372 (* default 4.0))) 1372 (* default 4.0)))
1373 c''4. d8 a4. g8 1373 c''4. d8 a4. g8
1374 @} 1374 @}
1375 @end example 1375 @end example
1376 1376
1377 It is also possible to get the value of the existing default by
1378 employing the function @code{grob-transformer}:
1379
1380 @lilypond[verbatim,quote]
1381 \relative {
1382 \override Flag.X-offset = #(grob-transformer 'X-offset
1383 (lambda (flag default) (* default 4.0)))
1384 c''4. d8 a4. g8
1385 }
1386 @end example
pkx166h 2017/09/11 17:11:45 Doesn't compile. You need either an @example or an
dak 2017/09/11 18:11:59 Acknowledged.
dak 2017/09/11 18:11:59 Ouch.
1387
1388
1377 From within a callback, the easiest method for evaluating a markup is 1389 From within a callback, the easiest method for evaluating a markup is
1378 to use grob-interpret-markup. For example: 1390 to use grob-interpret-markup. For example:
1379 1391
1380 @example 1392 @example
1381 my-callback = #(lambda (grob) 1393 my-callback = #(lambda (grob)
1382 (grob-interpret-markup grob (markup "foo"))) 1394 (grob-interpret-markup grob (markup "foo")))
1383 @end example 1395 @end example
1384 1396
1385 @ignore 1397 @ignore
1386 1398
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
1529 1541
1530 @end itemize 1542 @end itemize
1531 1543
1532 @node LilyPond Scheme interfaces 1544 @node LilyPond Scheme interfaces
1533 @chapter LilyPond Scheme interfaces 1545 @chapter LilyPond Scheme interfaces
1534 1546
1535 This chapter covers the various tools provided by LilyPond to help 1547 This chapter covers the various tools provided by LilyPond to help
1536 Scheme programmers get information into and out of the music streams. 1548 Scheme programmers get information into and out of the music streams.
1537 1549
1538 TODO -- figure out what goes in here and how to organize it 1550 TODO -- figure out what goes in here and how to organize it
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b