User's Guide
Reference Manual
Release Notes
PDF
Top

DocBuilder
User's Guide
Version 0.9.8.7

Expand All
Contract All

Chapters

# 7 Inline Tags

Inline tags are typically used within block tags, for example to highlight a word within a paragraph.

### 7.1 <br> - Line Break

Forces a newline. The <br> tag is both a block- and an inline tag and is described in the Block Tags section.

### 7.2 <c> - Code

Highlights things like variables and file names in a text flow. Can contain plain text only. Newlines and tabs are ignored as opposed to the code tag. All character entities are expanded. Example:

    <p>Returns <c>true</c> if <c>Term</c> is an integer.</p>

results in:

Returns true if Term is an integer.

### 7.3 <em> - Emphasis

Highlights words which are important within a text flow. Example:

    <p>The application <em>must</em> be up and running.</p>

results in:

The application must be up and running.

Contains plain text or a <c> tag.

### 7.4 <marker> - Marker

Used as an anchor for hypertext references. The id attribute defines the name of the marker. Example:

    <marker id="marker_example"/>

The <seealso> tag is used to refer to the marker.

The <marker> tag is both a block- and an inline tag.

### 7.5 <path> - Path

Highlights file paths. The attributes unix and windows makes it possible to specify different paths for different file path notations. Default for both are "". Example:

    <p>Look at the <path unix=".profile" windows="win.ini">start-up file</path>
      if you intend to alter the initial behavior.</p>

If no ptype option is specified when calling docb_transform:file/1,2, this simply results in:

"Look at the start-up file if you intend to alter the initial behavior."

If both the options {ptype,unix} and {ptype,windows} are specified, the example instead results in:

"Look at the start-up file if you intend to alter the initial behavior."

### 7.6 <seealso> - Local Cross Reference

A cross reference (hypertext link) to a marker in the same file, a marker in another file, or (the top of) another file, given by the marker attribute. Must contain plain text. Examples:

          <seealso marker="#marker_example">marker example</seealso>

results in: marker example (a hypertext link to the marker example above).

          <seealso marker="block_tags#markerTAG">marker tag</seealso>

results in: marker tag (a hypertext link to the marker section in the Block Tags chapter).

          <seealso marker="overview">Overview</seealso>

results in: Overview (a hypertext link to the Overview chapter).

Note the use of "#" before the name of the marker. Note also that the filename extension .html is omitted. This is because the default behavior of DocBuilder is to translate <seealso marker="File#Marker">text</seealso> to <A HREF="File.html#Marker">text</A>.

The default behaviour can be modified by using the callback module option to docb_transform:file/1,2 and defining a callback function Module:seealso/1. This possibility is for example used in OTP to resolve cross references between applications.

### 7.7 <url> - Non-Local Cross Reference

A reference to a file outside the documentation, a web address or similar, given by the href attribute. Must contain plain text. Example:

    <url href="http://www.erlang.org">erlang.org</url>

results in: erlang.org

### 7.8 <term>, <termdef> - Glossary

Used to highlight a term with a local (for this document only) or global definition. The identity of the term is given by the id attribute.

For a locally defined term, the tag contains a <termdef>, which in turn contains an explanation of the term as plain text. Example:

    <term id="HTML"><termdef>Hyper-Text Markup Language</termdef></term>

For a globally defined term, the tag is empty. Example:

    <term id="HTML"/>

Global definitions are given to DocBuilder in a file, using the docb_transform:file/1,2 option term_defs. The file should contain a list of tuples, one for each term definition, on the format {Id,Name,Definition,Owner}. The Owner part is just for administration, if there are several people contributing to a term definition file. Example:

    [...,
     {"HTML", "HTML", "Hyper-Text Markup Language", "Gunilla"},
     ...].

DocBuilder will collect both local and global definitions in a glossary, which can be reached from a link in the left frame of the HTML documentation.

In the generated HTML, it is the term name which will be visible. For locally defined terms, the id and the name are the same. The name has a hypertext link to the definition in the glossary. Example:

    <term id="HTML"><termdef>Hyper-Text Markup Language</termdef></term>

results in: HTML

If a term is defined both locally and globally, the global definition takes precedence.

### 7.9 <cite>, <citedef> - Bibliography

Works the same way as <term> and <termdef>, but for a bibliography list rather than a glossary.

A global bibliography list is given to DocBuilder in a file, using the docb_transform:file/1,2 option cite_defs. The file should contain a list of tuples, one for each cite, on the format {Id,Title,Info,Owner}. The Owner part is just for administration, if there are several people contributing to a bibliography file. Example:

    [...,
     {"erlbook","Concurrent Programming in ERLANG","J. Armstrong, R. Virding, C. Wikström, M. Williams, Concurrent Programming in ERLANG, Prentice Hall, 1996, ISBN 0-13-508301-X","jocke"},
     ...].