3. AsciiDoc

adoc Studio uses the markup language AsciiDoc as its foundation. This chapter gives beginners a quick overview of the most important commands and features. Links to further documentation are also included.

Until the first official AsciiDoc specification is published, Dan Allen defines the language. No other official definition exists.

Experienced AsciiDoc users can skip this chapter.

3.1. What Is AsciiDoc?

AsciiDoc is a lightweight markup language that lets you convert texts into various document formats. AsciiDoc files can be converted to HTML, PDF, ePub, and other formats.

Compared to XML-based formats such as DocBook, AsciiDoc is easy to learn and remains readable as plain text. More information is available on Wikipedia.

3.2. Writing Text

Write your text in the editor as usual. You can write everything continuously or place each sentence on a new line; the output looks the same either way.

Create a new paragraph by inserting a blank line between paragraphs.

This introduces a central AsciiDoc concept: the block.

A block is any contiguous structural unit at block level, not to be confused with a typographic "text block."

Blocks include:

Regular body text is a paragraph block and does not need to be declared explicitly as a block; it is one implicitly.

The Preamble

When a document begins with text before the first section, the first paragraph is called the preamble or abstract. It automatically appears slightly larger than regular text and often serves as an introduction.

To enlarge other paragraphs, add [.lead] before them.

Including a preamble-style format in the middle of the text
[.lead]
This paragraph is displayed slightly larger than the others.
With the "Optima" product style, the paragraph receives a _drop cap_, a decorative large first letter.
Result:

This paragraph is displayed slightly larger than the others. With the "Optima" product style, the paragraph receives a drop cap, a decorative large first letter.

Prevent this effect in the first paragraph by using [.nolead], so your text begins directly in the regular font size.

You can find more information about paragraphs on the AsciiDoc website.

3.3. Formatting

Design in AsciiDoc comes from Cascading Style Sheets. As in any markup language, you highlight individual words in the editor as bold, italic, or in other ways. The editor menu in adoc Studio provides all important formatting options for quick mouse access.

Table 7. Direct formatting in the editor menu

Command

Keyboard shortcut

Markup in text

Result in preview

Bold

+B

*bold*

bold

Italic

+I

_italic_

italic

Highlighted

+#

#highlighted#

highlighted

Monospace

++#

`monospace`

monospace

Underlined

+U

[.underline]#underlined#

underlined

Strikethrough

++X

[.line-through]#strikethrough#

strikethrough

Overline

+++X

[.overline]#overline#

overline

Superscript

++++

^superscript^

superscript

Subscript

+++-

~subscript~

subscript

AsciiDoc can do much more.
Combine different formatting options freely.

**##Super##cali[underline]##fragilist__ic##[red]##expialige__tious##** 😀

Result in preview:

Supercalifragilistischexpialigetisch 😀

You can find more information about text formatting on the AsciiDoc website.

3.4. Headings

Define headings and their level by the number of = signs. In the source text, all headings look like this:

= Document Title
== Heading 1
=== Heading 2
==== Heading 3
===== Heading 4
====== Heading 5
Additional headings

If the six heading levels plus the document title are not enough, add a paragraph title by placing a . before the line:

.Additional Headings
You can find more information about heading levels on the AsciiDoc website.

3.5. The Document Header

The document title, marked with =, defines the document header.

To establish a clear structure from the start, every AsciiDoc document should begin with a document header. It contains:

  • the document title.

  • author and revision information.

  • document-wide attributes.

  • additional metadata.

You can find more information about the document header on the AsciiDoc website.

Although the AsciiDoc documentation recommends placing the title (= Document Title) on the first line, a different structure has proven effective in practice.

In documents with many attributes, such as this manual, all attributes are placed before the document title, not after it.

The output is identical, but the readability improves considerably, particularly with adoc Studio features such as composite documents and translation support.

Example of an alternative document header with identical output
// Comments are ignored 1
= Document Title
Felix Fleissig <support@adoc-studio.app> 2
:description: The document's description.
:sectanchors:
:url-repo: https://my-git-repo.com
5
Document follows here…
// Comments are ignored 1

