summaryrefslogtreecommitdiff
path: root/contrib/glilypond/glilypond.1.man
blob: ae10bbd076cbf28faf1af94c37a4eeb895609501 (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
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
.TH glilypond @MAN1EXT@ "@MDATE@" "groff @VERSION@"
.SH Name
glilypond \- embed LilyPond musical notation in
.I groff
documents
.
.
.\" TODO: This page needs a thorough edit by a fluent English speaker.
.
.\" ====================================================================
.\" Legal Terms
.\" ====================================================================
.\"
.\" Copyright (C) 2013-2020 Free Software Foundation, Inc.
.\"
.\" This file is part of glilypond, which is part of GNU groff, a free
.\" software project.
.\"
.\" You can redistribute it and/or modify it under the terms of the GNU
.\" General Public License version 2 (GPL2) as published by the Free
.\" Software Foundation.
.\"
.\" The license text is available in the internet at
.\" <http://www.gnu.org/licenses/gpl-2.0.html>.
.
.
.\" Save and disable compatibility mode (for, e.g., Solaris 10/11).
.do nr *groff_glilypond_1_man_C \n[.cp]
.cp 0
.
.\" Define fallback for groff 1.23's MR macro if the system lacks it.
.nr do-fallback 0
.if !\n(.f           .nr do-fallback 1 \" mandoc
.if  \n(.g .if !d MR .nr do-fallback 1 \" older groff
.if !\n(.g           .nr do-fallback 1 \" non-groff *roff
.if \n[do-fallback]  \{\
.  de MR
.    ie \\n(.$=1 \
.      I \%\\$1
.    el \
.      IR \%\\$1 (\\$2)\\$3
.  .
.\}
.rr do-fallback
.
.
.\" ====================================================================
.SH Synopsis
.\" ====================================================================
.
.SY glilypond
.RB [ \-k ]
.RB [{ \-\-ly2eps | \-\-pdf2eps }]
.RB [ \-e
.IR directory ]
.RB [ \-o
.IR output-file ]
.RB [ \-p
.IR filename-prefix ]
.RB [ \-t
.IR tdir ]
.RB [{ \-v | \-V }]
.RB [ \-\- ]
.RI [ file\~ .\|.\|.]
.
.
.SY glilypond
.RB [{ \-\-ly2eps | \-\-pdf2eps }]
.RB [ \-\-eps_dir
.IR directory ]
.RB [ \-\-keep_all ]
.RB [ \-\-output
.IR output-file ]
.RB [ \-\-prefix
.IR filename-prefix ]
.RB [ \-\-temp_dir
.IR tdir ]
.RB [ \-\-verbose ]
.RB [ \-\- ]
.RI [ file\~ .\|.\|.]
.YS
.
.
.SY glilypond
.B \-?
.SY glilypond
.B \-h
.SY glilypond
.B \-\-help
.SY glilypond
.B \-\-usage
.YS
.
.
.SY glilypond
.B \-l
.SY glilypond
.B \-\-license
.YS
.
.
.SY glilypond
.B \-\-version
.YS
.
.
.\" ====================================================================
.SH Description
.\" ====================================================================
.
.I glilypond
is a
.MR groff @MAN7EXT@
preprocessor that enables the embedding of LilyPond music scores in
.I groff
documents.
.\".
.\".B .PDFPIC
.\"is available, but does not yet work with lilypond.
.
If no operands are given,
or if
.I file
is
.RB \[lq] \- \[rq],
.I glilypond
reads the standard input stream.
.
A double-dash argument
.RB (\[lq] \-\- \[rq])
causes all subsequent arguments to be interpreted as
.I file
operands,
even if their names start with a dash.
.
.
.\" ====================================================================
.SH Usage
.\" ====================================================================
.
At present,
.I glilypond
works with the
.I groff
.BR ps ,
.BR dvi ,
.BR html ,
and
.B xhtml
devices.
.
The
.B lbp
and
.B lj4
devices are untested.
.
Unfortunately,
the
.B pdf
device does not yet work.
.
.
.\" ====================================================================
.SH "Option overview"
.\" ====================================================================
.
.
.TP
.BR \-? | \-h | \-\-help | \-\-usage
Display usage information and exit.
.
.TP
.B \-\-version
Display version information and exit.
.
.TP
.BR \-l | \-\-license
Display copyright license information and exit.
.
.
.\" ====================================================================
.SS "Options for building EPS files"
.\" ====================================================================
.
.TP
.B \-\-ly2eps
Direct
.MR lilypond 1
to create Encapsulated PostScript (EPS) files.
.
This is the default.
.
.
.TP
.B \-\-pdf2eps
The program
.I glilypond
generates a PDF file using
.IR lilypond .
.
Then the EPS file is generated by
.I pdf2ps
and
.IR ps2eps .
.
.
.\" ====================================================================
.SS "Directories and files"
.\" ====================================================================
.
.TP
.BR \-e | \-\-eps_dir "\fI directory_name\fP"
Normally all
.I EPS
files are sent to the temporary directory.
.
With this option,
you can generate your own directory,
in which all useful
.I EPS
files are send.
.
So at last, the temporary directory can be removed.
.
.
.TP
.BR \-p | \-\-prefix "\fI begin_of_name\fP"
Normally all temporary files get names that start with the
.BI ly .\|.\|.\&
prefix.
.
With this option, you can freely change this prefix.
.
.
.TP
.BR \-k | \-\-keep_all
Normally all temporary files without the
.I eps
files are deleted.
.
With this option, all generated files either by the
.I lilypond
program or other format transposers are kept.
.
.
.TP
.BR \-t | \-\-temp_dir "\fI dir\fP"
With this option, you call a directory that is the base for the
temporary directory.
.
This directory name is used as is without any extensions.
.
If this directory does not exist it is be created.
.
The temporary directory is created by Perl's security operations
directly under this directory.
.
In this temporary directory, the temporary files are stored.
.
.
.\" ====================================================================
.SS Output
.\" ====================================================================
.
.TP
.BR \-o | \-\-output "\fI file_name\fP"
Normally all
.I groff
output of this program is sent to
.BR STDOUT .
.
With this option, that can be changed, such that the output is stored
into a file named in the option argument
.IR file_name .
.
.
.TP
.BR \-v | \-V | \-\-verbose
A lot more of information is sent to STDERR.
.
.
.\" ====================================================================
.SS "Short option collections"
.\" ====================================================================
.
The argument handling of options
.
.
.P
.I "Short options"
are arguments that start with a single dash
.BR \- .
.
Such an argument can consist of arbitrary many options without option
argument, composed as a collection of option characters following the
single dash.
.
.
.P
Such a collection can be terminated by an option character that
expects an option argument.
.
If this option character is not the last character of the argument,
the following final part of the argument is the option argument.
.
If it is the last character of the argument, the next argument is
taken as the option argument.
.
.
.P
This is the standard for
.I POSIX
and
.I GNU
option management.
.
.
.P
For example,
.
.TP
.BI \-kVe " some_dir"
is a collection of the short options
.B \-k
and
.B \-V
without option argument, followed by the short option
.B \-e
with option argument that is the following part of the argument
.IR some_dir .
.
So this argument could also be written as several arguments
.B \-k \-V \-e
.IR some_dir .
.
.
.\" ====================================================================
.SS "Handling of long options"
.\" ====================================================================
.
Arguments that start with a double dash
.B \-\-
are so-called
.I "long options" R .
.
Each double dash argument can only have a single long option.
.
.
.P
.I "Long options"
have or have not an option argument.
.
An option argument can be the next argument or can be appended with an
equal sign
.B =
to the same argument as the long option.
.
.
.TP
.B \-\-help
is a long option without an option argument.
.
.TP
.BI \-\-eps_dir " some_dir"
.TQ
.BI \-\-eps_dir= some_dir
is the long option
.B \-\-eps_dir
with the option argument
.IR some_dir .
.
.
.P
Moreover the program allows abbreviations of long options, as much as
possible.
.
.
.P
The
.I "long option"
.B \-\-keep_all
can be abbreviated from
.B \-\-keep_al
up to
.B \-\-k
because the program does not have another
.I "long option"
whose name starts with the character
.BR k .
.
.
.P
On the other hand, the option
.B \-\-version
cannot be abbreviated further than
.B \-\-vers
because there is also the
.I long option
.B \-\-verbose
that can be abbreviated up to
.BR \-\-verb .
.
.
.P
An option argument can also be appended to an abbreviation.
.
So is
.BI \-\-e= some_dir
the same as
.B \-\-eps_dir
.IR some_dir .
.
.
.P
Moreover the program allows an arbitrary usage of upper and lower case
in the option name.
.
This is
.I Perl
style.
.
.
.P
For example, the
.I "long option"
.B \-\-keep_all
can as well be written as
.B \-\-Keep_All
or even as an abbreviation like
.BR \-\-KeE .
.
.
.\" ====================================================================
.SH "LilyPond regions in \f[I]roff\f[] input"
.\" ====================================================================
.
.\" ====================================================================
.SS "Integrated LilyPond code"
.\" ====================================================================
.
A
.I lilypond
part within a structure written in the
.I groff
language is the whole part between the marks
.RS
.EX
.B ".lilypond start"
.EE
.RE
and
.RS
.EX
.B ".lilypond end"
.EE
.RE
.
.
.P
A
.I groff
input can have several of these
.I lilypond
parts.
.
.
.P
When processing such a
.I lilypond
part between
.B ".lilypond start"
and
.B ".lilypond end"
we say that the
.B glilypond
program is in
.IR "lilypond mode" .
.
.
.P
These
.I lilypond
parts are sent into temporary
.I lilypond
files with the file name extension
.BR .ly .
.
These files are transformed later on into
.I EPS
files.
.
.
.\" ====================================================================
.SS "Inclusion of \f[I].ly\f[] files"
.\" ====================================================================
.
An additional command line for file inclusion of
.I lilypond
files is given by
.EX
.BI ".lilypond include" " file_name"
.EE
in
.I groff
input.
.
For each such
.I include
command, one file of
.I lilypond
code can be included into the
.I groff
code.
.
Arbitrarily many of these commands can be included in the
.I groff
input.
.
.
.P
These include commands can only be used outside the
.I lilypond
parts.
.
Within the
.IR "lilypond mode" ,
this inclusion is not possible.
.
So
.B ".lilypond include"
may not be used in
.IR "lilypond mode" ,
i.e.\& between
.B ".lilypond start"
and
.BR ".lilypond end" .
.
.
These included
.IR ly -files
are also transformed into
.I EPS
files.
.
.
.\" ====================================================================
.SH "Generated files"
.\" ====================================================================
.
By the transformation process of
.I lilypond
parts into
.I EPS
files, there are many files generated.
.
By default, these files are regarded as temporary files and as such
stored in a temporary directory.
.
.
.P
This process can be changed by command-line options.
.
.
.\" ====================================================================
.SS "Command-line options for directories"
.\" ====================================================================
.
The temporary directory for this program is either created
automatically or can be named by the option
.BR \-t | \-\-temp_dir
.IR dir .
.
.
.P
Moreover, the
.I EPS
files that are later on referred by
.B .PSPIC
command in the final
.I groff
output can be stored in a different directory that can be set by the
command-line option
.BR \-e | \-\-eps_dir
.IR directory_name .
.
With this option, the temporary directory can be removed completely at
the end of the program.
.
.
.P
The beginning of the names of the temporary files can be set by the
command-line options
.B \-p
or
.BR \-\-prefix .
.
.
.P
All of the temporary files except the
.I EPS
files are deleted finally.
.
This can be changed by setting the command-line options
.B \-k
or
.BR \-\-keep_files .
.
With this, all temporary files and directories are kept, not deleted.
.
.
.P
These
.I EPS
files are stored in a temporary or
.I EPS
directory.
.
But they cannot be deleted by the transformation process because they
are needed for the display which can take a long time.
.
.
.\" ====================================================================
.SH "Transformation processes for generating EPS files"
.\" ====================================================================
.
.\" ====================================================================
.SS "Mode pdf2eps"
.\" ====================================================================
.
This mode is the actual default and can also be chosen by the option
.BR \-\-pdf2eps .
.
.
.P
In this mode, the
.B .ly
files are transformed by the
.MR lilypond 1
program into
.I PDF
files, using
.RS
.EX
.BI "lilypond \-\-pdf \-\-output=" file-name
.EE
.RE
for each
.B .ly
file.
.
The
.I file-name
must be provided without the extension
.BR .pdf .
.
By this process, a file
.IB file-name .pdf
is generated.
.
.
.P
The next step is to transform these
.I PDF
files into a
.I PS
file.
.
This is done by the
.MR pdf2ps 1
program using
.RS
.EX
$\~\c
.B pdf2ps\~\c
.IB file-name .pdf\~\c
.IB file-name .pds
.EE
.RE
.
.
The next step creates an
.I EPS
file from the
.I PS
file.
.
This is done by the
.MR ps2eps 1
program using
.RS
.EX
.RB "$ " "ps2eps " \fIfile-name\fP ".ps"
.EE
.RE
.
.
.P
By that, a file
.IB file-name .eps
is created for each
.I lilypond
part in the
.I groff
file or standard input.
.
.
.P
The last step to be done is replacing all
.I lilypond
parts by the
.I groff
command
.RS
.EX
.BI ".PSPIC " file-name .eps
.EE
.RE
.
.
.\" ====================================================================
.SS "Mode ly2eps"
.\" ====================================================================
.
In earlier time, this mode was the default.
.
But now it does not work any more, so accept the new default
.IR pdf2eps .
.
For testing, this mode can also be chosen by the
.I glilypond
option
.BR \-\-ly2eps .
.
.
.P
In this mode, the
.B .ly
files are transformed by the
.I lilypond
program into many files of different formats, including
.I eps
files, using
.RS
.EX
$\~\c
.B lilypond \-\-ps \-dbackend=eps \-dgs\-load\-fonts \-\-output=\c
.I file-name
.EE
.RE
for each
.B .ly
file.
.
The output
.I file\-name
must be provided without an extension, its directory is temporary.
.
.
.P
There are many
.I EPS
files created.
.
One having the complete transformed
.B ly
file, named
.IB file\-name .eps \fR.\fP
.
.
.P
Moreover there are
.I EPS
files for each page, named
.IB file\-name \- digit .eps \fR.\fP
.
.
.P
The last step to be done is replacing all
.I lilypond
parts by the collection of the corresponding
.I EPS
page files.
.
This is done by
.I groff
commands
.EX
.BI ".PSPIC " file-name \- digit .eps
.EE
.
.
.\" ====================================================================
.SH "Generated \f[I]groff\f[] output"
.\" ====================================================================
.
The new
.MR groff @MAN7EXT@
structure generated by
.I glilypond
is either
.
.TP
1)
sent to standard output and can there be saved into a file or piped into
.MR groff @MAN1EXT@
or
.
.TP
2)
stored into a file by given the option
.BR \-o\ \~| \~\-\-output
.I file_name
.
.
.\" ====================================================================
.SH Authors
.\" ====================================================================
.
.I glilypond
was written by
.MT groff\-bernd\:.warken\-72@\:web\:.de
Bernd Warken
.ME .
.
.
.\" ====================================================================
.SH "See also"
.\" ====================================================================
.
.TP
.MR groff @MAN1EXT@
describes the usage of the
.I groff
command and contains pointers to further documentation of the
.I groff
system.
.
.
.TP
.MR groff_tmac @MAN5EXT@
describes the
.B .PSPIC
request.
.
.
.TP
.MR lilypond 1
briefly describes the
.I lilypond
command and contains pointers to further documentation.
.
.
.TP
.MR pdf2ps 1
transforms a
.I PDF
file into a
.I PostScript
format.
.
.
.TP
.MR ps2eps 1
transforms a
.I PS
file into an
.I EPS
format.
.
.
.\" Restore compatibility mode (for, e.g., Solaris 10/11).
.cp \n[*groff_glilypond_1_man_C]
.do rr *groff_glilypond_1_man_C
.
.
.\" Local Variables:
.\" fill-column: 72
.\" mode: nroff
.\" End:
.\" vim: set filetype=groff textwidth=72: