<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>coppice</title>
    <link>https://coppice.spinney.dev/</link>
    <description>A small site builder for a personal site with essays: markdown in, plain HTML out.</description>
    <language>en</language>
    <copyright>cc by-sa 4.0 https://creativecommons.org/licenses/by-sa/4.0/</copyright>
    <lastBuildDate>Mon, 19 Oct 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://coppice.spinney.dev/feed.xml" rel="self" type="application/rss+xml"></atom:link>
    <item>
      <title>A tour of coppice</title>
      <link>https://coppice.spinney.dev/posts/tour/</link>
      <guid>https://coppice.spinney.dev/posts/tour/</guid>
      <pubDate>Mon, 19 Oct 2026 00:00:00 +0000</pubDate>
      <description>Sidenotes, contents, code, tables, mathematics, pictures and a gallery: everything a coppice post can hold, each shown at work.</description>
      <content:encoded>&lt;p&gt;This post is a sampler. Each section below shows one thing a coppice site can do, working, rather than describing it; &lt;a href=&#34;https://coppice.spinney.dev/posts/writing/&#34;&gt;Writing with coppice&lt;/a&gt; has the syntax behind each. Because the post has several sections, it has a contents list, unless &lt;code&gt;contents&lt;/code&gt; is turned off in &lt;code&gt;config.toml&lt;/code&gt;: on a wide screen it is the sidebar on the left, marking the section you are reading, and on a narrow one it is the list above.&lt;/p&gt;&#xA;&lt;h2 id=&#34;notes-in-the-margin&#34;&gt;Notes in the margin&lt;/h2&gt;&#xA;&lt;p&gt;Long asides interrupt an argument, and footnotes make readers jump to the bottom of the page and back. Sidenotes sit beside the line they belong to instead. (This is a sidenote. On a wide screen it sits in the right margin, level with its number; on a narrow one, tap the number to open it under the line.) They are numbered in order through the post. (The second one. Notes can hold &lt;em&gt;markdown&lt;/em&gt;, and &lt;a href=&#34;https://coppice.spinney.dev/writings/&#34;&gt;links&lt;/a&gt; too.) A margin note is the same without a number, for a remark rather than a reference. (A margin note: on a narrow screen it opens from the ⊕.)&lt;/p&gt;&#xA;&lt;p&gt;In the feed, which has no margins, each note follows its line in parentheses, so nothing is lost there either.&lt;/p&gt;&#xA;&lt;h2 id=&#34;type&#34;&gt;Type&lt;/h2&gt;&#xA;&lt;p&gt;Text is set in one column, with &lt;em&gt;italics&lt;/em&gt;, &lt;strong&gt;bold&lt;/strong&gt;, &lt;del&gt;struck-out words&lt;/del&gt;, &lt;code&gt;inline code&lt;/code&gt; and &lt;a href=&#34;https://en.wikipedia.org/wiki/Typography&#34;&gt;links&lt;/a&gt;. Headings come in three levels below the title.&lt;/p&gt;&#xA;&lt;h3 id=&#34;a-third-level-heading&#34;&gt;A third-level heading&lt;/h3&gt;&#xA;&lt;h4 id=&#34;and-a-fourth&#34;&gt;And a fourth&lt;/h4&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;A quotation stands apart, in italics, with a rule down its left side, and its source underneath.&lt;/p&gt;&#xA;&lt;footer&gt;the stylesheet, describing itself&lt;/footer&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;div class=&#34;callout tip&#34; role=&#34;note&#34;&gt;&#xA;&lt;p class=&#34;callout-title ui&#34;&gt;Tip&lt;/p&gt;&#xA;&lt;p&gt;A callout sets a note, a tip or a warning apart from the text. It&#39;s a quotation that starts with &lt;code&gt;[!TIP]&lt;/code&gt;, as on GitHub.&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Lists come numbered, bulleted or ticked:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Write in markdown.&lt;/li&gt;&#xA;&lt;li&gt;Run &lt;code&gt;go run .&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Upload &lt;code&gt;public/&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;input checked=&#34;&#34; disabled=&#34;&#34; type=&#34;checkbox&#34;&gt; sidenotes&lt;/li&gt;&#xA;&lt;li&gt;&lt;input checked=&#34;&#34; disabled=&#34;&#34; type=&#34;checkbox&#34;&gt; galleries&lt;/li&gt;&#xA;&lt;li&gt;&lt;input disabled=&#34;&#34; type=&#34;checkbox&#34;&gt; a newsletter&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;tables&#34;&gt;Tables&lt;/h2&gt;&#xA;&lt;p&gt;Tables take the column&#39;s width, with figures lined up. These are the thirteen animations the home page can show, set by &lt;code&gt;animation&lt;/code&gt; in &lt;code&gt;config.toml&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;table&gt;&#xA;&lt;thead&gt;&#xA;&lt;tr&gt;&#xA;&lt;th&gt;animation&lt;/th&gt;&#xA;&lt;th&gt;what it draws&lt;/th&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/thead&gt;&#xA;&lt;tbody&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;code&gt;shapes&lt;/code&gt;&lt;/td&gt;&#xA;&lt;td&gt;ASCII solids that melt into each other: a donut, a cube, a Menger sponge&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;code&gt;curve&lt;/code&gt;&lt;/td&gt;&#xA;&lt;td&gt;Lissajous figures and rose curves, one line throughout&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;code&gt;cycloid&lt;/code&gt;&lt;/td&gt;&#xA;&lt;td&gt;a circle rolling round another: cardioid, nephroid, astroid&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;code&gt;cycloid-horizontal&lt;/code&gt;&lt;/td&gt;&#xA;&lt;td&gt;a circle rolling along a line: normal, curtate and prolate cycloids&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;code&gt;medley&lt;/code&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;code&gt;curve&lt;/code&gt;, &lt;code&gt;cycloid&lt;/code&gt; and &lt;code&gt;cycloid-horizontal&lt;/code&gt; as one&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;code&gt;mandelbrot&lt;/code&gt;&lt;/td&gt;&#xA;&lt;td&gt;one line closing in on the Mandelbrot set&#39;s boundary&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;code&gt;ford&lt;/code&gt;&lt;/td&gt;&#xA;&lt;td&gt;Ford circles over the fractions from 0 to 1&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;code&gt;golden&lt;/code&gt;&lt;/td&gt;&#xA;&lt;td&gt;a line that curls into the golden spiral and back&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;code&gt;nautilus&lt;/code&gt;&lt;/td&gt;&#xA;&lt;td&gt;a nautilus shell in section, its chambers growing in&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;code&gt;sine&lt;/code&gt;&lt;/td&gt;&#xA;&lt;td&gt;a pen bobbing up and down, its height drawn out as a sine wave&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;code&gt;penrose&lt;/code&gt;&lt;/td&gt;&#xA;&lt;td&gt;the impossible triangle, turning for ever&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;code&gt;chords&lt;/code&gt;&lt;/td&gt;&#xA;&lt;td&gt;chords round a circle, their envelope a cardioid, then a nephroid&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;code&gt;newton&lt;/code&gt;&lt;/td&gt;&#xA;&lt;td&gt;Newton&#39;s cradle&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;p&gt;On a narrow screen a table too wide for it scrolls sideways.&lt;/p&gt;&#xA;&lt;h2 id=&#34;code&#34;&gt;Code&lt;/h2&gt;&#xA;&lt;p&gt;Code is highlighted when the site is built, so readers download no highlighter, and each block has a button to copy it. The ratio of neighbouring Fibonacci numbers closes in on the golden ratio, the one the &lt;code&gt;golden&lt;/code&gt; animation curls into:&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;package&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;main&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&#x9;&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;fmt&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&#x9;&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;math&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;func&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;main&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&#x9;&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;b&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mf&#34;&gt;1.0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mf&#34;&gt;1.0&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&#x9;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;for&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;range&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;20&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&#x9;&#x9;&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;b&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;b&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;+&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;b&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&#x9;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&#x9;&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;fmt&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;Printf&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;F(22)/F(21) = %.10f\n&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;b&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&#x9;&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;fmt&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;Printf&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;φ           = %.10f\n&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;+&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;math&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;Sqrt&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;5&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;It prints &lt;code&gt;1.6180339850&lt;/code&gt; and &lt;code&gt;1.6180339887&lt;/code&gt;: twenty steps get eight decimal places right. The &lt;code&gt;ford&lt;/code&gt; animation draws one circle for every fraction between 0 and 1 whose denominator is at most 20:&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;math&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;gcd&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;fractions&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;q&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;q&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;range&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;21&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;p&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;range&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;q&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;gcd&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;q&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;print&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;len&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;fractions&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;),&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;circles&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;print&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;smallest radius:&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;/&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;*&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;20&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;**&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;It finds 129 circles, the smallest of radius 0.00125, when the two largest have radius ½.&lt;/p&gt;&#xA;&lt;h2 id=&#34;mathematics&#34;&gt;Mathematics&lt;/h2&gt;&#xA;&lt;p&gt;Equations are MathML, drawn by the browser itself, with no script and no pictures of formulae. The circle over the fraction &lt;em&gt;p&lt;/em&gt;/&lt;em&gt;q&lt;/em&gt; has radius 1/(2&lt;em&gt;q&lt;/em&gt;&lt;sup&gt;2&lt;/sup&gt;), and two of them touch exactly when the fractions are neighbours:&lt;/p&gt;&#xA;&lt;math display=&#34;block&#34;&gt;&#xA;&lt;mrow&gt;&lt;mrow&gt;&lt;mo&gt;|&lt;/mo&gt;&lt;mi&gt;p&lt;/mi&gt;&lt;mi&gt;s&lt;/mi&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mi&gt;q&lt;/mi&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mo&gt;|&lt;/mo&gt;&lt;/mrow&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&#xA;&lt;/math&gt;&#xA;&lt;p&gt;for circles over &lt;em&gt;p&lt;/em&gt;/&lt;em&gt;q&lt;/em&gt; and &lt;em&gt;r&lt;/em&gt;/&lt;em&gt;s&lt;/em&gt;. And the sum Euler found in 1734:&lt;/p&gt;&#xA;&lt;math display=&#34;block&#34;&gt;&#xA;&lt;mrow&gt;&lt;munderover&gt;&lt;mo&gt;∑&lt;/mo&gt;&lt;mrow&gt;&lt;mi&gt;n&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;mi&gt;∞&lt;/mi&gt;&lt;/munderover&gt;&lt;mfrac&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;msup&gt;&lt;mi&gt;n&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;&lt;/mfrac&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mfrac&gt;&lt;msup&gt;&lt;mi&gt;π&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;&lt;mn&gt;6&lt;/mn&gt;&lt;/mfrac&gt;&lt;/mrow&gt;&#xA;&lt;/math&gt;&#xA;&lt;h2 id=&#34;pictures&#34;&gt;Pictures&lt;/h2&gt;&#xA;&lt;p&gt;A picture can carry a caption, set in a smaller, quieter type:&lt;/p&gt;&#xA;&lt;figure&gt;&#xA;&lt;img width=&#34;1600&#34; height=&#34;1076&#34; src=&#34;https://coppice.spinney.dev/images/gallery/great-wave.jpg&#34; alt=&#34;A great wave curling over three boats, Mount Fuji small in the distance&#34;&gt;&#xA;&lt;figcaption&gt;Katsushika Hokusai, Under the Wave off Kanagawa, about 1830–32. The Metropolitan Museum of Art, public domain.&lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&lt;h2 id=&#34;a-gallery&#34;&gt;A gallery&lt;/h2&gt;&#xA;&lt;p&gt;A gallery works in a post as it does on a page: tiles in a grid, each opening larger over the page, with the arrow keys and Esc to move through them. These are six of the home page&#39;s animations, recorded as GIFs, in a gallery of columns, which shows each picture whole:&lt;/p&gt;&#xA;&lt;div class=&#34;gallery columns&#34;&gt;&#xA;&lt;figure id=&#34;ford&#34;&gt;&lt;img src=&#34;https://coppice.spinney.dev/thumbs/ford-1d1d1900-400.jpg&#34; alt=&#34;Ford circles rising over a line&#34; width=&#34;280&#34; height=&#34;145&#34; loading=&#34;lazy&#34;&gt;&lt;figcaption&gt;ford&lt;/figcaption&gt;&lt;/figure&gt;&#xA;&lt;figure id=&#34;golden&#34;&gt;&lt;img src=&#34;https://coppice.spinney.dev/thumbs/golden-d06bed05-400.jpg&#34; alt=&#34;A line curling into the golden spiral&#34; width=&#34;280&#34; height=&#34;181&#34; loading=&#34;lazy&#34;&gt;&lt;figcaption&gt;golden&lt;/figcaption&gt;&lt;/figure&gt;&#xA;&lt;figure id=&#34;newton&#34;&gt;&lt;img src=&#34;https://coppice.spinney.dev/thumbs/newton-d66764b1-400.jpg&#34; alt=&#34;Newton&#39;s cradle, the end balls swinging in turn&#34; width=&#34;280&#34; height=&#34;131&#34; loading=&#34;lazy&#34;&gt;&lt;figcaption&gt;newton&lt;/figcaption&gt;&lt;/figure&gt;&#xA;&lt;figure id=&#34;nautilus&#34;&gt;&lt;img src=&#34;https://coppice.spinney.dev/thumbs/nautilus-2d1d9030-400.jpg&#34; alt=&#34;A nautilus shell in section, its chambers growing in&#34; width=&#34;280&#34; height=&#34;213&#34; loading=&#34;lazy&#34;&gt;&lt;figcaption&gt;nautilus&lt;/figcaption&gt;&lt;/figure&gt;&#xA;&lt;figure id=&#34;cycloid-horizontal&#34;&gt;&lt;img src=&#34;https://coppice.spinney.dev/thumbs/cycloid-horizontal-aa0f73d2-400.jpg&#34; alt=&#34;A circle rolling along a line, tracing a looped cycloid&#34; width=&#34;280&#34; height=&#34;115&#34; loading=&#34;lazy&#34;&gt;&lt;figcaption&gt;cycloid-horizontal&lt;/figcaption&gt;&lt;/figure&gt;&#xA;&lt;figure id=&#34;mandelbrot&#34;&gt;&lt;img src=&#34;https://coppice.spinney.dev/thumbs/mandelbrot-b1c754e9-400.jpg&#34; alt=&#34;A line closing in on the Mandelbrot set&#39;s boundary&#34; width=&#34;280&#34; height=&#34;280&#34; loading=&#34;lazy&#34;&gt;&lt;figcaption&gt;mandelbrot&lt;/figcaption&gt;&lt;/figure&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;The &lt;a href=&#34;https://coppice.spinney.dev/gallery/&#34;&gt;gallery page&lt;/a&gt; has a hundred and eighteen paintings and prints, from van Eyck to Malevich.&lt;/p&gt;&#xA;&lt;h2 id=&#34;colours-and-type&#34;&gt;Colours and type&lt;/h2&gt;&#xA;&lt;p&gt;Everything here follows &lt;code&gt;config.toml&lt;/code&gt;. Ten colour themes, each with a light and a dark side that follow the reader&#39;s system: paper, Catppuccin, Gruvbox, Solarized, Nord, Rosé Pine, Tokyo Night, Everforest, Dracula and clrs. Ten styles for code, paired the same way. Any two fonts from Google Fonts, which the build downloads so that readers never contact Google; by default Atkinson Hyperlegible, drawn for readers with low vision. The site&#39;s own words in lowercase, as typed, in capitals or in small capitals. And a size for every kind of text, from this paragraph to the captions.&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>Writing with coppice</title>
      <link>https://coppice.spinney.dev/posts/writing/</link>
      <guid>https://coppice.spinney.dev/posts/writing/</guid>
      <pubDate>Sun, 11 Aug 2024 00:00:00 +0000</pubDate>
      <description>What writing a post is like: markdown, a note in the margin, a callout, some code. An example post, with the docs for the details.</description>
      <content:encoded>&lt;p&gt;A post is a markdown file in &lt;code&gt;content/posts/&lt;/code&gt;, and its file name is its address: this one is &lt;code&gt;content/posts/writing.md&lt;/code&gt;, published at &lt;code&gt;/posts/writing/&lt;/code&gt;. It&#39;s an example, to read and delete; &lt;a href=&#34;https://coppice.spinney.dev/docs/writing/&#34;&gt;writing&lt;/a&gt; in the docs has the syntax for everything here, and &lt;a href=&#34;https://coppice.spinney.dev/posts/tour/&#34;&gt;the tour&lt;/a&gt; shows all of it at once.&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-top-of-the-file&#34;&gt;The top of the file&lt;/h2&gt;&#xA;&lt;p&gt;Every post starts with its front matter, a few lines between &lt;code&gt;---&lt;/code&gt; lines:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;---&#xA;title: Writing with coppice&#xA;description: A line under the title, also for search engines and the feed.&#xA;date: 11-08-2024&#xA;---&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;The date is day, month and year. A post dated after today waits until a build on or after that day, and one with &lt;code&gt;draft: true&lt;/code&gt; waits until you take the line out.&lt;/p&gt;&#xA;&lt;h2 id=&#34;asides&#34;&gt;Asides&lt;/h2&gt;&#xA;&lt;p&gt;An aside that would interrupt the argument goes in the margin instead, as in Edward Tufte&#39;s books. (Like this one: &lt;code&gt;{sn|…&amp;lt;/span&amp;gt;&lt;/code&gt; in the text, a number here, and the note beside its line on a wide screen.} On a phone, the number opens it under the line.&lt;/p&gt;&#xA;&lt;div class=&#34;callout note&#34; role=&#34;note&#34;&gt;&#xA;&lt;p class=&#34;callout-title ui&#34;&gt;Note&lt;/p&gt;&#xA;&lt;p&gt;A callout is for what the reader mustn&#39;t miss, rather than what they might enjoy: &lt;code&gt;&amp;gt; [!NOTE]&lt;/code&gt; at the start of a quotation.&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;h2 id=&#34;code&#34;&gt;Code&lt;/h2&gt;&#xA;&lt;p&gt;Fenced code is highlighted when the site is built, and copied with the button that appears when it&#39;s pointed at:&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;fmt)&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;Println&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;hello&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The rest, from pictures and galleries to mathematics, is in &lt;a href=&#34;https://coppice.spinney.dev/docs/writing/&#34;&gt;the docs&lt;/a&gt;.&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>Getting started with coppice</title>
      <link>https://coppice.spinney.dev/posts/getting-started/</link>
      <guid>https://coppice.spinney.dev/posts/getting-started/</guid>
      <pubDate>Tue, 23 Jul 2024 00:00:00 +0000</pubDate>
      <description>From a fresh clone to a site on the internet, in four steps, with the docs for each.</description>
      <content:encoded>&lt;p&gt;coppice turns a folder of markdown into a small personal site: a home page with an animation, posts with sidenotes, a list of writings, pages, galleries, docs and a feed. This post is an example, to read and then delete; the &lt;a href=&#34;https://coppice.spinney.dev/docs/&#34;&gt;docs&lt;/a&gt; are where the details live, and this is the short way through them.&lt;/p&gt;&#xA;&lt;h2 id=&#34;four-steps&#34;&gt;Four steps&lt;/h2&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;Build it.&lt;/strong&gt; With &lt;a href=&#34;https://go.dev/dl/&#34;&gt;Go&lt;/a&gt; installed, clone the repository and run &lt;code&gt;go run . -serve :8000&lt;/code&gt;. The site is at &lt;a href=&#34;http://localhost:8000&#34;&gt;localhost:8000&lt;/a&gt;, and builds again whenever you save a file. &lt;a href=&#34;https://coppice.spinney.dev/docs/getting-started/&#34;&gt;Getting started&lt;/a&gt; has the rest.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Make it yours.&lt;/strong&gt; Every setting is in &lt;code&gt;config.toml&lt;/code&gt;, with a comment saying what it does: the site&#39;s name and address, the links on the home page, the animation, the colours and the fonts. &lt;a href=&#34;https://coppice.spinney.dev/docs/settings/&#34;&gt;Settings&lt;/a&gt; goes through each.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Write.&lt;/strong&gt; A post is a markdown file in &lt;code&gt;content/posts/&lt;/code&gt;, with a title and a date at its top. &lt;a href=&#34;https://coppice.spinney.dev/docs/pages-posts-and-docs/&#34;&gt;Pages, posts and docs&lt;/a&gt; says what goes where, and &lt;a href=&#34;https://coppice.spinney.dev/docs/writing/&#34;&gt;writing&lt;/a&gt; what can go inside.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Publish.&lt;/strong&gt; &lt;code&gt;public/&lt;/code&gt; is the whole site, ready for any static host, or for one that builds it from git on every push. &lt;a href=&#34;https://coppice.spinney.dev/docs/deploying/&#34;&gt;Deploying&lt;/a&gt; shows how.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2 id=&#34;when-somethings-wrong&#34;&gt;When something&#39;s wrong&lt;/h2&gt;&#xA;&lt;p&gt;coppice would rather stop than build a broken site. A typo in a setting, a post without a date, a link to a page that isn&#39;t there: the build names the file and the problem, and with &lt;code&gt;-serve&lt;/code&gt; the last good site stays up while you fix it. (A picture without a description doesn&#39;t stop it, but it&#39;s reported, so you can describe it for those who can&#39;t see it.)&lt;/p&gt;&#xA;</content:encoded>
    </item>
  </channel>
</rss>