:author: Felix Fleissig <support@adoc-studio.app> 3
4
:description: The document's description.
:sectanchors:
4
:url-repo: https://my-git-repo.com
4
= Document Title
5
Document follows here…
1 Comments are visible only in the editor.
2 The author is set automatically by the author line.
3 The author is set via an attribute.
4 Any number of blank lines are permitted.
5 A blank line after the document title separates the header from the content.

The advantage is immediately apparent: the document header is clearly structured and much easier to read.

Subtitle for the Document Title

A document may have only one title =. The exception is the document type Book, but more on that later.

You can optionally add a subtitle to a document title. By default, a : separates the subtitle from the title. Alternatively, define a custom separator string using [separator=STRING] before the title or as an attribute in the document header (:title-separator: STRING).

Asciidoctor displays subtitles only in PDF, not in HTML.
In adoc Studio, subtitles work in both formats.

3.6. Table of Contents

As soon as you use headings, a table of contents is recommended. In adoc Studio, add :toc: to the document header. adoc Studio generates the table of contents automatically.

By default:

  • it contains two heading levels

  • it appears between the document title and the text

  • it updates automatically while you write

The :toc: attribute supports additional parameters:

  • left — positions the table of contents to the left of the text.

  • right — positions it to the right of the text.

  • preamble — inserts it after the preamble.

  • macro — inserts it via the macro toc::[] at a freely chosen position.

  • auto — equivalent to using no parameter.

The number after :toclevels: specifies how many heading levels the table of contents should display, for example :toclevels: 3.

Define this attribute in the document header. By default, the table of contents shows two levels.

You can find more information about table of contents on the AsciiDoc website.

You can use two types of links:

  • Hyperlinks to the internet.

  • Cross-references within the document.

The simplest link is a written-out address, for example: https://www.adoc-studio.app. In the preview, the address becomes active automatically and can be clicked to open in the web browser. The most common URL schemes are supported:

  • http

  • https

  • ftp

  • irc

  • mailto

Alternatively, specify links as a macro: https://www.adoc-studio.app[]

You can optionally add link text between the square brackets. This text replaces the displayed URL:

Input → https://www.adoc-studio.app[{app-name} website]
Output → adoc Studio website

You can find more information about Hyperlinks on the AsciiDoc website.

Cross-References in the Document

Use a cross-reference to jump to another location in the same document. This works in both standalone and composite documents.

<<Reference>>

A cross-reference points to a so-called anchor.

An anchor is a named target in the document. It works similarly to an HTML ID. An anchor is not visible; it simply marks a position.

Although AsciiDoc automatically generates anchors for headings, avoid using them directly. If you change a heading, the automatic anchor changes too, and existing references stop working.

Instead, set your own anchor before the heading:

