This repository has been archived by the owner on Aug 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
frundis_syntax.5
1558 lines (1558 loc) · 33.7 KB
/
frundis_syntax.5
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
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
.\" Copyright (c) 2014 Yon <[email protected]>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.Dd May 12, 2023
.Dt FRUNDIS_SYNTAX 5
.Os
.Sh NAME
.Nm frundis
.Nd semantic markup language for formatting documents
.Sh DESCRIPTION
The
.Nm frundis
language is a semantic markup language with a roff-like syntax for supporting
authoring of a variety of light to medium weight documents, from novels to
technical tutorials.
It relies on the exporting capabilities of the tool
.Xr frundis 1
to LaTeX, XHTML, EPUB, markdown and groff mom.
.Pp
The manual is organized as follows.
Language syntax is described in the
.Sx LANGUAGE SYNTAX AND SEMANTICS
section.
The
.Sx MACRO OVERVIEW
and
.Sx MACRO REFERENCE
sections describe built-in macros.
Section
.Sx FORMATS
concerns target format specific questions.
The
.Sx PARAMETERS
section describes some global configuration parameters.
Section
.Sx EXAMPLES
contains examples of
.Nm
source.
.Sh LANGUAGE SYNTAX AND SEMANTICS
There are two sorts of lines: lines beginning with the control character
.Sq \&. ,
called
.Dq macro lines ,
and lines
formed of free-form text, called
.Dq text lines .
Apart from specific rules explained in subsection
.Sx Macro lines ,
text processing follows the rules explained in subsections
.Sx Comments
and
.Sx Escape Sequences .
The
.Sx Processing
subsection explains how
.Nm
source files are processed.
.Pp
In this document, the term
.Dq whitespace
refers to any space character in the Unicode range.
.Ss Macro lines
Macro lines begin with the control character
.Sq \&. ,
followed by a macro name, with optional horizontal whitespace between both.
Macro lines can be continued in several lines by using a backslash
.Sq \&\e
at the end of the line.
Whitespace is used to delimit arguments, unless it appears
inside a pair of quote characters
.Sq \&" .
A literal character
.Sq \&"
can be rendered inside a quoted string by doubling it.
.Ss Comments
In any type of line, text beginning by
.Sq \&\e\(dq
is ignored until the end of the line.
Lines with only a control character
.Sq \&.
and optional trailing horizontal whitespace are ignored, also.
.Ss Escape Sequences
Escape sequences start with a backslash character
.Sq \e ,
which is the only character that needs to be escaped.
The accepted sequences are described in the following table:
.Pp
.Bl -column "Input Escape" "Description" -offset indent -compact
.It Em Input Ta Em Description
.It \ee Ta a literal backslash
.Sq \e
character
.It \e& Ta a non-printing zero-width character
.It \e~ Ta a non-breaking space
.It \e*[ Ns Ar name Ns ] Ta variable interpolation, see Sx \&#dv Ns \& macro description.
.It \e$ Ns Ar N Ta numbered argument
.It \e$[ Ns Ar name Ns ] Ta named argument
.It \e$?[ Ns Ar name Ns ] Ta named flag
.It \e$@ Ta argument list
.El
.Pp
The character
.Sq \e&
can be in particular used to allow printing of a period
.Sq \&.
at the beginning of a line.
See
.Sx \&#de
macro description for a detailed description of the argument and flag escapes.
.Ss Processing
.Nm
files are processed in two phases: a first pass is used to collect information
(such as TOC information), and a second pass does the actual processing.
.Sh MACRO OVERVIEW
This section is an overview of the macros with short descriptions, and some
common options.
Detailed descriptions can be found in the
.Sx MACRO REFERENCE
section.
.Ss Structure
.Bl -column "Brq, Bro, Brc" description
.It Sx \&Pt Ta declare a new part
.It Sx \&Ch Ta declare a new chapter
.It Sx \&Sh Ta declare a new section
.It Sx \&Ss Ta declare a new subsection
.It Sx \&Tc Ta print table of contents:
.Op Fl mini
.Op Fl summary
.Op Fl Ar type
.It Sx \&P Ta break a paragraph
.It Sx \&D Ta start a text dialogue paragraph
.El
.Ss Displays and lists
.Bl -column "Brq, Bro, Brc" description
.It Sx \&Bd , \&Ed Ta display block:
.Op Fl t Ar tag
.It Sx \&Bl , \&El Ta list block:
.Op Fl t Ar type
.It Sx \&It Ta list item
.It Sx \&Ta Ta table cell separator
.El
.Ss Miscellaneous phrasing markup
.Bl -column "Brq, Bro, Brc" description
.It Sx \&Lk Ta format a hyperlink:
.Ar url
.Op Ar text
.It Sx \&Sm , \&Bm , \&Em Ta arbitrary phrasing text markup:
.Op Fl t Ar tag
.It Sx \&Sx Ta make a cross-reference:
.Ar label
.Ar args ...
.El
.Ss Include external files
.Bl -column "Brq, Bro, Brc" description
.It Sx \&If Ta include a
.Nm
source file:
.Op Fl as-is Op Fl t Ar tag
.Op Fl f Ar formats
.Ar path
.It Sx \&Im Ta include an image:
.Op Fl link Ar url
.Ar src
.Op Ar caption
.El
.Ss Filters
.Bl -column "Brq, Bro, Brc" description
.It Sx \&Ft , \&Bf , \&Ef Ta as-is or specially filtered text:
.Fl f Ar formats
.Op Fl t Ar tag
.El
.Ss Tags and global parameters
.Bl -column "Brq, Bro, Brc" description
.It Sx \&X Ta
define exporting parameters and tags:
.Cm set | mtag | dtag | ftag
.El
.Ss Macros, variables and conditionals
.Bl -column "Brq, Bro, Brc" description
.It Sx \&#de Ns , \&#. Ta define a macro:
.Op Fl f Ar formats
.Ar name
.It Sx \&#dv Ta define a variable:
.Op Fl f Ar formats
.Ar name
.Ar args ...
.It Sx \&#if Ns , \&#; Ta conditional:
.Op Fl f Ar formats
.Op Ar string
.It Sx \&#run Ta run command:
.Ar args ...
.El
.Sh FORMATS
Currently several target formats are supported: LaTeX, XHTML, EPUB,
markdown and groff mom.
Some parameters apply only to a specific target format, see the
.Sx PARAMETERS
section.
In particular, the parameters
.Cm epub-version
and
.Cm xhtml-version
allow to choose which version of EPUB and XHTML to produce.
When a macro accepts a
.Ar formats
argument,
.Cm xhtml
refers to XHTML,
.Cm epub
refers to EPUB,
.Cm latex
refers to LaTeX,
.Cm markdown
refers to markdown, and
.Cm mom
refers to groff mom.
Several formats can be specified at once by separating them by commas.
.Em Note:
only XHTML, EPUB and LaTeX output formats handle the complete language.
For example, the mom and markdown output formats do not handle complex lists
and tables.
.Ss Restricted mode
Restricted mode (option
.Fl t
of
.Xr frundis 1 )
is an experimental mode of operation with a restricted macro-set, and a
somewhat different behaviour more template-friendly.
In particular, text blocks and phrasing macros don't implicitly generate begin
and end paragraph markers, and arguments
.Fl b
and
.Fl e
of
.Sx \&X
.Cm mtag
are not escaped.
The exported macros are as follows:
.Sx \&Bd ,
.Sx \&Bf ,
.Sx \&Bm ,
.Sx \&Ed ,
.Sx \&Ef ,
.Sx \&Em ,
.Sx \&Ft ,
.Sx \&If ,
.Sx \&Sm ,
and
.Sx \&X ,
as well as macros starting with
.Sq # .
.Sh MACRO REFERENCE
This section is a reference of all macros, in alphabetic order.
.Ss \&Bd
Begin a display block.
The syntax is as follows:
.Bd -ragged -offset indent
.Pf \. Sx \&Bd
.Op Fl id Ar label
.Op Fl r
.Op Fl t Ar tag
.Ed
.Pp
.Sx Bd
is a generic macro for styled blocks, whose styling and exact semantics are
controlled by the optional
.Ar tag
argument, which can be
.Cm div ,
or a new tag created by a previous
.Sx X
.Cm dtag
macro declaration.
The value
.Cm div
is the default tag.
The optional
.Fl r
flag states that the corresponding
.Sx \&Ed
should specify
.Fl t
option.
.Pp
The optional
.Ar label
option argument works as in the
.Sx \&Sm
macro.
.Pp
The
.Sx \&Bd
macro terminates previous paragraph text, if any.
.Pp
A
.Cm div
block actually does nothing in LaTeX apart from terminating any previous paragraph.
It is rendered as a
.Dq div
element in html.
.Ss \&Bf
Begin a filter block.
The syntax is as follows:
.Bd -ragged -offset indent
.Pf \. Sx \&Bf
.Fl f Ar formats
.Op Fl ns
.Op Fl t Ar tag
.Ed
.Pp
This is a multi-line version of the
.Sx \&Ft
macro.
.Ss \&Bl
Begin a list.
The syntax is as follows:
.Bd -ragged -offset indent
.Pf \. Sx \&Bl
.Op Fl id Ar label
.Op Fl t Ar type
.Op Ar args ...
.Ed
.Pp
The optional
.Ar type
argument can be
.Cm item
for a simple list (this is the default),
.Cm enum
for an enumerated list,
.Cm desc
for a description list,
.Cm table
for a table, or
.Cm verse
for writing a verse poem.
The optional
.Ar args
arguments are used in
.Cm verse
and
.Cm table
lists to provide a title; arguments are joined with spaces interleaved.
When a title is provided,
.Cm table
lists are added to the list of tables generated by
.Sx \&Tc Fl Cm lot .
.Pp
The optional
.Fl id
works as in the
.Sx \&Sm
macro.
.Pp
Lists of type
.Cm item
or
.Cm enum
can be nested.
The
.Sx \&P
macro is handled specially in lists of type
.Cm verse ,
marking the start a new stanza.
.Pp
In html,
.Sx \&Bl Fl t Cm verse
lists are rendered within a
.Dq div
element with class
.Dq verse .
The
.Cm verse
package is required for LaTeX with
.Sx \&Bl Fl t Cm verse
lists.
.Ss \&Bm
Begin semantic markup block.
The syntax is as follows:
.Bd -ragged -offset indent
.Pf \. Sx \&Bm
.Op Fl id Ar label
.Op Fl ns
.Op Fl r
.Op Fl t Ar tag
.Ed
.Pp
This macro is a multi-line version of the
.Sx \&Sm
macro.
The markup spans through paragraphs until a corresponding
.Sx \&Em
macro is encountered.
.Pp
The optional
.Fl ns
flag works as in
.Sx \&Sm .
The
.Fl r
plays the same role as in the
.Sx \&Bd
macro.
.Ss \&Ch
Declare a new chapter.
Same syntax as the
.Sx \&Sh
macro.
.Ss \&D
Start a new dialogue.
This macro breaks a paragraph as the
.Sx \&P
macro, but then a new paragraph is started with a marker starting
a dialogue.
The default marker can be changed by setting the
.Cm dmark
parameter.
See the
.Sx PARAMETERS
section.
.Ss \&Ed
End a display block.
The syntax is as follows:
.Bd -ragged -offset indent
.Pf \. Sx \&Ed
.Op Fl t Ar tag
.Ed
.Pp
The optional
.Fl t Ar tag
argument can be provided to state that the macro should end a
corresponding
.Sx \&Bd
with the same tag.
It is particularly useful when defining opening/closing pairs of user defined
macros, in which the first starts a display block and the second closes it.
Using the tag will ensure error messages about unclosed blocks do not get
confused when nesting with differently tagged display blocks, accurately
pointing out which block is unclosed.
.Ss \&Ef
End a filter block.
The syntax is as follows:
.Bd -ragged -offset indent
.Pf \. Sx \&Ef
.Op Fl ns
.Ed
.Pp
The
.Fl ns
flag can be used to specify that no space should be appended at the end of the
block.
.Ss \&El
End a list.
.Ss \&Em
End markup started by a corresponding
.Sx \&Bm
macro.
The syntax is as follows:
.Bd -ragged -offset indent
.Pf \. Sx \&Em
.Op Fl ns
.Op Fl t Ar tag
.Op Ar delimiter
.Ed
.Pp
The optional closing
.Ar delimiter
follows the same semantics as described in the
.Sx \&Sm
macro below, except that it can be any string.
.Pp
The optional
.Fl t Ar tag
plays the same role as in the
.Sx \&Ed
macro.
The optional
.Fl ns
flag specifies that no space is wanted before further paragraph text.
.Ss \&Ft
One line filter.
The syntax is as follows:
.Bd -ragged -offset indent
.Pf \. Sx \&Ft
.Fl f Ar formats
.Op Fl ns
.Op Fl t Ar tag
.Ar args ...
.Ed
.Pp
The
.Ar formats
argument specifies that the macro should apply only when exporting to some
specific target formats.
See the
.Sx FORMATS
section for a list of possible values for the
.Ar formats
argument.
When it applies, the
.Ar args
arguments are joined with spaces interleaved and rendered as-is.
Specific
.Nm
language escape rules still apply, but format specific ones don't.
.Pp
The
.Fl t Ar tag
optional argument specifies that text should be pre-processed by a special filter,
as specified by an
.Sx \&X
.Cm ftag
invocation, or by one of the following built-in filters:
.Bl -tag -width 13n
.It Cm escape
Text will be rendered escaped, but without any additional processing.
.El
.Pp
In the case that the
.Fl t
option is specified, the
.Fl f
option is no more mandatory.
.Pp
The optional
.Fl ns
flag follows the same semantics as in the
.Sx \&Sm
macro.
.Ss \&If
Include a file.
The syntax is as follows:
.Bd -ragged -offset indent
.Pf \. Sx \&If
.Op Fl as-is Oo Fl ns Oc Op Fl t Ar tag
.Op Fl f Ar formats
.Ar path
.Ed
.Pp
The
.Ar path
argument specifies the path to the file that should be included.
The optional
.Ar formats
argument specifies that the file should be included only for a particular
target format, see the
.Sx FORMATS
section for details.
The optional
.Fl as-is
flag specifies that the file should be included
.Qq as-is ,
without interpreting it as a
.Nm
file.
.Pp
The optional
.Fl t
works as in the
.Sx \&Ft
macro.
.Pp
Relative
.Ar path
arguments search for files in the current directory, and then for files specified
in the
.Ev FRUNDISLIB
environment variable, as specified in the
.Xr frundis 1
manpage.
.Ss \&Im
Include an image.
The syntax is as follows:
.Bd -ragged -offset indent
.Pf \. Sx \&Im
.Op Fl alt Ar text
.Op Fl id Ar label
.Op Fl link Ar url
.Op Fl ns
.Ar src
.Op Ar caption
.Op Ar delimiter
.Ed
.Pp
The
.Ar src
argument is the path or url to the image.
If a
.Ar caption
is provided, the image is rendered as a figure with caption, and an entry is
added in the list of figures generated by
.Sx \&Tc Fl lof .
Otherwise, the image is rendered in-line, and
.Ar delimiter
and the
.Fl ns
work as in the
.Sx \&Sm
macro.
In both cases, the
.Fl id
option follows the same semantics as in the
.Sx \&Sm
macro.
.Pp
When exporting to XHTML, the optional
.Fl link Ar url
embeds the image in a hyperlink given by
.Ar url .
The optional
.Fl alt Ar text
provides alternate text for the
.Dq alt
attribute.
If the
.Fl alt
option is not passed, the
.Dq alt
attribute is set to
.Ar caption
if specified, or leaved empty otherwise.
If a caption is provided, in html
the macro renders as a
.Dq div
element with
.Dq class
attribute
.Dq figure ,
and in LaTeX it is rendered as a centered figure with caption.
.Pp
The
.Cm graphicx
package is required for LaTeX.
.Ss \&It
A list item.
The syntax is as follows:
.Bd -ragged -offset indent
.Pf \. Sx \&It
.Op Ar args ...
.Ed
.Pp
The
.Ar args
arguments are joined, with spaces interleaved, and used as text for the item in
case of an
.Cm item
or
.Cm verse
list, as the text to be described in the case of a
.Cm desc
list, and as the text of the first cell in a row in a
.Cm table
list.
.Ss \&Lk
Format a hyperlink.
The syntax is as follows:
.Bd -ragged -offset indent
.Pf \. Sx \&Lk
.Op Fl ns
.Ar url
.Op Ar args ...
.Op Ar delimiter
.Ed
.Pp
The optional
.Ar delimiter
argument and the
.Fl ns
flag work as in the
.Sx \&Sm
macro.
The optional
.Ar args
arguments are joined with spaces interleaved to provide text for the link.
.Pp
The
.Cm hyperref
package is required for LaTeX.
.Ss \&P
Break a paragraph.
The syntax is as follows:
.Bd -ragged -offset indent
.Pf \. Sx \&P
.Op Ar args ...
.Ed
.Pp
The
.Sx \&P
macro is optional just after or before a header macro.
If
.Ar args
arguments are provided, a new paragraph is started, the
.Ar args
are joined with spaces interleaved and used as a header for
the new paragraph.
.Pp
If no
.Ar args
are provided, the macro has no effect before and after display blocks or lists
for XHTML and EPUB outputs, but in LaTeX a newline will be inserted in these
cases.
The new paragraph has class
.Dq paragraph
in XHTML and EPUB.
The header appears as argument to a
.Dq paragraph
command in LaTeX, and within a
.Dq strong
element with class
.Dq paragraph
in XHTML and EPUB.
.Ss \&Pt
Declare a new part.
Same syntax as the
.Sx \&Sh
macro.
.Ss \&Sh
Declare a new section.
The syntax is as follows:
.Bd -ragged -offset indent
.Pf \. Sx \&Sh
.Op Fl id Ar label
.Op Fl nonum
.Ar args ...
.Ed
.Pp
The
.Ar args
arguments are joined with spaces interleaved to form the name of the section.
The optional
.Fl nonum
flag specifies that the section should not be numbered.
.Pp
The optional
.Ar label
option argument follows the same semantics as with the
.Sx \&Sm
macro.
.Pp
In XHTML and EPUB, a header is rendered as an
.Dq h Ns Ar N
element, with the name of the macro as a class attribute, and where
.Ar N
is such that the hierarchical order between header macros
.Sx \&Pt ,
.Sx \&Ch ,
.Sx \&Sh ,
and
.Sx \&Ss
is satisfied.
.Ss \&Sm
Semantic Markup.
The syntax is as follows:
.Bd -ragged -offset indent
.Pf \. Sx \&Sm
.Op Fl id Ar label
.Op Fl ns
.Op Fl t Ar tag
.Ar args ...
.Op Ar delimiter
.Ed
.Pp
The optional
.Ar tag
argument attaches some special semantics to the text, according to the rules
defined in a prior
.Sx \&X
macro line declaration.
The
.Ar args
arguments are joined with spaces interleaved to form the text to markup.
If the last argument is a punctuation closing
.Ar delimiter ,
it is excluded from the markup, but no space is interleaved between it and the
text.
This allows to avoid unwanted space before punctuation, such as it
would occur when putting punctuation in the next text or macro line.
Currently, a Unicode punctuation character,
possibly preceded by a non-breaking space
.Sq \e~ ,
is considered a punctuation delimiter.
.Pp
The optional
.Fl ns
flag specifies that no newline should be inserted after any preceding
paragraph text.
.Pp
The optional
.Ar label
option argument can be used to provide an identifier for use in a further
.Sx \&Sx
.Fl id
invocation.
The
.Ar label
should be both a valid
.Dq id
html attribute and a valid LaTeX label.
.Pp
The
.Sx \&Sm
macro can also be used inline as an argument to a header macro,
.Sx \&Sx
macro,
.Sx \&P
macro,
.Sx \&It
macro,
.Sx \&Lk
or a
.Sx \&Ta
macro.
Fine-grained control over the words to mark can be obtained by the use of the
.Sx \&Bm
and
.Sx \&Em
macros.
As a result of this special treatment, these macro names need to be escaped in
order to appear as-is.
For example:
.Bd -literal -offset indent
\&.\e" Emphasis of the word "Frundis". Note the "\e&" after "Em".
\&.Ch The Bm Frundis Em \e& Manual
\&.\e" To get "Sm" as-is:
\&.Ch All About the \e&Sm Macro
.Ed
.Ss \&Ss
Declare a new subsection.
Same syntax as the
.Sx \&Sh
macro.
.Ss \&Sx
Make a cross-reference.
The syntax is as follows:
.Bd -ragged -offset indent
.Pf \. Sx \&Sx
.Op Fl ns
.Ar label
.Op Ar args ...
.Op Ar delimiter
.Ed
.Pp
If given,
.Ar args
arguments are joined with spaces interleaved, and used as text for the
cross-reference link.
Otherwise, the header number, title or label are used as the text.
The argument
.Ar label
should correspond to a valid label passed to any macro supporting
.Fl id
option.
.Pp
The optional
.Ar delimiter
argument and the optional
.Fl ns
flag follow the same semantics as in the
.Sx \&Sm
macro.
.Pp
The
.Cm hyperref
package is required for LaTeX.
Cross-references are not implemented for the markdown format, text will appear
as-is.
.Ss \&Ta
Table cell separator in
.Sx \&Bl
.Fl t Cm table
lists.
The syntax is as follows:
.Bd -ragged -offset indent
.Pf \. Sx \&Ta
.Op Ar args ...
.Ed
.Pp
The
.Ar args
arguments are joined with spaces interleaved, and used as text for the new
cell.
.Ss \&Tc
Print a table of contents.
The syntax is as follows:
.Bd -ragged -offset indent
.Pf \. Sx \&Tc
.Op Fl mini
.Op Fl nonum
.Op Fl summary
.Op Fl title Ar text
.Op Fl Ar type
.Ed
.Pp
The
.Ar type
can be
.Cm toc
for a table of contents,
.Cm lof
for a list of figures and
.Cm lot
for a list of tables.
The default is
.Cm toc .
The
.Fl summary
flag specifies that only a summary without sections and subsections should be
printed.
The
.Fl mini
flag specifies that a local table of contents should be printed, that is a
list of sections within chapter, or a list of chapters after a part
declaration.
If
.Fl summary
and
.Fl mini
are combined, only sections will be printed for chapter local table of
contents.
.Pp
The
.Fl nonum
flag specifies, for XHTML and EPUB, that entries should not be numbered.
The
.Fl title Ar text
can be used to specify a title for XHTML and EPUB.
When
.Fl mini
is not specified in table of contents, the default is to use the title of the
document, as specified by the
.Cm document-title
parameter.
If an empty title is provided, no title will be print.
In HTML, the index is rendered as an unordered list in a
.Dq div
element with
.Dq class
attribute
.Dq lof ,
.Dq lot
or
.Dq toc
according to the
.Fl Ar type
flag.
.Pp
The
.Cm minitoc
package is required for LaTeX if the
.Fl Cm mini
flag is used.
.Ss \&X
Declare exporting parameters.
The syntax is as follows:
.Bd -ragged -offset indent
.Pf \. Sx \&X
.Cm set
.Op Fl f Ar formats
.Ar parameter
.Ar value
.br
.Pf \. Sx \&X
.Cm mtag
.Fl f Ar formats
.Fl t Ar tag
.Op Fl c Ar cmd
.Op Fl b Ar opening
.Op Fl e Ar closing
.Op Fl a Ar |key|value
.br
.Pf \. Sx \&X
.Cm dtag
.Fl f Ar formats
.Fl t Ar tag
.Op Fl c Ar cmd
.Op Fl a Ar |key|value
.br
.Pf \. Sx \&X
.Cm ftag
.Op Fl f Ar formats
.Fl t Ar tag
.Pq Fl shell Ar args ... | Fl gsub Ar /string/replacement | Fl regexp Ar /pattern/replacement
.Ed
.Pp
The
.Pf \. Sx \&X
.Cm set
form allows to assign a
.Ar value