Conventions:
syntax | docbook | description |
---|---|---|
|
monospaced |
monospaced text |
|
|
generic |
|
|
literal commands typed by user or |
|
|
+replaceable+ or |
|
user inp+replbl |
+user input replaceable+ or |
|
|
emphasized text and new terms. |
|
|
URLs, email addresses, filenames, and file extensions |
|
|
[role="filename"]'/pathto/file.ext' |
|
|
[role="citetitle"]'Hadoop' |
|
bold text |
bold text should not be used for emphasis — use underscores. |
|
super/subscripts |
H2O and 25 = 32. Subscripts and superscripts. For mathematical equations, italicize the variables: x2 + y2 = z2 |
|
||
[1]` |
footnotes |
footnote[2]. Put them belly-up against text and following the punctuation — |
|
figure titles |
Titles for figures, tables, examples, and sidebars, but not sections. |
.Image \n image::path/image.jpg |
image | |
---|---|---|
|
|
underbars |
|
code block |
|
|
sidebar |
|
`.Table \n [options="header"] \n |
==== \n` |
table |
|
secret message |
|
plus |
|
NOTE, TIP, WARNING, CAUTION |
| :HS | Half Sentence | :Comment | General editorial comment | :FIN | Chapter / section needs finishing, conclusion, summary
Somewhere nearby is [FIG1_syntax] (a figure, titled and cross-referenced).
[[FIG_syntax]] .A figure image::images/quadkeys-numbering-zl0-zl1.png[alt="This is the alt text" width="222px"]
Inline code block. You can use include::code/HelloWorld.rb[]
to pull it in from a separate file.
[source,java] CODE_BLOCK_NOTE = Standard line length for code is 85 in an "Animal" book:" STANDARD LINE_FORMAT = <<-EOF 0 10 20 30 40 50 60 70 80 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345 EOF
Contrast the code block above with An Example, which is a formal code example (titled and cross-referenced).
[source,ruby] CODE_BLOCK_NOTE = "Note that the line length is a bit longer here (90 in an Animal):" LINE_FORMAT = <<-EOF 0 10 20 30 40 50 60 70 80 9 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 EOF
[[STD_TABLE]] .A Table [options="header"] |======= | syntax | docbook | description | `+plus signs+` | monospaced | +monospaced text+ |=======
Here are some admonitions:
Note
|
O’Reilly Animal books traditionally make no distinction between the DocBook <note>, <tip>, and <important> elements. |
Tip
|
Titled Admonition
We do support optional titles in admonitions (in most series). |
Warning
|
O’Reilly Animal books traditionally make no distinction between the DocBook <warning> and <caution> elements. |
Caution
|
O’Reilly Animal books traditionally make no distinction between the DocBook <warning> and <caution> elements. |