Filenames could be shown in a “typewriter” style font for viewing on screen, but as “italics” when printed, or any of a myriad of other options for presentation.
It was once hoped that Artificial Intelligence (AI) would make this easy.
-The computer would read the document and automatically identify key phrases, filenames, text that the reader should type in, examples, and more.
+The computer would read the document and automatically identify key phrases, filenames, text that the reader should type in, examples, and more.
Unfortunately, real life has not happened quite like that, and computers still require assistance before they can meaningfully process text.
More precisely, they need help identifying what is what.
@@ -137,7 +137,7 @@
[[asciidoctor-paragraphs]]
== Paragraphs
-Paragraphs don't require special markup in AsciiDoc.
+Paragraphs do not require special markup in AsciiDoc.
A paragraph is defined by one or more consecutive lines of text.
To create a new paragraph leave one blank line.
@@ -222,7 +222,7 @@
=== Links to another book or article
To point to another book or article the Asciidoctor variables should be used.
-For example, if we are in the `cups` article and we want to point to `ipsec-must` these steps should be used.
+For example, in the `cups` article, to point to `ipsec-must` these steps should be used.
. Include the [.filename]#urls.adoc# file from [.filename]#~/doc/shared# folder.
+
@@ -297,7 +297,7 @@
The next step will be to configure the Asciidoctor attributes `images-path` and `imagesdir`.
-We are going to use as an example the header of the extref:{freebsd-releng}[FreeBSD Release Engineering] article.
+Here is the example header of the extref:{freebsd-releng}[FreeBSD Release Engineering] article.
[source,asciidoc]
....
@@ -333,7 +333,7 @@
[TIP]
====
-To improve accessibility, it is mandatory to add descriptive text to each image.
+To improve accessibility, it is mandatory to add descriptive text to each image as shown in the example above.
====
[[asciidoctor-icons]]
@@ -360,6 +360,199 @@
To improve the accessibility of the website, the `title` attribute is mandatory.
====
+== Creating an Index in FDP Articles and Books
+
+Creating an index in FreeBSD Documentation Project documents is easy, because the index tooling is already built into Asciidoctor.
+An index is simply a new section in a document or a new chapter in a book.
+Here's a quick summary on how to generate an index for FreeBSD FDP books, articles, and multi-part documents.
+
+[NOTE]
+====
+The FDP toolkit does not generate an index for HTML output, only PDF output.
+====
+
+=== Creating an Index for Article Documents
+
+Articles are single-part documents as opposed to muli-part documents like books.
+If the article is short - one or two pages - an index is hardly worth the trouble.
+But for larger articles, it can help the reader to easily locate specific terms.
+
+[TIP]
+====
+Asciidoctor only allows level 1 headings (== MyHeading) and higher levels for articles.
+It does not allow level 0 headings (= MyHeading) for articles, only books.
+====
+
+Here is a procedure for creating an index for an article.
+
+[.procedure]
+====
+. Decide where to place the index.
+The best location is usually at the end of the article.
++
+. Add a new section to the bottom of the _index.adoc file.
+This tells Asciidoctor where the index is to be placed.
+Use the following construction:
++
+ [[index]]
+ == Index
++
+. Continue below with "Tagging Terms for an Index"
+====
+
+=== Creating an Index for Book Documents
+
+There are several additional steps necessary for building a book index.
+An index is a new chapter, and the steps below show how to integrate the new chapter into an existing book.
+
+[.procedure]
+====
+. Create a new chapter by copying an existing chapter.
+Usually, copying the last existing chapter works well.
+Here, `chapter10` is used as the name of the last chapter.
++
+ cd <bookdir>
+ cp -av chapter10 index
++
+Change the front matter in the [.filename]#index/_index.adoc# as described below.
+Change the title, "prev:" field, and the "weight:" value.