git-scribe 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (151) hide show
  1. data/.gitignore +1 -0
  2. data/Rakefile +31 -0
  3. data/SPEC.asciidoc +126 -0
  4. data/TODO.txt +29 -0
  5. data/bin/git-scribe +2 -1
  6. data/docbook-xsl/.CatalogManager.properties.example +61 -0
  7. data/docbook-xsl/.urilist +1 -0
  8. data/git-scribe.gemspec +32 -0
  9. data/lib/git-scribe.rb +21 -315
  10. data/lib/git-scribe/check.rb +60 -0
  11. data/lib/git-scribe/cli.rb +84 -0
  12. data/lib/git-scribe/generate.rb +222 -0
  13. data/lib/git-scribe/init.rb +16 -0
  14. data/lib/git-scribe/version.rb +3 -0
  15. data/template/.gitignore +1 -0
  16. data/template/.gitscribe +5 -0
  17. data/test/check_test.rb +12 -0
  18. data/test/gen_test.rb +78 -0
  19. data/test/init_test.rb +36 -0
  20. data/test/test_helper.rb +44 -0
  21. metadata +49 -161
  22. data/example/book/big.asc +0 -5604
  23. data/example/book/holmes.asc +0 -12983
  24. data/example/output/META-INF/container.xml +0 -6
  25. data/example/output/OEBPS/ar01s02.html +0 -15
  26. data/example/output/OEBPS/ar01s03.html +0 -3
  27. data/example/output/OEBPS/content.opf +0 -21
  28. data/example/output/OEBPS/index.html +0 -5
  29. data/example/output/OEBPS/toc.ncx +0 -37
  30. data/example/output/a_case_of_identity.html +0 -725
  31. data/example/output/a_example_appendix.html +0 -63
  32. data/example/output/a_migration_notes.html +0 -95
  33. data/example/output/apa.html +0 -20
  34. data/example/output/apb.html +0 -6
  35. data/example/output/apc.html +0 -24
  36. data/example/output/apd.html +0 -30
  37. data/example/output/ape.html +0 -26
  38. data/example/output/apf.html +0 -9
  39. data/example/output/apg.html +0 -42
  40. data/example/output/aph.html +0 -89
  41. data/example/output/ar01s02.html +0 -12
  42. data/example/output/ar01s03.html +0 -34
  43. data/example/output/ar01s04.html +0 -77
  44. data/example/output/ar01s05.html +0 -272
  45. data/example/output/ar01s06.html +0 -35
  46. data/example/output/ar01s07.html +0 -105
  47. data/example/output/ar01s08.html +0 -33
  48. data/example/output/ar01s09.html +0 -12
  49. data/example/output/ar01s10.html +0 -14
  50. data/example/output/ar01s11.html +0 -34
  51. data/example/output/ar01s12.html +0 -63
  52. data/example/output/ar01s13.html +0 -156
  53. data/example/output/ar01s14.html +0 -330
  54. data/example/output/ar01s15.html +0 -22
  55. data/example/output/ar01s16.html +0 -27
  56. data/example/output/ar01s17.html +0 -94
  57. data/example/output/ar01s18.html +0 -359
  58. data/example/output/ar01s19.html +0 -373
  59. data/example/output/ar01s20.html +0 -27
  60. data/example/output/ar01s21.html +0 -33
  61. data/example/output/ar01s22.html +0 -351
  62. data/example/output/ar01s23.html +0 -21
  63. data/example/output/ar01s24.html +0 -69
  64. data/example/output/ar01s25.html +0 -60
  65. data/example/output/ar01s26.html +0 -217
  66. data/example/output/ar01s27.html +0 -88
  67. data/example/output/ar01s28.html +0 -237
  68. data/example/output/ar01s29.html +0 -68
  69. data/example/output/ar01s30.html +0 -154
  70. data/example/output/ar01s31.html +0 -6
  71. data/example/output/ar01s32.html +0 -22
  72. data/example/output/ar01s33.html +0 -209
  73. data/example/output/asciidoc_backends.html +0 -190
  74. data/example/output/asciidoc_document_types.html +0 -131
  75. data/example/output/attribute_entries.html +0 -185
  76. data/example/output/attribute_lists.html +0 -157
  77. data/example/output/attribute_references.html +0 -414
  78. data/example/output/attributelist_element.html +0 -143
  79. data/example/output/b_packager_notes.html +0 -68
  80. data/example/output/bi01.html +0 -18
  81. data/example/output/big.asc +0 -5604
  82. data/example/output/block_element_definitions.html +0 -448
  83. data/example/output/block_titles.html +0 -83
  84. data/example/output/blockid_element.html +0 -80
  85. data/example/output/book.asc +0 -5604
  86. data/example/output/book.epub +0 -0
  87. data/example/output/book.fo +0 -3788
  88. data/example/output/book.html +0 -8793
  89. data/example/output/book.xml +0 -8265
  90. data/example/output/c_asciidoc_safe_mode.html +0 -105
  91. data/example/output/callouts.html +0 -214
  92. data/example/output/catalog +0 -10
  93. data/example/output/colophon.html +0 -397
  94. data/example/output/configuration_files.html +0 -672
  95. data/example/output/converting_docbook_to_other_file_formats.html +0 -324
  96. data/example/output/d_using_asciidoc_with_non-english_languages.html +0 -107
  97. data/example/output/delimited_blocks.html +0 -455
  98. data/example/output/document_attributes.html +0 -95
  99. data/example/output/document_processing.html +0 -116
  100. data/example/output/document_structure.html +0 -493
  101. data/example/output/e_vim_syntax_highlighter.html +0 -111
  102. data/example/output/example_bibliography.html +0 -82
  103. data/example/output/example_colophon.html +0 -58
  104. data/example/output/example_glossary.html +0 -73
  105. data/example/output/example_index.html +0 -108
  106. data/example/output/f_attribute_options.html +0 -129
  107. data/example/output/filters.html +0 -179
  108. data/example/output/footnotes.html +0 -103
  109. data/example/output/g_diagnostics.html +0 -148
  110. data/example/output/generating_plain_text_files.html +0 -68
  111. data/example/output/getting_started.html +0 -87
  112. data/example/output/glossary.html +0 -95
  113. data/example/output/go01.html +0 -24
  114. data/example/output/h_backend_attributes.html +0 -308
  115. data/example/output/help_commands.html +0 -96
  116. data/example/output/holmes.asc +0 -12983
  117. data/example/output/image/octocat_professor.png +0 -0
  118. data/example/output/include/hello.c +0 -10
  119. data/example/output/index.html +0 -656
  120. data/example/output/indexes.html +0 -104
  121. data/example/output/intrinsic_attributes.html +0 -165
  122. data/example/output/ix01.html +0 -3
  123. data/example/output/lists.html +0 -666
  124. data/example/output/macros.html +0 -737
  125. data/example/output/manpage_documents.html +0 -124
  126. data/example/output/master.css +0 -281
  127. data/example/output/mathematical_formulas.html +0 -125
  128. data/example/output/page.html +0 -60
  129. data/example/output/paragraphs.html +0 -192
  130. data/example/output/pr01.html +0 -3
  131. data/example/output/source_code_highlighting.html +0 -59
  132. data/example/output/stylesheets/handbookish-quirks.css +0 -0
  133. data/example/output/stylesheets/handbookish.css +0 -233
  134. data/example/output/tables.html +0 -797
  135. data/example/output/text_formatting.html +0 -273
  136. data/example/output/the_adventure_of_the_beryl_coronet.html +0 -968
  137. data/example/output/the_adventure_of_the_blue_carbuncle.html +0 -825
  138. data/example/output/the_adventure_of_the_copper_beeches.html +0 -998
  139. data/example/output/the_adventure_of_the_engineer_s_thumb.html +0 -851
  140. data/example/output/the_adventure_of_the_noble_bachelor.html +0 -861
  141. data/example/output/the_adventure_of_the_speckled_band.html +0 -1015
  142. data/example/output/the_boscombe_valley_mystery.html +0 -974
  143. data/example/output/the_first_chapter.html +0 -110
  144. data/example/output/the_five_orange_pips.html +0 -776
  145. data/example/output/the_man_with_the_twisted_lip.html +0 -946
  146. data/example/output/the_red-headed_league.html +0 -950
  147. data/example/output/the_second_chapter.html +0 -95
  148. data/example/output/the_third_chapter.html +0 -58
  149. data/example/output/tips_and_tricks.html +0 -452
  150. data/example/output/title.html +0 -120
  151. data/example/output/titles.html +0 -126
@@ -1,77 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>AsciiDoc Backends</title><link rel="stylesheet" href="stylesheets/handbookish.css" type="text/css" /><meta name="generator" content="DocBook XSL Stylesheets V1.74.1" /><link rel="home" href="index.html" title="AsciiDoc User Guide" /><link rel="up" href="index.html" title="AsciiDoc User Guide" /><link rel="prev" href="ar01s03.html" title="AsciiDoc Document Types" /><link rel="next" href="ar01s05.html" title="Document Structure" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">AsciiDoc Backends</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s03.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ar01s05.html">Next</a></td></tr></table><hr /></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="X5"></a>AsciiDoc Backends</h2></div></div></div><p>The asciidoc(1) command translates an AsciiDoc formatted file to the
4
- backend format specified by the <code class="literal">-b</code> (<code class="literal">--backend</code>) command-line
5
- option. asciidoc(1) itself has little intrinsic knowledge of backend
6
- formats, all translation rules are contained in customizable cascading
7
- configuration files. Backend specific attributes are listed in the
8
- <a class="link" href="aph.html" title="H. Backend Attributes">Backend Attributes</a> section.</p><div class="variablelist"><dl><dt><span class="term">
9
- docbook45
10
- </span></dt><dd>
11
- Outputs DocBook XML 4.5 markup.
12
- </dd><dt><span class="term">
13
- html4
14
- </span></dt><dd>
15
- This backend generates plain HTML 4.01 Transitional markup.
16
- </dd><dt><span class="term">
17
- xhtml11
18
- </span></dt><dd>
19
- This backend generates XHTML 1.1 markup styled with CSS2. Output
20
- files have an <code class="literal">.html</code> extension.
21
- </dd><dt><span class="term">
22
- slidy
23
- </span></dt><dd>
24
- Use this backend to generate self-contained
25
- <a class="ulink" href="http://www.w3.org/Talks/Tools/Slidy2/" target="_top">Slidy</a> HTML slideshows for
26
- your web browser from AsciiDoc documents. The Slidy backend is
27
- documented in the distribution <code class="literal">doc/slidy.txt</code> file and
28
- <a class="ulink" href="http://www.methods.co.nz/asciidoc/slidy.html" target="_top">online</a>.
29
- </dd><dt><span class="term">
30
- wordpress
31
- </span></dt><dd>
32
- A minor variant of the <span class="emphasis"><em>html4</em></span> backend to support
33
- <a class="ulink" href="http://srackham.wordpress.com/blogpost1/" target="_top">blogpost</a>.
34
- </dd><dt><span class="term">
35
- latex
36
- </span></dt><dd>
37
- Experimental LaTeX backend.
38
- </dd></dl></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_backend_aliases"></a>Backend Aliases</h3></div></div></div><p>Backend aliases are alternative names for AsciiDoc backends. AsciiDoc
39
- comes with two backend aliases: <span class="emphasis"><em>html</em></span> (aliased to <span class="emphasis"><em>xhtml11</em></span>) and
40
- <span class="emphasis"><em>docbook</em></span> (aliased to <span class="emphasis"><em>docbook45</em></span>).</p><p>You can assign (or reassign) backend aliases by setting an AsciiDoc
41
- attribute named like <code class="literal">backend-alias-&lt;alias&gt;</code> to an AsciiDoc backend
42
- name. For example, the following backend alias attribute definitions
43
- appear in the <code class="literal">[attributes]</code> section of the global <code class="literal">asciidoc.conf</code>
44
- configuration file:</p><pre class="literallayout">backend-alias-html=xhtml11
45
- backend-alias-docbook=docbook45</pre><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>Backend aliases must be assigned in one of the <code class="literal">asciidoc.conf</code>
46
- configuration files because these files are loaded first (before the
47
- backend configuration files).</p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_docbook"></a>DocBook</h3></div></div></div><p>AsciiDoc generates <span class="emphasis"><em>article</em></span>, <span class="emphasis"><em>book</em></span> and <span class="emphasis"><em>refentry</em></span>
48
- <a class="ulink" href="http://www.docbook.org/" target="_top">DocBook</a> documents (corresponding to the
49
- AsciiDoc <span class="emphasis"><em>article</em></span>, <span class="emphasis"><em>book</em></span> and <span class="emphasis"><em>manpage</em></span> document types).</p><p>DocBook documents are not designed to be viewed directly. Most Linux
50
- distributions come with conversion tools (collectively called a
51
- toolchain) for <a class="link" href="ar01s30.html" title="Converting DocBook to other file formats">converting DocBook files</a> to presentation
52
- formats such as Postscript, HTML, PDF, EPUB, DVI, PostScript, LaTeX,
53
- roff (the native man page format), HTMLHelp, JavaHelp and text.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="X35"></a>XHTML Stylesheets</h3></div></div></div><p>AsciiDoc XHTML output is styled using CSS2 stylesheets from the
54
- distribution <code class="literal">./stylesheets/</code> directory.</p><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Important</h3><p>All browsers have CSS quirks, but Microsoft’s IE6 has so many
55
- omissions and errors that the <code class="literal">xhtml11-quirks.css</code> stylesheet and
56
- <code class="literal">xhtml11-quirks.conf</code> configuration files are available for inclusion
57
- during XHTML backend processing to to implement workarounds for IE6.
58
- Set the AsciiDoc <span class="emphasis"><em>quirks</em></span> attribute to enable AsciiDoc’s quirks mode,
59
- for example with the <code class="literal">--attribute quirks!</code> command-line option.</p></div><p>Default <span class="emphasis"><em>xhtml11</em></span> stylesheets:</p><div class="variablelist"><dl><dt><span class="term">
60
- <code class="literal">./stylesheets/xhtml11.css</code>
61
- </span></dt><dd>
62
- The main stylesheet.
63
- </dd><dt><span class="term">
64
- <code class="literal">./stylesheets/xhtml11-manpage.css</code>
65
- </span></dt><dd>
66
- Tweaks for manpage document type generation.
67
- </dd><dt><span class="term">
68
- <code class="literal">./stylesheets/xhtml11-quirks.css</code>
69
- </span></dt><dd>
70
- Stylesheet modifications to work around IE6 browser
71
- incompatibilities.
72
- </dd></dl></div><p>Use the <span class="emphasis"><em>theme</em></span> attribute to select an alternative set of stylesheets.
73
- For example, the command-line option <code class="literal">-a theme=foo</code> will use
74
- stylesheets <code class="literal">foo.css</code>, <code class="literal">foo-manpage.css</code> (and <code class="literal">foo-quirks.css</code> if
75
- quirks mode is enabled) instead of the default stylesheets.</p><p>Use the <span class="emphasis"><em>stylesheet</em></span> attribute to include an additional stylesheet in
76
- XHTML documents. For example, the command-line option <code class="literal">-a
77
- stylesheet=newsletter.css</code> will use stylesheets <code class="literal">newsletter.css</code>.</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s03.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="ar01s05.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">AsciiDoc Document Types </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Document Structure</td></tr></table></div></body></html>
@@ -1,272 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Document Structure</title><link rel="stylesheet" href="stylesheets/handbookish.css" type="text/css" /><meta name="generator" content="DocBook XSL Stylesheets V1.74.1" /><link rel="home" href="index.html" title="AsciiDoc User Guide" /><link rel="up" href="index.html" title="AsciiDoc User Guide" /><link rel="prev" href="ar01s04.html" title="AsciiDoc Backends" /><link rel="next" href="ar01s06.html" title="Document Processing" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Document Structure</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s04.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ar01s06.html">Next</a></td></tr></table><hr /></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_document_structure"></a>Document Structure</h2></div></div></div><p>An AsciiDoc document consists of a series of <a class="link" href="go01.html#X8">block elements</a>
4
- starting with an optional document Header, followed by an optional
5
- Preamble, followed by zero or more document Sections.</p><p>Almost any combination of zero or more elements constitutes a valid
6
- AsciiDoc document: documents can range from a single sentence to a
7
- multi-part book.</p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_block_elements"></a>Block Elements</h3></div></div></div><p>Block elements consist of one or more lines of text and may contain
8
- other block elements.</p><p>The AsciiDoc block structure can be informally summarized as follows
9
- <sup>[<a id="id36113202" href="#ftn.id36113202" class="footnote">1</a>]</sup>:</p><pre class="literallayout">Document ::= (Header?,Preamble?,Section*)
10
- Header ::= (Title,(AuthorInfo,RevisionInfo?)?)
11
- AuthorInfo ::= (FirstName,(MiddleName?,LastName)?,EmailAddress?)
12
- RevisionInfo ::= (RevisionNumber?,RevisionDate,RevisionRemark?)
13
- Preamble ::= (SectionBody)
14
- Section ::= (Title,SectionBody?,(Section)*)
15
- SectionBody ::= ((BlockTitle?,Block)|BlockMacro)+
16
- Block ::= (Paragraph|DelimitedBlock|List|Table)
17
- List ::= (BulletedList|NumberedList|LabeledList|CalloutList)
18
- BulletedList ::= (ListItem)+
19
- NumberedList ::= (ListItem)+
20
- CalloutList ::= (ListItem)+
21
- LabeledList ::= (ListEntry)+
22
- ListEntry ::= (ListLabel,ListItem)
23
- ListLabel ::= (ListTerm+)
24
- ListItem ::= (ItemText,(List|ListParagraph|ListContinuation)*)</pre><p>Where:</p><div class="itemizedlist"><ul type="disc"><li>
25
- <span class="emphasis"><em>?</em></span> implies zero or one occurrence, <span class="emphasis"><em>+</em></span> implies one or more
26
- occurrences, <span class="emphasis"><em>*</em></span> implies zero or more occurrences.
27
- </li><li>
28
- All block elements are separated by line boundaries.
29
- </li><li>
30
- <code class="literal">BlockId</code>, <code class="literal">AttributeEntry</code> and <code class="literal">AttributeList</code> block elements (not
31
- shown) can occur almost anywhere.
32
- </li><li>
33
- There are a number of document type and backend specific
34
- restrictions imposed on the block syntax.
35
- </li><li>
36
- The following elements cannot contain blank lines: Header, Title,
37
- Paragraph, ItemText.
38
- </li><li>
39
- A ListParagraph is a Paragraph with its <span class="emphasis"><em>listelement</em></span> option set.
40
- </li><li>
41
- A ListContinuation is a <a class="link" href="ar01s14.html#X15" title="List Item Continuation">list continuation element</a>.
42
- </li></ul></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="X95"></a>Header</h3></div></div></div><p>The Header contains document meta-data, typically title plus optional
43
- authorship and revision information:</p><div class="itemizedlist"><ul type="disc"><li>
44
- The Header is optional, but if it is used it must start with a
45
- document <a class="link" href="ar01s08.html" title="Titles">title</a>.
46
- </li><li>
47
- Optional Author and Revision information immediately follows the
48
- header title.
49
- </li><li>
50
- The document header must be separated from the remainder of the
51
- document by one or more blank lines and cannot contain blank lines.
52
- </li><li>
53
- The header can include comments.
54
- </li><li>
55
- The header can include <a class="link" href="ar01s24.html" title="Attribute Entries">attribute entries</a>, typically
56
- <span class="emphasis"><em>doctype</em></span>, <span class="emphasis"><em>lang</em></span>, <span class="emphasis"><em>encoding</em></span>, <span class="emphasis"><em>icons</em></span>, <span class="emphasis"><em>data-uri</em></span>, <span class="emphasis"><em>toc</em></span>,
57
- <span class="emphasis"><em>numbered</em></span>.
58
- </li><li>
59
- Header attributes are overridden by command-line attributes.
60
- </li><li>
61
- If the header contains non-UTF-8 characters then the <span class="emphasis"><em>encoding</em></span> must
62
- precede the header (either in the document or on the command-line).
63
- </li></ul></div><p>Here’s an example AsciiDoc document header:</p><pre class="literallayout">Writing Documentation using AsciiDoc
64
- ====================================
65
- Joe Bloggs &lt;jbloggs@mymail.com&gt;
66
- v2.0, February 2003:
67
- Rewritten for version 2 release.</pre><p>The author information line contains the author’s name optionally
68
- followed by the author’s email address. The author’s name is formatted
69
- like:</p><pre class="literallayout">firstname[ [middlename ]lastname][ &lt;email&gt;]]</pre><p>i.e. a first name followed by optional middle and last names followed
70
- by an email address in that order. Multi-word first, middle and last
71
- names can be entered using the underscore as a word separator. The
72
- email address comes last and must be enclosed in angle &lt;&gt; brackets.
73
- Here a some examples of author information lines:</p><pre class="literallayout">Joe Bloggs &lt;jbloggs@mymail.com&gt;
74
- Joe Bloggs
75
- Vincent Willem van_Gogh</pre><p>If the author line does not match the above specification then the
76
- entire author line is treated as the first name.</p><p>The optional revision information line follows the author information
77
- line. The revision information can be one of two formats:</p><div class="orderedlist"><ol type="1"><li><p>
78
- An optional document revision number followed by an optional
79
- revision date followed by an optional revision remark:
80
- </p><div class="itemizedlist"><ul type="disc"><li>
81
- If the revision number is specified it must be followed by a
82
- comma.
83
- </li><li>
84
- The revision number must contain at least one numeric character.
85
- </li><li>
86
- Any non-numeric characters preceding the first numeric character
87
- will be dropped.
88
- </li><li>
89
- If a revision remark is specified it must be preceded by a colon.
90
- The revision remark extends from the colon up to the next blank
91
- line, attribute entry or comment and is subject to normal text
92
- substitutions.
93
- </li><li>
94
- If a revision number or remark has been set but the revision date
95
- has not been set then the revision date is set to the value of the
96
- <span class="emphasis"><em>docdate</em></span> attribute.
97
- </li></ul></div></li><li>
98
- An RCS/CVS/SVN $Id$ marker (if an $Id$ revision marker is used the
99
- header author line can be omitted).
100
- </li></ol></div><p>Here a some examples of header revision lines:</p><pre class="literallayout">v2.0, February 2003
101
- February 2003
102
- v2.0,
103
- v2.0, February 2003: Rewritten for version 2 release.
104
- February 2003: Rewritten for version 2 release.
105
- v2.0,: Rewritten for version 2 release.
106
- :Rewritten for version 2 release.</pre><p>You can override or set header parameters by passing <span class="emphasis"><em>revnumber</em></span>,
107
- <span class="emphasis"><em>revremark</em></span>, <span class="emphasis"><em>revdate</em></span>, <span class="emphasis"><em>email</em></span>, <span class="emphasis"><em>author</em></span>, <span class="emphasis"><em>authorinitials</em></span>,
108
- <span class="emphasis"><em>firstname</em></span> and <span class="emphasis"><em>lastname</em></span> attributes using the asciidoc(1) <code class="literal">-a</code>
109
- (<code class="literal">--attribute</code>) command-line option. For example:</p><pre class="literallayout">$ asciidoc -a revdate=2004/07/27 article.txt</pre><p>The <span class="emphasis"><em>revnumber</em></span> attribute can be an RCS/CVS/SVN $Id$ marker.
110
- Attributes can also be added to the header for substitution in the
111
- header template with <a class="link" href="ar01s24.html" title="Attribute Entries">Attribute Entry</a> elements.</p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="X87"></a>Additional document header information</h4></div></div></div><p><span class="emphasis"><em>docinfo</em></span> files are a mechanism for optionally including additional
112
- meta-data in the header of the output document.</p><p>Two docinfo files are recognized: one named <code class="literal">docinfo</code> and a second
113
- named like the AsciiDoc source file with a <code class="literal">-docinfo</code> suffix. For
114
- example, if the source document is called <code class="literal">mydoc.txt</code> then the
115
- document information files would be <code class="literal">docinfo.xml</code> and
116
- <code class="literal">mydoc-docinfo.xml</code> (for DocBook outputs) and <code class="literal">docinfo.html</code> and
117
- <code class="literal">mydoc-docinfo.html</code> (for HTML outputs).</p><p>The <a class="link" href="aph.html#X97">docinfo</a> attributes control which
118
- docinfo files are included in the output files.</p><p>The contents docinfo file is dependent on the type of output:</p><div class="variablelist"><dl><dt><span class="term">
119
- HTML
120
- </span></dt><dd>
121
- Valid <span class="emphasis"><em>head</em></span> child elements. Typically <span class="emphasis"><em>style</em></span> and <span class="emphasis"><em>script</em></span> elements
122
- for CSS and JavaScript inclusion.
123
- </dd><dt><span class="term">
124
- DocBook
125
- </span></dt><dd>
126
- Valid <span class="emphasis"><em>articleinfo</em></span> or <span class="emphasis"><em>bookinfo</em></span> child elements. DocBook defines
127
- numerous elements for document meta-data, for example: copyrights,
128
- document history and authorship information. See the DocBook
129
- <code class="literal">./doc/article-docinfo.xml</code> example that comes with the AsciiDoc
130
- distribution. The rendering of meta-data elements (or not) is
131
- DocBook processor dependent.
132
- </dd></dl></div></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="X86"></a>Preamble</h3></div></div></div><p>The Preamble is an optional untitled section body between the document
133
- Header and the first Section title.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_sections"></a>Sections</h3></div></div></div><p>In addition to the document title (level 0), AsciiDoc supports four
134
- section levels: 1 (top) to 4 (bottom). Section levels are delimited
135
- by section <a class="link" href="ar01s08.html" title="Titles">titles</a>. Sections are translated using
136
- configuration file <a class="link" href="ar01s05.html#X93" title="Section markup templates">section markup templates</a>. AsciiDoc
137
- generates the following <a class="link" href="ar01s27.html" title="Intrinsic Attributes">intrinsic attributes</a> specifically for
138
- use in section markup templates:</p><div class="variablelist"><dl><dt><span class="term">
139
- level
140
- </span></dt><dd>
141
- The <code class="literal">level</code> attribute is the section level number, it is normally just
142
- the <a class="link" href="ar01s08.html" title="Titles">title</a> level number (1..4). However, if the <code class="literal">leveloffset</code>
143
- attribute is defined it will be added to the <code class="literal">level</code> attribute. The
144
- <code class="literal">leveloffset</code> attribute is useful for <a class="link" href="ar01s33.html#X90" title="Combining separate documents">combining documents</a>.
145
- </dd><dt><span class="term">
146
- sectnum
147
- </span></dt><dd>
148
- The <code class="literal">-n</code> (<code class="literal">--section-numbers</code>) command-line option generates the
149
- <code class="literal">sectnum</code> (section number) attribute. The <code class="literal">sectnum</code> attribute is used
150
- for section numbers in HTML outputs (DocBook section numbering are
151
- handled automatically by the DocBook toolchain commands).
152
- </dd></dl></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="X93"></a>Section markup templates</h4></div></div></div><p>Section markup templates specify output markup and are defined in
153
- AsciiDoc configuration files. Section markup template names are
154
- derived as follows (in order of precedence):</p><div class="orderedlist"><ol type="1"><li><p>
155
- From the title’s first positional attribute or <span class="emphasis"><em>template</em></span>
156
- attribute. For example, the following three section titles are
157
- functionally equivalent:
158
- </p><pre class="literallayout">[[terms]]
159
- [glossary]
160
- List of Terms
161
- -------------
162
-
163
- ["glossary",id="terms"]
164
- List of Terms
165
- -------------
166
-
167
- [template="glossary",id="terms"]
168
- List of Terms
169
- -------------</pre></li><li>
170
- When the title text matches a configuration file
171
- <a class="link" href="ar01s05.html#X16" title="Special Section Titles"><code class="literal">[specialsections]</code></a> entry.
172
- </li><li>
173
- If neither of the above the default <code class="literal">sect&lt;level&gt;</code> template is used
174
- (where <code class="literal">&lt;level&gt;</code> is a number from 1 to 4).
175
- </li></ol></div><p>In addition to the normal section template names (<span class="emphasis"><em>sect1</em></span>, <span class="emphasis"><em>sect2</em></span>,
176
- <span class="emphasis"><em>sect3</em></span>, <span class="emphasis"><em>sect4</em></span>) AsciiDoc has the following templates for
177
- frontmatter, backmatter and other special sections: <span class="emphasis"><em>abstract</em></span>,
178
- <span class="emphasis"><em>preface</em></span>, <span class="emphasis"><em>colophon</em></span>, <span class="emphasis"><em>dedication</em></span>, <span class="emphasis"><em>glossary</em></span>, <span class="emphasis"><em>bibliography</em></span>,
179
- <span class="emphasis"><em>synopsis</em></span>, <span class="emphasis"><em>appendix</em></span>, <span class="emphasis"><em>index</em></span>. These special section templates
180
- generate the corresponding Docbook elements; for HTML outputs they
181
- default to the <span class="emphasis"><em>sect1</em></span> section template.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="_section_ids"></a>Section IDs</h4></div></div></div><p>If no explicit section ID is specified an ID will be synthesised from
182
- the section title. The primary purpose of this feature is to ensure
183
- persistence of table of contents links (permalinks): the missing
184
- section IDs are generated dynamically by the JavaScript TOC generator
185
- <span class="strong"><strong>after</strong></span> the page is loaded. If you link to a dynamically generated TOC
186
- address the page will load but the browser will ignore the (as yet
187
- ungenerated) section ID.</p><p>The IDs are generated by the following algorithm:</p><div class="itemizedlist"><ul type="disc"><li>
188
- Replace all non-alphanumeric title characters with underscores.
189
- </li><li>
190
- Strip leading or trailing underscores.
191
- </li><li>
192
- Convert to lowercase.
193
- </li><li>
194
- Prepend the <code class="literal">idprefix</code> attribute (so there’s no possibility of name
195
- clashes with existing document IDs). Prepend an underscore if the
196
- <code class="literal">idprefix</code> attribute is not defined.
197
- </li><li>
198
- A numbered suffix (<code class="literal">_2</code>, <code class="literal">_3</code> …) is added if a same named
199
- auto-generated section ID exists.
200
- </li></ul></div><p>For example the title <span class="emphasis"><em>Jim’s House</em></span> would generate the ID
201
- <code class="literal">_jim_s_house</code>.</p><p>Section ID synthesis can be disabled by undefining the <code class="literal">sectids</code>
202
- attribute.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="X16"></a>Special Section Titles</h4></div></div></div><p>AsciiDoc has a mechanism for mapping predefined section titles
203
- auto-magically to specific markup templates. For example a title
204
- <span class="emphasis"><em>Appendix A: Code Reference</em></span> will automatically use the <span class="emphasis"><em>appendix</em></span>
205
- <a class="link" href="ar01s05.html#X93" title="Section markup templates">section markup template</a>. The mappings from title to template
206
- name are specified in <code class="literal">[specialsections]</code> sections in the Asciidoc
207
- language configuration files (<code class="literal">lang-*.conf</code>). Section entries are
208
- formatted like:</p><pre class="literallayout">&lt;title&gt;=&lt;template&gt;</pre><p><code class="literal">&lt;title&gt;</code> is a Python regular expression and <code class="literal">&lt;template&gt;</code> is the name
209
- of a configuration file markup template section. If the <code class="literal">&lt;title&gt;</code>
210
- matches an AsciiDoc document section title then the backend output is
211
- marked up using the <code class="literal">&lt;template&gt;</code> markup template (instead of the
212
- default <code class="literal">sect&lt;level&gt;</code> section template). The <code class="literal">{title}</code> attribute value
213
- is set to the value of the matched regular expression group named
214
- <span class="emphasis"><em>title</em></span>, if there is no <span class="emphasis"><em>title</em></span> group <code class="literal">{title}</code> defaults to the whole
215
- of the AsciiDoc section title. If <code class="literal">&lt;template&gt;</code> is blank then any
216
- existing entry with the same <code class="literal">&lt;title&gt;</code> will be deleted.</p><div class="sidebar"><p class="title"><b>Special section titles vs. explicit template names</b></p><p>AsciiDoc has two mechanisms for specifying non-default section markup
217
- templates: you can specify the template name explicitly (using the
218
- <span class="emphasis"><em>template</em></span> attribute) or indirectly (using <span class="emphasis"><em>special section titles</em></span>).
219
- Specifying a <a class="link" href="ar01s05.html#X93" title="Section markup templates">section template</a> attribute explicitly is
220
- preferred. Auto-magical <span class="emphasis"><em>special section titles</em></span> have the following
221
- drawbacks:</p><div class="itemizedlist"><ul type="disc"><li>
222
- They are non-obvious, you have to know the exact matching
223
- title for each special section on a language by language basis.
224
- </li><li>
225
- Section titles are predefined and can only be customised with a
226
- configuration change.
227
- </li><li>
228
- The implementation is complicated by multiple languages: every
229
- special section title has to be defined for each language (in each
230
- of the <code class="literal">lang-*.conf</code> files).
231
- </li></ul></div><p>Specifying special section template names explicitly does add more
232
- noise to the source document (the <span class="emphasis"><em>template</em></span> attribute declaration),
233
- but the intention is obvious and the syntax is consistent with other
234
- AsciiDoc elements c.f. bibliographic, Q&amp;A and glossary lists.</p><p>Special section titles have been deprecated but are retained for
235
- backward compatibility.</p></div></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_inline_elements"></a>Inline Elements</h3></div></div></div><p><a class="link" href="go01.html#X34">Inline document elements</a> are used to format text and to
236
- perform various types of text substitution. Inline elements and inline
237
- element syntax is defined in the asciidoc(1) configuration files.</p><p>Here is a list of AsciiDoc inline elements in the (default) order in
238
- which they are processed:</p><div class="variablelist"><dl><dt><span class="term">
239
- Special characters
240
- </span></dt><dd>
241
- These character sequences escape special characters used by
242
- the backend markup (typically <code class="literal">&lt;</code>, <code class="literal">&gt;</code>, and <code class="literal">&amp;</code> characters).
243
- See <code class="literal">[specialcharacters]</code> configuration file sections.
244
- </dd><dt><span class="term">
245
- Quotes
246
- </span></dt><dd>
247
- Elements that markup words and phrases; usually for character
248
- formatting. See <code class="literal">[quotes]</code> configuration file sections.
249
- </dd><dt><span class="term">
250
- Special Words
251
- </span></dt><dd>
252
- Word or word phrase patterns singled out for markup without
253
- the need for further annotation. See <code class="literal">[specialwords]</code>
254
- configuration file sections.
255
- </dd><dt><span class="term">
256
- Replacements
257
- </span></dt><dd>
258
- Each replacement defines a word or word phrase pattern to
259
- search for along with corresponding replacement text. See
260
- <code class="literal">[replacements]</code> configuration file sections.
261
- </dd><dt><span class="term">
262
- Attribute references
263
- </span></dt><dd>
264
- Document attribute names enclosed in braces are replaced by
265
- the corresponding attribute value.
266
- </dd><dt><span class="term">
267
- Inline Macros
268
- </span></dt><dd>
269
- Inline macros are replaced by the contents of parametrized
270
- configuration file sections.
271
- </dd></dl></div></div><div class="footnotes"><br /><hr width="100" align="left" /><div class="footnote"><p><sup>[<a id="ftn.id36113202" href="#id36113202" class="simpara">1</a>] </sup>This is a rough structural guide, not a rigorous syntax
272
- definition</p></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s04.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="ar01s06.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">AsciiDoc Backends </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Document Processing</td></tr></table></div></body></html>
@@ -1,35 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Document Processing</title><link rel="stylesheet" href="stylesheets/handbookish.css" type="text/css" /><meta name="generator" content="DocBook XSL Stylesheets V1.74.1" /><link rel="home" href="index.html" title="AsciiDoc User Guide" /><link rel="up" href="index.html" title="AsciiDoc User Guide" /><link rel="prev" href="ar01s05.html" title="Document Structure" /><link rel="next" href="ar01s07.html" title="Text Formatting" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Document Processing</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s05.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ar01s07.html">Next</a></td></tr></table><hr /></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_document_processing"></a>Document Processing</h2></div></div></div><p>The AsciiDoc source document is read and processed as follows:</p><div class="orderedlist"><ol type="1"><li>
4
- The document <span class="emphasis"><em>Header</em></span> is parsed, header parameter values are
5
- substituted into the configuration file <code class="literal">[header]</code> template section
6
- which is then written to the output file.
7
- </li><li>
8
- Each document <span class="emphasis"><em>Section</em></span> is processed and its constituent elements
9
- translated to the output file.
10
- </li><li>
11
- The configuration file <code class="literal">[footer]</code> template section is substituted
12
- and written to the output file.
13
- </li></ol></div><p>When a block element is encountered asciidoc(1) determines the type of
14
- block by checking in the following order (first to last): (section)
15
- Titles, BlockMacros, Lists, DelimitedBlocks, Tables, AttributeEntrys,
16
- AttributeLists, BlockTitles, Paragraphs.</p><p>The default paragraph definition <code class="literal">[paradef-default]</code> is last element
17
- to be checked.</p><p>Knowing the parsing order will help you devise unambiguous macro, list
18
- and block syntax rules.</p><p>Inline substitutions within block elements are performed in the
19
- following default order:</p><div class="orderedlist"><ol type="1"><li>
20
- Special characters
21
- </li><li>
22
- Quotes
23
- </li><li>
24
- Special words
25
- </li><li>
26
- Replacements
27
- </li><li>
28
- Attributes
29
- </li><li>
30
- Inline Macros
31
- </li><li>
32
- Replacements2
33
- </li></ol></div><p>The substitutions and substitution order performed on
34
- Title, Paragraph and DelimitedBlock elements is determined by
35
- configuration file parameters.</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s05.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="ar01s07.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Document Structure </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Text Formatting</td></tr></table></div></body></html>
@@ -1,105 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Text Formatting</title><link rel="stylesheet" href="stylesheets/handbookish.css" type="text/css" /><meta name="generator" content="DocBook XSL Stylesheets V1.74.1" /><link rel="home" href="index.html" title="AsciiDoc User Guide" /><link rel="up" href="index.html" title="AsciiDoc User Guide" /><link rel="prev" href="ar01s06.html" title="Document Processing" /><link rel="next" href="ar01s08.html" title="Titles" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Text Formatting</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s06.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ar01s08.html">Next</a></td></tr></table><hr /></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_text_formatting"></a>Text Formatting</h2></div></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="X51"></a>Quoted Text</h3></div></div></div><p>Words and phrases can be formatted by enclosing inline text with
4
- quote characters:</p><div class="variablelist"><dl><dt><span class="term">
5
- <span class="emphasis"><em>Emphasized text</em></span>
6
- </span></dt><dd>
7
- Word phrases 'enclosed in single quote characters' (acute
8
- accents) or _underline characters_ are emphasized.
9
- </dd><dt><span class="term">
10
- <span class="strong"><strong>Strong text</strong></span>
11
- </span></dt><dd>
12
- Word phrases *enclosed in asterisk characters* are rendered
13
- in a strong font (usually bold).
14
- </dd><dt><span class="term">
15
- <a id="X81"></a><code class="literal">Monospaced text</code>
16
- </span></dt><dd>
17
- Word phrases +enclosed in plus characters+ are rendered in a
18
- monospaced font. Word phrases `enclosed in backtick
19
- characters` (grave accents) are also rendered in a monospaced
20
- font but in this case the enclosed text is rendered literally
21
- and is not subject to further expansion (see <a class="link" href="ar01s18.html#X80">inline literal</a>).
22
- </dd><dt><span class="term">
23
- ‘Single quoted text’
24
- </span></dt><dd>
25
- Phrases enclosed with a `single grave accent to the left and
26
- a single acute accent to the right' are rendered in single
27
- quotation marks.
28
- </dd><dt><span class="term">
29
- “Double quoted text”
30
- </span></dt><dd>
31
- Phrases enclosed with ``two grave accents to the left and
32
- two acute accents to the right'' are rendered in quotation
33
- marks.
34
- </dd><dt><span class="term">
35
- Unquoted text
36
- </span></dt><dd>
37
- Placing #hashes around text# does nothing, it is a mechanism
38
- to allow inline attributes to be applied to otherwise
39
- unformatted text.
40
- </dd></dl></div><p>New quote types can be defined by editing asciidoc(1) configuration
41
- files. See the <a class="link" href="ar01s22.html" title="Configuration Files">Configuration Files</a> section for details.</p><div class="itemizedlist"><p class="title"><b>Quoted text behavior</b></p><ul type="disc"><li>
42
- Quoting cannot be overlapped.
43
- </li><li>
44
- Different quoting types can be nested.
45
- </li><li>
46
- To suppress quoted text formatting place a backslash character
47
- immediately in front of the leading quote character(s). In the case
48
- of ambiguity between escaped and non-escaped text you will need to
49
- escape both leading and trailing quotes, in the case of
50
- multi-character quotes you may even need to escape individual
51
- characters.
52
- </li></ul></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="X96"></a>Quoted text attributes</h4></div></div></div><p>Quoted text can be prefixed with an <a class="link" href="ar01s25.html" title="Attribute Lists">attribute list</a>. The first
53
- positional attribute is translated by AsciiDoc to an HTML <span class="emphasis"><em>span</em></span>
54
- element <span class="emphasis"><em>class</em></span> attribute or a DocBook <span class="emphasis"><em>phrase</em></span> element <span class="emphasis"><em>role</em></span>
55
- attribute.</p><p>DocBook XSL Stylesheets translate DocBook <span class="emphasis"><em>phrase</em></span> elements with
56
- <span class="emphasis"><em>role</em></span> attributes to corresponding HTML <span class="emphasis"><em>span</em></span> elements with the same
57
- <span class="emphasis"><em>class</em></span> attributes; CSS can then be used
58
- <a class="ulink" href="http://www.sagehill.net/docbookxsl/UsingCSS.html" target="_top">to style the
59
- generated HTML</a>.</p><p>Thus CSS styling can be applied to both DocBook and AsciiDoc generated
60
- HTML outputs from the same AsciiDoc source. You can also specify
61
- multiple class names separated by spaces. Examples:</p><pre class="literallayout">[red]#obvious#
62
- [big red yellowback]*very obvious*</pre><p>The following CSS rules for <span class="emphasis"><em>big</em></span>, <span class="emphasis"><em>red</em></span> and <span class="emphasis"><em>yellowback</em></span> class names
63
- could be used to style HTML outputs generated from the previous
64
- examples:</p><pre class="literallayout">span.big { font-size: 2em; }
65
- span.red { color: #e3372e; }
66
- span.yellowback { background: #faf519; }</pre></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="X52"></a>Constrained and Unconstrained Quotes</h4></div></div></div><p>There are actually two types of quotes:</p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h5 class="title"><a id="_constrained_quotes"></a>Constrained quotes</h5></div></div></div><p>Quoted must be bounded by white space or commonly adjoining
67
- punctuation characters. These are the most commonly used type of
68
- quote.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h5 class="title"><a id="_unconstrained_quotes"></a>Unconstrained quotes</h5></div></div></div><p>Unconstrained quotes have no boundary constraints and can be placed
69
- anywhere within inline text. For consistency and to make them easier
70
- to remember unconstrained quotes are double-ups of the <code class="literal">_</code>, <code class="literal">*</code>, <code class="literal">+</code>
71
- and <code class="literal">#</code> constrained quotes:</p><pre class="literallayout">__unconstrained emphasized text__
72
- **unconstrained strong text**
73
- ++unconstrained monospaced text++
74
- ##unconstrained unquoted text##</pre><p>The following example emboldens the letter F:</p><pre class="literallayout">**F**ile Open...</pre></div></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_superscripts_and_subscripts"></a>Superscripts and Subscripts</h3></div></div></div><p>Put ^carets on either^ side of the text to be superscripted, put
75
- ~tildes on either side~ of text to be subscripted. For example, the
76
- following line:</p><pre class="literallayout">e^&amp;#960;i^+1 = 0. H~2~O and x^10^. Some ^super text^
77
- and ~some sub text~</pre><p>Is rendered like:</p><p>e<sup>πi</sup>+1 = 0. H<sub>2</sub>O and x<sup>10</sup>. Some <sup>super text</sup>
78
- and <sub>some sub text</sub></p><p>Superscripts and subscripts are implemented as <a class="link" href="ar01s07.html#X52" title="Constrained and Unconstrained Quotes">unconstrained quotes</a> and they can be escaped with a leading backslash and prefixed
79
- with with an attribute list.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_line_breaks"></a>Line Breaks</h3></div></div></div><p>A plus character preceded by at least one space character at the end
80
- of a non-blank line forces a line break. It generates a line break
81
- (<code class="literal">br</code>) tag for HTML outputs and a custom XML <code class="literal">asciidoc-br</code> processing
82
- instruction for DocBook outputs. The <code class="literal">asciidoc-br</code> processing
83
- instruction is handled by <a class="link" href="ar01s30.html#X43" title="a2x Toolchain Wrapper">a2x(1)</a>.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_page_breaks"></a>Page Breaks</h3></div></div></div><p>A line of three or more less-than (<code class="literal">&lt;&lt;&lt;</code>) characters will generate a
84
- hard page break in DocBook and printed HTML outputs. It uses the CSS
85
- <code class="literal">page-break-after</code> property for HTML outputs and a custom XML
86
- <code class="literal">asciidoc-pagebreak</code> processing instruction for DocBook outputs. The
87
- <code class="literal">asciidoc-pagebreak</code> processing instruction is handled by
88
- <a class="link" href="ar01s30.html#X43" title="a2x Toolchain Wrapper">a2x(1)</a>. Hard page breaks are sometimes handy but as a general
89
- rule you should let your page processor generate page breaks for you.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_rulers"></a>Rulers</h3></div></div></div><p>A line of three or more apostrophe characters will generate a ruler
90
- line. It generates a ruler (<code class="literal">hr</code>) tag for HTML outputs and a custom
91
- XML <code class="literal">asciidoc-hr</code> processing instruction for DocBook outputs. The
92
- <code class="literal">asciidoc-hr</code> processing instruction is handled by <a class="link" href="ar01s30.html#X43" title="a2x Toolchain Wrapper">a2x(1)</a>.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_tabs"></a>Tabs</h3></div></div></div><p>By default tab characters input files will translated to 8 spaces. Tab
93
- expansion is set with the <span class="emphasis"><em>tabsize</em></span> entry in the configuration file
94
- <code class="literal">[miscellaneous]</code> section and can be overridden in included files by
95
- setting a <span class="emphasis"><em>tabsize</em></span> attribute in the <code class="literal">include</code> macro’s attribute list.
96
- For example:</p><pre class="literallayout">include::addendum.txt[tabsize=2]</pre><p>The tab size can also be set using the attribute command-line option,
97
- for example <code class="literal">--attribute tabsize=4</code></p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_replacements"></a>Replacements</h3></div></div></div><p>The following replacements are defined in the default AsciiDoc
98
- configuration:</p><pre class="literallayout">(C) copyright, (TM) trademark, (R) registered trademark,
99
- -- em dash, ... ellipsis, -&gt; right arrow, &lt;- left arrow, =&gt; right
100
- double arrow, &lt;= left double arrow.</pre><p>Which are rendered as:</p><p>© copyright, ™ trademark, ® registered trademark, — em dash, … ellipsis, → right arrow, ← left arrow, ⇒ right
101
- double arrow, ⇐ left double arrow.</p><p>You can also include arbitrary entity references in the AsciiDoc
102
- source. Examples:</p><pre class="literallayout">&amp;#x278a; &amp;#182;</pre><p>renders:</p><p>➊ ¶</p><p>To render a replacement literally escape it with a leading back-slash.</p><p>The <a class="link" href="ar01s22.html" title="Configuration Files">Configuration Files</a> section explains how to configure your
103
- own replacements.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_special_words"></a>Special Words</h3></div></div></div><p>Words defined in <code class="literal">[specialwords]</code> configuration file sections are
104
- automatically marked up without having to be explicitly notated.</p><p>The <a class="link" href="ar01s22.html" title="Configuration Files">Configuration Files</a> section explains how to add and replace
105
- special words.</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s06.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="ar01s08.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Document Processing </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Titles</td></tr></table></div></body></html>