<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/default.xsl"?>
<fr:tree xmlns:fr="http://www.forester-notes.org" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:xml="http://www.w3.org/XML/1998/namespace" root="true" base-url="/">
  <fr:frontmatter>
    <fr:authors>
      <fr:author>
        <fr:link href="https://graft.sirref.org/The Graft Developers/" type="external">The Graft Developers</fr:link>
      </fr:author>
    </fr:authors>
    <fr:uri>https://graft.sirref.org/index/</fr:uri>
    <fr:display-uri>index</fr:display-uri>
    <fr:route>/index/</fr:route>
    <fr:title text="Graft Documentation">Graft Documentation</fr:title>
  </fr:frontmatter>
  <fr:mainmatter>
    <html:p>Welcome to the <fr:link href="/index/" title="Graft Documentation" uri="https://graft.sirref.org/index/" display-uri="index" type="local">Graft</fr:link><![CDATA[ documentation homepage (written in, you guessed it,]]>  <fr:link href="/index/" title="Graft Documentation" uri="https://graft.sirref.org/index/" display-uri="index" type="local">Graft</fr:link><![CDATA[)!]]></html:p>
    <html:p><fr:link href="/index/" title="Graft Documentation" uri="https://graft.sirref.org/index/" display-uri="index" type="local">Graft</fr:link> is a preprocessor for <fr:link href="https://graft.sirref.org/forester/" type="external">Forester</fr:link> allowing users to write their forests using markdown and bibtex. Different markups and formats have slightly different semantics in terms of the trees they generate. For more information, please refer to their individual trees.</html:p>
    <fr:tree show-metadata="false" expanded="false">
      <fr:frontmatter>
        <fr:authors />
        <fr:date>
          <fr:year>2025</fr:year>
          <fr:month>7</fr:month>
          <fr:day>14</fr:day>
        </fr:date>
        <fr:uri>https://graft.sirref.org/graft-0001/</fr:uri>
        <fr:display-uri>graft-0001</fr:display-uri>
        <fr:route>/graft-0001/</fr:route>
        <fr:title text="Markdown Syntax">Markdown Syntax</fr:title>
      </fr:frontmatter>
      <fr:mainmatter>
        <html:p>The markdown syntax is the core feature of <fr:link href="https://graft.sirref.org/graft/" type="external">Graft</fr:link>. It supports most of what <fr:link href="https://graft.sirref.org/forester/" type="external">Forester</fr:link> has to offer. It uses a <fr:link href="https://jekyllrb.com/docs/front-matter/" type="external">Jekyll format frontmatter</fr:link> to provide <fr:link href="https://graft.sirref.org/forester/" type="external">Forester</fr:link> metadata and supports special code blocks too.</html:p>
        <fr:tree show-metadata="false">
          <fr:frontmatter>
            <fr:authors />
            <fr:date>
              <fr:year>2025</fr:year>
              <fr:month>7</fr:month>
              <fr:day>14</fr:day>
            </fr:date>
            <fr:uri>https://graft.sirref.org/graft-0003/</fr:uri>
            <fr:display-uri>graft-0003</fr:display-uri>
            <fr:route>/graft-0003/</fr:route>
            <fr:title text="YAML Frontmatter">YAML Frontmatter</fr:title>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>The markdown format for <fr:link href="/index/" title="Graft Documentation" uri="https://graft.sirref.org/index/" display-uri="index" type="local">Graft</fr:link> follows the Jekyll-style YAML frontmatter format. For example:</html:p>
            <html:pre><![CDATA[---
title: Hello, World!
date: 2025-07-14
---

This is a valid tree.]]></html:pre>
            <html:p>will generate a tree with <html:code>title</html:code> and <html:code>date</html:code> metadata with a single paragraph of text.</html:p>
            <html:p>To insert <html:code>meta</html:code> field into your tree, you can use a nested object in your YAML frontmatter.</html:p>
            <html:pre><![CDATA[---
title: Meta fields!
meta:
  external: http://example.org
---

External links !]]></html:pre>
            <html:p>There is no centralised documentation on these <html:code>meta</html:code><![CDATA[ fields (that I could find),]]>  but this <fr:link href="https://www.forester-notes.org/007K/index.xml" type="external">biographical tree example may be useful</fr:link></html:p>
          </fr:mainmatter>
        </fr:tree>
        <fr:tree show-metadata="false">
          <fr:frontmatter>
            <fr:authors />
            <fr:date>
              <fr:year>2025</fr:year>
              <fr:month>7</fr:month>
              <fr:day>15</fr:day>
            </fr:date>
            <fr:uri>https://graft.sirref.org/graft-0008/</fr:uri>
            <fr:display-uri>graft-0008</fr:display-uri>
            <fr:route>/graft-0008/</fr:route>
            <fr:title text="Subheadings are subtrees">Subheadings are subtrees</fr:title>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>Markdown headings are automatically transformed into "anonymous subtrees"</html:p>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors />
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>7</fr:month>
                  <fr:day>15</fr:day>
                </fr:date>
                <fr:title text="Anonymous!">Anonymous!</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>Just like that. It means they allow authors to provide structure without adhering to the atomicity principles.</html:p>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors />
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>7</fr:month>
                  <fr:day>15</fr:day>
                </fr:date>
                <fr:title text="Interaction with Forester Subtrees">Interaction with Forester Subtrees</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>Markdown sections delimited by headings have no "closing tag". This means you that you don't quite get the nice feature of <fr:link href="https://graft.sirref.org/forester/" type="external">Forester</fr:link> where subtrees can be a standalone thing inside another text. Furthermore, including a subtree <![CDATA[will place it below the current hierarchy (as it pertains to the table of contents).]]></html:p>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors />
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>7</fr:month>
                  <fr:day>15</fr:day>
                </fr:date>
                <fr:uri>https://graft.sirref.org/named-subtrees/</fr:uri>
                <fr:display-uri>named-subtrees</fr:display-uri>
                <fr:route>/named-subtrees/</fr:route>
                <fr:title text="Named subtrees ">Named subtrees </fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>Sometimes you don't want to create a new file just to have a referenceable tree. In this case, you want a named subtree. In the markdown syntax you can use <fr:link href="https://www.markdownguide.org/extended-syntax/#heading-ids" type="external">markdown heading IDs</fr:link> to name your subtrees. For example this section has the following heading:</html:p>
                <html:pre><![CDATA[## Named subtrees {#named-subtrees}]]></html:pre>
              </fr:mainmatter>
            </fr:tree>
          </fr:mainmatter>
        </fr:tree>
        <fr:tree show-metadata="false">
          <fr:frontmatter>
            <fr:authors />
            <fr:date>
              <fr:year>2025</fr:year>
              <fr:month>7</fr:month>
              <fr:day>14</fr:day>
            </fr:date>
            <fr:uri>https://graft.sirref.org/graft-0004/</fr:uri>
            <fr:display-uri>graft-0004</fr:display-uri>
            <fr:route>/graft-0004/</fr:route>
            <fr:title text="Forester Code Blocks">Forester Code Blocks</fr:title>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>The markdown syntax cannot do everything that <fr:link href="https://graft.sirref.org/forester/" type="external">Forester</fr:link> can. For example, how might you <fr:link href="https://graft.sirref.org/transclude another tree into your tree/" type="external">transclude another tree into your tree</fr:link>?</html:p>
            <html:p>At any given moment, you can escape into Forester syntax by using a code block where the <html:code>infostring</html:code> is <html:code>forester</html:code>. <fr:link href="https://graft.sirref.org/graft/" type="external">Graft</fr:link> will translate this into <fr:link href="https://graft.sirref.org/forester/" type="external">Forester</fr:link> syntax and output it in the same location as the code block in the generated code.</html:p>
            <html:pre><![CDATA[```forester
\put\transclude/numbered{false}
\transclude{graft-0001}
```]]></html:pre>
          </fr:mainmatter>
        </fr:tree>
        <fr:tree show-metadata="false">
          <fr:frontmatter>
            <fr:authors />
            <fr:date>
              <fr:year>2025</fr:year>
              <fr:month>7</fr:month>
              <fr:day>14</fr:day>
            </fr:date>
            <fr:uri>https://graft.sirref.org/graft-0005/</fr:uri>
            <fr:display-uri>graft-0005</fr:display-uri>
            <fr:route>/graft-0005/</fr:route>
            <fr:title text="Other Special Code Blocks">Other Special Code Blocks</fr:title>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p><![CDATA[There are two other (for now) code blocks that are treated differently]]>  by <fr:link href="https://graft.sirref.org/graft/" type="external">Graft</fr:link>.</html:p>
            <html:ol>
              <html:li>
                <html:p><html:code>ocaml</html:code> code blocks will be run through <fr:link href="https://ocaml.org/p/hilite" type="external">hilite</fr:link> and converted to HTML.</html:p>
              </html:li>
            </html:ol>
          </fr:mainmatter>
        </fr:tree>
        <fr:tree show-metadata="false">
          <fr:frontmatter>
            <fr:authors />
            <fr:date>
              <fr:year>2025</fr:year>
              <fr:month>7</fr:month>
              <fr:day>16</fr:day>
            </fr:date>
            <fr:uri>https://graft.sirref.org/graft-0007/</fr:uri>
            <fr:display-uri>graft-0007</fr:display-uri>
            <fr:route>/graft-0007/</fr:route>
            <fr:title text="Verbatim HTML">Verbatim HTML</fr:title>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>Using markdown's HTML blocks, you can add HTML directly into your tree.</html:p>
            <html:p>For example you could embed a <html:code>marquee</html:code> element by writing.</html:p>
            <html:pre><![CDATA[<p><marquee> This is a marquee element! </marquee></p>]]></html:pre>
            <html:p>
              <html:marquee> This is a marquee element! </html:marquee>
            </html:p>
          </fr:mainmatter>
        </fr:tree>
      </fr:mainmatter>
    </fr:tree>
    <fr:tree show-metadata="false" expanded="false">
      <fr:frontmatter>
        <fr:authors />
        <fr:date>
          <fr:year>2025</fr:year>
          <fr:month>7</fr:month>
          <fr:day>14</fr:day>
        </fr:date>
        <fr:uri>https://graft.sirref.org/graft-0002/</fr:uri>
        <fr:display-uri>graft-0002</fr:display-uri>
        <fr:route>/graft-0002/</fr:route>
        <fr:title text="Bibtex Syntax">Bibtex Syntax</fr:title>
      </fr:frontmatter>
      <fr:mainmatter>
        <html:p>The bibtex syntax allows you to generate individual <html:code>reference</html:code> trees per entry.</html:p>
        <html:p>For example, consider the following bibtex entry.</html:p>
        <html:pre><![CDATA[@article{mokhov-build-systems,
    author = {Mokhov, Andrey and Mitchell, Neil and Jones, Simon},
    title = {Build systems a la carte},
    year = {2018},
    issue_date = {September 2018},
    publisher = {Association for Computing Machinery},
    address = {New York, NY, USA},
    volume = {2},
    url = {https://doi.org/10.1145/3236774},
    doi = {10.1145/3236774},
    abstract = {Build systems are awesome, terrifying -- and unloved...},
    journal={Proceedings of the ACM on Programming Languages},
    articleno = {79},
    numpages = {29},
    keywords = {functional programming, build systems, algorithms}
}]]></html:pre>
        <html:p>We have placed this in a file called <html:code>refs.bib</html:code> and can <fr:link href="/mokhov-build-systems/" title="Build systems a la carte" uri="https://graft.sirref.org/mokhov-build-systems/" display-uri="mokhov-build-systems" type="local">directly reference the entry with <html:code>mokhov-build-systems</html:code></fr:link>!</html:p>
        <html:p style="background-color: lightyellow; padding: 1em;">
<html:strong>Warning</html:strong>: the bibtex is quite fragile due to the parser we use. At some point
I hope to help make this better. Using the above entry as an example would be wise. For example,
middle name initials are not supported in author names.
</html:p>
      </fr:mainmatter>
    </fr:tree>
    <fr:tree show-metadata="false" expanded="false">
      <fr:frontmatter>
        <fr:authors />
        <fr:date>
          <fr:year>2025</fr:year>
          <fr:month>7</fr:month>
          <fr:day>14</fr:day>
        </fr:date>
        <fr:uri>https://graft.sirref.org/graft-0006/</fr:uri>
        <fr:display-uri>graft-0006</fr:display-uri>
        <fr:route>/graft-0006/</fr:route>
        <fr:title text="Usage">Usage</fr:title>
      </fr:frontmatter>
      <fr:mainmatter>
        <html:p>To use <fr:link href="/index/" title="Graft Documentation" uri="https://graft.sirref.org/index/" display-uri="index" type="local">Graft</fr:link> you will need to install it via opam.</html:p>
        <html:pre><![CDATA[opam install graft]]></html:pre>
        <html:p>and after setting up a minimal <fr:link href="https://www.forester-notes.org/0052/index.xml" type="external">Forester project</fr:link>, you can generate your forest using:</html:p>
        <html:pre><![CDATA[graft forest --output=trees src]]></html:pre>
        <html:p>This assumes your <html:code>forest.toml</html:code> is set up to build from <html:code>trees</html:code> and all of your markdown and bibtex files are stored in <html:code>src</html:code>.</html:p>
        <fr:tree show-metadata="false">
          <fr:frontmatter>
            <fr:authors />
            <fr:date>
              <fr:year>2025</fr:year>
              <fr:month>7</fr:month>
              <fr:day>14</fr:day>
            </fr:date>
            <fr:uri>https://graft.sirref.org/usage-dev/</fr:uri>
            <fr:display-uri>usage-dev</fr:display-uri>
            <fr:route>/usage-dev/</fr:route>
            <fr:title text="Development ">Development </fr:title>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>Graft has most likely had plenty of improvements and bug fixes since the last release. To grab a hold of those changes you can pin the package:</html:p>
            <html:pre><![CDATA[opam pin git+https://github.com/patricoferris/graft]]></html:pre>
          </fr:mainmatter>
        </fr:tree>
      </fr:mainmatter>
    </fr:tree>
  </fr:mainmatter>
  <fr:backmatter>
    <fr:tree show-metadata="false" hidden-when-empty="true">
      <fr:frontmatter>
        <fr:authors />
        <fr:title text="References">References</fr:title>
      </fr:frontmatter>
      <fr:mainmatter>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="https://graft.sirref.org/Andrey Mokhov/" type="external">Andrey Mokhov</fr:link>
              </fr:author>
              <fr:author>
                <fr:link href="https://graft.sirref.org/Neil Mitchell/" type="external">Neil Mitchell</fr:link>
              </fr:author>
              <fr:author>
                <fr:link href="https://graft.sirref.org/Simon Jones/" type="external">Simon Jones</fr:link>
              </fr:author>
            </fr:authors>
            <fr:date>
              <fr:year>2018</fr:year>
            </fr:date>
            <fr:uri>https://graft.sirref.org/mokhov-build-systems/</fr:uri>
            <fr:display-uri>mokhov-build-systems</fr:display-uri>
            <fr:route>/mokhov-build-systems/</fr:route>
            <fr:title text="Build systems a la carte">Build systems a la carte</fr:title>
            <fr:taxon>Reference</fr:taxon>
            <fr:meta name="external">https://doi.org/10.1145/3236774</fr:meta>
            <fr:meta name="journal">Proceedings of the ACM on Programming Languages</fr:meta>
            <fr:meta name="doi">10.1145/3236774</fr:meta>
          </fr:frontmatter>
          <fr:mainmatter>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="https://graft.sirref.org/Andrey Mokhov/" type="external">Andrey Mokhov</fr:link>
                  </fr:author>
                  <fr:author>
                    <fr:link href="https://graft.sirref.org/Neil Mitchell/" type="external">Neil Mitchell</fr:link>
                  </fr:author>
                  <fr:author>
                    <fr:link href="https://graft.sirref.org/Simon Jones/" type="external">Simon Jones</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2018</fr:year>
                </fr:date>
                <fr:title text="Abstract">Abstract</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>Build systems are awesome, terrifying -- and unloved. They are used by every developer around the world, but are rarely the object of study. In this paper we offer a systematic, and executable, framework for developing and comparing build systems, viewing them as related points in landscape rather than as isolated phenomena. By teasing apart existing build systems, we can recombine their components, allowing us to prototype new build systems with desired properties.</html:p>
              </fr:mainmatter>
            </fr:tree>
          </fr:mainmatter>
        </fr:tree>
      </fr:mainmatter>
    </fr:tree>
    <fr:tree show-metadata="false" hidden-when-empty="true">
      <fr:frontmatter>
        <fr:authors />
        <fr:title text="Context">Context</fr:title>
      </fr:frontmatter>
      <fr:mainmatter />
    </fr:tree>
    <fr:tree show-metadata="false" hidden-when-empty="true">
      <fr:frontmatter>
        <fr:authors />
        <fr:title text="Backlinks">Backlinks</fr:title>
      </fr:frontmatter>
      <fr:mainmatter>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors />
            <fr:date>
              <fr:year>2025</fr:year>
              <fr:month>7</fr:month>
              <fr:day>14</fr:day>
            </fr:date>
            <fr:uri>https://graft.sirref.org/graft-0006/</fr:uri>
            <fr:display-uri>graft-0006</fr:display-uri>
            <fr:route>/graft-0006/</fr:route>
            <fr:title text="Usage">Usage</fr:title>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>To use <fr:link href="/index/" title="Graft Documentation" uri="https://graft.sirref.org/index/" display-uri="index" type="local">Graft</fr:link> you will need to install it via opam.</html:p>
            <html:pre><![CDATA[opam install graft]]></html:pre>
            <html:p>and after setting up a minimal <fr:link href="https://www.forester-notes.org/0052/index.xml" type="external">Forester project</fr:link>, you can generate your forest using:</html:p>
            <html:pre><![CDATA[graft forest --output=trees src]]></html:pre>
            <html:p>This assumes your <html:code>forest.toml</html:code> is set up to build from <html:code>trees</html:code> and all of your markdown and bibtex files are stored in <html:code>src</html:code>.</html:p>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors />
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>7</fr:month>
                  <fr:day>14</fr:day>
                </fr:date>
                <fr:uri>https://graft.sirref.org/usage-dev/</fr:uri>
                <fr:display-uri>usage-dev</fr:display-uri>
                <fr:route>/usage-dev/</fr:route>
                <fr:title text="Development ">Development </fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>Graft has most likely had plenty of improvements and bug fixes since the last release. To grab a hold of those changes you can pin the package:</html:p>
                <html:pre><![CDATA[opam pin git+https://github.com/patricoferris/graft]]></html:pre>
              </fr:mainmatter>
            </fr:tree>
          </fr:mainmatter>
        </fr:tree>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors />
            <fr:date>
              <fr:year>2025</fr:year>
              <fr:month>7</fr:month>
              <fr:day>14</fr:day>
            </fr:date>
            <fr:uri>https://graft.sirref.org/graft-0003/</fr:uri>
            <fr:display-uri>graft-0003</fr:display-uri>
            <fr:route>/graft-0003/</fr:route>
            <fr:title text="YAML Frontmatter">YAML Frontmatter</fr:title>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>The markdown format for <fr:link href="/index/" title="Graft Documentation" uri="https://graft.sirref.org/index/" display-uri="index" type="local">Graft</fr:link> follows the Jekyll-style YAML frontmatter format. For example:</html:p>
            <html:pre><![CDATA[---
title: Hello, World!
date: 2025-07-14
---

This is a valid tree.]]></html:pre>
            <html:p>will generate a tree with <html:code>title</html:code> and <html:code>date</html:code> metadata with a single paragraph of text.</html:p>
            <html:p>To insert <html:code>meta</html:code> field into your tree, you can use a nested object in your YAML frontmatter.</html:p>
            <html:pre><![CDATA[---
title: Meta fields!
meta:
  external: http://example.org
---

External links !]]></html:pre>
            <html:p>There is no centralised documentation on these <html:code>meta</html:code><![CDATA[ fields (that I could find),]]>  but this <fr:link href="https://www.forester-notes.org/007K/index.xml" type="external">biographical tree example may be useful</fr:link></html:p>
          </fr:mainmatter>
        </fr:tree>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="https://graft.sirref.org/The Graft Developers/" type="external">The Graft Developers</fr:link>
              </fr:author>
            </fr:authors>
            <fr:uri>https://graft.sirref.org/index/</fr:uri>
            <fr:display-uri>index</fr:display-uri>
            <fr:route>/index/</fr:route>
            <fr:title text="Graft Documentation">Graft Documentation</fr:title>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>Welcome to the <fr:link href="/index/" title="Graft Documentation" uri="https://graft.sirref.org/index/" display-uri="index" type="local">Graft</fr:link><![CDATA[ documentation homepage (written in, you guessed it,]]>  <fr:link href="/index/" title="Graft Documentation" uri="https://graft.sirref.org/index/" display-uri="index" type="local">Graft</fr:link><![CDATA[)!]]></html:p>
            <html:p><fr:link href="/index/" title="Graft Documentation" uri="https://graft.sirref.org/index/" display-uri="index" type="local">Graft</fr:link> is a preprocessor for <fr:link href="https://graft.sirref.org/forester/" type="external">Forester</fr:link> allowing users to write their forests using markdown and bibtex. Different markups and formats have slightly different semantics in terms of the trees they generate. For more information, please refer to their individual trees.</html:p>
            <fr:tree show-metadata="false" expanded="false">
              <fr:frontmatter>
                <fr:authors />
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>7</fr:month>
                  <fr:day>14</fr:day>
                </fr:date>
                <fr:uri>https://graft.sirref.org/graft-0001/</fr:uri>
                <fr:display-uri>graft-0001</fr:display-uri>
                <fr:route>/graft-0001/</fr:route>
                <fr:title text="Markdown Syntax">Markdown Syntax</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>The markdown syntax is the core feature of <fr:link href="https://graft.sirref.org/graft/" type="external">Graft</fr:link>. It supports most of what <fr:link href="https://graft.sirref.org/forester/" type="external">Forester</fr:link> has to offer. It uses a <fr:link href="https://jekyllrb.com/docs/front-matter/" type="external">Jekyll format frontmatter</fr:link> to provide <fr:link href="https://graft.sirref.org/forester/" type="external">Forester</fr:link> metadata and supports special code blocks too.</html:p>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>14</fr:day>
                    </fr:date>
                    <fr:uri>https://graft.sirref.org/graft-0003/</fr:uri>
                    <fr:display-uri>graft-0003</fr:display-uri>
                    <fr:route>/graft-0003/</fr:route>
                    <fr:title text="YAML Frontmatter">YAML Frontmatter</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>The markdown format for <fr:link href="/index/" title="Graft Documentation" uri="https://graft.sirref.org/index/" display-uri="index" type="local">Graft</fr:link> follows the Jekyll-style YAML frontmatter format. For example:</html:p>
                    <html:pre><![CDATA[---
title: Hello, World!
date: 2025-07-14
---

This is a valid tree.]]></html:pre>
                    <html:p>will generate a tree with <html:code>title</html:code> and <html:code>date</html:code> metadata with a single paragraph of text.</html:p>
                    <html:p>To insert <html:code>meta</html:code> field into your tree, you can use a nested object in your YAML frontmatter.</html:p>
                    <html:pre><![CDATA[---
title: Meta fields!
meta:
  external: http://example.org
---

External links !]]></html:pre>
                    <html:p>There is no centralised documentation on these <html:code>meta</html:code><![CDATA[ fields (that I could find),]]>  but this <fr:link href="https://www.forester-notes.org/007K/index.xml" type="external">biographical tree example may be useful</fr:link></html:p>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:uri>https://graft.sirref.org/graft-0008/</fr:uri>
                    <fr:display-uri>graft-0008</fr:display-uri>
                    <fr:route>/graft-0008/</fr:route>
                    <fr:title text="Subheadings are subtrees">Subheadings are subtrees</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Markdown headings are automatically transformed into "anonymous subtrees"</html:p>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors />
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>7</fr:month>
                          <fr:day>15</fr:day>
                        </fr:date>
                        <fr:title text="Anonymous!">Anonymous!</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>Just like that. It means they allow authors to provide structure without adhering to the atomicity principles.</html:p>
                      </fr:mainmatter>
                    </fr:tree>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors />
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>7</fr:month>
                          <fr:day>15</fr:day>
                        </fr:date>
                        <fr:title text="Interaction with Forester Subtrees">Interaction with Forester Subtrees</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>Markdown sections delimited by headings have no "closing tag". This means you that you don't quite get the nice feature of <fr:link href="https://graft.sirref.org/forester/" type="external">Forester</fr:link> where subtrees can be a standalone thing inside another text. Furthermore, including a subtree <![CDATA[will place it below the current hierarchy (as it pertains to the table of contents).]]></html:p>
                      </fr:mainmatter>
                    </fr:tree>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors />
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>7</fr:month>
                          <fr:day>15</fr:day>
                        </fr:date>
                        <fr:uri>https://graft.sirref.org/named-subtrees/</fr:uri>
                        <fr:display-uri>named-subtrees</fr:display-uri>
                        <fr:route>/named-subtrees/</fr:route>
                        <fr:title text="Named subtrees ">Named subtrees </fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>Sometimes you don't want to create a new file just to have a referenceable tree. In this case, you want a named subtree. In the markdown syntax you can use <fr:link href="https://www.markdownguide.org/extended-syntax/#heading-ids" type="external">markdown heading IDs</fr:link> to name your subtrees. For example this section has the following heading:</html:p>
                        <html:pre><![CDATA[## Named subtrees {#named-subtrees}]]></html:pre>
                      </fr:mainmatter>
                    </fr:tree>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>14</fr:day>
                    </fr:date>
                    <fr:uri>https://graft.sirref.org/graft-0004/</fr:uri>
                    <fr:display-uri>graft-0004</fr:display-uri>
                    <fr:route>/graft-0004/</fr:route>
                    <fr:title text="Forester Code Blocks">Forester Code Blocks</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>The markdown syntax cannot do everything that <fr:link href="https://graft.sirref.org/forester/" type="external">Forester</fr:link> can. For example, how might you <fr:link href="https://graft.sirref.org/transclude another tree into your tree/" type="external">transclude another tree into your tree</fr:link>?</html:p>
                    <html:p>At any given moment, you can escape into Forester syntax by using a code block where the <html:code>infostring</html:code> is <html:code>forester</html:code>. <fr:link href="https://graft.sirref.org/graft/" type="external">Graft</fr:link> will translate this into <fr:link href="https://graft.sirref.org/forester/" type="external">Forester</fr:link> syntax and output it in the same location as the code block in the generated code.</html:p>
                    <html:pre><![CDATA[```forester
\put\transclude/numbered{false}
\transclude{graft-0001}
```]]></html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>14</fr:day>
                    </fr:date>
                    <fr:uri>https://graft.sirref.org/graft-0005/</fr:uri>
                    <fr:display-uri>graft-0005</fr:display-uri>
                    <fr:route>/graft-0005/</fr:route>
                    <fr:title text="Other Special Code Blocks">Other Special Code Blocks</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p><![CDATA[There are two other (for now) code blocks that are treated differently]]>  by <fr:link href="https://graft.sirref.org/graft/" type="external">Graft</fr:link>.</html:p>
                    <html:ol>
                      <html:li>
                        <html:p><html:code>ocaml</html:code> code blocks will be run through <fr:link href="https://ocaml.org/p/hilite" type="external">hilite</fr:link> and converted to HTML.</html:p>
                      </html:li>
                    </html:ol>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>16</fr:day>
                    </fr:date>
                    <fr:uri>https://graft.sirref.org/graft-0007/</fr:uri>
                    <fr:display-uri>graft-0007</fr:display-uri>
                    <fr:route>/graft-0007/</fr:route>
                    <fr:title text="Verbatim HTML">Verbatim HTML</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Using markdown's HTML blocks, you can add HTML directly into your tree.</html:p>
                    <html:p>For example you could embed a <html:code>marquee</html:code> element by writing.</html:p>
                    <html:pre><![CDATA[<p><marquee> This is a marquee element! </marquee></p>]]></html:pre>
                    <html:p>
                      <html:marquee> This is a marquee element! </html:marquee>
                    </html:p>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false" expanded="false">
              <fr:frontmatter>
                <fr:authors />
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>7</fr:month>
                  <fr:day>14</fr:day>
                </fr:date>
                <fr:uri>https://graft.sirref.org/graft-0002/</fr:uri>
                <fr:display-uri>graft-0002</fr:display-uri>
                <fr:route>/graft-0002/</fr:route>
                <fr:title text="Bibtex Syntax">Bibtex Syntax</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>The bibtex syntax allows you to generate individual <html:code>reference</html:code> trees per entry.</html:p>
                <html:p>For example, consider the following bibtex entry.</html:p>
                <html:pre><![CDATA[@article{mokhov-build-systems,
    author = {Mokhov, Andrey and Mitchell, Neil and Jones, Simon},
    title = {Build systems a la carte},
    year = {2018},
    issue_date = {September 2018},
    publisher = {Association for Computing Machinery},
    address = {New York, NY, USA},
    volume = {2},
    url = {https://doi.org/10.1145/3236774},
    doi = {10.1145/3236774},
    abstract = {Build systems are awesome, terrifying -- and unloved...},
    journal={Proceedings of the ACM on Programming Languages},
    articleno = {79},
    numpages = {29},
    keywords = {functional programming, build systems, algorithms}
}]]></html:pre>
                <html:p>We have placed this in a file called <html:code>refs.bib</html:code> and can <fr:link href="/mokhov-build-systems/" title="Build systems a la carte" uri="https://graft.sirref.org/mokhov-build-systems/" display-uri="mokhov-build-systems" type="local">directly reference the entry with <html:code>mokhov-build-systems</html:code></fr:link>!</html:p>
                <html:p style="background-color: lightyellow; padding: 1em;">
<html:strong>Warning</html:strong>: the bibtex is quite fragile due to the parser we use. At some point
I hope to help make this better. Using the above entry as an example would be wise. For example,
middle name initials are not supported in author names.
</html:p>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false" expanded="false">
              <fr:frontmatter>
                <fr:authors />
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>7</fr:month>
                  <fr:day>14</fr:day>
                </fr:date>
                <fr:uri>https://graft.sirref.org/graft-0006/</fr:uri>
                <fr:display-uri>graft-0006</fr:display-uri>
                <fr:route>/graft-0006/</fr:route>
                <fr:title text="Usage">Usage</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>To use <fr:link href="/index/" title="Graft Documentation" uri="https://graft.sirref.org/index/" display-uri="index" type="local">Graft</fr:link> you will need to install it via opam.</html:p>
                <html:pre><![CDATA[opam install graft]]></html:pre>
                <html:p>and after setting up a minimal <fr:link href="https://www.forester-notes.org/0052/index.xml" type="external">Forester project</fr:link>, you can generate your forest using:</html:p>
                <html:pre><![CDATA[graft forest --output=trees src]]></html:pre>
                <html:p>This assumes your <html:code>forest.toml</html:code> is set up to build from <html:code>trees</html:code> and all of your markdown and bibtex files are stored in <html:code>src</html:code>.</html:p>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>14</fr:day>
                    </fr:date>
                    <fr:uri>https://graft.sirref.org/usage-dev/</fr:uri>
                    <fr:display-uri>usage-dev</fr:display-uri>
                    <fr:route>/usage-dev/</fr:route>
                    <fr:title text="Development ">Development </fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Graft has most likely had plenty of improvements and bug fixes since the last release. To grab a hold of those changes you can pin the package:</html:p>
                    <html:pre><![CDATA[opam pin git+https://github.com/patricoferris/graft]]></html:pre>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
          </fr:mainmatter>
        </fr:tree>
      </fr:mainmatter>
    </fr:tree>
    <fr:tree show-metadata="false" hidden-when-empty="true">
      <fr:frontmatter>
        <fr:authors />
        <fr:title text="Related">Related</fr:title>
      </fr:frontmatter>
      <fr:mainmatter>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="https://graft.sirref.org/The Graft Developers/" type="external">The Graft Developers</fr:link>
              </fr:author>
            </fr:authors>
            <fr:uri>https://graft.sirref.org/index/</fr:uri>
            <fr:display-uri>index</fr:display-uri>
            <fr:route>/index/</fr:route>
            <fr:title text="Graft Documentation">Graft Documentation</fr:title>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>Welcome to the <fr:link href="/index/" title="Graft Documentation" uri="https://graft.sirref.org/index/" display-uri="index" type="local">Graft</fr:link><![CDATA[ documentation homepage (written in, you guessed it,]]>  <fr:link href="/index/" title="Graft Documentation" uri="https://graft.sirref.org/index/" display-uri="index" type="local">Graft</fr:link><![CDATA[)!]]></html:p>
            <html:p><fr:link href="/index/" title="Graft Documentation" uri="https://graft.sirref.org/index/" display-uri="index" type="local">Graft</fr:link> is a preprocessor for <fr:link href="https://graft.sirref.org/forester/" type="external">Forester</fr:link> allowing users to write their forests using markdown and bibtex. Different markups and formats have slightly different semantics in terms of the trees they generate. For more information, please refer to their individual trees.</html:p>
            <fr:tree show-metadata="false" expanded="false">
              <fr:frontmatter>
                <fr:authors />
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>7</fr:month>
                  <fr:day>14</fr:day>
                </fr:date>
                <fr:uri>https://graft.sirref.org/graft-0001/</fr:uri>
                <fr:display-uri>graft-0001</fr:display-uri>
                <fr:route>/graft-0001/</fr:route>
                <fr:title text="Markdown Syntax">Markdown Syntax</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>The markdown syntax is the core feature of <fr:link href="https://graft.sirref.org/graft/" type="external">Graft</fr:link>. It supports most of what <fr:link href="https://graft.sirref.org/forester/" type="external">Forester</fr:link> has to offer. It uses a <fr:link href="https://jekyllrb.com/docs/front-matter/" type="external">Jekyll format frontmatter</fr:link> to provide <fr:link href="https://graft.sirref.org/forester/" type="external">Forester</fr:link> metadata and supports special code blocks too.</html:p>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>14</fr:day>
                    </fr:date>
                    <fr:uri>https://graft.sirref.org/graft-0003/</fr:uri>
                    <fr:display-uri>graft-0003</fr:display-uri>
                    <fr:route>/graft-0003/</fr:route>
                    <fr:title text="YAML Frontmatter">YAML Frontmatter</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>The markdown format for <fr:link href="/index/" title="Graft Documentation" uri="https://graft.sirref.org/index/" display-uri="index" type="local">Graft</fr:link> follows the Jekyll-style YAML frontmatter format. For example:</html:p>
                    <html:pre><![CDATA[---
title: Hello, World!
date: 2025-07-14
---

This is a valid tree.]]></html:pre>
                    <html:p>will generate a tree with <html:code>title</html:code> and <html:code>date</html:code> metadata with a single paragraph of text.</html:p>
                    <html:p>To insert <html:code>meta</html:code> field into your tree, you can use a nested object in your YAML frontmatter.</html:p>
                    <html:pre><![CDATA[---
title: Meta fields!
meta:
  external: http://example.org
---

External links !]]></html:pre>
                    <html:p>There is no centralised documentation on these <html:code>meta</html:code><![CDATA[ fields (that I could find),]]>  but this <fr:link href="https://www.forester-notes.org/007K/index.xml" type="external">biographical tree example may be useful</fr:link></html:p>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:uri>https://graft.sirref.org/graft-0008/</fr:uri>
                    <fr:display-uri>graft-0008</fr:display-uri>
                    <fr:route>/graft-0008/</fr:route>
                    <fr:title text="Subheadings are subtrees">Subheadings are subtrees</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Markdown headings are automatically transformed into "anonymous subtrees"</html:p>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors />
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>7</fr:month>
                          <fr:day>15</fr:day>
                        </fr:date>
                        <fr:title text="Anonymous!">Anonymous!</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>Just like that. It means they allow authors to provide structure without adhering to the atomicity principles.</html:p>
                      </fr:mainmatter>
                    </fr:tree>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors />
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>7</fr:month>
                          <fr:day>15</fr:day>
                        </fr:date>
                        <fr:title text="Interaction with Forester Subtrees">Interaction with Forester Subtrees</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>Markdown sections delimited by headings have no "closing tag". This means you that you don't quite get the nice feature of <fr:link href="https://graft.sirref.org/forester/" type="external">Forester</fr:link> where subtrees can be a standalone thing inside another text. Furthermore, including a subtree <![CDATA[will place it below the current hierarchy (as it pertains to the table of contents).]]></html:p>
                      </fr:mainmatter>
                    </fr:tree>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors />
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>7</fr:month>
                          <fr:day>15</fr:day>
                        </fr:date>
                        <fr:uri>https://graft.sirref.org/named-subtrees/</fr:uri>
                        <fr:display-uri>named-subtrees</fr:display-uri>
                        <fr:route>/named-subtrees/</fr:route>
                        <fr:title text="Named subtrees ">Named subtrees </fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>Sometimes you don't want to create a new file just to have a referenceable tree. In this case, you want a named subtree. In the markdown syntax you can use <fr:link href="https://www.markdownguide.org/extended-syntax/#heading-ids" type="external">markdown heading IDs</fr:link> to name your subtrees. For example this section has the following heading:</html:p>
                        <html:pre><![CDATA[## Named subtrees {#named-subtrees}]]></html:pre>
                      </fr:mainmatter>
                    </fr:tree>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>14</fr:day>
                    </fr:date>
                    <fr:uri>https://graft.sirref.org/graft-0004/</fr:uri>
                    <fr:display-uri>graft-0004</fr:display-uri>
                    <fr:route>/graft-0004/</fr:route>
                    <fr:title text="Forester Code Blocks">Forester Code Blocks</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>The markdown syntax cannot do everything that <fr:link href="https://graft.sirref.org/forester/" type="external">Forester</fr:link> can. For example, how might you <fr:link href="https://graft.sirref.org/transclude another tree into your tree/" type="external">transclude another tree into your tree</fr:link>?</html:p>
                    <html:p>At any given moment, you can escape into Forester syntax by using a code block where the <html:code>infostring</html:code> is <html:code>forester</html:code>. <fr:link href="https://graft.sirref.org/graft/" type="external">Graft</fr:link> will translate this into <fr:link href="https://graft.sirref.org/forester/" type="external">Forester</fr:link> syntax and output it in the same location as the code block in the generated code.</html:p>
                    <html:pre><![CDATA[```forester
\put\transclude/numbered{false}
\transclude{graft-0001}
```]]></html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>14</fr:day>
                    </fr:date>
                    <fr:uri>https://graft.sirref.org/graft-0005/</fr:uri>
                    <fr:display-uri>graft-0005</fr:display-uri>
                    <fr:route>/graft-0005/</fr:route>
                    <fr:title text="Other Special Code Blocks">Other Special Code Blocks</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p><![CDATA[There are two other (for now) code blocks that are treated differently]]>  by <fr:link href="https://graft.sirref.org/graft/" type="external">Graft</fr:link>.</html:p>
                    <html:ol>
                      <html:li>
                        <html:p><html:code>ocaml</html:code> code blocks will be run through <fr:link href="https://ocaml.org/p/hilite" type="external">hilite</fr:link> and converted to HTML.</html:p>
                      </html:li>
                    </html:ol>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>16</fr:day>
                    </fr:date>
                    <fr:uri>https://graft.sirref.org/graft-0007/</fr:uri>
                    <fr:display-uri>graft-0007</fr:display-uri>
                    <fr:route>/graft-0007/</fr:route>
                    <fr:title text="Verbatim HTML">Verbatim HTML</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Using markdown's HTML blocks, you can add HTML directly into your tree.</html:p>
                    <html:p>For example you could embed a <html:code>marquee</html:code> element by writing.</html:p>
                    <html:pre><![CDATA[<p><marquee> This is a marquee element! </marquee></p>]]></html:pre>
                    <html:p>
                      <html:marquee> This is a marquee element! </html:marquee>
                    </html:p>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false" expanded="false">
              <fr:frontmatter>
                <fr:authors />
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>7</fr:month>
                  <fr:day>14</fr:day>
                </fr:date>
                <fr:uri>https://graft.sirref.org/graft-0002/</fr:uri>
                <fr:display-uri>graft-0002</fr:display-uri>
                <fr:route>/graft-0002/</fr:route>
                <fr:title text="Bibtex Syntax">Bibtex Syntax</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>The bibtex syntax allows you to generate individual <html:code>reference</html:code> trees per entry.</html:p>
                <html:p>For example, consider the following bibtex entry.</html:p>
                <html:pre><![CDATA[@article{mokhov-build-systems,
    author = {Mokhov, Andrey and Mitchell, Neil and Jones, Simon},
    title = {Build systems a la carte},
    year = {2018},
    issue_date = {September 2018},
    publisher = {Association for Computing Machinery},
    address = {New York, NY, USA},
    volume = {2},
    url = {https://doi.org/10.1145/3236774},
    doi = {10.1145/3236774},
    abstract = {Build systems are awesome, terrifying -- and unloved...},
    journal={Proceedings of the ACM on Programming Languages},
    articleno = {79},
    numpages = {29},
    keywords = {functional programming, build systems, algorithms}
}]]></html:pre>
                <html:p>We have placed this in a file called <html:code>refs.bib</html:code> and can <fr:link href="/mokhov-build-systems/" title="Build systems a la carte" uri="https://graft.sirref.org/mokhov-build-systems/" display-uri="mokhov-build-systems" type="local">directly reference the entry with <html:code>mokhov-build-systems</html:code></fr:link>!</html:p>
                <html:p style="background-color: lightyellow; padding: 1em;">
<html:strong>Warning</html:strong>: the bibtex is quite fragile due to the parser we use. At some point
I hope to help make this better. Using the above entry as an example would be wise. For example,
middle name initials are not supported in author names.
</html:p>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false" expanded="false">
              <fr:frontmatter>
                <fr:authors />
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>7</fr:month>
                  <fr:day>14</fr:day>
                </fr:date>
                <fr:uri>https://graft.sirref.org/graft-0006/</fr:uri>
                <fr:display-uri>graft-0006</fr:display-uri>
                <fr:route>/graft-0006/</fr:route>
                <fr:title text="Usage">Usage</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>To use <fr:link href="/index/" title="Graft Documentation" uri="https://graft.sirref.org/index/" display-uri="index" type="local">Graft</fr:link> you will need to install it via opam.</html:p>
                <html:pre><![CDATA[opam install graft]]></html:pre>
                <html:p>and after setting up a minimal <fr:link href="https://www.forester-notes.org/0052/index.xml" type="external">Forester project</fr:link>, you can generate your forest using:</html:p>
                <html:pre><![CDATA[graft forest --output=trees src]]></html:pre>
                <html:p>This assumes your <html:code>forest.toml</html:code> is set up to build from <html:code>trees</html:code> and all of your markdown and bibtex files are stored in <html:code>src</html:code>.</html:p>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>14</fr:day>
                    </fr:date>
                    <fr:uri>https://graft.sirref.org/usage-dev/</fr:uri>
                    <fr:display-uri>usage-dev</fr:display-uri>
                    <fr:route>/usage-dev/</fr:route>
                    <fr:title text="Development ">Development </fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Graft has most likely had plenty of improvements and bug fixes since the last release. To grab a hold of those changes you can pin the package:</html:p>
                    <html:pre><![CDATA[opam pin git+https://github.com/patricoferris/graft]]></html:pre>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
          </fr:mainmatter>
        </fr:tree>
      </fr:mainmatter>
    </fr:tree>
    <fr:tree show-metadata="false" hidden-when-empty="true">
      <fr:frontmatter>
        <fr:authors />
        <fr:title text="Contributions">Contributions</fr:title>
      </fr:frontmatter>
      <fr:mainmatter />
    </fr:tree>
  </fr:backmatter>
</fr:tree>
