Erlang -- Inline Tags

Erl_Docgen

User's Guide

Version 1.1

- User's Guide
- Reference Manual
- Release Notes
- PDF
- Top

- Expand All
- Contract All

### Chapters

- How to Build OTP like documentation
  - Top of chapter
  - Utilities to prepare XML files
  - Use xsltproc to generate different output formats
- Overview OTP DTDs
  - Top of chapter
  - DTD Suite
  - Basic Tags
- User's Guide DTDs
  - Top of chapter
  - The part DTD
  - <part>
  - <description>
  - <include>
  - The chapter DTD
  - <chapter>
  - <section>
  - <title>
- Reference Manual DTDs
  - Top of chapter
  - The application DTD
  - <application>
  - The appref DTD
  - The comref DTD
  - The cref DTD
  - The erlref DTD
  - The fileref DTD
  - <description>
  - <section>
  - <funcs>
  - <func>
  - <name>
  - <fsummary>
  - <type>
  - <v>
  - <d>
  - <desc>
  - <authors>
  - <aname>
  - <email>
- Header Tags
  - Top of chapter
  - <header>
  - <copyright>
  - <legalnotice>
  - <title>
  - <shorttitle>
  - <prepared>
  - <responsible>
  - <docno>
  - <approved>
  - <checked>
  - <date>
  - <rev>
  - <file>
- Block Tags
  - Top of chapter
  - <br> - Line Break
  - <code> - Code Example
  - <codeinclude> - Code Inclusion
  - <list> - List
  - <marker> - Marker
  - <p> - Paragraph
  - <note> - Note
  - <pre> - Pre-formatted Text
  - <quote> - Quotation
  - <taglist> - Definition List
  - <warning> - Warning
  - <image> - Image
  - <table> - Table
- Inline Tags
  - Top of chapter
  - <br> - Line Break
  - <c> - Code
  - <em> - Emphasis
  - <marker> - Marker
  - <see*> - See tags
  - <url> - Non-Local Cross Reference
- Character Entities
  - Top of chapter
  - Added Latin 1
- EEP-48: Implementation in Erlang/OTP
  - Top of chapter
  - EEP-48: Documentation storage and format
  - Erlang Documentation Format
  - Erlang Documentation extra Metadata
  - See Also

# 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 <see*> tags are used to refer to the marker.

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

### 7.5 <see*> - See tags

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. The syntax used within the marker attribute is application:file#anchor for the general case. application and file can be omitted if the link target is the current application or file.

There are several different see tags that are to be used depending on what it is that they point to.

<seemfa>

  Points to an MFA using the syntax application:module#function/arity. These links must point to functions documented in a <funcs> section. Examples:

      <seemfa marker="stdlib:string#length/1">string:length/1</seemfa>
      <seemfa marker="string#length/1">string:length/1</seemfa>
      <seemfa marker="#length/1">string:length/1</seemfa>

  results in: string:length/1.
<seeerl>

  Points to an Erlang module or a custom marker within a module. Example:

      <seeerl marker="stdlib:string">string(3)</seeerl>,
      <seeerl marker="stdlib:string#oldapi">Old API in string</seeerl>

  results in: string(3),Old API in string.
<seetype>

  Points to a type using the syntax application:module#type. These links must point to types documented in a <datatypes> section. Example:

      <seetype marker="stdlib:string#grapheme_cluster">string::grapheme_cluster()</seetype>

  results in: string::grapheme_cluster().
<seeapp>

  Points to the application documentation. index can be used as the target file. Example:

      <seeapp marker="stdlib:STDLIB_app">STDLIB app</seeapp>,
      <seeapp marker="stdlib:index">STDLIB index</seeapp>

  results in: STDLIB, STDLIB.
<seecom>

  Points to the documentation of any command line utility. Example:

      <seecom marker="erts:epmd">epmd</seecom>

  results in: epmd.
<seecref>

  Points to the documentation of any C reference. Example:

      <seecref marker="erts:erl_nif">erl_nif</seecref>

  results in: erl_nif.
<seefile>

  Points to the documentation of a file format. Example:

      <seefile marker="kernel:config">config(3)</seefile>

  results in: config(3).
<seeguide>

  Points to the User"s Guide of any application. index can be used as the target file. Example:

      <seeguide marker="kernel:index">Kernel User's Guide Index</seeguide>,
      <seeguide marker="kernel:logger_chapter">Logging in the Kernel User's Guide</seeguide>

  results in: Kernel User's Guide Index, Logging in the Kernel User's Guide.

### 7.6 <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