]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/writing-texinfo.txt
Misc minor updates.
[lilypond.git] / Documentation / user / writing-texinfo.txt
1 DOCUMENTATION FORMATTING
2 ------------------------
3
4 The language is called texinfo; you can see its manual here:
5 http://www.gnu.org/software/texinfo/manual/texinfo/
6
7 However, you don't need to read those docs.  The most important
8 thing to notice is that text is text.  If you see a mistake in the
9 text, you can fix it.  If you want to change the order of
10 something, you can cut-and-paste that stuff into a new location.
11
12
13 %%%%% SECTIONING COMMANDS
14
15 Most of the manual operates at the
16         @node Foo
17         @unnumberedsubsubsec Foo
18 level.  Sections are created with
19         @node Foo
20         @subsection Foo
21 commands.
22
23 * sectioning commands (@node and @section) must not appear inside
24   an @ignore.  Separate those commands with a space, ie @n ode.
25
26
27
28 %%%%% LILYPOND FORMATTING
29
30 * Use two spaces for indentation in lilypond examples.  (no tabs)
31
32 * If possible, only write one bar per line.  The notes on each
33   line should be an independent line.
34   Bad:
35     \override textscript #'padding = #3 c1^"hi"
36   Good:
37     \override textscript #'padding = #3
38     c1^"hi"
39
40 * LilyPond input should be produced via
41     @lilypond[verbatim,quote,ragged-right]
42   with `fragment' and `relative=2' optional.
43
44   Examples about page layout may alter the quote/ragged-right
45   options.  Omitting `verbatim' is not allowed except for special
46   circumstances.
47
48 * Inspirational headwords are produced with
49   @lilypondfile[quote,ragged-right,line-width=16\cm,staffsize=16]
50   {pitches-headword.ly}
51
52 * LSR snippets are linked with
53   @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
54   {filename.ly}
55
56 * Avoid long stretches of input code.  Noone is going to read them
57   in print.  Please create a smaller example.  (the smaller
58   example does not need to be minimal, however)
59
60 * If you want to work on an example outside of the manual (for
61   easier/faster processing), use this header:
62
63 \paper {
64   #(define dump-extents #t)
65   indent = 0\mm
66   line-width = 160\mm - 2.0 * 0.4\in
67   ragged-right = ##t
68   force-assignment = #""
69   line-width = #(- line-width (* mm  3.000000))
70 }
71
72 \layout {
73 }
74
75   You may not change any of these values.  If you are making an
76   example demonstrating special \paper{} values, contact the
77   Documentation Editor.
78
79
80 %%%%% TEXT FORMATTING
81
82 * Lines should be less than 72 characters long.  (I personally
83   recommend writing with 66-char lines, but don't bother modifying
84   existing material.)
85
86 * Do not use tabs.
87
88 * Do not use spaces at the beginning of a line (except in @example
89   or @verbatim environments), and do not use more than a single
90   space between words.  `makeinfo' copies the input lines verbatim
91   without removing those spaces.
92
93 * Use two spaces after a period.
94
95 * Variables or numbers which consist of a single character
96   (probably followed by a punctuation mark) should be tied
97   properly, either to the previous or the next word.  Example:
98
99       The variable@tie{}@var{a} ...
100
101 * To get consistent indentation in the DVI output it is better to
102   avoid the @verbatim environment.  Use the @example environment
103   instead if possible, but without extraneous indentation.  For
104   example, this
105
106     @example
107       foo {
108         bar
109       }
110     @end example
111
112   should be replaced with
113
114     @example
115     foo {
116       bar
117     }
118     @end example
119
120   where `@example' starts the line (without leading spaces).
121
122 * Do not compress the input vertically; this is, do not use
123
124     Beginning of logical unit
125     @example
126     ...
127     @end example
128     continuation of logical unit
129
130   but
131
132     Beginning of logical unit
133
134     @example
135     ...
136     @end example
137
138     @noindent
139     continuation of logical unit
140
141   This makes it easier to avoid forgetting the `@noindent'.  Only
142   use @noindent if the material is discussing the same material;
143   new material should simply begin without anything special on the
144   line above it.
145
146 * in @itemize use @item on a separate line like this:
147   @itemize
148   @item
149   Foo
150
151   @item
152   Bar
153
154   Do not use @itemize @bullet.
155
156
157 %%%%% SYNTAX SURVEY
158
159 @c - single line comments
160   "@c NOTE:" is a comment which should remain in the final
161   version.  (gp only command ;)
162 @ignore ... @end ignore - multi-line comment
163
164 @cindex - General index. Please add as many as you can.  Don't
165   capitalize the first word.
166 @funindex - is for a \lilycommand.
167
168 @example ... @end ignore - example text that should be set as a
169   blockquote.  Any {} must be escaped with @{ }@
170 @itemize @item A @item B ... @end itemize - for bulleted lists.
171   Do not compress vertically like this.
172
173 @code{} - typeset in a tt-font. Use for actual lilypond code or
174   property/context names.
175 @notation{} - refers to pieces of notation, e.g.
176   "@notation{cres.}".  Also use to specific lyrics ("the
177   @notation{A - men} is centered")
178 @q{} - Single quotes. Used for `vague' terms.
179 @qq{} - Double quotes.  Used for actual quotes ("he said").
180
181 @warning{}: produces a "Note: " box.  Use for important
182       messages.
183
184 @tie{} - Variables or numbers which consist of a single character
185   (probably followed by a punctuation mark) should be tied
186   properly, either to the previous or the next word.  Example:
187     "The letter@tie{}@q{I} is skipped"
188
189 @var - Use for variables.
190 @warning{} - produces a "Note: " box.
191   Any `\' used inside this must be written as `\\'.
192
193
194
195 %%%%% OTHER TEXT CONCERNS
196
197 * References must occur at the end of a sentence, for more
198   information see @ref{the texinfo manual}.  Ideally this should
199   also be the final sentence of a paragraph, but this is not
200   required.  Any link in a doc section must be duplicated in the
201   @seealso section at the bottom.
202
203 * Introducing examples may be done with
204      . (ie finish the previous sentence/paragaph)
205      : (ie `in this example:')
206      , (ie `may add foo with the blah construct,')
207
208 * Abbrevs in caps, e.g., HTML, DVI, MIDI, etc.
209
210 * Colon usage
211
212   1. To introduce lists
213   2. When beginning a quote: "So, he said,..."
214      This usage is rarer.  Americans often just use a comma.
215   3. When adding a defining example at the end of a sentence.
216
217 * Non-ASCII characters which are in utf-8 should be directly used;
218   this is, don't say `Ba@ss{}tuba' but `Baßtuba'.  This ensures that
219   all such characters appear in all output formats.
220
221 * Don't use a @ref{link to another section} in the middle of a
222   sentence.  It looks ok in HTML, moderately bad in PDF, and
223   utterly horrible in INFO.  Instead, reword the sentence so that
224   users are encouraged to see @ref{link to another section}.
225   (at the end of the sentence)
226
227