<html><head><metahttp-equiv="content-type"content="text/html; charset=utf-8"/><title>4 The big picture</title><linkrel="stylesheet"type="text/css"href="scribble.css"title="default"/><linkrel="stylesheet"type="text/css"href="racket.css"title="default"/><linkrel="stylesheet"type="text/css"href="manual-style.css"title="default"/><linkrel="stylesheet"type="text/css"href="manual-racket.css"title="default"/><scripttype="text/javascript"src="scribble-common.js"></script><scripttype="text/javascript"src="manual-racket.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><bodyid="scribble-racket-lang-org"><divclass="tocset"><divclass="tocview"><divclass="tocviewlist tocviewlisttopspace"><divclass="tocviewtitle"><tablecellspacing="0"cellpadding="0"><tr><tdstyle="width: 1em;"><ahref="javascript:void(0);"title="Expand/Collapse"class="tocviewtoggle"onclick="TocviewToggle(this,"tocview_0");">▼</a></td><td></td><td><ahref="index.html"class="tocviewlink"data-pltdoc="x">Pollen:<spanclass="mywbr"> </span> the book is a program</a></td></tr></table></div><divclass="tocviewsublisttop"style="display: block;"id="tocview_0"><tablecellspacing="0"cellpadding="0"><tr><tdalign="right">1 </td><td><ahref="Installation.html"class="tocviewlink"data-pltdoc="x">Installation</a></td></tr><tr><tdalign="right">2 </td><td><ahref="quick-tour.html"class="tocviewlink"data-pltdoc="x">Quick tour</a></td></tr><tr><tdalign="right">3 </td><td><ahref="Backstory.html"class="tocviewlink"data-pltdoc="x">Backstory</a></td></tr><tr><tdalign="right">4 </td><td><ahref="big-picture.html"class="tocviewselflink"data-pltdoc="x">The big picture</a></td></tr><tr><tdalign="right">5 </td><td><ahref="first-tutorial.html"class="tocviewlink"data-pltdoc="x">First tutorial</a></td></tr><tr><tdalign="right">6 </td><td><ahref="second-tutorial.html"class="tocviewlink"data-pltdoc="x">Second tutorial</a></td></tr><tr><tdalign="right">7 </td><td><ahref="raco-pollen.html"class="tocviewlink"data-pltdoc="x">Using <spanclass="stt">raco pollen</span></a></td></tr><tr><tdalign="right">8 </td><td><ahref="File_formats.html"class="tocviewlink"data-pltdoc="x">File formats</a></td></tr><tr><tdalign="right">9 </td><td><ahref="reader.html"class="tocviewlink"data-pltdoc="x">◊ command overview</a></td></tr><tr><tdalign="right">10 </td><td><ahref="Module_reference.html"class="tocviewlink"data-pltdoc="x">Module reference</a></td></tr><tr><tdalign="right">11 </td><td><ahref="Acknowledgments.html"class="tocviewlink"data-pltdoc="x">Acknowledgments</a></td></tr><tr><tdalign="right">12 </td><td><ahref="License___source_code.html"class="tocviewlink"data-pltdoc="x">License & source code</a></td></tr><tr><tdalign="right"></td><td><ahref="doc-index.html"class="tocviewlink"data-pltdoc="x">Index</a></td></tr></table></div></div><divclass="tocviewlist"><tablecellspacing="0"cellpadding="0"><tr><tdstyle="width: 1em;"><ahref="javascript:void(0);"title="Expand/Collapse"class="tocviewtoggle"onclick="TocviewToggle(this,"tocview_1");">►</a></td><td>4 </td><td><ahref="big-picture.html"class="tocviewselflink"data-pltdoc="x">The big picture</a></td></tr></table><divclass="tocviewsublistbottom"style="display: none;"id="tocview_1"><tablecellspacing="0"cellpadding="0"><tr><tdalign="right">4.1 </td><td><ahref="big-picture.html#%28part._.The_book_is_a_program%29"class="tocviewlink"data-pltdoc="x">The book is a program</a></td></tr><tr><tdalign="right">4.2 </td><td><ahref="big-picture.html#%28part._.One_language__multiple_dialects%29"class="tocviewlink"data-pltdoc="x">One language, multiple dialects</a></td></tr><tr><tdalign="right">4.3 </td><td><ahref="big-picture.html#%28part._.Development_environment%29"class="tocviewlink"data-pltdoc="x">Development environment</a></td></tr><tr><tdalign="right">4.4 </td><td><ahref="bi
</div><divclass="SIntrapara"><blockquoteclass="SCodeFlow"><tablecellspacing="0"cellpadding="0"class="RktBlk"><tr><td><ahref="http://docs.racket-lang.org/guide/Module_Syntax.html#%28part._hash-lang%29"class="RktModLink"data-pltdoc="x"><spanclass="RktMod">#lang</span></a><spanclass="hspace"> </span><ahref="index.html"class="RktModLink"data-pltdoc="x"><spanclass="RktSym">pollen</span></a></td></tr><tr><td><spanclass="RktSym">Hello</span><spanclass="hspace"> </span><spanclass="RktSym">world:</span><spanclass="hspace"> </span><spanclass="RktSym">how</span><spanclass="hspace"> </span><spanclass="RktSym">are</span><spanclass="hspace"> </span><spanclass="RktSym">you</span><spanclass="hspace"> </span><spanclass="RktSym">on</span><spanclass="hspace"> </span><spanclass="RktSym">this</span><spanclass="hspace"> </span><spanclass="RktSym">fine</span><spanclass="hspace"> </span><spanclass="RktSym">summer</span><spanclass="hspace"> </span><spanclass="RktSym">day?</span></td></tr></table></blockquote></div></p></li><li><p><spanstyle="font-weight: bold">Commands start with ◊.</span> A simple rule: if a piece of text starts with <spanclass="RktInBG"><spanclass="hspace"></span><spanclass="RktIn">◊</span><spanclass="hspace"></span></span>, it’s treated as a command; otherwise it’s treated as ordinary text.</p></li><li><p><spanstyle="font-weight: bold">Write commands in text mode or Racket mode.</span> Commands can use two equivalent notation systems: either Pollen’s text-mode command syntax, or standard Racket syntax.</p></li><li><p><spanstyle="font-weight: bold">Everything in Racket is in Pollen too.</span> This isn’t some dimwit “template language.” Racket is a fully provisioned programming language, and every Racket function is available in Pollen.</p></li></ul><h4>4.6<tt> </tt><aname="(part._.The_preprocessor)"></a>The preprocessor</h4><p>The <spanstyle="font-style: italic">preprocessor</span> is the simplest processing mode in Pollen.</p><ul><li><p><spanstyle="font-weight: bold">Text output.</span> The preprocessor scans the source for any Pollen commands, resolves them, and outputs the whole file as text.</p></li><li><p><spanstyle="font-weight: bold">Work with any text file.</span> I hope this blows your mind a teeny bit. You can use the preprocessor with HTML, CSS, Markdown, JavaScript, XML, SVG, or any other text-based file (including source files of other programming languages).</p></li><li><p><spanstyle="font-weight: bold">Start quickly.</span> Because it works with any text file, the preprocessor is an easy way to try out Pollen, because you can mix it into your workflow on an existing project, or even just one file.</p></li></ul><h4>4.7<tt> </tt><aname="(part._.Templated_source_files)"></a>Templated source files</h4><p>If you want to apply a particular page format to multiple sources of content — as you would in a book — you can use Pollen <spanstyle="font-style: italic">templates</span>.</p><ul><li><p><spanstyle="font-weight: bold">Templates can be any format.</span> Usually Pollen templates will be HTML. But they don’t have to be.</p></li><li><p><spanstyle="font-weight: bold">Markdown support.</span> Pollen has a built-in Markdown parser, so you can import Markdown sources into a Pollen publication.</p></li><li><p><spanstyle="font-weight: bold">Custom markup.</span> Pollen’s markup mode allows you the freedom to define your own markup tags and attach behavior to them.</p></li><li><p><spanstyle="font-weight: bold">Mix source types.</span> Every text source is converted to an X-expression before going into a template. So it’s fine to have multiple kinds of text source in one project.</p></li></ul><h4>4.8<tt> </tt><aname="(part._.Pagetrees)"></a>Pagetrees</h4><p>Similar to a table of contents, a <spanstyle="font-style: italic">pagetree</span> is a special Pollen source file that gets turned into a hierarchical list of pages.</p