Path: blob/main/documentation/content/ru/books/fdp-primer/examples/_index.adoc
18098 views
---
description: 'Пример статьи и книги, используемых в проекте документации FreeBSD'
params:
path: /books/fdp-primer/examples/
prev: books/fdp-primer/see-also/
showBookMenu: 'true'
tags: ["examples", "tutorial", "AsciiDoctor", "Book", "Article"]
title: 'Приложение A. Примеры'
weight: 16
---
[appendix]
[[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::[]
Эти примеры не являются исчерпывающими — они не содержат всех элементов, которые может быть желательно использовать, особенно в преамбуле документа. Для дополнительных примеров использования AsciiDoctor изучите исходный AsciiDoc код для этого и других документов, доступных в Git-репозитории *doc* или онлайн, начиная с link:https://cgit.freebsd.org/doc/[https://cgit.freebsd.org/doc/].
[[examples-asciidoctor-book]]
== *Книга* AsciiDoctor
.*Книга* AsciiDoctor
[example]
====
[.programlisting]
....
---
title: An Example Book
authors:
- author: The FreeBSD Documentation Project
copyright: 1995-2021 The FreeBSD Documentation Project
releaseinfo: ""
trademarks: ["general"]
---
= Пример книги
: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/ru/books/bookname/
endif::[]
ifeval::["{backend}" == "pdf"]
:chapters-path:
endif::[]
ifeval::["{backend}" == "epub3"]
:chapters-path:
endif::[]
[abstract] Аннотация
Раздел аннотации
'''
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
.*Статья* AsciiDoctor
[example]
====
[.programlisting]
....
---
title: An Example Article
authors:
- author: Your name and surname
email: [email protected]
trademarks: ["general"]
---
= Пример статьи
:doctype: article
:toc: macro
:toclevels: 1
:icons: font
:sectnums:
:sectnumlevels: 6
:source-highlighter: rouge
:experimental:
'''
toc::[]
== Мой первый раздел
Это первый раздел в моей статье.
=== Мой первый подраздел
Это первый подраздел в моей статье.
....
====