summaryrefslogtreecommitdiff
path: root/contrib/lilypond/groff_lilypond.man
blob: 0c6a4198bce037294d009dd5dd5c14089d410dc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
.TH groff_lilypond @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
.SH NAME
groff\-lilypond \[em] integrate \f[CI]lilypond\f[] parts into \f[CI]groff\f[]
.
.\" This .SH was moved to this place in order to appease `apropos'.
.
.\" --------------------------------------------------------------------
.\" Legalese
.\" --------------------------------------------------------------------
.
.de authors
This file was written by Bernd Warken
.MT groff\-bernd.warken\-72@web.de
.ME .
.
Last update: 22 Feb 2013
..
.
.
.de copying
groff_lilypond \[em] integrate lilypond into groff files
.
.P
.EX
Source file position: <groff-source>/contrib/lilypond/groff_lilypond.man
Installed position: <prefix>/share/man/man1/groff_lilypond.1
.EE
.
.P
Copyright \(co 2013
.RS
.ft CI
Free Software Foundation, Inc.
.ft R
.RE
.
.P
This file is part of
.ft CI
GNU groff\\f[R].
.
.P
.ft CI
GNU groff
.ft R
is free software is free software: you can redistribute it and/or modify it
under the terms of the
.ft CI
GNU General Public License
.ft R
as published by the
.ft CI
Free Software Foundation\fR, either
.ft CI
version 3
.ft R
of the
.IR License ,
or
.RI ( "at your option" )
any later version.
.
.P
.ft CI
GNU groff
.ft R
is distributed in the hope that it will be useful, but
.ft CI
WITHOUT ANY WARRANTY\fR; without even the implied warranty of
.ft CI
MERCHANTABILITY
.ft R
or
.ft CI FITNESS FOR A PARTICULAR PURPOSE\fR.
See the
.ft CI
GNU General Public License
.ft R
for more details.
.
.P
.P
You should have received a copy of the
.nh
.ft CI
GNU General Public License
.ft R
.hy
along with
.ft CI
groff\\f[R], see the files
.nh
.ft CB
COPYING
.ft R
and
.ft CB
LICENSE
.ft R
.hy
in the top directory of the
.ft CI
groff
.ft R
source package.
.
If not, see
.UR http://\\:www.gnu.org/\\:licenses/
 the
.ft CI
GNU licenses
.ft R
.UE .
.
..
.
.
.\" --------------------------------------------------------------------
.\" Setup
.\" --------------------------------------------------------------------
.
.ds Ellipsis "\&.\|.\|.\&\"
.
.
.\" --------------------------------------------------------------------
.\" Macro definitions
.\" --------------------------------------------------------------------
.
.\" --------------------------------------------------------------------
.\" .FONT (<font name> <text> [<font name> <text> ...])
.\"
.\" Print in different fonts: R, I, B, CR, CI, CB
.\"
.de1 FONT
.  if (\\n[.$] = 0) \{\
.	nop \&\f[P]\&
.	return
.  \}
.  ds result \&
.  while (\\n[.$] >= 2) \{\
.	as result \,\f[\\$1]\\$2
.	if !"\\$1"P" .as result \f[P]
.	shift 2
.  \}
.  if (\\n[.$] = 1) .as result \,\f[\\$1]
.  nh
.  nop \\*[result]\&
.  hy
..
.
.
.\" --------------------------------------------------------------------
.SH "SYNOPSIS"
.\" --------------------------------------------------------------------
.
.SY groff_lilypond
.OP options
.OP -
.OP --
.OP \%filespec \*[Ellipsis]
.YS
.
.
.\" --------------------------------------------------------------------
.SH DESCRIPTION
.\" --------------------------------------------------------------------
.
.FONT CB groff_lilypond
transforms sheet music in the
.FONT CI lilypond
language in a
.FONT CI groff
file such that
.FONT CB groff
can display them.
.
.
.P
Without arguments or without
.I filespec
arguments,
.FONT CB groff_lilypond
reads from standard input.
.
Several files can be used; the minus character
.FONT CB \[em]
stands for standard input.
.
.
.\" --------------------------------------------------------------------
.SH "OPTION OVERVIEW"
.\" --------------------------------------------------------------------
.
.\" --------------------------------------------------------------------
.SS "Breaking Options"
.\" --------------------------------------------------------------------
.TP
.I breaking options
.RS
.P
.SY
.OP -h\~\fR|\fB\~--help
.OP -v\~\fR|\fB\~--version
.OP \fB\~--license
.YS
.RE
.
.
.TP
.I \%groff_lilypond mode options
.RS
.
.TP
.OP --pdf2eps
The program
.FONT CB groff_lilypond
generates a
.FONT CI pdf
file using
.FONT CB lilypond R .
.
Then the
.FONT CI eps
file is generated by
.FONT CB pdf2ps
and
.FONT CB ps2eps R .
.
.
.TP
.OP --ly2eps
Here the
.FONT CB lilypond
program creates
.FONT CI eps
files directly.
.
.
.RE
.
.
.TP
.I \%directories and files
.RS
.
.TP
.OP --file_prefix name
Normally all temporary files get names that start with the
.FONT CB ly CI \*[Ellipsis]
prefix.
.
With this option, you can freely change this prefix.
.
.
.TP
.OP --keep_files
Normally all temporary files without the
.FONT CI eps
files are deleted.
.
With this opton, all generated files either by the
.FONT CB lilypond
program or other format transposers are kept.
.
.
.TP
.OP --temp_dir dir
With this option, you can change the directory in which the temporary
files are stored.
.
No extensions are used for this directory.
.
If the directory does not exist it will be created.
.
.
.RE
.
.
.\" --------------------------------------------------------------------
.SH "FINDING THE LILYPOND PARTS IN A ROFF FILE OR STANDARD INPUT"
.\" --------------------------------------------------------------------
.
A
.FONT CI lilypond
part within a structure written in the
.FONT CI groff
language is the whole part between the marks
.EX
.FONT CB ".lilypond start"
.EE
and
.EX
.FONT CB ".lilypond end"
.EE
.
.
.P
A
.FONT CI groff
file can have several of these
.FONT CI lilypond
parts.
.
.
.P
These
.FONT CI lilypond
parts are sent into temporary files with the file name extension
.FONT CB .ly R .
.
There a 2 modes to transform these files.
.
.
.\" --------------------------------------------------------------------
.SH "LY\-FILE INCLUSION"
.\" --------------------------------------------------------------------
.
An additional command line for file inclusion of
.FONT CI lilypond
files is given by
.EX
.FONT CB ".lilypond include" I " file_name"
.EE
in
.FONT CI groff
files.
.
One file can be included per
.FONT CI include
command.
.
.
.P
If this command is written outside a
.FONT CI lilypond
part, one new
.FONT CB .ly  R file
is created for all files in the argument, which will be transformed
afterwards when writing is done.
.
.
.P
Within a
.FONT CI lilypond
part, this inclusion is not possible.
.
So
.FONT CB ".lilypond include"
may not be used between
.FONT CB ".lilypond start"
and
.FONT CB ".lilypond end" .R .
.
.
.\" --------------------------------------------------------------------
.SH "TRANSFORMATION MODE LY2EPS"
.\" --------------------------------------------------------------------
.
This mode is the default.
.
It can also be chosen by the option
.FONT CB --ly2eps R .
.
.
.P
In this mode, the
.FONT CB .ly
files are transformed by the
.FONT CB lilypond
program into many files of different formats, including
.FONT CI eps
files, using
.EX
.FONT CB "$ lilypond \-\-ps \-dbackend=eps \-dgs\-load\-fonts \-\-output=" I file\-name
.EE
for each
.FONT CB .ly
file.
.
The output
.I file\-name
must be provided without an extension, its directory is temporary..
.
.
.P
There are many
.FONT CI EPS
files created.
.
One having the complete transformed
.FONT CB ly
file, named
.FONT I file\-name CB .eps R .
.
.
.P
Moreover there are
.FONT CI EPS
files for each page, named
.FONT I file\-name CB \- I digit CB .eps R .
.
.
.P
The last step to be done is replacing all
.FONT CI lilypond
parts by the collection of the corresponding
.FONT CI EPS
page files.
.
This is done by
.FONT CI groff
commands
.EX
.FONT CB ".PSPIC " CI file-name CB \- I digit CB .eps 
.EE
.
.
.\" --------------------------------------------------------------------
.SH "TRANSFORMATION MODE PDF2EPS"
.\" --------------------------------------------------------------------
.
This mode can be chosen by the option
.FONT CB --pdf2eps R .
.
.
.P
In this mode, the
.FONT CB .ly
files are transformed by the
.FONT CB lilypond
program into
.FONT CI pdf
files, using
.EX
.FONT CB "lilypond \-\-pdf \-\-output=" I file-name
.EE
for each
.FONT CB .ly
file.
.
The
.I file-name
must be provided without the extension
.FONT CB .pdf R .
.
By this process, a file
.FONT CI file-name CB .pdf
is generated.
.
.
.P
The next step is to transform these
.FONT CI pdf
files into a
.FONT CI ps
file.
.
This is done by the
.FONT CB pdf2ps
program using
.EX
.FONT R "$ " CB "pdf2ps " CI file-name CB ".pdf " CI file-name CB ".ps"
.EE
.
.
The next step creates an
.FONT CI EPS
file from the
.FONT CI ps
file.
.
This is done by the
.FONT CB ps2eps
program using
.EX
.FONT R "$ " CB "ps2eps " CI file-name CB ".ps"
.EE
.
.
.P
By that, a file
.FONT CI file-name CB .eps
is created for each
.FONT CI lilypond
part in the
.FONT CI groff
file or standard input.
.
.
.P
The last step to be done is replacing all
.FONT CI lilypond
parts by the
.FONT CI groff
command
.EX
.FONT CB ".PSPIC " CI file-name CB .eps 
.EE
.
.
.\" --------------------------------------------------------------------
.SH "NEW ROFF STRUCTURE"
.\" --------------------------------------------------------------------
.
The new
.BR groff (@MAN7EXT@)
structure generated by
.FONT CB groff_lilypond
is sent to standard output.
.
It can either be saved in a file or piped to
.BR groff (@MAN1EXT@)
or
.BR groffer (@MAN1EXT@)
for a display.
.
.
.\" --------------------------------------------------------------------
.SH "TEMPORARY FILES"
.\" --------------------------------------------------------------------
.
By the transformation process, there are many temporary files
generated.
.
All of them except the
.FONT CI EPS
files are deleted when the
.FONT CB groff_lilypond
process is finished.
.
.
.P
These
.FONT CI EPS
files are stored in a temporary directory.
.
But they cannot be deleted by the transformation process because they
are needed for the display which can take a long time.
.
.
.\" --------------------------------------------------------------------
.SH "DISPLAY"
.\" --------------------------------------------------------------------
.
The display maps each
.FONT CI lilypond
part on a complete page, preceded and followed by a page break.
.
I do not know how to change this or what very long music sheets will
do.
.
.
.\" --------------------------------------------------------------------
.SH "AUTHORS"
.\" --------------------------------------------------------------------
.authors
.
.
.\" --------------------------------------------------------------------
.SH "COPYING"
.\" --------------------------------------------------------------------
.copying
.
.
.\" --------------------------------------------------------------------
.\" Emacs settings
.\" --------------------------------------------------------------------
.
.\" Local Variables:
.\" mode: nroff
.\" End: