metanorma / tex2mn

Write Metanorma documents in LaTeX
https://www.metanorma.com
MIT License
2 stars 0 forks source link

Understand how to correctly handle author(s) #56

Closed paolobrasolin closed 4 years ago

paolobrasolin commented 4 years ago

Based on https://www.metanorma.com/author/topics/document-format/meta-attributes/ we must have headers such as

= Document title
Author Name
:my-attribute: value
// ...

and

The author line is ignored by Metanorma, but needs to be present for Asciidoctor to process document attributes correctly.

However Asciidoctor manual states that

The document header is a special set of contiguous lines at the start of the document that encapsulates the document title, author and revision information, and document-wide attributes (either built-in or user-defined).

The header typically begins with a document title, though this element is optional. If a document title is specified, it may be immediately followed by two optional lines of text to set the author and revision information. Finally, the header may declare document-wide attributes (built-in or user-defined) using attribute entries.

It doesn't seem to be actually required by Asciidoctor!

Here's the details of how Asciidoctor handles single and multiple authors: https://asciidoctor.org/docs/user-manual/#author-and-email

We have two options to handle multiple authors: either

= Document title
Kismet Rainbow Chameleon <kismet@asciidoctor.org>; Lazarus het_Draeke <lazarus@asciidoctor.org>

or

= Document title
:author_1: Kismet Rainbow Chameleon
:email_1: kismet@asciidoctor.org
:author_2: Lazarus het_Draeke
:email_2: lazarus@asciidoctor.org

The latter is obviously cleaner (and it's equivalent to what the former is doing under the hood w/ some regexps).

Note that the variable authorcount exists (and is automatically set).