/usr/share/doc/racket/scribble/layers.html is in racket-doc 6.7-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>6.1 Scribble Layers</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_0");">►</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x">Scribble:<span class="mywbr"> </span> The Racket Documentation Tool</a></td></tr></table></div><div class="tocviewsublisttop" style="display: none;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1 </td><td><a href="getting-started.html" class="tocviewlink" data-pltdoc="x">Getting Started</a></td></tr><tr><td align="right">2 </td><td><a href="reader.html" class="tocviewlink" data-pltdoc="x">@ Syntax</a></td></tr><tr><td align="right">3 </td><td><a href="generic-prose.html" class="tocviewlink" data-pltdoc="x">High-<wbr></wbr>Level Scribble API</a></td></tr><tr><td align="right">4 </td><td><a href="plt-manuals.html" class="tocviewlink" data-pltdoc="x">Scribbling Documentation</a></td></tr><tr><td align="right">5 </td><td><a href="lp.html" class="tocviewlink" data-pltdoc="x">Literate Programming</a></td></tr><tr><td align="right">6 </td><td><a href="internals.html" class="tocviewselflink" data-pltdoc="x">Low-<wbr></wbr>Level Scribble API</a></td></tr><tr><td align="right">7 </td><td><a href="running.html" class="tocviewlink" data-pltdoc="x">Running <span class="stt">scribble</span></a></td></tr><tr><td align="right"></td><td><a href="doc-index.html" class="tocviewlink" data-pltdoc="x">Index</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_1");">▼</a></td><td>6 </td><td><a href="internals.html" class="tocviewlink" data-pltdoc="x">Low-<wbr></wbr>Level Scribble API</a></td></tr></table><div class="tocviewsublist" style="display: block;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">6.1 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">Scribble Layers</a></td></tr><tr><td align="right">6.2 </td><td><a href="reader-internals.html" class="tocviewlink" data-pltdoc="x">@ Reader Internals</a></td></tr><tr><td align="right">6.3 </td><td><a href="core.html" class="tocviewlink" data-pltdoc="x">Structures And Processing</a></td></tr><tr><td align="right">6.4 </td><td><a href="renderer.html" class="tocviewlink" data-pltdoc="x">Renderers</a></td></tr><tr><td align="right">6.5 </td><td><a href="decode.html" class="tocviewlink" data-pltdoc="x">Decoding Text</a></td></tr><tr><td align="right">6.6 </td><td><a href="doclang.html" class="tocviewlink" data-pltdoc="x">Document Language</a></td></tr><tr><td align="right">6.7 </td><td><a href="docreader.html" class="tocviewlink" data-pltdoc="x">Document Reader</a></td></tr><tr><td align="right">6.8 </td><td><a href="xref.html" class="tocviewlink" data-pltdoc="x">Cross-<wbr></wbr>Reference Utilities</a></td></tr><tr><td align="right">6.9 </td><td><a href="tag.html" class="tocviewlink" data-pltdoc="x">Tag Utilities</a></td></tr><tr><td align="right">6.10 </td><td><a href="blueboxes.html" class="tocviewlink" data-pltdoc="x">Blue Boxes Utilities</a></td></tr><tr><td align="right">6.11 </td><td><a href="config.html" class="tocviewlink" data-pltdoc="x">Extending and Configuring Scribble Output</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_2");">►</a></td><td>6.1 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">Scribble Layers</a></td></tr></table><div class="tocviewsublistbottom" style="display: none;" id="tocview_2"><table cellspacing="0" cellpadding="0"><tr><td align="right">6.1.1 </td><td><a href="#%28part._.Typical_.Composition%29" class="tocviewlink" data-pltdoc="x">Typical Composition</a></td></tr><tr><td align="right">6.1.2 </td><td><a href="#%28part._.Layer_.Roadmap%29" class="tocviewlink" data-pltdoc="x">Layer Roadmap</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><span class="tocsublinknumber">6.1.1<tt> </tt></span><a href="#%28part._.Typical_.Composition%29" class="tocsubseclink" data-pltdoc="x">Typical Composition</a></td></tr><tr><td><span class="tocsublinknumber">6.1.2<tt> </tt></span><a href="#%28part._.Layer_.Roadmap%29" class="tocsubseclink" data-pltdoc="x">Layer Roadmap</a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.7", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.7");">top</a></span><span class="navright"> <a href="internals.html" title="backward to "6 Low-Level Scribble API"" data-pltdoc="x">← prev</a> <a href="internals.html" title="up to "6 Low-Level Scribble API"" data-pltdoc="x">up</a> <a href="reader-internals.html" title="forward to "6.2 @ Reader Internals"" data-pltdoc="x">next →</a></span> </div><h4 x-source-module="(lib "scribblings/scribble/scribble.scrbl")" x-source-pkg="scribble-doc" x-part-tag=""layers"">6.1<tt> </tt><a name="(part._layers)"></a>Scribble Layers</h4><p>Scribble is made of independently usable parts. For example, the
Scribble reader can be used in any situation that requires lots of
free-form text. You can also skip Scribble’s special reader support,
and instead use the document-generation structure directly.</p><h5 x-source-module="(lib "scribblings/scribble/scribble.scrbl")" x-source-pkg="scribble-doc" x-part-tag=""Typical_Composition"">6.1.1<tt> </tt><a name="(part._.Typical_.Composition)"></a>Typical Composition</h5><p>A Scribble document normally starts</p><blockquote class="SCodeFlow"><p><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=guide&rel=Module_Syntax.html%23%2528part._hash-lang%2529&version=6.7" class="RktModLink Sq" data-pltdoc="x"><span class="RktMod">#lang</span></a><span class="hspace"> </span><a href="manual.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/manual</span></a></p></blockquote><p>but it could also start</p><blockquote class="SCodeFlow"><p><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=guide&rel=Module_Syntax.html%23%2528part._hash-lang%2529&version=6.7" class="RktModLink Sq" data-pltdoc="x"><span class="RktMod">#lang</span></a><span class="hspace"> </span><a href="base.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/base</span></a></p></blockquote><p>or</p><blockquote class="SCodeFlow"><p><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=guide&rel=Module_Syntax.html%23%2528part._hash-lang%2529&version=6.7" class="RktModLink Sq" data-pltdoc="x"><span class="RktMod">#lang</span></a><span class="hspace"> </span><a href="docreader.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/doc</span></a></p></blockquote><p>The last one introduces the smallest number of typesetting bindings in
the document body. Using <a href="base.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/base</span></a> after
<a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=guide&rel=Module_Syntax.html%23%2528part._hash-lang%2529&version=6.7" class="RktModLink Sq" data-pltdoc="x"><span class="RktMod">#lang</span></a> is the same as using <a href="docreader.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/doc</span></a> plus
<span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><span class="RktSym">scribble/base</span><span class="RktPn">)</span>, and using
<a href="manual.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/manual</span></a> after <a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=guide&rel=Module_Syntax.html%23%2528part._hash-lang%2529&version=6.7" class="RktModLink Sq" data-pltdoc="x"><span class="RktMod">#lang</span></a> is the same as using
<a href="docreader.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/doc</span></a> plus <span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><span class="RktSym">scribble/manual</span><span class="RktPn">)</span>.</p><p>Besides making the file a module, each of the <a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=guide&rel=Module_Syntax.html%23%2528part._hash-lang%2529&version=6.7" class="RktModLink Sq" data-pltdoc="x"><span class="RktMod">#lang</span></a>
declarations selects the Scribble reader (instead of the usual Racket
reader), and it starts the body of the file in “text” mode. The
reader layer mostly leaves text alone, but <a href="reader.html#%28tech._~40._form%29" class="techoutside" data-pltdoc="x"><span class="techinside">@-forms</span></a> escape
to S-expression mode.</p><p>A module written as</p><p><table cellspacing="0" cellpadding="0"><tr><td><p><span class="hspace"> </span><span class="stt">#lang scribble/doc</span></p></td></tr><tr><td><p><span class="hspace"> </span><span class="stt">@(require scribble/manual)</span></p></td></tr><tr><td><p><span class="hspace"> </span><span class="stt"></span></p></td></tr><tr><td><p><span class="hspace"> </span><span class="stt">@(define to-be "To Be")</span></p></td></tr><tr><td><p><span class="hspace"> </span><span class="stt"></span></p></td></tr><tr><td><p><span class="hspace"> </span><span class="stt">@title{@|to-be| or Not @|to-be|}</span></p></td></tr><tr><td><p><span class="hspace"> </span><span class="stt"></span></p></td></tr><tr><td><p><span class="hspace"> </span><span class="stt">@bold{That} is the question.</span></p></td></tr><tr><td><p><span class="hspace"> </span><span class="stt">Whether 'tis nobler...</span></p></td></tr></table></p><p>reads as</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=module.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._module%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">module</a></span><span class="hspace"> </span><span class="sroman">‹<span style="font-style: italic">name</span>›</span><span class="hspace"> </span><span class="RktSym">scribble/doc</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="hspace"> </span><span class="RktSym">scribble/manual</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVal">"\n"</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym">to-be</span><span class="hspace"> </span><span class="RktVal">"To Be"</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">"\n"</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVal">"\n"</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="base.html#%28def._%28%28lib._scribble%2Fbase..rkt%29._title%29%29" class="RktValLink" data-pltdoc="x">title</a></span><span class="hspace"> </span><span class="RktSym">to-be</span><span class="hspace"> </span><span class="RktVal">" or Not "</span><span class="hspace"> </span><span class="RktSym">to-be</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">"\n"</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVal">"\n"</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="base.html#%28def._%28%28lib._scribble%2Fbase..rkt%29._bold%29%29" class="RktValLink" data-pltdoc="x">bold</a></span><span class="hspace"> </span><span class="RktVal">"That"</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">" is the question."</span><span class="hspace"> </span><span class="RktVal">"\n"</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVal">"Whether 'tis nobler..."</span><span class="hspace"> </span><span class="RktVal">"\n"</span><span class="RktPn">)</span></td></tr></table></blockquote><p>As shown in this example, the read result is a module whose content
mingles text and definitions. The <a href="docreader.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/doc</span></a>
language lifts definitions, <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span>s, and <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._provide%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">provide</a></span>s
to the beginning of the module, while everything else is collected
into a document bound to the provided identifier <span class="RktSym">doc</span>. That
is, the module is transformed to something like this:</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=module.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._module%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">module</a></span><span class="hspace"> </span><span class="sroman">‹<span style="font-style: italic">name</span>›</span><span class="hspace"> </span><span class="RktSym">racket/base</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="hspace"> </span><span class="RktSym">scribble/decode</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">scribble/manual</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym">to-be</span><span class="hspace"> </span><span class="RktVal">"To Be"</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym">doc</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="decode.html#%28def._%28%28lib._scribble%2Fdecode..rkt%29._decode%29%29" class="RktValLink" data-pltdoc="x">decode</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVal">"\n"</span><span class="hspace"> </span><span class="RktVal">"\n"</span><span class="hspace"> </span><span class="RktVal">"\n"</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="base.html#%28def._%28%28lib._scribble%2Fbase..rkt%29._title%29%29" class="RktValLink" data-pltdoc="x">title</a></span><span class="hspace"> </span><span class="RktSym">to-be</span><span class="hspace"> </span><span class="RktVal">" or Not "</span><span class="hspace"> </span><span class="RktSym">to-be</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">"\n"</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVal">"\n"</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="base.html#%28def._%28%28lib._scribble%2Fbase..rkt%29._bold%29%29" class="RktValLink" data-pltdoc="x">bold</a></span><span class="hspace"> </span><span class="RktVal">"That"</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">" is the question."</span><span class="hspace"> </span><span class="RktVal">"\n"</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVal">"Whether 'tis nobler..."</span><span class="hspace"> </span><span class="RktVal">"\n"</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._provide%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">provide</a></span><span class="hspace"> </span><span class="RktSym">doc</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote><p>The <span class="RktSym"><a href="decode.html#%28def._%28%28lib._scribble%2Fdecode..rkt%29._decode%29%29" class="RktValLink" data-pltdoc="x">decode</a></span> function produces a <span class="RktSym"><a href="core.html#%28def._%28%28lib._scribble%2Fcore..rkt%29._part%29%29" class="RktValLink" data-pltdoc="x">part</a></span> structure
instance that represents the document. To build the <span class="RktSym"><a href="core.html#%28def._%28%28lib._scribble%2Fcore..rkt%29._part%29%29" class="RktValLink" data-pltdoc="x">part</a></span>
instance, it inspects its arguments to find a <span class="RktSym"><a href="decode.html#%28def._%28%28lib._scribble%2Fdecode..rkt%29._title-decl%29%29" class="RktValLink" data-pltdoc="x">title-decl</a></span>
value created by <span class="RktSym"><a href="base.html#%28def._%28%28lib._scribble%2Fbase..rkt%29._title%29%29" class="RktValLink" data-pltdoc="x">title</a></span> to name the part, <span class="RktSym"><a href="decode.html#%28def._%28%28lib._scribble%2Fdecode..rkt%29._part-start%29%29" class="RktValLink" data-pltdoc="x">part-start</a></span>
values created by <span class="RktSym"><a href="base.html#%28def._%28%28lib._scribble%2Fbase..rkt%29._section%29%29" class="RktValLink" data-pltdoc="x">section</a></span> to designate sub-parts, etc.</p><p>A <span class="RktSym"><a href="core.html#%28def._%28%28lib._scribble%2Fcore..rkt%29._part%29%29" class="RktValLink" data-pltdoc="x">part</a></span> is the input to a rendering back-end, such as the HTML
renderer. All renderers recognize a fixed structure hierarchy: the
content of a part is a <span style="font-style: italic">flow</span>, which is a sequence of
<span style="font-style: italic">flow elements</span>, such as paragraphs and tables; a table, in
turn, consists of a list of list of flows; a paragraph is a list of
<span style="font-style: italic">elements</span>, which can be instances of the <span class="RktSym"><a href="core.html#%28def._%28%28lib._scribble%2Fcore..rkt%29._element%29%29" class="RktValLink" data-pltdoc="x">element</a></span>
structure type, plain strings, or certain special symbols.</p><p>The value bound to <span class="RktSym">doc</span> in the example above is something like</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="core.html#%28def._%28%28lib._scribble%2Fcore..rkt%29._make-part%29%29" class="RktValLink" data-pltdoc="x">make-part</a></span><span class="hspace"> </span><span class="RktSym">....</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">list</a></span><span class="hspace"> </span><span class="RktVal">"To Be"</span><span class="hspace"> </span><span class="RktVal">" or Not "</span><span class="hspace"> </span><span class="RktVal">"To Be"</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktCmt">;</span><span class="RktCmt"> </span><span class="RktCmt">title</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">....</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">make-flow</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">list</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="core.html#%28def._%28%28lib._scribble%2Fcore..rkt%29._make-paragraph%29%29" class="RktValLink" data-pltdoc="x">make-paragraph</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">list</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="core.html#%28def._%28%28lib._scribble%2Fcore..rkt%29._make-element%29%29" class="RktValLink" data-pltdoc="x">make-element</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">bold</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">list</a></span><span class="hspace"> </span><span class="RktVal">"That"</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVal">" is the question."</span><span class="hspace"> </span><span class="RktVal">"\n"</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVal">"Whether "</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">rsquo</span><span class="hspace"> </span><span class="RktVal">"tis nobler..."</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">....</span><span class="RktPn">)</span></td></tr></table></blockquote><p>Notice that the <span class="RktInBG"><span class="hspace"></span><span class="RktIn">'</span><span class="hspace"></span></span> in the input’s <span class="RktInBG"><span class="hspace"></span><span class="RktIn">'tis</span><span class="hspace"></span></span> has turned
into <span class="RktVal">'</span><span class="RktVal">rsquo</span> (rendered as a curly apostrophe). The conversion to use
<span class="RktVal">'</span><span class="RktVal">rsquo</span> was performed by <span class="RktSym"><a href="decode.html#%28def._%28%28lib._scribble%2Fdecode..rkt%29._decode%29%29" class="RktValLink" data-pltdoc="x">decode</a></span> via
<span class="RktSym"><a href="decode.html#%28def._%28%28lib._scribble%2Fdecode..rkt%29._decode-flow%29%29" class="RktValLink" data-pltdoc="x">decode-flow</a></span> via <span class="RktSym"><a href="decode.html#%28def._%28%28lib._scribble%2Fdecode..rkt%29._decode-paragraph%29%29" class="RktValLink" data-pltdoc="x">decode-paragraph</a></span> via
<span class="RktSym"><a href="decode.html#%28def._%28%28lib._scribble%2Fdecode..rkt%29._decode-content%29%29" class="RktValLink" data-pltdoc="x">decode-content</a></span> via <span class="RktSym"><a href="decode.html#%28def._%28%28lib._scribble%2Fdecode..rkt%29._decode-string%29%29" class="RktValLink" data-pltdoc="x">decode-string</a></span>.</p><p>In contrast, <span class="RktPn">(</span><span class="RktSym"><a href="core.html#%28def._%28%28lib._scribble%2Fcore..rkt%29._make-element%29%29" class="RktValLink" data-pltdoc="x">make-element</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">bold</span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">list</a></span><span class="stt"> </span><span class="RktVal">"That"</span><span class="RktPn">)</span><span class="RktPn">)</span> was produced
by the <span class="RktSym"><a href="base.html#%28def._%28%28lib._scribble%2Fbase..rkt%29._bold%29%29" class="RktValLink" data-pltdoc="x">bold</a></span> function. The <span class="RktSym"><a href="decode.html#%28def._%28%28lib._scribble%2Fdecode..rkt%29._decode%29%29" class="RktValLink" data-pltdoc="x">decode</a></span> operation is a
function, not a syntactic form, and so <span class="RktSym"><a href="base.html#%28def._%28%28lib._scribble%2Fbase..rkt%29._bold%29%29" class="RktValLink" data-pltdoc="x">bold</a></span> has control over
its argument before <span class="RktSym"><a href="decode.html#%28def._%28%28lib._scribble%2Fdecode..rkt%29._decode%29%29" class="RktValLink" data-pltdoc="x">decode</a></span> sees the result. Also, decoding
traverses only immediate string arguments.</p><p>As it turns out, <span class="RktSym"><a href="base.html#%28def._%28%28lib._scribble%2Fbase..rkt%29._bold%29%29" class="RktValLink" data-pltdoc="x">bold</a></span> also decodes its argument, because the
<span class="RktSym"><a href="base.html#%28def._%28%28lib._scribble%2Fbase..rkt%29._bold%29%29" class="RktValLink" data-pltdoc="x">bold</a></span> function is implemented as</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="base.html#%28def._%28%28lib._scribble%2Fbase..rkt%29._bold%29%29" class="RktValLink" data-pltdoc="x">bold</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym">strs</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="core.html#%28def._%28%28lib._scribble%2Fcore..rkt%29._make-element%29%29" class="RktValLink" data-pltdoc="x">make-element</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">bold</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="decode.html#%28def._%28%28lib._scribble%2Fdecode..rkt%29._decode-content%29%29" class="RktValLink" data-pltdoc="x">decode-content</a></span><span class="hspace"> </span><span class="RktSym">strs</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote><p>The <span class="RktSym"><a href="base.html#%28def._%28%28lib._scribble%2Fbase..rkt%29._verbatim%29%29" class="RktValLink" data-pltdoc="x">verbatim</a></span> function, however, does not decode its content,
and instead typesets its text arguments directly.</p><p>A document module can construct elements directly using
<span class="RktSym"><a href="core.html#%28def._%28%28lib._scribble%2Fcore..rkt%29._make-element%29%29" class="RktValLink" data-pltdoc="x">make-element</a></span>, but normally functions like <span class="RktSym"><a href="base.html#%28def._%28%28lib._scribble%2Fbase..rkt%29._bold%29%29" class="RktValLink" data-pltdoc="x">bold</a></span> and
<span class="RktSym"><a href="base.html#%28def._%28%28lib._scribble%2Fbase..rkt%29._verbatim%29%29" class="RktValLink" data-pltdoc="x">verbatim</a></span> are used to construct them. In particular, the
<a href="manual.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/manual</span></a> library provides many functions and
forms to typeset elements and flow elements.</p><p>The <span class="RktSym"><a href="core.html#%28def._%28%28lib._scribble%2Fcore..rkt%29._part%29%29" class="RktValLink" data-pltdoc="x">part</a></span> structure hierarchy includes built-in element types
for setting hyperlink targets and references. Again, this machinery is
normally packaged into higher-level functions and forms, such as
<span class="RktSym"><a href="base.html#%28def._%28%28lib._scribble%2Fbase..rkt%29._secref%29%29" class="RktValLink" data-pltdoc="x">secref</a></span>, <span class="RktSym"><a href="doc-forms.html#%28form._%28%28lib._scribble%2Fmanual..rkt%29._defproc%29%29" class="RktStxLink" data-pltdoc="x">defproc</a></span>, and <span class="RktSym"><a href="scribble_manual_code.html#%28form._%28%28lib._scribble%2Fmanual..rkt%29._racket%29%29" class="RktStxLink" data-pltdoc="x">racket</a></span>.</p><h5 x-source-module="(lib "scribblings/scribble/scribble.scrbl")" x-source-pkg="scribble-doc" x-part-tag=""Layer_Roadmap"">6.1.2<tt> </tt><a name="(part._.Layer_.Roadmap)"></a>Layer Roadmap</h5><p>Working roughly from the bottom up, the Scribble layers are:</p><ul><li><p><a href="reader-internals.html#%28mod-path._scribble%2Freader%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/reader</span></a>: A reader that extends the
syntax of Racket with <a href="reader.html#%28tech._~40._form%29" class="techoutside" data-pltdoc="x"><span class="techinside">@-forms</span></a> for conveniently embedding a
mixin of text and escapes. See <a href="reader.html" data-pltdoc="x">@ Syntax</a>.</p></li><li><p><a href="core.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/core</span></a>: A set of document datatypes
and utilities that define the basic layout and processing of a
document. For example, the <span class="RktSym"><a href="core.html#%28def._%28%28lib._scribble%2Fcore..rkt%29._part%29%29" class="RktValLink" data-pltdoc="x">part</a></span> datatype is defined in
this layer. See <a href="core.html" data-pltdoc="x">Structures And Processing</a>.</p></li><li><p><a href="renderer.html#%28mod-path._scribble%2Fbase-render%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/base-render</span></a> with
<a href="renderer.html#%28mod-path._scribble%2Fhtml-render%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/html-render</span></a>,
<a href="renderer.html#%28mod-path._scribble%2Flatex-render%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/latex-render</span></a>, or
<a href="renderer.html#%28mod-path._scribble%2Ftext-render%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/text-render</span></a>: A base renderer and
mixins that generate documents in various formats from
instances of the <a href="Compatibility_Libraries.html#%28mod-path._scribble%2Fstruct%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/struct</span></a> datatypes. See
<a href="renderer.html" data-pltdoc="x">Renderers</a>.</p></li><li><p><a href="decode.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/decode</span></a>: Processes a stream of text,
section-start markers, etc. to produce instances of the
<a href="core.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/core</span></a> datatypes. See
<a href="decode.html" data-pltdoc="x">Decoding Text</a>.</p></li><li><p><a href="doclang.html#%28mod-path._scribble%2Fdoclang%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/doclang</span></a>: A language to be used for the
initial import of a module; processes the module top level
through <a href="decode.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/decode</span></a>, and otherwise provides
all of <a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=index.html&version=6.7" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">racket/base</span></a>. See <a href="doclang.html" data-pltdoc="x">Document Language</a>.</p></li><li><p><a href="docreader.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/doc</span></a>: A language that combines
<a href="reader-internals.html#%28mod-path._scribble%2Freader%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/reader</span></a> with
<a href="doclang.html#%28mod-path._scribble%2Fdoclang%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/doclang</span></a>. See <a href="docreader.html" data-pltdoc="x">Document Reader</a>.</p></li><li><p><a href="base.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/base</span></a>: A library of basic document
operators—<wbr></wbr>such as <span class="RktSym"><a href="base.html#%28def._%28%28lib._scribble%2Fbase..rkt%29._title%29%29" class="RktValLink" data-pltdoc="x">title</a></span>, <span class="RktSym"><a href="base.html#%28def._%28%28lib._scribble%2Fbase..rkt%29._section%29%29" class="RktValLink" data-pltdoc="x">section</a></span>, and
<span class="RktSym"><a href="base.html#%28def._%28%28lib._scribble%2Fbase..rkt%29._secref%29%29" class="RktValLink" data-pltdoc="x">secref</a></span>—<wbr></wbr>for use with <a href="decode.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/decode</span></a>
and a renderer. This library name also can be used as a
language, where it combines <a href="docreader.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/doc</span></a> with
the exports of <a href="base.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/base</span></a>. See
<a href="base.html" data-pltdoc="x">Base Document Format</a>.</p></li><li><p><a href="scheme.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/racket</span></a>: A library of functions for
typesetting Racket code. See <a href="scheme.html" data-pltdoc="x">Racket</a>. These functions
are not normally used directly, but instead used through
<a href="manual.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/manual</span></a>.</p></li><li><p><a href="manual.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/manual</span></a>: A library of functions for
writing Racket documentation; re-exports
<a href="base.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/base</span></a>. Also, the
<a href="index-entries.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/manual-struct</span></a> library provides types
for index-entry descriptions created by functions in
<a href="manual.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/manual</span></a>. See <a href="manual.html" data-pltdoc="x">Manual Forms</a>.</p></li><li><p><a href="eval.html#%28mod-path._scribble%2Feval%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/eval</span></a>: A library of functions for
evaluating code at document-build time, especially for showing
examples. See <a href="eval.html" data-pltdoc="x">Evaluation and Examples</a>.</p></li><li><p><a href="bnf.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/bnf</span></a>: A library of support functions
for writing grammars. See <a href="bnf.html" data-pltdoc="x">BNF Grammars</a>.</p></li><li><p><a href="xref.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/xref</span></a>: A library of support functions
for using cross-reference information, typically after a
document is rendered (e.g., to search). See <a href="xref.html" data-pltdoc="x">Cross-Reference Utilities</a>.</p></li><li><p><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=scribble-pp&rel=text.html&version=6.7" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">scribble/text</span></a>: A language that uses
<a href="reader-internals.html#%28mod-path._scribble%2Freader%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/reader</span></a> preprocessing text files.</p></li></ul><p>The <span class="stt">scribble</span> command-line utility generates output with a
specified renderer. More specifically, the executable installs a
renderer, loads the modules specified on the command line, extracts
the <span class="RktSym">doc</span> export of each module (which must be an instance of
<span class="RktSym"><a href="core.html#%28def._%28%28lib._scribble%2Fcore..rkt%29._part%29%29" class="RktValLink" data-pltdoc="x">part</a></span>), and renders each—<wbr></wbr>potentially with links that span
documents.</p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.7", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.7");">top</a></span><span class="navright"> <a href="internals.html" title="backward to "6 Low-Level Scribble API"" data-pltdoc="x">← prev</a> <a href="internals.html" title="up to "6 Low-Level Scribble API"" data-pltdoc="x">up</a> <a href="reader-internals.html" title="forward to "6.2 @ Reader Internals"" data-pltdoc="x">next →</a></span> </div></div></div><div id="contextindicator"> </div></body></html>
|