---
title: Appendix A. Examples
prev: books/fdp-primer/see-also/
description: Example of an article and a book used in the FreeBSD Documentation Project
tags: ["examples", "tutorial", "AsciiDoctor", "Book", "Article"]
showBookMenu: true
weight: 16
params:
  path: "/books/fdp-primer/examples/"
---

[appendix]
[[examples]]
= Examples
:doctype: book
:toc: macro
:toclevels: 1
:icons: font
:sectnums:
:sectnumlevels: 6
:sectnumoffset: A
:partnums:
:source-highlighter: rouge
:experimental:
:images-path: books/fdp-primer/

ifdef::env-beastie[]
ifdef::backend-html5[]
:imagesdir: ../../../../images/{images-path}
endif::[]
ifndef::book[]
include::shared/authors.adoc[]
include::shared/mirrors.adoc[]
include::shared/releases.adoc[]
include::shared/attributes/attributes-{{% lang %}}.adoc[]
include::shared/{{% lang %}}/teams.adoc[]
include::shared/{{% lang %}}/mailing-lists.adoc[]
include::shared/{{% lang %}}/urls.adoc[]
toc::[]
endif::[]
ifdef::backend-pdf,backend-epub3[]
include::../../../../../shared/asciidoctor.adoc[]
endif::[]
endif::[]

ifndef::env-beastie[]
toc::[]
include::../../../../../shared/asciidoctor.adoc[]
endif::[]

These examples are not exhaustive - they do not contain all the elements that might be desirable to use, particularly in a document's front matter.
For more examples of AsciiDoctor, examine the AsciiDoc source for this and other documents available in the Git *doc* repository, or available online starting at link:https://cgit.freebsd.org/doc/[https://cgit.freebsd.org/doc/].

[[examples-asciidoctor-book]]
== AsciiDoctor *book*

.AsciiDoctor *book*
[example]
====
[.programlisting]
....
---
title: An Example Book
authors:
  - author: The FreeBSD Documentation Project
copyright: 1995-2021 The FreeBSD Documentation Project
releaseinfo: "" 
trademarks: ["general"] 
---

= An Example Book
:doctype: book
:toc: macro
:toclevels: 2
:icons: font
:xrefstyle: basic
:relfileprefix: ../
:outfilesuffix:
:sectnums:
:sectnumlevels: 6
:partnums:
:chapter-signifier: Chapter
:part-signifier: Part
:source-highlighter: rouge
:experimental:
:skip-front-matter:
:book: true
:pdf: false

ifeval::["{backend}" == "html5"]
:chapters-path: content/en/books/bookname/
endif::[]

ifeval::["{backend}" == "pdf"]
:chapters-path:
endif::[]

ifeval::["{backend}" == "epub3"]
:chapters-path:
endif::[]

[abstract]
Abstract

Abstract section

'''

toc::[]

:sectnums!:

\include::{chapters-path}preface/_index.adoc[leveloffset=+1]

:sectnums:

\include::{chapters-path}parti.adoc[lines=7..18]

\include::{chapters-path}chapter-name/_index.adoc[leveloffset=+1]
....

====

[[examples-asciidoctor-article]]
== AsciiDoctor *article*

.AsciiDoctor *article*
[example]
====
[.programlisting]
....
---
title: An Example Article
authors:
  - author: Your name and surname
    email: foo@example.com
trademarks: ["general"]
---

= An Example Article
:doctype: article
:toc: macro
:toclevels: 1
:icons: font
:sectnums:
:sectnumlevels: 6
:source-highlighter: rouge
:experimental:

'''

toc::[]

== My First Section

This is the first section in my article.

=== My First Sub-Section

This is the first sub-section in my article.

....

====
