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

AsciiDoc User Guide

file system location of the referring document). The optional <caption> is the link's displayed text. If <caption> is not specified then <target> is displayed. Example:

link:downloads/foo.zip[download foo.zip]

You can use the <filename>#<id> syntax to refer to an anchor within a target document but this usually only makes sense when targeting HTML documents.

Images can serve as hyperlinks using the image macro.

Images

Inline images are inserted into the output document using the image macro. The inline syntax is:

image:<target>[<attributes>]

The contents of the image file <target> is displayed. To display the image it's file format must be supported by the target backend application. HTML and DocBook applications normally support PNG or JPG files.

<target> file name paths are relative to the location of the referring document.

Image macro attributes

The optional first positional attribute list entry specifies the alternative text which is displayed if the output application is unable to process the image file. For example:

image:images/logo.png[Company Logo]

The optional width and height named attributes scale the image size and can be used in any combination. The following example scales the previous example to a height of 32 pixels:

image:images/logo.png["Company Logo",height=32]

The optional link named attribute is used to link the image to an external document. The following example links a screenshot thumbnail to a full size version:

image:screen-thumbnail.png[height=32,link="screen.png"]

Block Macros

A Block macro reference must be contained in a single line separated either side by a blank line or a block delimiter.

Block macros behave just like Inline macros, with the following differences:

They occur in a block context.

The default syntax is <name>::<target>[<attributelist>] (two colons, not one).

36