... oh, except that minimal documentation might be helpful.
[sgt/halibut] / doc / input.but
CommitLineData
11f2edfa 1\C{input} Halibut input format
2
3This chapter describes the format in which you should write
4documents to be processed by Halibut.
5
6\H{input-basics} The basics
7
8Halibut's input files mostly look like ordinary ASCII text files;
9you can edit them with any text editor you like.
10
339cbe09 11Writing \i{paragraphs of ordinary text} is very simple: you just
12write ordinary text in the ordinary way. You can wrap a paragraph
13across more than one line using \i{line breaks} in the text file,
14and Halibut will ignore this when it \I{wrapping paragraphs}rewraps
15the paragraph for each output format. To separate paragraphs, use a
16\i{blank line} (i.e. two consecutive line breaks). For example, a
17fragment of Halibut input looking like this:
11f2edfa 18
19\c This is a line of text.
20\c This is another line of text.
21\c
22\c This line is separated from the previous one by a blank line.
23
24will produce two paragraphs looking like this:
25
26\quote{
27This is a line of text.
28This is another line of text.
29
30This line is separated from the previous one by a blank line.
31}
32
33The first two lines of the input have been merged together into a
34single paragraph, and the line break in the input file was treated
35identically to the spaces between the individual words.
36
339cbe09 37Halibut is designed to have very few \I{escaping, special
38characters}\i{special characters}. The only printable characters in
39Halibut input which will not be treated exactly literally in the
40output are the \i{backslash} (\c{\\}) and the \i{braces} (\c{\{} and
41\c{\}}). If you do not use these characters, \e{everything} else you
42might type in normal ASCII text is perfectly safe. If you do need to
43use any of those three characters in your document, you will have to
44precede each one with a backslash. Hence, for example, you could
45write
11f2edfa 46
47\c This \\ is a backslash, and these are \{braces\}.
48
49and Halibut would generate the text
50
51\quote{
52This \\ is a backslash, and these are \{braces\}.
53}
54
339cbe09 55\H{input-inline} Simple \i{inline formatting commands}
11f2edfa 56
57Halibut formatting commands all begin with a backslash, followed by
58a word or character identifying the command. Some of them then use
59braces to surround one or more pieces of text acted on by the
60command. (In fact, the \c{\\\\}, \c{\\\{} and \c{\\\}} sequences you
61met in \k{input-basics} are themselves formatting commands.)
62
63This section describes some simple formatting commands you can use
64in Halibut documents. The commands in this section are \e{inline}
65commands, which means you can use them in the middle of a paragraph.
66\K{input-para} describes some \e{paragraph} commands, which affect a
67whole paragraph at a time.
68
c63ce2c7 69Many of these commands are followed by a pair of braces surrounding
339cbe09 70some text. In all cases, it is perfectly safe to have a \i{line break}
c63ce2c7 71(in the input file) within those braces; Halibut will treat that
72exactly the same as a space. For example, these two paragraphs will
73be treated identically:
74
75\c Here is some \e{emphasised
76\c text}.
77\c
78\c Here is some \e{emphasised text}.
79
11f2edfa 80\S{input-emph} \c{\\e}: Emphasising text
81
82Possibly the most obvious piece of formatting you might want to use
339cbe09 83in a document is \i\e{emphasis}. To emphasise text, you use the
84\i\c{\\e} command, and follow it up with the text to be emphasised
85in braces. For example, the first sentence in this paragraph was
11f2edfa 86generated using the Halibut input
87
88\c Possibly the most obvious piece of formatting you might want to use
89\c in a document is \e{emphasis}.
90
339cbe09 91\S{input-code} \c{\\c} and \c{\\cw}: Displaying \i{computer code} inline
11f2edfa 92
93Halibut was primarily designed to produce software manuals. It can
94be used for other types of document as well, but software manuals
95are its speciality.
96
97In software manuals, you often want to format text in a way that
339cbe09 98indicates that it is something you might see displayed \i{verbatim}
99on a computer screen. In printed manuals, this is typically done by
100setting that text in a font which is obviously \I{fixed-width
101font}fixed-width. This provides a visual cue that the text being
102displayed is code, and it also ensures that punctuation marks are
103clearly separated and shown individually (so that a user can copy
104the text accurately and conveniently).
11f2edfa 105
106Halibut provides \e{two} commands for this, which are subtly
339cbe09 107different. The names of those commands are \i\c{\\c} (\q{code}) and
108\i\c{\\cw} (\q{\i{weak code}}). You use them just like \c{\\e}, by
11f2edfa 109following them with some text in braces. For example, this...
110
111\c This sentence contains some \c{code} and some \cw{weak code}.
112
113... produces this:
114
115\quote{
116This sentence contains some \c{code} and some \cw{weak code}.
117}
118
119The distinction between code and weak code is mainly important when
120producing plain text output. Plain text output is typically viewed
121in a fixed-width font, so there is no need (and no way) to change
122font in order to make the order of punctuation marks clear. However,
123marking text as code is also \e{sometimes} done to provide a visual
124distinction between it and the text around it, so that the reader
125knows where the literal computer text starts and stops; and in plain
126text, this cannot be done by changing font, so there needs to be an
127alternative way.
128
e21ccf73 129So in the plain text output format, things marked as code (\c{\\c})
130will be surrounded by quote marks, so that it's obvious where they
131start and finish. Things marked as weak code (\c{\\cw}) will not
132look any different from normal text.
11f2edfa 133
134I recommend using weak code for any application where it is
135\e{obvious} that the text is literal computer input or output. For
136example, if the text is capitalised, that's usually good enough. If
137I talk about the Pentium's \cw{EAX} and \cw{EDX} registers, for
138example, you don't need quotes to notice that those are special; so
139I would write that in Halibut as \q{\c{the Pentium's \\cw\{EAX\} and
140\\cw\{EDX\} registers}}. But if I'm talking about the Unix command
141\c{man}, which is an ordinary English word in its own right, a reader
142might be slightly confused if it appeared in the middle of a
143sentence undecorated; so I would write that as \q{\c{the Unix command
144\\c\{man\}}}.
145
146In summary:
147
148\b \c{\\c} means \q{this text \e{must} be visually distinct from the
149text around it}. Halibut's various output formats will do this by
150changing the font if possible, or by using quotes if not.
151
152\b \c{\\cw} means \q{it would be nice to display this text in a
153fixed-width font if possible, but it's not essential}.
154
155There is a separate mechanism for displaying computer code in an
156entire paragraph; see \k{input-codepara} for that one.
157
339cbe09 158\S{input-quotes} \c{\\q}: \ii{Quotation marks}
11f2edfa 159
160Halibut's various output formats don't all use the same conventions
161for displaying text in ordinary quotation marks (\q{like these}).
162Some output formats have access to proper matched quote characters,
163whereas others are restricted to using plain ASCII. Therefore, it is
164not ideal to use the ordinary ASCII double quote character in your
165document (although you can if you like).
166
339cbe09 167Halibut provides the formatting command \i\c{\\q} to indicate quoted
11f2edfa 168text. If you write
169
170\c Here is some \q{text in quotes}.
171
172then Halibut will print
173
174\quote{
175Here is some \q{text in quotes}.
176}
177
178and in every output format Halibut generates, it will choose the
179best quote characters available to it in that format.
180
339cbe09 181You can still use ordinary ASCII \i{double quotes} if you prefer; or
182you could even use the \c{\\u} command (see \k{input-unicode}) to
183generate \i{Unicode matched quotes} (single or double) and fall back
184to the normal ASCII one if they aren't available. But I recommend
185using the built-in \c{\\q} command in most cases, because it's
186simple and does the best it can everywhere.
11f2edfa 187
188(Note that if you're using the \c{\\c} or \c{\\cw} commands to
189display literal computer code, you probably \e{will} want to use
339cbe09 190literal \i{ASCII quote characters}, because it is likely to matter
11f2edfa 191precisely which quote character you use.)
192
339cbe09 193\S{input-nonbreaking} \c{\\-} and \c{\\_}: \ii{Non-breaking hyphens}
194and \I{non-breaking spaces}spaces
11f2edfa 195
196If you use an ordinary hyphen in the middle of a word (such as
197\q{built-in}), Halibut's output formats will feel free to break a
339cbe09 198line after that hyphen when \i{wrapping paragraphs}. This is fine
199for a word like \q{built-in}, but if you were displaying some
200literal computer code such as the Emacs command
11f2edfa 201\c{M\-x\_psychoanalyze\-pinhead}, you might prefer to see the whole
202hyphenated word treated as an unbreakable block. In some cases, you
203might even want to prevent the \e{space} in that command from
204becoming a line break.
205
339cbe09 206For these purposes, Halibut provides the commands \i\c{\\-} and
207\i\c{\\_}, which generate a non-breaking hyphen and a non-breaking
11f2edfa 208space respectively. So the above Emacs command might be written as
209
210\c the Emacs command \c{M\-x\_psychoanalyze\-pinhead}
211
212Unfortunately, some of Halibut's output formats do not support
213non-breaking hyphens, and others don't support \e{breaking} hyphens!
214So Halibut cannot promise to honour these commands in all situations.
215All it can do is make a best effort.
216
339cbe09 217\S{input-date} \c{\\date}: Automatic \i{date} generation
11f2edfa 218
219Sometimes you might want your document to give an up-to-date
220indication of the date on which it was run through Halibut.
221
339cbe09 222Halibut supplies the \i\c{\\date} command to do this. In its
223simplest form, you simply say
11f2edfa 224
225\c This document was generated on \date.
226
227and Halibut generates something like
228
229\quote{
230This document was generated on \date.
231}
232
acbb8b72 233You can follow the \c{\\date} command directly with punctuation (as
234in this example, where it is immediately followed by a full stop),
235but if you try to follow it with an alphabetic or numeric character
236(such as writing \c{\\dateZ}) then Halibut will assume you are
237trying to invoke the name of a macro command you have defined
238yourself, and will complain if no such command exists. To get round
239this you can use the special \c{\\.} do-nothing command. See
240\k{input-macro} for more about general Halibut command syntax and
241\c{\\.}.
242
11f2edfa 243If you would prefer the date to be generated in a specific format,
244you can follow the \c{\\date} command with a format specification in
245braces. The format specification will be run through the standard C
339cbe09 246function \i\c{strftime}, so any format acceptable to that function
247is acceptable here as well. I won't document the format here,
248because the details vary from computer to computer (although there
249is a standard core which should be supported everywhere). You should
250look at your local system's manual for \c{strftime} for details.
11f2edfa 251
252Here's an example which generates the date in the international
339cbe09 253standard \i{ISO 8601} format:
11f2edfa 254
255\c This document was generated on \date{%Y-%m-%d %H:%M:%S}.
256
257And here's some sample output from that command:
258
259\quote{
260This document was generated on \date{%Y-%m-%d %H:%M:%S}.
261}
262
339cbe09 263\S{input-weblink} \c{\\W}: \i{WWW hyperlinks}
11f2edfa 264
339cbe09 265Since one of Halibut's output formats is \i{HTML}, it's obviously
266useful to be able to provide \I{linking to web sites}links to
267arbitrary \i{web sites} in a Halibut document.
11f2edfa 268
339cbe09 269This is done using the \i\c{\\W} command. \c{\\W} expects to be
11f2edfa 270followed by \e{two} sets of braces. In the first set of braces you
339cbe09 271put a \i{URL}; in the second set you put the text which should be a
272\i{hyperlink}. For example, you might write
11f2edfa 273
274\c Try searching on \W{http://www.google.com/}{Google}.
275
276and Halibut would generate
277
278\quote{
279Try searching on \W{http://www.google.com/}{Google}.
280}
281
282Note that hyperlinks, like the non-breaking commands discussed in
283\k{input-nonbreaking}, are \e{discretionary}: if an output format
284does not support them then they will just be left out completely. So
285unless you're \e{only} intending to use the HTML output format, you
286should avoid storing vital content in the URL part of a \c{\\W}
287command. The Google example above is reasonable (because most users
288are likely to be able to find Google for themselves even without a
289convenient hyperlink leading straight there), but if you really need
290to direct users to a specific web site, you will need to give the
291URL in actual displayed text (probably displayed as code as well).
292However, there's nothing to stop you making it a hyperlink \e{as
293well} for the convenience of HTML readers.
294
295The \c{\\W} command supports a piece of extra syntax to make this
296convenient for you. You can specify \c{\\c} or \c{\\cw} \e{between}
297the first and second pairs of braces. For example, you might write
298
299\c Google is located at \W{http://www.google.com/}\cw{www.google.com}.
300
301and Halibut would produce
302
303\quote{
304Google is located at \W{http://www.google.com/}\cw{www.google.com}.
305}
306
339cbe09 307\S{input-unicode} \c{\\u}: Specifying arbitrary \i{Unicode}
308characters
11f2edfa 309
310When Halibut is finished, it should have full Unicode support. You
339cbe09 311should be able to specify any (reasonably well known) \i{character
312set} for your input document, and Halibut should convert it all to
11f2edfa 313Unicode as it reads it in. Similarly, you should be able to specify
314the character set you want for each output format and have all the
315conversion done automatically.
316
317Currently, none of this is actually supported. Input text files are
339cbe09 318assumed to be in \i{ISO 8859-1}, and each output format has its own
11f2edfa 319non-configurable character set (although the HTML output can use the
320\c{Ӓ} mechanism to output any Unicode character it likes).
321
322If you need to specify a Unicode character in your input document
323which is not supported by the input character set, you can use the
339cbe09 324\i\c{\\u} command to do this. \c{\\u} expects to be followed by a
11f2edfa 325sequence of hex digits; so that \c{\\u0041}, for example, denotes
326the Unicode character \cw{0x0041}, which is the capital letter A.
327
328If a Unicode character specified in this way is not supported in a
329particular \e{output} format, you probably don't just want it to be
330omitted. So you can put a pair of braces after the \c{\\u} command
339cbe09 331containing \i{fallback text}. For example, to specify an amount of
332money in euros, you might write this:
11f2edfa 333
16ea3abe 334\c This is likely to cost \u20AC{EUR\_}2500 at least.
11f2edfa 335
336Halibut will render that as a Euro sign \e{if available}, and
16ea3abe 337the text \q{EUR\_} if not. In the output format you're currently
11f2edfa 338reading in, the above input generates this:
339
340\quote{
16ea3abe 341This is likely to cost \u20AC{EUR\_}2500 at least.
11f2edfa 342}
343
344If you read it in other formats, you may see different results.
345
339cbe09 346\S{input-xref} \i\c{\\k} and \i\c{\\K}: \ii{Cross-references} to
347other sections
11f2edfa 348
339cbe09 349\K{intro-features} mentions that Halibut \I{section numbers}numbers
350the sections of your document automatically, and can generate
351cross-references to them on request. \c{\\k} and \c{\\K} are the
352commands used to generate those cross-references.
11f2edfa 353
354To use one of these commands, you simply follow it with a pair of
355braces containing the keyword for the section in question. For
356example, you might write something like
357
358\c \K{input-xref} expands on \k{intro-features}.
359
360and Halibut would generate something like
361
362\quote{
363\K{input-xref} expands on \k{intro-features}.
364}
365
339cbe09 366The \i{keywords} \c{input-xref} and \c{intro-features} are
367\i{section keywords} used in this manual itself. In your own
368document, you would have supplied a keyword for each one of your own
369sections, and you would provide your own keywords for the \c{\\k}
370command to work on.
11f2edfa 371
372The difference between \c{\\k} and \c{\\K} is simply that \c{\\K}
373starts the cross-reference text with a capital letter; so you would
374use \c{\\K} at the beginning of a sentence, and \c{\\k} everywhere
375else.
376
377In output formats which permit it, cross-references act as
339cbe09 378\i{hyperlinks}, so that clicking the mouse on a cross-reference
379takes you straight to the referenced section.
11f2edfa 380
381The \c{\\k} commands are also used for referring to entries in a
339cbe09 382\i{bibliography} (see \k{input-biblio} for more about
383bibliographies), and can also be used for referring to an element of
384a \i{numbered list} by its number (see \k{input-list-number} for
385more about numbered lists).
11f2edfa 386
387See \k{input-sections} for more about chapters and sections.
388
339cbe09 389\S{input-inline-comment} \i\c{\\#}: Inline comments
11f2edfa 390
339cbe09 391If you want to include \i{comments} in your Halibut input, to be seen
11f2edfa 392when reading it directly but not copied into the output text, then
393you can use \c{\\#} to do this. If you follow \c{\\#} with text in
394braces, that text will be ignored by Halibut.
395
396For example, you might write
397
398\c The typical behaviour of an antelope \#{do I mean gazelle?} is...
399
400and Halibut will simply leave out the aside about gazelles, and will
401generate nothing but
402
403\quote{
404The typical behaviour of an antelope \#{do I mean gazelle?} is...
405}
406
acbb8b72 407This command will respect nested braces, so you can use it to
408comment out sections of Halibut markup:
409
410\c This function is \#{very, \e{very}} important.
411
412In this example, the comment lasts until the final closing brace (so
413that the whole \q{very, \e{very}} section is commented out).
414
11f2edfa 415The \c{\\#} command can also be used to produce a whole-paragraph
416comment; see \k{input-commentpara} for details of that.
417
339cbe09 418\H{input-para} \ii{Paragraph-level commands}
11f2edfa 419
420This section describes Halibut commands which affect an entire
421paragraph, or sometimes even \e{more} than one paragraph, at a time.
422
339cbe09 423\S{input-codepara} \i\c{\\c}: Displaying whole \I{code
424paragraphs}paragraphs of \i{computer code}
11f2edfa 425
426\K{input-code} describes a mechanism for displaying computer code in
427the middle of a paragraph, a few words at a time.
428
429However, this is often not enough. Often, in a computer manual, you
339cbe09 430really want to show several lines of code in a \i{display
431paragraph}.
11f2edfa 432
433This is also done using the \c{\\c} command, in a slightly different
434way. Instead of using it in the middle of a paragraph followed by
435braces, you can use it at the start of each line of a paragraph. For
436example, you could write
437
438\c \c #include <stdio.h>
439\c \c
440\c \c int main(int argc, char **argv) {
441\c \c printf("hello, world\n");
442\c \c return 0;
443\c \c }
444
445and Halibut would generate
446
447\quote{
448
449\c #include <stdio.h>
450\c
451\c int main(int argc, char **argv) {
452\c printf("hello, world\n");
453\c return 0;
454\c }
455
456}
457
458Note that the above paragraph makes use of a backslash and a pair of
459braces, and does \e{not} need to escape them in the way described in
460\k{input-basics}. This is because code paragraphs formatted in this
461way are a special case; the intention is that you can just copy and
462paste a lump of code out of another program, put \q{\cw{\\c }} at the
463start of every line, and simply \e{not have to worry} about the
464details - you don't have to go through the whole block looking for
465characters to escape.
466
467Since a backslash inside a code paragraph generates a literal
468backslash, this means you cannot use any other Halibut formatting
469commands inside a code paragraph. In particular, if you want to
470emphasise a particular word in the paragraph, you can't do that
471using \c{\\e} (\k{input-emph}) in the normal way.
472
339cbe09 473Therefore, Halibut provides an alternative means of \i{emphasis in
474code paragraphs}. Each line beginning with \c{\\c} can optionally be
11f2edfa 475followed by a single line beginning with \c{\\e}, indicating the
476emphasis in that line. The emphasis line contains the letters \c{b}
477and \c{i} (for \q{bold} and \q{italic}, although some output formats
339cbe09 478might render \c{i} as underlining instead of italics), positioned to
479line up under the parts of the text that you want emphasised.
11f2edfa 480
339cbe09 481For example, if you wanted to do \i{syntax highlighting} on the
482above C code by highlighting the preprocessor command in italic and
483the keywords in bold, you might do it like this:
11f2edfa 484
485\c \c #include <stdio.h>
486\c \e iiiiiiiiiiiiiiiiii
487\c \c
488\c \c int main(int argc, char **argv) {
489\c \e bbb bbb bbbb
490\c \c printf("hello, world\n");
491\c \c return 0;
492\c \e bbbbbb
493\c \c }
494
495and Halibut would generate:
496
497\quote{
498
499\c #include <stdio.h>
500\e iiiiiiiiiiiiiiiiii
501\c
502\c int main(int argc, char **argv) {
503\e bbb bbb bbbb
504\c printf("hello, world\n");
505\c return 0;
506\e bbbbbb
507\c }
508
509}
510
511Note that not every \c{\\c} line has to be followed by a \c{\\e}
512line; they're optional.
513
514Also, note that highlighting within a code paragraph is
515\e{discretionary}. Not all of Halibut's output formats can support
516it (plain text, in particular, has no sensible way to do it). Unless
517you know you are using a restricted range of output formats, you
518should use highlighting in code paragraphs \e{only} as a visual aid,
519and not rely on it to convey any vital semantic content.
520
339cbe09 521\S{input-lists} \c{\\b}, \c{\\n}, \c{\\dt}, \c{\\dd}, \c{\\lcont}:
522\ii{Lists}
11f2edfa 523
524Halibut supports bulletted lists, numbered lists and description
525lists.
526
339cbe09 527\S2{input-list-bullet} \i\c{\\b}: \ii{Bulletted lists}
11f2edfa 528
529To create a bulletted list, you simply prefix each paragraph
530describing a bullet point with the command \c{\\b}. For example, this
531Halibut input:
532
533\c Here's a list:
534\c
535\c \b One.
536\c
537\c \b Two.
538\c
539\c \b Three.
540
541would produce this Halibut output:
542
543\quote{
544Here's a list:
545
546\b One.
547
548\b Two.
549
550\b Three.
551}
552
339cbe09 553\S2{input-list-number} \i\c{\\n}: \ii{Numbered lists}
11f2edfa 554
555Numbered lists are just as simple: instead of \c{\\b}, you use
556\c{\\n}, and Halibut takes care of getting the numbering right for
557you. For example:
558
559\c Here's a list:
560\c
561\c \n One.
562\c
563\c \n Two.
564\c
565\c \n Three.
566
567This produces the Halibut output:
568
569\quote{
570Here's a list:
571
572\n One.
573
574\n Two.
575
576\n Three.
577}
578
579The disadvantage of having Halibut sort out the list numbering for
580you is that if you need to refer to a list item by its number, you
581can't reliably do so. To get round this, Halibut allows an optional
582keyword in braces after the \c{\\n} command. This keyword can then
583be referenced using the \c{\\k} or \c{\\K} command (see
584\k{input-xref}) to provide the number of the list item. For example:
585
586\c Here's a list:
587\c
588\c \n One.
589\c
590\c \n{this-one} Two.
591\c
592\c \n Three.
593\c
594\c \n Now go back to step \k{this-one}.
595
596This produces the following output:
597
598\quote{
599Here's a list:
600
601\n One.
602
603\n{this-one} Two.
604
605\n Three.
606
607\n Now go back to step \k{this-one}.
608}
609
acbb8b72 610The keyword you supply after \c{\\n} is allowed to contain escaped
611special characters (\c{\\\\}, \c{\\\{} and \c{\\\}}), but should not
612contain any other Halibut markup. It is intended to be a word or two
613of ordinary text. (This also applies to keywords used in other
614commands, such as \c{\\B} and \c{\\C}).
615
339cbe09 616\S2{input-list-description} \i\c{\\dt} and \i\c{\\dd}:
617\ii{Description lists}
11f2edfa 618
339cbe09 619To write a description list, you prefix alternate paragraphs with
620the \c{\\dt} (\q{described thing}) and \c{\\dd} (description)
621commands. For example:
11f2edfa 622
623\c \dt Pelican
624\c
625\c \dd This is a large bird with a big beak.
626\c
627\c \dt Panda
628\c
629\c \dd This isn't.
630
631This produces the following output:
632
633\quote{
634
635\dt Pelican
636
637\dd This is a large bird with a big beak.
638
639\dt Panda
640
641\dd This isn't.
642
643}
644
339cbe09 645\S2{input-list-continuation} \ii{Continuing list items} into further
11f2edfa 646paragraphs
647
648All three of the above list types assume that each list item is a
649single paragraph. For a short, snappy list in which each item is
650likely to be only one or two words, this is perfectly sufficient;
651but occasionally you will find you want to include several
339cbe09 652paragraphs in a single list item, or even to \I{nested lists}nest
653other types of paragraph (such as code paragraphs, or other lists)
654inside a list item.
11f2edfa 655
339cbe09 656To do this, you use the \i\c{\\lcont} command. This is a command
657which can span \e{multiple} paragraphs.
11f2edfa 658
659After the first paragraph of a list item, include the text
660\c{\\lcont\{}. This indicates that the subsequent paragraph(s) are a
661\e{continuation} of the list item that has just been seen. So you
662can include further paragraphs, and eventually include a closing
663brace \c{\}} to finish the list continuation. After that, you can
664either continue adding other items to the original list, or stop
665immediately and return to writing normal paragraphs of text.
666
667Here's a (long) example.
668
669\c Here's a list:
670\c
671\c \n One. This item is followed by a code paragraph:
672\c
673\c \lcont{
674\c
675\c \c code
676\c \c paragraph
677\c
678\c }
679\c
680\c \n Two. Now when I say \q{two}, I mean:
681\c
682\c \lcont{
683\c
684\c \n Two, part one.
685\c
686\c \n Two, part two.
687\c
688\c \n Two, part three.
689\c
690\c }
691\c
692\c \n Three.
693
694The output produced by this fragment is:
695
696\quote{
697
698Here's a list:
699
700\n One. This item is followed by a code paragraph:
701
702\lcont{
703
704\c code
705\c paragraph
706
707}
708
709\n Two. Now when I say \q{two}, I mean:
710
711\lcont{
712
713\n Two, part one.
714
715\n Two, part two.
716
717\n Two, part three.
718
719}
720
721\n Three.
722
723}
724
725This syntax seems a little bit inconvenient, and perhaps
726counter-intuitive: you might expect the enclosing braces to have to
727go around the \e{whole} list item, rather than everything except the
728first paragraph.
729
730\c{\\lcont} is a recent addition to the Halibut input language;
731previously, \e{all} lists were required to use no more than one
732paragraph per list item. So it's certainly true that this feature
733looks like an afterthought because it \e{is} an afterthought, and
734it's possible that if I'd been designing the language from scratch
735with multiple-paragraph list items in mind, I would have made it
736look different.
737
738However, the advantage of doing it this way is that no enclosing
739braces are required in the \e{common} case: simple lists with only
740one paragraph per item are really, really easy to write. So I'm not
741too unhappy with the way it turned out; it obeys the doctrine of
742making simple things simple, and difficult things possible.
743
744Note that \c{\\lcont} can only be used on \c{\\b}, \c{\\n} and
745\c{\\dd} paragraphs; it cannot be used on \c{\\dt}.
746
339cbe09 747\S{input-rule} \i\c{\\rule}: \ii{Horizontal rules}
11f2edfa 748
749The command \c{\\rule}, appearing on its own as a paragraph, will
750cause a horizontal rule to be drawn, like this:
751
752\c Some text.
753\c
754\c \rule
755\c
756\c Some more text.
757
758This produces the following output:
759
760\quote{
761
762Some text.
763
764\rule
765
766Some more text.
767
768}
769
339cbe09 770\S{input-quote} \i\c{\\quote}: \ii{Indenting multiple paragraphs} as a
771long \i{quotation}
11f2edfa 772
773Quoting verbatim text using a code paragraph (\k{input-codepara}) is
774not always sufficient for your quoting needs. Sometimes you need to
775quote some normally formatted text, possibly in multiple paragraphs.
339cbe09 776This is similar to HTML's \i\cw{<BLOCKQUOTE>} command.
11f2edfa 777
778To do this, you can use the \c{\\quote} command. Like \c{\\lcont},
779this is a command which expects to enclose at least one paragraph
780and possibly more. Simply write \c{\\quote\{} at the beginning of
781your quoted section, and \c{\}} at the end, and the paragraphs in
782between will be formatted to indicate that they are a quotation.
783
784(This very manual, in fact, uses this feature a lot: all of the
785examples of Halibut source followed by Halibut output have the
786output quoted using \c{\\quote}.)
787
788Here's some example Halibut input:
789
790\c In \q{Through the Looking Glass}, Lewis Carroll wrote:
791\c
792\c \quote{
793\c
794\c \q{The question is,} said Alice, \q{whether you \e{can} make
795\c words mean so many different things.}
796\c
797\c \q{The question is,} said Humpty Dumpty, \q{who is to be master -
798\c that's all.}
799\c
800\c }
801\c
802\c So now you know.
803
804The output generated by this is:
805
806\quote{
807
808In \q{Through the Looking Glass}, Lewis Carroll wrote:
809
810\quote{
811
812\q{The question is,} said Alice, \q{whether you \e{can} make
813words mean so many different things.}
814
815\q{The question is,} said Humpty Dumpty, \q{who is to be master -
816that's all.}
817
818}
819
820So now you know.
821
822}
823
339cbe09 824\S{input-sections} \i\c{\\C}, \i\c{\\H}, \i\c{\\S}, \i\c{\\A},
825\i\c{\\U}: Chapter and \i{section headings}
11f2edfa 826
339cbe09 827\K{intro-features} mentions that Halibut \I{section
828numbering}numbers the sections of your document automatically, and
829can generate cross-references to them on request; \k{input-xref}
830describes the \c{\\k} and \c{\\K} commands used to generate the
831cross-references. This section describes the commands used to set up
832the sections in the first place.
11f2edfa 833
834A paragraph beginning with the \c{\\C} command defines a chapter
835heading. The \c{\\C} command expects to be followed by a pair of
836braces containing a keyword for the chapter; this keyword can then
837be used with the \c{\\k} and \c{\\K} commands to generate
838cross-references to the chapter. After the closing brace, the rest
839of the paragraph is used as the displayed chapter title. So the
840heading for the current chapter of this manual, for example, is
841written as
842
843\c \C{input} Halibut input format
844
845and this allows me to use the command \c{\\k\{input\}} to generate a
846cross-reference to that chapter somewhere else.
847
acbb8b72 848The \I{keyword syntax}keyword you supply after one of these commands
849is allowed to contain escaped special characters (\c{\\\\}, \c{\\\{}
850and \c{\\\}}), but should not contain any other Halibut markup. It
851is intended to be a word or two of ordinary text. (This also applies
852to keywords used in other commands, such as \c{\\B} and \c{\\n}).
853
11f2edfa 854The next level down from \c{\\C} is \c{\\H}, for \q{heading}. This
855is used in exactly the same way as \c{\\C}, but section headings
856defined with \c{\\H} are considered to be part of a containing
857chapter, and will be numbered with a pair of numbers. After \c{\\H}
858comes \c{\\S}, and if necessary you can then move on to \c{\\S2},
859\c{\\S3} and so on.
860
861For example, here's a sequence of heading commands. Normally these
862commands would be separated at least by blank lines (because each is
863a separate paragraph), and probably also by body text; but for the
864sake of brevity, both of those have been left out in this example.
865
866\c \C{foo} Using Foo
867\c \H{foo-intro} Introduction to Foo
868\c \H{foo-running} Running the Foo program
869\c \S{foo-inter} Running Foo interactively
870\c \S{foo-batch} Running Foo in batch mode
871\c \H{foo-trouble} Troubleshooting Foo
872\c \C{bar} Using Bar instead of Foo
873
874This would define two chapters with keywords \c{foo} and \c{bar},
875which would end up being called Chapter 1 and Chapter 2 (unless
876there were other chapters before them). The sections \c{foo-intro},
877\c{foo-running} and \c{foo-trouble} would be referred to as Section
8781.1, Section 1.2 and Section 1.3 respectively; the subsections
879\c{foo-inter} and \c{foo-batch} would be Section 1.2.1 and Section
339cbe09 8801.2.2. If there had been a \i\c{\\S2} command within one of those,
881it would have been something like Section 1.2.1.1.
11f2edfa 882
883If you don't like the switch from \c{\\H} to \c{\\S}, you can use
884\c{\\S1} as a synonym for \c{\\S} and \c{\\S0} as a synonym for
885\c{\\H}. Chapters are still designated with \c{\\C}, because they
886need to be distinguished from other types of chapter such as
887appendices. (Personally, I like the \c{\\C},\c{\\H},\c{\\S} notation
888because it encourages me to think of my document as a hard disk :-)
889
339cbe09 890You can define an \i{appendix} by using \c{\\A} in place of \c{\\C}.
11f2edfa 891This is no different from a chapter except that it's given a letter
892instead of a number, and cross-references to it will say \q{Appendix
893A} instead of \q{Chapter 9}. Subsections of an appendix will be
894numbered \q{A.1}, \q{A.2}, \q{A.2.1} and so on.
895
339cbe09 896\I{renaming sections}If you want a particular section to be referred
897to as something other than a \q{chapter}, \q{section} or
898\q{appendix}, you can include a second pair of braces after the
899keyword. For example, if you're \i{writing a FAQ} chapter and you
900want cross-references between questions to refer to \q{question
9011.2.3} instead of \q{section 1.2.3}, you can write each section
902heading as
11f2edfa 903
904\c \S{question-about-fish}{Question} What about fish?
905
906(The word \q{Question} should be given with an initial capital
907letter. Halibut will lower-case it when you refer to it using
908\c{\\k}, and will leave it alone if you use \c{\\K}.)
909
910This technique allows you to change the designation of
911\e{particular} sections. To make an overall change in what \e{every}
912section is called, see \k{input-config}.
913
339cbe09 914Finally, the \c{\\U} command defines an \I{unnumbered
915chapter}\e{unnumbered} chapter. These sometimes occur in books, for
916specialist purposes such as \q{Bibliography} or
917\q{Acknowledgements}. \c{\\U} does not expect a keyword argument,
918because there is no sensible way to generate an automatic
919cross-reference to such a chapter anyway.
11f2edfa 920
8902e0ed 921\S{input-blurb} \c{\\copyright}, \c{\\title}, \c{\\versionid}:
339cbe09 922Miscellaneous \i{blurb commands}
11f2edfa 923
339cbe09 924These three commands define a variety of \i{special paragraph
925types}. They are all used in the same way: you put the command at
926the start of a paragraph, and then just follow it with normal text,
927like this:
11f2edfa 928
929\c \title My First Manual
930
8902e0ed 931The three special paragraph types are:
11f2edfa 932
339cbe09 933\dt \i\cw{\\title}
11f2edfa 934
935\dd This defines the overall title of the entire document. This
936title is treated specially in some output formats (for example, it's
937used in a \cw{<title>} tag in the HTML output), so it needs a
938special paragraph type to point it out.
939
339cbe09 940\dt \i\cw{\\copyright}
11f2edfa 941
942\dd This command indicates that the paragraph attached to it
339cbe09 943contains a \i{copyright statement} for the document. This text is
9057a0a8 944displayed inline where it appears, exactly like a normal paragraph;
945but in some output formats it is given additional special treatment.
946For example, Windows Help files have a standard slot in which to
947store a copyright notice, so that other software can display it
948prominently.
11f2edfa 949
339cbe09 950\dt \i\cw{\\versionid}
11f2edfa 951
952\dd This command indicates that the paragraph contains a version
953identifier, such as those produced by CVS (of the form \c{$\#{hope this
954defuses CVS}Id: thingy.but,v 1.6 2004/01/01 16:47:48 simon Exp $}).
955This text will be tucked away somewhere unobtrusive, so that anyone
956wanting to (for example) report errors to the document's author can
339cbe09 957pick out the \i{version IDs} and send them as part of the report, so
11f2edfa 958that the author can tell at a glance which revision of the document
959is being discussed.
960
339cbe09 961\S{input-commentpara} \i\c{\\#}: Whole-paragraph \i{comments}
11f2edfa 962
963\K{input-inline-comment} describes the use of the \c{\\#} command to
964put a short comment in the middle of a paragraph.
965
966If you need to use a \e{long} comment, Halibut also allows you to
967use \c{\\#} without braces, to indicate that an entire paragraph is
968a comment, like this:
969
970\c Here's a (fairly short) paragraph which will be displayed.
971\c
972\c \# Here's a comment paragraph which will not be displayed, no
973\c matter how long it goes on. All I needed to indicate this was the
974\c single \# at the start of the paragraph; I don't need one on
975\c every line or anything like that.
976\c
977\c Here's another displayed paragraph.
978
979When run through Halibut, this produces the following output:
980
981\quote{
982
983Here's a (fairly short) paragraph which will be displayed.
984
985\# Here's a comment paragraph which will not be displayed, no
986matter how long it goes on. All I needed to indicate this was the
987single \# at the start of the paragraph; I don't need one on
988every line or anything like that.
989
990Here's another displayed paragraph.
991
992}
993
339cbe09 994\H{input-biblio} Creating a \i{bibliography}
11f2edfa 995
996If you need your document to refer to other documents (research
997papers, books, websites, whatever), you might find a bibliography
998feature useful.
999
339cbe09 1000You can define a bibliography entry using the \i\c{\\B} command. This
11f2edfa 1001looks very like the \c{\\C} command and friends: it expects a
1002keyword in braces, followed by some text describing the document
1003being referred to. For example:
1004
1005\c \B{freds-book} \q{The Taming Of The Mongoose}, by Fred Bloggs.
1006\c Published by Paperjam & Notoner, 1993.
1007
1008If this bibliography entry appears in the finished document, it will
1009look something like this:
1010
1011\quote{
1012
1013\B{freds-book} \q{The Taming Of The Mongoose}, by Fred Bloggs.
1014Published by Paperjam & Notoner, 1993.
1015
1016}
1017
1018I say \q{if} above because not all bibliography entries defined
1019using the \c{\\B} command will necessarily appear in the finished
339cbe09 1020document. They only appear if they are \I{citation}referred to by a
1021\i\c{\\k} command (see \k{input-xref}). This allows you to (for
1022example) maintain a single Halibut source file with a centralised
1023database of \e{all} the references you have ever needed in any of
1024your writings, include that file in every document you feed to
1025Halibut, and have it only produce the bibliography entries you
1026actually need for each particular document. (In fact, you might even
1027want this centralised source file to be created automatically by,
1028say, a Perl script from BibTeX input, so that you can share the same
1029bibliography with users of other formatting software.)
11f2edfa 1030
1031If you really want a bibliography entry to appear in the document
1032even though no text explicitly refers to it, you can do that using
339cbe09 1033the \i\c{\\nocite} command:
11f2edfa 1034
1035\c \nocite{freds-book}
1036
1037Normally, each bibliography entry will be referred to (in citations
1038and in the bibliography itself) by a simple reference number, such
1039as \k{freds-book}. If you would rather use an alternative reference
339cbe09 1040notation, such as [Fred1993], you can use the \i\c{\\BR}
11f2edfa 1041(\q{Bibliography Rewrite}) command to specify your own reference
1042format for a particular book:
1043
1044\c \BR{freds-book} [Fred1993]
1045
acbb8b72 1046The keyword you supply after \c{\\B} is allowed to contain escaped
1047special characters (\c{\\\\}, \c{\\\{} and \c{\\\}}), but should not
1048contain any other Halibut markup. It is intended to be a word or two
1049of ordinary text. (This also applies to keywords used in other
1050commands, such as \c{\\n} and \c{\\C}).
1051
339cbe09 1052\H{input-index} Creating an \i{index}
11f2edfa 1053
1054Halibut contains a comprehensive indexing mechanism, which attempts
1055to be reasonably easy to use in the common case in spite of its
1056power.
1057
1058\S{input-index-simple} Simple indexing
1059
1060In normal usage, you should be able to add index terms to your
339cbe09 1061document simply by using the \i\c{\\i} command to wrap one or two
11f2edfa 1062words at a time. For example, if you write
1063
1064\c The \i{hippopotamus} is a particularly large animal.
1065
1066then the index will contain an entry under \q{hippopotamus},
1067pointing to that sentence (or as close to that sentence as the
1068output format sensibly permits).
1069
1070You can wrap more than one word in \c{\\i} as well:
1071
1072\c We recommend using a \i{torque wrench} for this job.
1073
1074\S{input-index-special} Special cases of indexing
1075
1076If you need to index a computer-related term, you can use the
339cbe09 1077special case \i\c{\\i\\c} (or \i\c{\\i\\cw} if you prefer):
11f2edfa 1078
1079\c The \i\c{grep} command is what you want here.
1080
1081This will cause the word \q{grep} to appear in code style, as if the
1082\c{\\i} were not present and the input just said \c{\\c\{grep\}};
1083the word will also appear in code style in the actual index.
1084
1085If you want to simultaneously index and emphasise a word, there's
339cbe09 1086another special case \i\c{\\i\\e}:
11f2edfa 1087
1088\c This is what we call a \i\e{paper jam}.
1089
1090This will cause the words \q{paper jam} to be emphasised in the
1091document, but (unlike the behaviour of \c{\\i\\c}) they will \e{not}
1092be emphasised in the index. This different behaviour is based on an
1093expectation that most people indexing a word of computer code will
1094still want it to look like code in the index, whereas most people
1095indexing an emphasised word will \e{not} want it emphasised in the
1096index.
1097
8856f150 1098(In fact, \e{no} emphasis in the text inside \c{\\i} will be
1099preserved in the index. If you really want a term in the index to
1100appear emphasised, you must say so explicitly using \c{\\IM}; see
1101\k{input-index-rewrite}.)
1102
11f2edfa 1103Sometimes you might want to index a term which is not explicitly
1104mentioned, but which is highly relevant to the text and you think
1105that somebody looking up that term in the index might find it useful
339cbe09 1106to be directed here. To do this you can use the \i\c{\\I} command,
1107to create an \i{\e{invisible} index tag}:
11f2edfa 1108
1109\c If your printer runs out of toner, \I{replacing toner
1110\c cartridge}here is what to do:
1111
1112This input will produce only the output \q{If your printer runs out
1113of toner, here is what to do}; but an index entry will show up under
1114\q{replacing toner cartridge}, so that if a user thinks the obvious
1115place to start in the index is under R for \q{replacing}, they will
1116find their way here with a minimum of fuss.
1117
1118(It's worth noting that there is no functional difference between
1119\c{\\i\{foo\}} and \c{\\I\{foo\}foo}. The simple \c{\\i} case is
1120only a shorthand for the latter.)
1121
1122Finally, if you want to index a word at the start of a sentence, you
1123might very well not want it to show up with a capital letter in the
339cbe09 1124index. For this, Halibut provides the \i\c{\\ii} command, for
1125\q{index (case-)insensitively}. You use it like this:
11f2edfa 1126
1127\c \ii{Lions} are at the top of the food chain in this area.
1128
1129This is equivalent to \c{\\I\{lions\}Lions}; in other words, the
1130text will say \q{Lions}, but it will show up in the index as
1131\q{lions}. The text inside \c{\\ii} is converted entirely into lower
1132case before being added to the index data.
1133
339cbe09 1134\S{input-index-rewrite} \ii{Fine-tuning the index}
11f2edfa 1135
1136Halibut's index mechanism as described so far still has a few
1137problems left:
1138
1139\b In a reasonably large index, it's often difficult to predict
339cbe09 1140\I{replicating index terms}which of several words a user will think
1141of first when trying to look something up. For example, if they want
1142to know how to replace a toner cartridge, they might look up
1143\q{replacing} or they might look up \q{toner cartridge}. You
1144probably don't really want to have to try to figure out which of
1145those is more likely; instead, what you'd like is to be able to
1146effortlessly index the same set of document locations under \e{both}
1147terms.
11f2edfa 1148
1149\b Also, you may find you've indexed the same concept under multiple
339cbe09 1150different \I{merging index terms}index terms; for example, there
1151might be several instances of \c{\\i\{frog\}} and several of
1152\c{\\i\{frogs\}}, so that you'd end up with two separate index
1153entries for what really ought to be the same concept.
11f2edfa 1154
1155\b You might well not want the word \q{\cw{grep}} to appear in the
1156index without explanation; you might prefer it to say something more
339cbe09 1157\I{rewriting index terms}verbose such as \q{\cw{grep} command}, so
1158that a user encountering it in the index has some idea of what it is
1159\e{without} having to follow up the reference. However, you
1160certainly don't want to have to write \c{\\I\{\\cw\{grep\}
1161command\}\\c\{grep\}} every time you want to add an index term for
1162this! You wanted to write \c{\\i\\c\{grep\}} as shown in the
1163previous section, and tidy it all up afterwards.
1164
1165All of these problems can be cleaned up by the \i\c{\\IM} (for
11f2edfa 1166\q{Index Modification}) command. \c{\\IM} expects to be followed by
1167one or more pairs of braces containing index terms as seen in the
1168document, and then a piece of text (not in braces) describing how it
1169should be shown in the index.
1170
1171So to rewrite the \c{grep} example above, you might do this:
1172
1173\c \IM{grep} \cw{grep} command
1174
1175This will arrange that the set of places in the document where you
1176asked Halibut to index \q{\cw{grep}} will be listed under
1177\q{\cw{grep} command} rather than just under \q{\cw{grep}}.
1178
1179You can specify more than one index term in a \c{\\IM} command; so
1180to merge the index terms \q{frog} and \q{frogs} into a single term,
1181you might do this:
1182
1183\c \IM{frog}{frogs} frog
1184
1185This will arrange that the single index entry \q{frog} will list
1186\e{all} the places in the document where you asked Halibut to index
1187either \q{frog} or \q{frogs}.
1188
1189You can use multiple \c{\\IM} commands to replicate the same set of
1190document locations in more than one index entry. For example:
1191
1192\c \IM{replacing toner cartridge} replacing toner cartridge
1193\c \IM{replacing toner cartridge} toner cartridge, replacing
1194
1195This will arrange that every place in the document where you have
1196indexed \q{replacing toner cartridge} will be listed both there
1197\e{and} under \q{toner cartridge, replacing}, so that no matter
1198whether the user looks under R or under T they will stil find their
1199way to the same parts of the document.
1200
1201In this example, note that although the first \c{\\IM} command
1202\e{looks} as if it's a tautology, it is still necessary, because
1203otherwise those document locations will \e{only} be indexed under
1204\q{toner cartridge, replacing}. If you have \e{no} explicit \c{\\IM}
1205commands for a particular index term, then Halibut will assume a
1206default one (typically \c{\\IM\{foo\}\_foo}, although it might be
1207\c{\\IM\{foo\}\_\\c\{foo\}} if you originally indexed using
1208\c{\\i\\c}); but as soon as you specify an explicit \c{\\IM},
1209Halibut discards its default implicit one, and you must then specify
1210that one explicitly as well if you wanted to keep it.
1211
339cbe09 1212\H{input-config} \ii{Configuring} Halibut
11f2edfa 1213
339cbe09 1214Halibut uses the \i\c{\\cfg} command to allow you to configure various
11f2edfa 1215aspects of its functionality.
1216
1217The \c{\\cfg} command expects to be followed by at least one pair of
1218braces, and usually more after that. The first pair of braces
1219contains a keyword indicating what aspect of Halibut you want to
1220configure, and the meaning of the one(s) after that depends on the
1221first keyword.
1222
1223The current list of configuration keywords in the main Halibut code
1224is quite small. Here it is in full:
1225
339cbe09 1226\dt \I\cw{\\cfg\{chapter\}}\cw{\\cfg\{chapter\}\{}\e{new chapter name}\cw{\}}
11f2edfa 1227
1228\dd This tells Halibut that you don't want to call a chapter a
339cbe09 1229\I{renaming sections}\I{configuring heading display}chapter any
1230more. For example, if you give the command
11f2edfa 1231\cw{\\cfg\{chapter\}\{Book\}}, then any chapter defined with the
1232\c{\\C} command will be labelled \q{Book} rather than \q{Chapter},
1233both in the section headings and in cross-references. This is
1234probably most useful if your document is not written in English.
1235
339cbe09 1236\lcont{
1237
1238Your replacement name should be given with a capital letter. Halibut
1239will leave it alone if it appears at the start of a sentence (in a
1240chapter title, or when \c{\\K} is used), and will lower-case it
1241otherwise (when \c{\\k} is used).
1242
1243}
1244
1245\dt \I\cw{\\cfg\{section\}}\cw{\\cfg\{section\}\{}\e{new section name}\cw{\}}
11f2edfa 1246
1247\dd Exactly like \c{chapter}, but changes the name given to
1248subsections of a chapter.
1249
339cbe09 1250\dt \I\cw{\\cfg\{appendix\}}\cw{\\cfg\{appendix\}\{}\e{new appendix name}\cw{\}}
11f2edfa 1251
339cbe09 1252\dd Exactly like \c{chapter}, but changes the name given to
11f2edfa 1253appendices.
1254
1255In addition to these configuration commands, there are also
1256configuration commands provided by each individual output format.
1257These configuration commands are discussed along with each output
16ea3abe 1258format, in \k{output}.
11f2edfa 1259
339cbe09 1260The \i{default settings} for the above options are:
1261
1262\c \cfg{chapter}{Chapter}
1263\c \cfg{section}{Section}
1264\c \cfg{appendix}{Appendix}
1265
1266\H{input-macro} Defining \i{macros}
11f2edfa 1267
1268If there's a complicated piece of Halibut source which you think
1269you're going to use a lot, you can define your own Halibut command
1270to produce that piece of source.
1271
1272In \k{input-unicode}, there is a sample piece of code which prints a
1273Euro sign, or replaces it with \q{EUR} if the Euro sign is not
1274available:
1275
16ea3abe 1276\c This is likely to cost \u20AC{EUR\_}2500 at least.
11f2edfa 1277
1278If your document quotes a \e{lot} of prices in Euros, you might not
1279want to spend all your time typing that out. So you could define a
339cbe09 1280macro, using the \i\c{\\define} command:
11f2edfa 1281
16ea3abe 1282\c \define{eur} \u20AC{EUR\_}
11f2edfa 1283
acbb8b72 1284Your macro names may include Roman alphabetic characters
1285(\c{a}-\c{z}, \c{A}-\c{Z}) and ordinary Arabic numerals
1286(\c{0}-\c{9}), but nothing else. (This is general \I{command
1287syntax}syntax for all of Halibut's commands, except for a few
1288special ones such as \c{\\_} and \c{\\-} which consist of a single
1289punctuation character only.)
1290
672e4626 1291Then you can just write ...
11f2edfa 1292
1293\c This is likely to cost \eur 2500 at least.
1294
672e4626 1295... except that that's not terribly good, because you end up with a
acbb8b72 1296space between the Euro sign and the number. (If you had written
1297\c{\\eur2500}, Halibut would have tried to interpret it as a macro
1298command called \c{eur2500}, which you didn't define.) In this case,
1299it's helpful to use the special \i\c{\\.} command, which is defined
1300to \I{NOP}\I{doing nothing}do nothing at all! But it acts as a
339cbe09 1301separator between your macro and the next character:
672e4626 1302
1303\c This is likely to cost \eur\.2500 at least.
1304
1305This way, you will see no space between the Euro sign and the number
1306(although, of course, there will be space between \q{EUR} and the
1307number if the Euro sign is not available, because the macro
1308definition specifically asked for it).