<html><head><metahttp-equiv="content-type"content="text/html; charset=utf-8"/><title>Pollen: the book is a program</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><!--[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="tocviewselflink"data-pltdoc="x">Pollen:<spanclass="mywbr"> </span> the book is a program</a></td></tr></table></div><divclass="tocviewsublistonly"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="System_overview.html"class="tocviewlink"data-pltdoc="x">System overview</a></td></tr><tr><tdalign="right">5 </td><td><ahref="Using_raco_pollen.html"class="tocviewlink"data-pltdoc="x">Using <spanclass="stt">raco pollen</span></a></td></tr><tr><tdalign="right">6 </td><td><ahref="File_formats.html"class="tocviewlink"data-pltdoc="x">File formats</a></td></tr><tr><tdalign="right">7 </td><td><ahref="reader.html"class="tocviewlink"data-pltdoc="x">◊ command overview</a></td></tr><tr><tdalign="right">8 </td><td><ahref="Module_reference.html"class="tocviewlink"data-pltdoc="x">Module reference</a></td></tr><tr><tdalign="right">9 </td><td><ahref="Acknowledgments.html"class="tocviewlink"data-pltdoc="x">Acknowledgments</a></td></tr><tr><tdalign="right">10 </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></div><divclass="tocsub"><divclass="tocsubtitle">On this page:</div><tableclass="tocsublist"cellspacing="0"><tr><td><spanclass="tocsublinknumber"></span><ahref="#%28part._.Pollen__the_book_is_a_program%29"class="tocsubseclink"data-pltdoc="x">Pollen:<spanclass="mywbr"> </span> the book is a program</a></td></tr></table></div></div><divclass="maincolumn"><divclass="main"><divclass="versionbox"><spanclass="version">6.0.1.6</span></div><divclass="navsettop"><spanclass="navleft"> </span><spanclass="navright"> <spanclass="nonavigation">← prev</span> <spanclass="nonavigation">up</span> <ahref="Installation.html"title="forward to "1 Installation""data-pltdoc="x">next →</a></span> </div><h2><aname="(part._.Pollen__the_book_is_a_program)"></a><aname="(mod-path._pollen)"></a>Pollen: the book is a program</h2><divclass="SAuthorListBox"><spanclass="SAuthorList"><pclass="author">Matthew Butterick <<ahref="mailto:mb@mbtype.com">mb@mbtype.com</a>></p></span></div><p><tablecellspacing="0"class="defmodule"><tr><tdalign="left"><spanclass="hspace"> </span><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
</div><divclass="SIntrapara"><ul><li><p>First, that digital books should be the best books we’ve ever had. So far, they’re not even close.</p></li><li><p>Second, that because digital books are software, an author shouldn’t think of a book as merely data. <spanstyle="font-weight: bold">The book is a program.</span></p></li><li><p>Third, that the way we make digital books better than their predecessors is by exploiting this programmability.</p></li></ul></div></p><p>That’s what Pollen is for.</p><p>Not that you need to be a programmer to use Pollen. On the contrary, the Pollen language is markup-based, so you can write & edit text naturally. But when you want to automate repetitive tasks, add cross-references, or pull in data from other sources, you can access a full programming language from within the text.</p><p>That language is Racket. I chose Racket because while the idea for Pollen had been with me for several years, it simply wasn’t possible to build it with other languages. So if it’s unfamiliar to you, don’t panic. It was unfamiliar to me. Once you see what you can do with Pollen & Racket, you may be persuaded. I was.</p><p>Or, if you can find a better digital-publishing tool, use that. But I’m never going back to the way I used to work.</p><tablecellspacing="0"><tr><td><p><spanclass="hspace"> </span><ahref="Installation.html"class="toptoclink"data-pltdoc="x">1<spanclass="hspace"> </span>Installation</a></p></td></tr><tr><td><p><spanclass="hspace"></span></p></td></tr><tr><td><p><spanclass="hspace"> </span><ahref="quick-tour.html"class="toptoclink"data-pltdoc="x">2<spanclass="hspace"> </span>Quick tour</a></p></td></tr><tr><td><p><spanclass="hspace"> </span><ahref="quick-tour.html#%28part._.Creating_a_source_file%29"class="toclink"data-pltdoc="x">2.1<spanclass="hspace"> </span>Creating a source file</a></p></td></tr><tr><td><p><spanclass="hspace"> </span><ahref="quick-tour.html#%28part._.Running_a_source_file%29"class="toclink"data-pltdoc="x">2.2<spanclass="hspace"> </span>Running a source file</a></p></td></tr><tr><td><p><spanclass="hspace"> </span><ahref="quick-tour.html#%28part._.Naming__saving__and_rendering_a_source_file%29"class="toclink"data-pltdoc="x">2.3<spanclass="hspace"> </span>Naming, saving, and rendering a source file</a></p></td></tr><tr><td><p><spanclass="hspace"> </span><ahref="quick-tour.html#%28part._.The_project_server%29"class="toclink"data-pltdoc="x">2.4<spanclass="hspace"> </span>The project server</a></p></td></tr><tr><td><p><spanclass="hspace"> </span><ahref="quick-tour.html#%28part._.Intermission%29"class="toclink"data-pltdoc="x">2.5<spanclass="hspace"> </span>Intermission</a></p></td></tr><tr><td><p><spanclass="hspace"> </span><ahref="quick-tour.html#%28part._.Pollen_as_a_preprocessor%29"class="toclink"data-pltdoc="x">2.6<spanclass="hspace"> </span>Pollen as a preprocessor</a></p></td></tr><tr><td><p><spanclass="hspace"> </span><ahref="quick-tour.html#%28part._.Markdown_mode%29"class="toclink"data-pltdoc="x">2.7<spanclass="hspace"> </span>Markdown mode</a></p></td></tr><tr><td><p><spanclass="hspace"> </span><ahref="quick-tour.html#%28part._.Markup_mode%29"class="toclink"data-pltdoc="x">2.8<spanclass="hspace"> </span>Markup mode</a></p></td></tr><tr><td><p><spanclass="hspace"> </span><ahref="quick-tour.html#%28part._.Templates%29"class="toclink"data-pltdoc="x">2.9<spanclass="hspace"> </span>Templates</a></p></td></tr><tr><td><p><spanclass="hspace"> </span><ahref="quick-tour.html#%28part._.P.S_for_.Scribble_users%29"class="toclin