doc/documentation/content/en/books/fdp-primer/rosetta/chapter.adoc
Sergio Carlavilla Delgado ab8cd36cda Improve the column widths of various pages in the FDP
Patch by:               allanjude@
Differential Revision:  https://reviews.freebsd.org/D28358
2021-01-26 20:45:47 +01:00

283 lines
4 KiB
Text

---
title: Chapter 7. Rosetta Stone
prev: books/fdp-primer/asciidoctor-primer
next: books/fdp-primer/translations
---
[[rosetta]]
= Rosetta Stone
:doctype: book
:toc: macro
:toclevels: 1
:icons: font
:sectnums:
:sectnumlevels: 6
:source-highlighter: rouge
:experimental:
:skip-front-matter:
:xrefstyle: basic
:relfileprefix: ../
:outfilesuffix:
:sectnumoffset: 7
toc::[]
[[docbook-vs-asciidoc]]
== Comparision between Docbook and AsciiDoc
This rosetta stone tries to show the differences between Docbook and AsciiDoc.
.Comparision between Docbook and AsciiDoc
[cols="1,4,4"]
|===
|Language Feature |Docbook | AsciiDoc
|*Bold*
|<keycap>bold</keycap>
|\*bold*
|*Italic*
|<emphasis>Italic</emphasis>
|\_Italic_
|*Monospace*
|<literal>Monospace</literal>
|\`Monospace`
|*Paragraph*
|<para>This is a paragraph</para>
|This is a paragraph
|*Keycap*
|<keycap>F11</keycap>
|\kbd:[F11]
|*Links*
a|
[source,xml]
----
<link xlink:href="https://www.freebsd.org/where/">Download FreeBSD</link>
----
a|
[source]
----
link:https://www.freebsd.org/where/[Download FreeBSD]
----
|*Sections*
a|
[source,xml]
----
<sect1 xml:id="id">
<title>Section 1</title>
</sect1>
----
a|
[source]
----
[[id]]
= Section 1
----
|*Unordered list*
a|
[source,xml]
----
<itemizedlist>
<listitem>
<para>When to build a custom kernel.</para>
</listitem>
<listitem>
<para>How to take a hardware inventory.</para>
</listitem>
</itemizedlist>
----
a|
[source]
----
* When to build a custom kernel.
* How to take a hardware inventory.
----
|*Ordered list*
a|
[source,xml]
----
<orderedlist>
<listitem>
<para>One</para>
</listitem>
<listitem>
<para>Two</para>
</listitem>
<listitem>
<para>Three</para>
</listitem>
<listitem>
<para>Four</para>
</listitem>
</orderedlist>
----
a|
[source]
----
. One
. Two
. Three
. Four
----
|*Variable list*
a|
[source,xml]
----
<variablelist>
<varlistentry>
<term>amd64</term>
<listitem>
<para>This is the most common desktop...</para>
</listitem>
</varlistentry>
</variablelist>
----
a|
[source]
----
amd64::
This is the most common desktop...
----
|*Source code*
a|
[source,xml]
----
<screen>
&prompt.root; <userinput>mkdir -p /var/</userinput>
</screen>
----
a|
[source]
....
[source,bash]
----
# mkdir -p /var/spool/lpd/lp
----
....
|*Literal block*
a|
[source,xml]
----
<programlisting>
include GENERIC
ident MYKERNEL
options IPFIREWALL
options DUMMYNET
options IPFIREWALL_DEFAULT_TO_ACCEPT
options IPDIVERT
</programlisting>
----
a|
[source]
----
....
include GENERIC
ident MYKERNEL
options IPFIREWALL
options DUMMYNET
options IPFIREWALL_DEFAULT_TO_ACCEPT
options IPDIVERT
....
----
|*Images*
a|
[source,xml]
----
<figure xml:id="bsdinstall-newboot-loader-menu">
<title>FreeBSD Boot Loader Menu</title>
<mediaobject>
<imageobject>
<imagedata fileref="bsdinstall/bsdinstall-newboot-loader-menu"/>
</imageobject>
</mediaobject>
</figure>
----
a|
[source]
----
[[bsdinstall-newboot-loader-menu]]
.FreeBSD Boot Loader Menu
image::bsdinstall/bsdinstall-newboot-loader-menu
----
|*Includes*
|n/a
a|
[source]
----
\include::chapter.adoc[]
----
|*Tables*
a|
[source,xml]
----
<table xml:id="partition-schemes" frame="none" rowsep="1" pgwide="1">
<title>Partitioning Schemes</title>
<tgroup cols="2" align="left">
<thead>
<row>
<entry align="left">Abbreviation</entry>
<entry align="left">Description</entry>
</row>
</thead>
<tbody>
<row>
<entry>APM</entry>
<entry>Apple Partition Map, used by PowerPC(R).</entry>
</row>
</tbody>
</tgroup>
</table>
----
a|
[source]
----
[[partition-schemes]]
.Partitioning Schemes
[cols="1,1", frame="none", options="header"]
\|===
\| Abbreviation
\| Description
\|APM
\|Apple Partition Map, used by PowerPC(R).
\|===
----
|*Admonitions*
a|
[source,xml]
----
<tip>
<para>This is a tip</para>
</tip>
----
a|
[source]
----
[TIP]
====
This is a tip
====
----
|===