[#my_anchor]
== A Heading

Reference it in the text like this:

<<my_anchor>>

The heading title appears automatically in the finished document. Alternatively, provide custom link text:

<<my_anchor, Jump here>>
You can find more information about Cross-references on the AsciiDoc website.

Footnotes

Asciidoctor displays footnotes as endnotes by default. adoc Studio supports both footnote and endnote.

Use the attribute :footnotes-position: to control placement and ensure compatibility with existing documents.

The macro footnote:[] generates footnotes automatically. In the preview and export, the footnote text is inserted in square brackets after the macro:

My text.footnote:[Here is the footnote text] 1
1 Because a footnote is attached directly to the text in AsciiDoc, it can sometimes be difficult to see in the editor. Color highlighting helps with orientation.

Output depends on the format:

HTML

All footnotes and endnotes appear at the end of the document, because HTML pages are not paginated.

PDF and Website

Footnotes appear on the page where they were defined. Endnotes always appear at the end of the document.

You can find more information about Footnotes on the AsciiDoc website.

Bibliography

AsciiDoc uses a bibliography section for references, similar to endnotes. If you do not use an external bibliography database, create entries as a specially formatted list. Add a section with the class [bibliography] at the end of the document.

Insert an unordered list below it. Mark each entry with three square brackets and a unique ID, for example: [[[book-id]]].

Example:
[bibliography]
== Bibliography

* [[[blome-cherif-merlin]]] Frank Blome, Antoni Nadir Cherif. Projektmanagement mit Merlin – Das offizielle Handbuch. Carl Hanser Verlag, Munich 2009. ISBN 978-3-446-41927-8.
* [[[bruening-illenberger-pwpat]]] Brüning, Kai & Illenberger, Frank. Method and system for syncing data structures. US20160055226A1, n.d. https://patents.google.com/patent/US20160055226A1/en.

Reference an entry in the text with a link: <<blome-cherif-merlin>>.

You can find more information about Bibliography on the AsciiDoc website.

3.8. Inserting Images

The introduction explains how images and their paths work. This section describes how to embed images directly in AsciiDoc text.

Images can be inserted in two ways: as a block image or as an inline image in body text.

Block Images

Insert an image as a block image on its own line:

image::photo.png[]

Adjust options directly in the brackets. Important parameters are:

  • width — sets the width of the image.

  • align — determines the alignment of the image.

  • float — controls text wrap around the image.

The adoc Studio completion menu assists with this, as shown in the "Example: Embedding an Image" example.

Inline Images

Inline images appear within body text and use the same syntax as block images, but with only one colon :

image:photo.png[]

Example in a sentence:

Please press image:reload.svg[] to reload the page.

Result in preview:
Please press to reload the page.

Insert multiple images side by side like this:

image:hello.jpg[width=80]
image:hello.jpg[width=120]
image:hello.jpg[width=170]

The images are centered and rendered at the specified widths:

hello hello hello

You can find more information about Images on the AsciiDoc website.

Symbols as Images

Symbols are a practical way to convey information visually while reducing unnecessary text. They are particularly useful for illustrating interface elements.

For symbols to appear in admonitions, as callout numbers, or in the icon macro, the :icon: attribute must be set.

Image-based symbols

:icon: or :icon: image

Symbols are loaded from image files in the directory specified by the iconsdir attribute.

Font-based symbols
:icon: font

Symbols are loaded from a symbol font, for example:

SF Symbols are activated with the :icon-set: apple attribute.

Once the attribute is set, symbols appear automatically for all admonitions. Depending on the style, they can also be displayed exclusively or in different formats.

You can find more information about Symbols on the AsciiDoc website.
Icons in Image Mode

To use symbols from image files, set the :iconsdir: attribute as well:

:icons: image
:iconsdir: icons

Icons are searched for in the project following the same rules.

To use a different file type, specify it via :icontype:. Example:

:icons: image
:iconsdir: icons
:icontype: svg
Icons in Font Mode

Font mode is recommended for font libraries. The SF Symbols collection is directly supported by adoc Studio. It is especially useful for guides targeting macOS, iOS, iPadOS, or visionOS.

Activate SF Symbols once in the document header:

:icons: font
:icon-set: apple
sf symbols inspector

Not every symbol is supported by every version of Apple operating systems!

For example, the Finder icon only appears when the document is exported under the 26 versions of the operating systems.

The SF Symbols Inspector provides information about when a symbol will be displayed.

For Font Awesome, choose the desired style:

  • far — outlined symbols

  • fas — filled symbols

  • fab — brand symbols

Example:

:icons: font
:icon-set: fas

Depending on the font family used, various options are then available:

  • flip flips the display horizontal or vertical.

  • link sets a hyperlink.

  • palette uses the Apple color palette (monochrome, hierarchical, multicolor).

  • role uses a predefined CSS role.

  • rotate rotates the image by 90°, 180°, or 270°.

  • size sets the size from 1x to 10x or to xs, lg, xl, fw.

  • title sets a title.

  • weight sets the font weight from ultralight to black.

  • window sets the target window if a link is defined.

You can find more information about Font Awesome symbols on the AsciiDoc website.

3.9. Lists

Start an unordered list with a *:

* First item

Each additional asterisk indents one level deeper:

  • Level 1

    • Level 2

      • Level 3

        • Level 4

      • Back to level 3

    • Back to level 2

  • Back to level 1

Alternatively, use -:

  • one

  • two

  • three

Ordered lists

Create ordered lists with a period .:

  1. one

  2. two

  3. three

You can also specify numbers:

  1. one

  2. two

  3. three

  4. In the preview and export, numbering is applied automatically and correctly. In the example above, "4." would appear in the preview instead of "7." (which is only visible in the editor).

adoc Studio creates the numbering automatically.
Multilevel ordered lists

The same principle as for unordered lists applies to nested ordered lists:

  1. Step 1

    1. Step 1 a

    2. Step 1 b

  2. Step 2

  3. Step 3

Which numbering style is used at a given level depends on the product style.

Checklists

Checklists are also supported:

  • to do

  • done

  • also done

Set the attribute :icons: font beforehand so that checklists are rendered according to the product style.

You can find more information about Lists on the AsciiDoc website.

3.10. Block Elements

Block elements (blocks for short) are versatile in AsciiDoc. There are numerous use cases and display forms.

Typical applications include:

Blocks can be written in different forms:

  • as a short form (usually single-line).

  • as a paragraph across multiple lines.

  • as a multi-part block with several paragraphs and blank lines.

The following examples demonstrate the concept using a quote.

Quote (short form)

Write a quote in short form:

.Title
"Text"
-- Author,Work

Quote (as paragraph)

Write a quote as a paragraph:

.Title
[quote,Author,Work]
Text

Quote (multiple paragraphs)

For a quote spanning multiple paragraphs, use block delimiters:

.Title
[quote,Author,Work]
____
Text
____
When you use adoc Coach to create blocks, some texts are formatted as placeholders. If a placeholder is selected and highlighted in blue, overwrite it directly. placeholder text. To skip the placeholder, press Enter or Delete.

A block always sits between two delimiters, each consisting of four identical characters. These mark the start and end of the block.

There are different possible delimiters, as shown in the following example:

Learning is experience. Everything else is just information.

— Albert Einstein
You can find more information about text and other blocks on the AsciiDoc website.

Source Code with Comments

Use the source block to document source code in a structured and clear way. Between two lines with ----, adoc Studio disables formatting rules. Within this area, write unformatted text.

Specify source to indicate that the content is source code. Optionally define the language, for example: [source, c].

For syntax highlighting, adoc Studio uses the highlightjs.org library, which currently supports over 190 programming languages.

The AsciiDoc attribute :source-highlighter: highlight.js is automatically set in adoc Studio since v3.
Input
.Brian Kernighan: Hello World
[source,c]
----
#import <standardio.h>
int main()
{
  printf ("hello, world\n");
}
----
Result
Brian Kernighan: Hello World
#import <standardio.h>

int main()
{
   printf ("hello, world\n");
}
You can find more information about source code on the AsciiDoc website.

To annotate source code, use callouts. Place a comment character followed by a number in angle brackets at the end of a line.

Repeat the numbers with the corresponding explanation below the source block.

A line of source code 1
A line of source code 2
A line of source code 3
A line of source code 4
1 Comment in C style.
2 Comment for Ruby , Python , Perl , etc.
3 Comment for Clojure .
4 Comment for XML or SGML languages such as HTML .
You can find more information about Callouts on the AsciiDoc website.

Admonitions

Admonitions deliberately interrupt the flow of text and draw attention to important information.

Set the attribute :icons: font at the beginning of your document; only then are the symbols displayed correctly.

Admonitions appear in different styles with matching symbols:

NOTE marks supplementary information.
TIP provides a useful tip or a specific recommendation.
WARNING warns of a potential danger.
CAUTION points out a potential source of error.
IMPORTANT marks particularly important information.

Here is a demonstration admonition.

You can find more information about Admonitions on the AsciiDoc website.

Equations and Formulas (STEM)

STEM stands for Science, Technology, Engineering & Mathematics. In technical documentation, this term describes the rendering of formulas and equations.

AsciiDoc supports mathematical expressions using \(\mathrm{\LaTeX}\) in either asciimath or latexmath syntax.

Inline, use for example (latexmath:[\mathrm{\LaTeX}])

Or use a block:

[latexmath]
++++
Life = \huge \int_ {birth}^{death} \normalsize \frac{happiness}{time} \Delta time
++++
\[Life = \huge \int_ {birth}^{death} \normalsize \frac{happiness}{time} \Delta time\]

Alternatively, use the simplified asciimath syntax:

[asciimath]
++++
sqrt(4) = 2
++++
\{sqrt(4) = 2\}
You can find more information about STEM on the AsciiDoc website.
Sidebars

This block type is a good example of how text and design work together. A sidebar appears as a highlighted block in the text. This text:

 [sidebar]
 This text is highlighted as a sidebar.

Produces this block:

This text is highlighted as a sidebar.

When you use this example with the "Modern" style and set the preview to PDF, the term sidebar suddenly makes perfect sense. The sidebar becomes a true note in the margin.

Passthrough Blocks

To pass content unchanged into the generated HTML, use a passthrough block.

This outputs text or code, such as SVG, directly.

:my_color: red

[subs=attributes]
++++
<svg width="100" height="100">
  <rect width="100" height="100" fill="{my_color}" />
</svg>
++++

Change the color via an attribute:

3.11. Tables

Use tables to present content in a structured way. Even a few characters are enough for a tabular layout.

Simple table

Start with a minimal table:

|===
| One | Two | Three
|===

The result:

One

Two

Three

Table with multiple rows

Add more rows to a table:

|===
| One | Two | Three
| Four | Five | Six
|===

The result:

One

Two

Three

Four

Five

Six

Table with header row

Create a header row by inserting a blank line after the first row:

|===
| Title 1 | Title 2 | Title 3

| One | Two | Three
| Four | Five | Six
|===

The result:

Title 1 Title 2 Title 3

One

Two

Three

Four

Five

Six

Advanced table features

AsciiDoc provides extensive options for formatting table cells. The following example is based on the official documentation:

|===
| Column 1 | Column 2

2*>m|This content spans two columns (2*) and is aligned to the right edge of the cell (>).

The text is rendered in a monospace font (`m`).

.3+^.>s|This cell spans 3 rows (`3+`).
The content is centered horizontally (`+^+`), aligned to the bottom edge of the cell (`.>`), and rendered in strong formatting (`s`).
e|This content is rendered in italics (`e`).

m|This content is rendered in a monospace font (m).

s|This *content* is bold (`s`), except for the word _content_.| End.
|===

The result:

Column 1 Column 2

This content spans two columns (2*) and is aligned to the right edge of the cell (>).

The text is rendered in a monospace font (m).

This cell spans 3 rows (3+). The content is centered horizontally (^), aligned to the bottom edge of the cell (.>), and rendered in strong formatting (s).

This content is rendered in italics (e).

This content is rendered in a monospace font (m).

This content is bold (s), except for the word content.

End.

You can find more information about Tables on the AsciiDoc website.

3.12. User Interface

In technical documentation, describing the graphical user interface (GUI, abbreviated UI for User Interface) is a daily task.

Three areas play a central role:

Keyboard shortcuts

Use the kbd:[] macro to display keyboard shortcuts.

Example → +S saves the document quickly.

A special feature of the kbd:[] macro is visible in the use of the arrow keys (↑ ↓ ← →) in this document.

Menus

Use the menu:[] macro to display menu paths, for example:

File  Export  Products…

Buttons

The btn:[] macro is available for buttons.

This renders a button such as OK.

You can find more information about UI Macros on the AsciiDoc website.

On the Apple platform in particular, using SF Symbols with the UI macros is especially useful, as it allows system elements to be represented authentically and in a platform-consistent way.

3.13. Comments

Comments in the source text are used to add notes, remarks, or tasks directly in the document. They help explain background, document decisions, or make thought processes traceable. Comments are visible only in the editor. They do not appear in the preview or in exports.

Commenting single lines

Start a line with // to mark the following text as a comment:

// This text is a comment and is not displayed in the preview or export.
Commenting out entire sections

To comment out larger sections of text, use //// at the beginning and end of the block:

Why use comments?

Even though comments do not appear in the finished document, they are very useful when working in the source text. Typical uses are::

  • // TODO:: — open tasks such as optimizations, improvements, or corrections.

  • Notes about formatting.

  • Reasons for specific content or decisions.

  • Internal version notes.

  • Comments for editorial review or subject-matter checking.

  • Additional context information needed only in the editor.

You can find more information about Comments on the AsciiDoc website.

3.14. Attributes

Attributes make your documentation more flexible and reusable.

In adoc Studio, attributes serve several purposes. They allow you to:

  • define values once and reuse them throughout the document

  • control and adjust document settings centrally

You can find more information about Attributes on the AsciiDoc website.

Using Attributes as Variables

When terms, version numbers, product names, or URLs repeat in the text, define them once as an attribute.

This avoids typos, reduces redundancy, and lets you update changes in one place.

Define an attribute and then use it in the document:

Example 1. Use an attribute as a variable
Definition
:app-version: 1.2.3.4
Input
This document is based on version {app-version}.
Output

This document is based on version 1.2.3.4.

If you later change the value of the attribute, all occurrences update automatically.

The name adoc Studio is also inserted in this documentation via the attribute {app-name}.

Below are further attributes used in this document:

:app-name: adoc Studio
:lang: en
:url-website: https://www.adoc-studio.app
:url-roadmap: https://www.adoc-studio.app
:url-styles: https://forum.adoc-studio.app/t/css
:url-forum: https://forum.adoc-studio.app

adoc Studio provides several standard attributes for use in most documents. Enter them at the beginning of the document in the document header:

  • Author information (:author:)

  • Version information (:revnumber:, :revdate:, and :revmark:)

  • Metadata (:description:, :keywords:)

An example of the document header:

:author: Frank Blome
:revnumber: 1.0
:revdate: {docdate}
:description: This document introduces you to working with {app-name}.
:keyword: {app-name}, AsciiDoc, technical documentation, manuals and more

Abbreviate a standard title as follows:

= The Manual for {app-name}
Frank Blome <frank@projectwizards.net>
1.0, {docdate}

In this case, adoc Studio automatically reads the following from the lines directly below the document title =:

  • :author:

  • :email:

  • :revnumber:

  • :revdate:

Use an attribute in the text with the syntax {attribute-name}.

Built-in Attributes

Use built-in attributes to control the output behavior of your document. Always define attributes on their own line, starting at the beginning of the line. Some attributes can be placed anywhere in the document; others must go exclusively in the document header.

Attributes serve various purposes:

Attributes:
  • provide access to document information

  • define metadata

  • enable or disable features

  • configure features

  • specify storage locations for assets (such as images)

  • store reusable content

Syntax examples:
  • Set an attribute: :beta:.

  • Set an attribute with a value: :beta-version: 23.

  • Disable an attribute: (:!beta:) or (:beta!:)

In adoc Studio, you can conveniently access all built-in attributes through adoc Coach:

Press ESC at the beginning of a line and choose the Attributes entry from the text completion menu. The list shows all available built-in attributes.

textmenu textmenuattributes

You can find more information about built-in attributes on the AsciiDoc website.

Deviations from Asciidoctor

adoc Studio follows the Asciidoctor standard, but deliberately takes its own path in some areas.

Known bugs from Asciidoctor were not adopted; they were corrected. In addition, selected features were extended to enable more consistent usage.

Details are in the chapter Notes on AsciiDoc Compatibility.

Custom Attributes

Custom attributes are defined by you. They are not reserved by AsciiDoc or any extension.

Use these attributes to:

  • define recurring texts centrally

  • control conditions

  • reuse content in multiple places

Instead of repeating a product name or notice text throughout the document, define it once as an attribute and reference it from there. This makes your work efficient and avoids redundancy.

For attribute names, use only lowercase letters a,b,c…, hyphens -, or underscores _. Other characters are ignored.

An example used regularly in the documentation for mp 32 Merlin Project:

:mp-mpe-features: https://www.projectwizards.net/merlin-project/features
:not-in-mpe: CAUTION: This feature is not included in Merlin Project Express. +
             Please compare your requirements with the table of +
             {mp-mpe-features}[feature comparisons].

Becomes:

This feature is not included in Merlin Project Express. Please compare your requirements with the table of feature comparisons.

This method saves a lot of work: the text does not have to be duplicated repeatedly with copy and paste. Make changes once in one place, and all occurrences in the document update automatically.

You can find more information about document attributes on the AsciiDoc website.

3.15. Conditions

Conditions control whether text is output or not in adoc Studio. Think of directives as programmatic control commands within the document that influence behavior without appearing in the final document themselves.

Available directives:

  • ifdef: includes content only if the specified attribute exists.

  • ifndef: includes content only if the specified attribute does not exist.

  • ifeval: includes content only if the expression in the square brackets evaluates to true.

During processing, the processor checks the condition based on existing attributes or their values. If the condition is true, the text is output; otherwise it is skipped.

You can find more information about conditional statements on the AsciiDoc website.

3.16. Includes

AsciiDoc supports working with multiple files. Instead of creating one long file, divide the text into individual chapters.

In adoc Studio, the section The Project Navigator introduced a dedicated concept for modular documents.

When authors do not use all adoc Studio features, the include directive is a good option. It lets you include chapters in AsciiDoc format one after another:

 include::chapter-1.adoc[]
 include::chapter-2.adoc[]
 include::chapter-3.adoc[]
Includes in adoc Studio

Within adoc Studio, the include directive is particularly useful when not all features are documented immediately. Placeholders can be used for this purpose. Example: In the file list there is a file comingSoon.adoc. To keep it from appearing automatically in the composite document, the corresponding checkbox was disabled in the file information. More details are here.

Include the placeholder file as follows:

:the_feature: important features 1
include::comingSoon.adoc[] 2

The output looks like this:

The important features are not yet described. A detailed documentation will be available as soon as possible.

Content of the placeholder file:

\ifdef::the_feature[] 3

CAUTION: The _{the_feature}_ have not yet been documented. 4
Comprehensive documentation will be available as soon as possible.

:!the_feature: 5

endif::[]

Explanation:

1 The attribute the_feature receives a text when the file is included, for example "important features."
2 The file comingSoon.adoc is inserted at the current position.
3 ifdef checks whether the attribute contains text.
4 If the attribute is set, a warning is output.
5 Afterwards, :!the_feature: clears the attribute so it is not used again in the next pass.
You can find more information about Includes on the AsciiDoc website.

3.17. Docinfo

With Docinfo, you insert custom content into the head or footer of the output document. The converter reads this content from so-called docinfo files. Docinfo files extend the automatically generated output and offer practical ways to add extra metadata, stylesheets, or scripts that the converter does not provide by default.

You can find more information about Docinfo on the AsciiDoc website.

In adoc Studio, do not set the :docinfo: attribute directly in the document. Unlike Asciidoctor, adoc Studio shows not only HTML but also PDF in the preview. Because PDF is based on HTML, adoc Studio interprets the attribute correctly, but the output can look visually disruptive. To avoid this, two options are available:

1 Source text

Insert the following code block into the document header:

ifdef::filetype-webseite[]
:docinfo: shared
endif::[]
2 In the product settings

Create a product for website or HTML output. Add the values :docinfo: and shared to the attribute list.