Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Rackham S.AsciiDoc user guide Rev7.1.2.2006.pdf
Скачиваний:
17
Добавлен:
23.08.2013
Размер:
298.24 Кб
Скачать

AsciiDoc User Guide

{author}, {firstname}, {surname}, {authorinitials}, {email}, {date}, {revision}, {keywords}, {revisionhistory}

The preceding example is equivalent to the standard AsciiDoc two line document header. Actually it's a little bit different with the addition of the {keywords} and {revisionhistory} attributes 4.

Attribute Lists

An attribute list is a comma separated list of attribute values. The entire list is enclosed in square brackets. Attribute lists are used to pass parameters to macros, blocks and inline quotes.

The list consists of zero or more positional attribute values followed by zero or more named attribute values. Here are three examples:

[Hello]

[Bertrand Russell, The World of Mathematics (1956)]

["22 times", backcolor="#0e0e0e", options="noborders,wide"]

Attribute list properties

List attributes take precedence over existing attributes.

List attributes can only be referenced in configuration file markup templates and tags, they are not available inside the document.

Attribute references are allowed inside attribute lists.

If the list contains any named attributes the all string attribute values must be quoted.

Quoted named attribute values have the same syntax and semantics as Python string literals.

Setting a named attribute to None undefines the attribute.

Positional attributes are referred to as {1},{2},{3},…

Attribute {0} refers to the entire list (excluding the enclosing square brackets).

If an attribute named options is present it is processed as a comma separated list of attributes with zero length string values. For example [options="opt1,opt2,opt3"] is equivalent to

[opt1="",opt2="",opt2=""].

Macro Attribute lists

4The existence of a {revisionhistory} attribute causes a revision history file (if it exists) to be included in DocBook outputs. If a file named like {docname}-revhistory.xml exists in the document's directory then it will be added verbatim to the DocBook header (see the ./doc/asciidoc-revhistory.xml example that comes with the AsciiDoc distribution).

56