<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html xmlns:fn="http://www.w3.org/2005/02/xpath-functions"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" href="../../../../doc/otp_doc.css" type="text/css"> <title>Erlang -- Block Tags</title> </head> <body bgcolor="white" text="#000000" link="#0000ff" vlink="#ff00ff" alink="#ff0000"><div id="container"> <script id="js" type="text/javascript" language="JavaScript" src="../../../../doc/js/flipmenu/flipmenu.js"></script><script id="js2" type="text/javascript" src="../../../../doc/js/erlresolvelinks.js"></script><script language="JavaScript" type="text/javascript"> <!-- function getWinHeight() { var myHeight = 0; if( typeof( window.innerHeight ) == 'number' ) { //Non-IE myHeight = window.innerHeight; } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode' myHeight = document.documentElement.clientHeight; } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { //IE 4 compatible myHeight = document.body.clientHeight; } return myHeight; } function setscrollpos() { var objf=document.getElementById('loadscrollpos'); document.getElementById("leftnav").scrollTop = objf.offsetTop - getWinHeight()/2; } function addEvent(obj, evType, fn){ if (obj.addEventListener){ obj.addEventListener(evType, fn, true); return true; } else if (obj.attachEvent){ var r = obj.attachEvent("on"+evType, fn); return r; } else { return false; } } addEvent(window, 'load', setscrollpos); //--></script><div id="leftnav"><div class="innertube"> <img alt="Erlang logo" src="../../../../doc/erlang-logo.png"><br><small><a href="users_guide.html">User's Guide</a><br><a href="index.html">Reference Manual</a><br><a href="release_notes.html">Release Notes</a><br><a href="../pdf/docbuilder-0.9.8.7.pdf">PDF</a><br><a href="../../../../doc/index.html">Top</a></small><p><strong>DocBuilder</strong><br><strong>User's Guide</strong><br><small>Version 0.9.8.7</small></p> <br><a href="javascript:openAllFlips()">Expand All</a><br><a href="javascript:closeAllFlips()">Contract All</a><p><small><strong>Chapters</strong></small></p> <ul class="flipMenu" imagepath="../../../../doc/js/flipmenu"> <li id="no" title="Overview" expanded="false">Overview<ul> <li><a href="overview.html"> Top of chapter </a></li> <li title="Background"><a href="overview.html#id2255927">Background</a></li> <li title="DTD Suite"><a href="overview.html#id2261226">DTD Suite</a></li> <li title="Structure of Generated HTML"><a href="overview.html#id2252211">Structure of Generated HTML</a></li> <li title="Basic Tags"><a href="overview.html#id2259883">Basic Tags</a></li> <li title="About This Document"><a href="overview.html#id2259327">About This Document</a></li> <li title="Usage"><a href="overview.html#id2259855">Usage</a></li> </ul> </li> <li id="no" title="User's Guide DTDs" expanded="false">User's Guide DTDs<ul> <li><a href="user_guide_dtds.html"> Top of chapter </a></li> <li title="The part DTD"><a href="user_guide_dtds.html#id2255918">The part DTD</a></li> <li title="<part>"><a href="user_guide_dtds.html#id2252604"><part></a></li> <li title="<description>"><a href="user_guide_dtds.html#id2257848"><description></a></li> <li title="<include>"><a href="user_guide_dtds.html#id2259250"><include></a></li> <li title="The chapter DTD"><a href="user_guide_dtds.html#id2260255">The chapter DTD</a></li> <li title="<chapter>"><a href="user_guide_dtds.html#id2259926"><chapter></a></li> <li title="<section>"><a href="user_guide_dtds.html#id2259200"><section></a></li> <li title="<title>"><a href="user_guide_dtds.html#id2252192"><title></a></li> </ul> </li> <li id="no" title="Reference Manual DTDs" expanded="false">Reference Manual DTDs<ul> <li><a href="refman_dtds.html"> Top of chapter </a></li> <li title="The application DTD"><a href="refman_dtds.html#id2259344">The application DTD</a></li> <li title="<application>"><a href="refman_dtds.html#id2258600"><application></a></li> <li title="The appref DTD"><a href="refman_dtds.html#id2261527">The appref DTD</a></li> <li title="The comref DTD"><a href="refman_dtds.html#id2261698">The comref DTD</a></li> <li title="The cref DTD"><a href="refman_dtds.html#id2261823">The cref DTD</a></li> <li title="The erlref DTD"><a href="refman_dtds.html#id2253008">The erlref DTD</a></li> <li title="The fileref DTD"><a href="refman_dtds.html#id2255212">The fileref DTD</a></li> <li title="<description>"><a href="refman_dtds.html#id2252314"><description></a></li> <li title="<section>"><a href="refman_dtds.html#id2261020"><section></a></li> <li title="<funcs>"><a href="refman_dtds.html#id2261064"><funcs></a></li> <li title="<func>"><a href="refman_dtds.html#id2261090"><func></a></li> <li title="<name>"><a href="refman_dtds.html#id2261135"><name></a></li> <li title="<fsummary>"><a href="refman_dtds.html#id2265198"><fsummary></a></li> <li title="<type>"><a href="refman_dtds.html#id2265227"><type></a></li> <li title="<v>"><a href="refman_dtds.html#id2265260"><v></a></li> <li title="<d>"><a href="refman_dtds.html#id2265277"><d></a></li> <li title="<desc>"><a href="refman_dtds.html#id2265306"><desc></a></li> <li title="<authors>"><a href="refman_dtds.html#id2265337"><authors></a></li> <li title="<aname>"><a href="refman_dtds.html#id2265373"><aname></a></li> <li title="<email>"><a href="refman_dtds.html#id2265389"><email></a></li> </ul> </li> <li id="no" title="Fascicules DTDs" expanded="false">Fascicules DTDs<ul> <li><a href="fasc_dtds.html"> Top of chapter </a></li> <li title="The fascicules DTD"><a href="fasc_dtds.html#id2265458">The fascicules DTD</a></li> <li title="<fascicules>"><a href="fasc_dtds.html#id2265565"><fascicules></a></li> <li title="<fascicule>"><a href="fasc_dtds.html#id2265595"><fascicule></a></li> </ul> </li> <li id="no" title="Header Tags" expanded="false">Header Tags<ul> <li><a href="header_tags.html"> Top of chapter </a></li> <li title="<header>"><a href="header_tags.html#id2263347"><header></a></li> <li title="<copyright>"><a href="header_tags.html#id2263363"><copyright></a></li> <li title="<legalnotice>"><a href="header_tags.html#id2263412"><legalnotice></a></li> <li title="<title>"><a href="header_tags.html#id2263441"><title></a></li> <li title="<shorttitle>"><a href="header_tags.html#id2263474"><shorttitle></a></li> <li title="<prepared>"><a href="header_tags.html#id2263492"><prepared></a></li> <li title="<responsible>"><a href="header_tags.html#id2263509"><responsible></a></li> <li title="<docno>"><a href="header_tags.html#id2263526"><docno></a></li> <li title="<approved>"><a href="header_tags.html#id2263559"><approved></a></li> <li title="<checked>"><a href="header_tags.html#id2263576"><checked></a></li> <li title="<date>"><a href="header_tags.html#id2263594"><date></a></li> <li title="<rev>"><a href="header_tags.html#id2263611"><rev></a></li> <li title="<file>"><a href="header_tags.html#id2263644"><file></a></li> </ul> </li> <li id="loadscrollpos" title="Block Tags" expanded="true">Block Tags<ul> <li><a href="block_tags.html"> Top of chapter </a></li> <li title="<br> - Line Break"><a href="block_tags.html#id2263775"><br> - Line Break</a></li> <li title="<code> - Code Example"><a href="block_tags.html#id2263814"><code> - Code Example</a></li> <li title="<codeinclude> - Code Inclusion"><a href="block_tags.html#id2263872"><codeinclude> - Code Inclusion</a></li> <li title="<erleval> - Erlang Evaluation"><a href="block_tags.html#id2263953"><erleval> - Erlang Evaluation</a></li> <li title="<list> - List"><a href="block_tags.html#id2263989"><list> - List</a></li> <li title="<marker> - Marker"><a href="block_tags.html#id2264076"><marker> - Marker</a></li> <li title="<p> - Paragraph"><a href="block_tags.html#id2264104"><p> - Paragraph</a></li> <li title="<note> - Note"><a href="block_tags.html#id2264149"><note> - Note</a></li> <li title="<pre> - Pre-formatted Text"><a href="block_tags.html#id2264198"><pre> - Pre-formatted Text</a></li> <li title="<quote> - Quotation"><a href="block_tags.html#id2264278"><quote> - Quotation</a></li> <li title="<taglist> - Definition List"><a href="block_tags.html#id2264331"><taglist> - Definition List</a></li> <li title="<warning> - Warning"><a href="block_tags.html#id2264437"><warning> - Warning</a></li> <li title="<image> - Image"><a href="block_tags.html#id2264492"><image> - Image</a></li> <li title="<table> - Table"><a href="block_tags.html#id2264557"><table> - Table</a></li> </ul> </li> <li id="no" title="Inline Tags" expanded="false">Inline Tags<ul> <li><a href="inline_tags.html"> Top of chapter </a></li> <li title="<br> - Line Break"><a href="inline_tags.html#id2264769"><br> - Line Break</a></li> <li title="<c> - Code"><a href="inline_tags.html#id2264797"><c> - Code</a></li> <li title="<em> - Emphasis"><a href="inline_tags.html#id2264848"><em> - Emphasis</a></li> <li title="<marker> - Marker"><a href="inline_tags.html#id2264891"><marker> - Marker</a></li> <li title="<path> - Path"><a href="inline_tags.html#id2264939"><path> - Path</a></li> <li title="<seealso> - Local Cross Reference"><a href="inline_tags.html#id2265025"><seealso> - Local Cross Reference</a></li> <li title="<url> - Non-Local Cross Reference"><a href="inline_tags.html#id2265132"><url> - Non-Local Cross Reference</a></li> <li title="<term>, <termdef> - Glossary"><a href="inline_tags.html#id2266646"><term>, <termdef> - Glossary</a></li> <li title="<cite>, <citedef> - Bibliography"><a href="inline_tags.html#id2266761"><cite>, <citedef> - Bibliography</a></li> </ul> </li> <li id="no" title="Character Entities" expanded="false">Character Entities<ul> <li><a href="character_entities.html"> Top of chapter </a></li> <li title="Added Latin 1"><a href="character_entities.html#id2266872">Added Latin 1</a></li> </ul> </li> </ul> </div></div> <div id="content"> <div class="innertube"> <h1>6 Block Tags</h1> <p>Block tags typically define a separate block of information, such as a paragraph or a list.</p> <p>The following subset of block tags are common for all DTDs in the DocBuilder DTD suite: <a name="block_subset"></a> <span class="bold_code"><a href="#pTAG"><p></a></span>, <span class="bold_code"><a href="#preTAG"><pre></a></span>, <span class="bold_code"><a href="#codeTAG"><code></a></span>, <span class="bold_code"><a href="#listTAG"><list></a></span>, <span class="bold_code"><a href="#taglistTAG"><taglist></a></span>, <span class="bold_code"><a href="#codeincludeTAG"><codeinclude></a></span> and <span class="bold_code"><a href="#erlevalTAG"><erleval></a></span>. </p> <h3><a name="id2263775">6.1 <br> - Line Break</a></h3> <a name="brTAG"></a> <p>Forces a newline. Example:</p> <div class="example"><pre> Eat yourself<br/>senseless! </pre></div> <p>results in:</p> <p>Eat yourself<br>senseless!</p> <p>The <span class="code"><br></span> tag is both a block- and an inline tag.</p> <h3><a name="id2263814">6.2 <code> - Code Example</a></h3> <a name="codeTAG"></a> <p>Highlight code examples. Example:</p> <div class="example"><pre> <code> sum([H|T]) -> H + sum(T); sum([]) -> 0. </code> </pre></div> <p>results in:</p> <div class="example"><pre> sum([H|T]) -> H + sum(T); sum([]) -> 0. </pre></div> <p>There is an attribute <span class="code">type = "erl" | "c" | "none"</span>, but currently this attribute is ignored by DocBuilder. Default value is <span class="code">"none"</span></p> <div class="note"> <div class="label">Note</div> <div class="content"><p> <p>No tags are allowed within the tag and no <span class="bold_code"><a href="character_entities.html">character entities</a></span> are expanded.</p> </p></div> </div> <h3><a name="id2263872">6.3 <codeinclude> - Code Inclusion</a></h3> <a name="codeincludeTAG"></a> <p>Include external code snippets. The attribute <span class="code">file</span> gives the file name and <span class="code">tag</span> defines a string which delimits the code snippet. Example:</p> <div class="example"><pre> <codeinclude file="gazonk" tag="%% Erlang example"/> </pre></div> <p>results in:</p> <p>provided there is a file named <span class="code">gazonk</span> looking like this: </p> <div class="example"><pre> ... %% Erlang example -module(gazonk). start() -> {error,"Pid required!"}. start(Pid) -> spawn(fun() -> init(Pid) end). %% Erlang example ... </pre></div> <p>If the <span class="code">tag</span> attribute is omitted, the whole file is included.</p> <p>There is also an attribute <span class="code">type = "erl" | "c" | "none"</span>, but currently this attribute is ignored by DocBuilder. Default value is <span class="code">"none"</span></p> <h3><a name="id2263953">6.4 <erleval> - Erlang Evaluation</a></h3> <a name="erlevalTAG"></a> <p>Include the result from evaluating an Erlang expression. Example: </p> <div class="example"><pre> <erleval expr="{A,b,C}={a,b,c}. "/> </pre></div> <p>results in:</p> <p>Note the '.' and space after the expression.</p> <h3><a name="id2263989">6.5 <list> - List</a></h3> <a name="listTAG"></a> <p>The attribute <span class="code">type = "ordered"|"bulleted"</span> decides if the list is numbered or bulleted. Default is <span class="code">"bulleted"</span>. </p> <p>Lists contains list items, tag <span class="code"><item></span>, which can contain plain text, the <span class="bold_code"><a href="#block_subset">common subset of block tags</a></span> and <span class="bold_code"><a href="inline_tags.html">inline tags</a></span>. Example:</p> <div class="example"><pre> <list type="ordered"> <item>Askosal: <list> <item>Nullalisis</item> <item>Facilisis</item> </list> </item> <item>Ankara</item> </list> </pre></div> <p>results in:</p> <ul> <li> <p>Askosal:</p> <ul> <li>Nullalisis</li> <li>Facilisis</li> </ul> </li> <li>Ankara</li> </ul> <h3><a name="id2264076">6.6 <marker> - Marker</a></h3> <a name="markerTAG"></a> <p>Used as an anchor for hypertext references. The <span class="code"><marker></span> tag is both a block- and an inline tag and is described in the <span class="bold_code"><a href="inline_tags.html#markerTAG">Inline Tags</a></span> section.</p> <h3><a name="id2264104">6.7 <p> - Paragraph</a></h3> <a name="pTAG"></a> <p>Paragraphs contain plain text and <span class="bold_code"><a href="inline_tags.html">inline tags</a></span>. Example:</p> <div class="example"><pre> <p>I call specific attention to the authority given by the <em>21st Amendment</em> to the Constitution to prohibit transportation or importation of intoxicating liquors into any State in violation of the laws of such State.</p> </pre></div> <p>results in:</p> <p>I call specific attention to the authority given by the <strong>21st Amendment</strong> to the Constitution to prohibit transportation or importation of intoxicating liquors into any State in violation of the laws of such State.</p> <h3><a name="id2264149">6.8 <note> - Note</a></h3> <a name="noteTAG"></a> <p>Highlights a note. Can contain block tags except <span class="code"><note></span>, <span class="code"><warning></span>, <span class="code"><image></span> and <span class="code"><table></span>. Example:</p> <div class="example"><pre> <note> <p>This function is mainly intended for debugging.</p> </note> </pre></div> <p>results in:</p> <div class="note"> <div class="label">Note</div> <div class="content"><p> <p>This function is mainly intended for debugging.</p> </p></div> </div> <h3><a name="id2264198">6.9 <pre> - Pre-formatted Text</a></h3> <a name="preTAG"></a> <p>Used for documentation of system interaction. Can contain text, <span class="bold_code"><a href="inline_tags.html#seealsoTAG">seealso</a></span>, <span class="bold_code"><a href="inline_tags.html#urlTAG">url</a></span> and <span class="code"><input></span> tags.</p> <p>The <span class="code"><input></span> tag is used to highlight user input. Example:</p> <div class="example"><pre> <pre> $ <input>erl</input> Erlang (BEAM) emulator version 5.5.3 [async-threads:0] [hipe] [kernel-poll:false] Eshell V5.5.3 (abort with ^G) 1> <input>pwd().</input> /home/user 2> <input>halt().</input> </pre> </pre></div> <p> results in:</p> <div class="example"><pre> $ <span class="bold_code">erl</span> Erlang (BEAM) emulator version 5.5.3 [async-threads:0] [hipe] [kernel-poll:false] Eshell V5.5.3 (abort with ^G) 1> <span class="bold_code">pwd().</span> /home/user 2> <span class="bold_code">halt().</span> </pre></div> <p>All <span class="bold_code"><a href="character_entities.html">character entities</a></span> are expanded.</p> <h3><a name="id2264278">6.10 <quote> - Quotation</a></h3> <a name="quoteTAG"></a> <p>Highlight quotations from other works, or dialog spoken by characters in a narrative. Contains one or more <span class="bold_code"><a href="#pTAG"><p></a></span> tags. Example:</p> <div class="example"><pre> <p>Whereas Section 217(a) of the Act of Congress entitled "An Act ..." approved June 16, 1933, provides as follows:</p> <quote> <p>Section 217(a) The President shall proclaim the law.</p> </quote> </pre></div> <p>results in:</p> <p>Whereas Section 217(a) of the Act of Congress entitled "An Act ..." approved June 16, 1933, provides as follows:</p> <p>Section 217(a) The President shall proclaim the law.</p> <h3><a name="id2264331">6.11 <taglist> - Definition List</a></h3> <a name="taglistTAG"></a> <a name="tagTAG"></a> <p>Definition lists contains pairs of tags, <span class="code"><tag></span>, and list items, <span class="code"><item></span>.</p> <p><span class="code"><tag></span> can contain plain text, <span class="bold_code"><a href="inline_tags.html#cTAG"><c></a></span>, <span class="bold_code"><a href="inline_tags.html#emTAG"><em></a></span>, <span class="bold_code"><a href="inline_tags.html#seealsoTAG"><seealso></a></span> and <span class="bold_code"><a href="inline_tags.html#urlTAG"><url></a></span> tags.</p> <p><span class="code"><item></span> can contain plain text, the <span class="bold_code"><a href="#block_subset">common subset of block tags</a></span> and <span class="bold_code"><a href="inline_tags.html">inline tags</a></span>. Example:</p> <div class="example"><pre> <taglist> <tag><c>eacces</c></tag> <item>Permission denied.</item> <tag><c>enoent</c></tag> <item>No such file or directory.</item> </taglist> </pre></div> <p>results in:</p> <dl> <dt><strong><span class="code">eacces</span></strong></dt> <dd>Permission denied.</dd> <dt><strong><span class="code">enoent</span></strong></dt> <dd>No such file or directory.</dd> </dl> <h3><a name="id2264437">6.12 <warning> - Warning</a></h3> <a name="warningTAG"></a> <p>Highlights a warning. Can contain block tags except <span class="code"><note></span>, <span class="code"><warning></span>, <span class="code"><image></span> and <span class="code"><table></span>. Example:</p> <div class="example"><pre> <warning> <p>This function might be removed in a future version without prior warning.</p> </warning> </pre></div> <p>results in:</p> <div class="warning"> <div class="label">Warning</div> <div class="content"><p> <p>This function might be removed in a future version without prior warning.</p> </p></div> </div> <h3><a name="id2264492">6.13 <image> - Image</a></h3> <a name="imageTAG"></a> <a name="icaptionTAG"></a> <p>Graphics is imported using the <span class="code"><image></span> tag. An image caption <span class="code"><icaption></span>, containing plain text, must be supplied. Example:</p> <div class="example"><pre> <image file="man"> <icaption>A Silly Man</icaption> </image> </pre></div> <p>results in:</p> <img alt="IMAGE MISSING" src="man.gif"><br> <em>Figure 6.1: A Silly Man</em> <p>This assumes that <span class="code">man.gif</span> exists in the current directory. </p> <h3><a name="id2264557">6.14 <table> - Table</a></h3> <a name="tableTAG"></a> <a name="rowTAG"></a> <a name="cellTAG"></a> <a name="tcaptionTAG"></a> <p>The table format is similar to how tables are described in HTML 3.2. A table contains one or more rows, <span class="code"><row></span>, and a table caption <span class="code"><tcaption></span>, containing plain text.</p> <p>Each row contains one or more cells, <span class="code"><cell></span>. The attributes <span class="code">align = "left"|"center"|"right"</span> and <span class="code">valign = "top"|"middle"|"bottom"</span> decides how text is aligned in the cell horizontally and vertically. Default is "<span class="code">left</span>" and "<span class="code">middle</span>".</p> <p>Each cell contains plain text and <span class="bold_code"><a href="inline_tags.html">inline tags</a></span>. Example:</p> <div class="example"><pre> <table> <row> <cell align="left" valign="top"><em>Boys</em></cell> <cell align="center" valign="middle"><em>Girls</em></cell> </row> <row> <cell align="left" valign="middle">Juda</cell> <cell align="right" valign="bottom">Susy</cell> </row> <row> <cell align="left" valign="middle">Anders</cell> <cell align="left" valign="middle">Victoria</cell> </row> <tcaption>A table caption</tcaption> </table> </pre></div> <p>results in:</p> <table border="1" cellpadding="2" cellspacing="0"> <tr> <td align="left" valign="middle"><strong>Boys</strong></td> <td align="left" valign="middle"><strong>Girls</strong></td> </tr> <tr> <td align="left" valign="middle">Juda</td> <td align="left" valign="middle">Susy</td> </tr> <tr> <td align="left" valign="middle">Anders</td> <td align="left" valign="middle">Victoria</td> </tr> </table> <em>Table 6.1: A table caption</em> </div> <div class="footer"> <hr> <p>Copyright © 1997-2010 Ericsson AB. All Rights Reserved.</p> </div> </div> </div></body> </html>