Using the Author Line
The author attributes can be implicitly set and assigned values using the author line.
What’s the author line?
The author line is directly after the document title line in the document header.
When the content on this line is structured correctly, the processor assigns the content to the built-in author
and email
attributes.
When can I use the author line?
In order for the processor to properly detect the author line and assign the content to the correct attributes, all of the following criteria must be met:
-
The header must contain a document title.
-
The author information must be entered on the line directly beneath the document title.
-
The author line must start with an author name.
-
The content in the author line must be placed in a specific order and separated with the correct syntax.
= Document Title
firstname middlename lastname <email>
The author’s middle name is optional.
An email or URL following the author’s last name is also optional.
If included, the email address must be enclosed in a pair of angle brackets (< >
).
The author line also accepts multiple authors.
Assign an author and email
In Example 2, let’s add an author and their email address using the author line. The author line must be placed on the line directly below the document title and start with an author’s name.
= The Intrepid Chronicles
Kismet R. Lee <kismet@asciidoctor.org> (1) (2)
1 | Enter the author’s name on the line below the document title. |
2 | In a pair of angle brackets (< > ), enter the author’s email or URL. |
Remember, a middle name and email are optional. The processor assigns the content on the author line to the built-in attributes using word position, word count, and syntax.
When the default stylesheet is applied, the author information is displayed on the byline. The byline displays the author information and the revision information directly beneath the document’s title.