17022tfmt-0001tfmt-0001.xmlDesigning tools for scientific thought20221226Jon SterlingThis document records what I have learned about the design of “tools for scientific thought” over the past couple years, with an emphasis on the mathematical sciences. One of my goals in writing this is to set out both the unique requirements of an information data model that is needed to record and facilitate scientific thought, as well as the technical requirements for tools that can be used for mathematics.12298tfmt-0002tfmt-0002.xmlTool for scientific thoughtDefinition20221226Jon SterlingA “tool for scientific thought” could be many things, but it must be a tool for the development and interlinking of scientific ideas in a way that facilitates authoring, publishing, teaching, learning, and the maintenance of evergreen notes.A tool for scientific thought could be a piece of software, or it could be an organizing principle for physical notes on paper. In these notes, we will primarily explore the design of computerized tools for scientific thought.12300tfmt-0004tfmt-0004.xmlExisting tools for scientific thought20221226Jon SterlingThe existing tools for scientific thought can be divided into two main categories: interactive proof assistants and textual authoring and publishing tools (including LaTeX, as well as the Gerby software that runs the Stacks Project).12302tfmt-000Wtfmt-000W.xmlEvergreen notes in the sciences202335Jon Sterling12304tfmt-0003tfmt-0003.xmlEvergreen notesDefinition20221226Jon SterlingThe phrase evergreen note is due to Andy Matuschak, who has written extensively about it in his public Zettelkasten. Evergreen notes are permanent notes that evolve and accumulate over time, cutting across different projects.12306tfmt-0007tfmt-0007.xmlAtomicity of scientific notes20221227Jon SterlingOne of the design principles for evergreen notes described by Matuschak is atomicity (Evergreen notes should be atomic): a note should capture just one thing, and if possible, all of that thing. A related point is that it should be possible to understand a note by (1) reading it, and (2) traversing the notes that it links to and recursively understanding those notes.Traditional mathematical writing does not achieve this kind of atomicity: understanding the meaning of a particular node (e.g. a theorem or definition) usually requires understanding everything that came (textually) before it. In the context of the hierarchical organization of evergreen notes, this would translate to needing to go upward in the hierarchy in order to understand the meaning of a leaf node. I regard this property of traditional notes as a defect: we should prefer explicit context over implicit context.High-quality scientific notes should make sense with minimal context; hierarchical context is imposed in order to tell a story, but consumers of scientific notes should not be forced into a particular narrative. Indeed, as many different hierarchical structures can be imposed, many different narratives can be explored.My first exploration of hypertext science was the lecture notes on relative category theory; in hindsight, these lecture notes are very much traditional lecture notes, not written with the atomicity principle in mind. As a result, it is often difficult to understand a given node without ascending upward in the hierarchy.12308tfmt-0008tfmt-0008.xmlAchieving atomicity20221227Jon SterlingAtomicity in evergreen notes is enhanced by adhering to the following principles:no free variables: do not rely on one-off objects that are defined incidentally upwards in the hierarchy; turn them into atomic nodes that can be linked;
favor explicit dependency: whenever using a terminology or construction that has been defined elsewhere, link it;
notation should be decodable: all notations (except the most very basic) should be recalled via a link.It can be a bit excessive to link every word: but the pertinent links could be added to a “related pages” section.12310tfmt-0005tfmt-0005.xmlHierarchy in evergreen notes20221226Jon SterlingMatuschak describes a number of organizing principles for evergreen notes, which are quite compelling; one design principle (Prefer associative ontologies to hierarchical taxonomies) deserves additional discussion in the context of mathematical thought. In particular, the problem of circular reference must be grappled with immediately rather than incidentally: in ordinary knowledge management, circularity represents the completion of a train of thought, whereas in mathematical thinking it remains very important to distinguish assumptions from consequences.Hence a purely associative organization of mathematical knowledge is not viable (although it often happens by accident), and so the hierarchical organization of mathematics must be taken seriously from the start. We find that Matuschak has in fact already grappled with the need for hierarchy in his note It’s hard to navigate to unlinked “neighbors” in associative note systems, where he discusses the difficulty of traversing the “neighbor”-relationship between notes that are related by another note’s context, but are not related on their own. Matuschak proposes to solve the problem by grafting hierarchy onto the associative ontology after the fact through “outline notes”:“Outline notes” can create pseudo-hierarchies with order and structure by linking to many child notes. Then we need the UI to support navigating between neighbors “through” these outline notes.The viewpoint of outline hierarchy as a structure imposed on the existing associative ontology is a convenient organizing principle for evergreen notes in the sense of Matuschak, but it is a necessary principle for the design of tools for scientific thought.12312tfmt-0006tfmt-0006.xmlHierarchical structure as non-unique narrative20221226Jon SterlingMultiple hierarchical structures can be imposed on the same associative network of nodes; a hierarchical structure amounts to a “narrative” that contextualizes a given subgraph of the network. One example could be the construction of lecture notes; another example could be a homework sheet; a further example could be a book chapter or scientific article. Although these may draw from the same body of definitions, theorems, examples, and exercises, these objects are contextualized within a different narrative, often toward fundamentally different ends.As a result, any interface for navigating the neighbor-relation in hierarchically organized notes would need to take account of the multiplicity of parent nodes. Most hypertext tools assume that the position of a node in the hierarchy is unique, and therefore have a single “next/previous” navigation interface; we must investigate the design of interfaces that surface all parent/neighbor relations.12314tfmt-0009tfmt-0009.xmlThe best structure to impose is relatively flat20221227Jon SterlingIt is easy to make the mistake of prematurely imposing a complex hierarchical structure on a network of notes, which leads to excessive refactoring. Hierarchy should be used sparingly, and its strength is for the large-scale organization of ideas. The best structure to impose on a network of many small related ideas is a relatively flat one. I believe that this is one of the mistakes made in the writing of the foundations of relative category theory, whose hierarchical nesting was too complex and quite beholden to my experience with pre-hypertext media.There are many ways to model hierarchy, but there are two salient orthogonal distinctions in the different designs.12316tfmt-000Btfmt-000B.xmlAbsolute vs. relative hierarchy in document markup languages20221229Jon SterlingBoth HTML and LaTeX support a form of hierarchical organization with “absolute” heading levels, i.e. levels that count upward from a single root. In HTML, there is ]]>, ]]>, ]]>..., and in LaTeX there is , , , ,, ..., depending on the document class. This is in contrast to a relative model of hierarchy, in which there is a single command to introduce a section heading at the “current” level, and there are other commands to introduce hierarchical nesting.The absolute sectioning model is completely inadequate for the hierarchical organization of ideas, for the simple reason that it is the context of a node that determines what its level in the hierarchy is, not the node itself. When this is mixed up, it makes re-contextualization an extremely painful and time-consuming process: you must recursively increment or decrement all section levels that occur underneath a given node, as anyone who has used LaTeX for any significant writing project can attest.In traditional texts, re-contextualization occurs when you want to move a section from one place in the hierarchy to another; in the more fluid media I am pursuing, there may be many orthogonal hierarchical structures imposed on the network, so re-contextualization ceases to be a refactoring task and is elevated as a basic unit of scientific activity. In either case, we are drawn to prefer relative hierarchy over absolute hierarchy. See existing implementations of this idea.This is similar to the relationship between De Bruijn levels (global levels) and De Bruijn indices (local levels) in type theory: conventional section headings are like De Bruijn indices in that they count from the root node, whereas what we would want are section headings that count from the present node.12318tfmt-000Dtfmt-000D.xmlImplicit vs. explicit hierarchy in document markup languages20221229Jon SterlingMany document markup languages, including LaTeX and HTML, use sectioning commands that evince an implicit hierarchical structure: for instance, consider the following HTML code:Foo
## Bar

### Baz

### Qux

# Boo

]]>The above corresponds to the tree [Bar > [Baz, Qux]], Boo]]]>. On the other hand, it is also possible to consider a model in which the hierarchy is made explicit through the syntactical tree structure of the markup language. This style is also supported (but not forced) in HTML:
# Foo

]]>We greatly prefer the combination of (relative, explicit) hierarchy.12320tfmt-000Ctfmt-000C.xmlRelative hierarchy in existing tools20221229Jon SterlingThere are a few LaTeX packages that implement relative hierarchy for sectioning as an alternative to the backward model of absolute hierarchy.The coseoul package implements relative sectioning commands; similar to the existing sectioning commands, an implicit hierarchy model is employed, leading to an imperative feel with commands like }]]> and }]]>.
The modular package builds on coseoul to behave better under the transclusion of LaTeX documents, introducing a command that is to be used instead of or .
On the other hand, the dieudonne package implements a form of relative sectioning with an explicit hierarchical model, i.e. one in which the syntactical nesting of LaTeX environments induces the hierarchy.There are some attempts to impose a (relative, explicit) hierarchical model in HTML by using ]]> and only the ]]> heading command. In the HTML5 spec, this behavior was initially endorsed as part of the “outline” algorithm, but unfortunately almost no vendors of browsers nor assistive technology have correctly implemented this behavior.12322tfmt-000Vtfmt-000V.xmlForests of evergreen notes202334Jon Sterling11272tfmt-000Rtfmt-000R.xmlForests and trees of evergreen notesDefinition202334Jon SterlingA forest of evergreen notes (or a forest for short) is loosely defined to be a collection of evergreen notes in which multiple hierarchical structures are allowed to emerge and evolve over time. Concretely, one note may contextualize several other notes via transclusion within its textual structure; in the context of a forest, we refer to an individual note as a tree. Of course, a tree can be viewed as a forest that has a root node.11274tfmt-000Utfmt-000U.xmlThe extent of a tree in a forestDefinition202334Jon SterlingThe extent of a tree within a forest is the smallest set of trees closed under the following rules: lies within the extent of .
If is transcluded by , then any tree in the extent of lies also in the extent of .11276tfmt-000Qtfmt-000Q.xmlAuthorship and responsibility in forests202334Jon SterlingA forest of evergreen notes may in general contain the work of many authors: for example, the tree on constructive domain theory comprises mathematical contributions of not only the present author, but also Martín Escardó and Tom de Jong. However, the correct attribution of authorship to a given tree is more subtle than one might at first think.To understand this subtlety, we first consider that each individual tree may contain both textual content and transcluded subtrees. Thinking inductively, a simple model of tree authorship would be to take the union of the authors of the immediate textual content and the authors of all trees within its extent. This model is incorrect, however, as authorship is usually taken to imply responsibility and endorsement, as can be seen by way of example from the ACM Policy on Authorship, Peer Review, Readership, and Conference Publication:They agree to be held accountable for any issues relating to the correctness or integrity of the work with the understanding that depending on the circumstances not all authors are necessarily held “equally” accountable. In the case of publications-related misconduct, it may be the case that penalties may vary for co-authors listed on a single publication.In particular, although one person may be aware of and responsible for the content of a given tree, it would be unreasonable to require them to be responsible for any subsequent (and potentially erroneous!) re-contextualization of that tree in the forest. For this reason, authors must be distinguished from contributors in forests of evergreen notes.11278tfmt-000Stfmt-000S.xmlAuthor of a treeDefinition202334Jon SterlingAn author of a tree within a forest is someone who satisfies the following conditions:They contributed intellectually to the immediate textual content of the tree, i.e. the non-transcluded content.
They can be held responsible for all the content within the tree, i.e. both the immediate textual content as well as the content of all the subtrees.11280tfmt-000Ttfmt-000T.xmlContributor to a treeDefinition202334Jon SterlingA direct contributor to a tree within a forest is either an author of the tree, or has contributed intellectually to the immediate content of the tree but cannot be held responsible for it.A contributor to a tree is someone who is a direct contributor to at least one tree lying within its extent.12324tfmt-000Etfmt-000E.xmlRequirements for typesetting mathematics202317Jon SterlingMany non-LaTeX hypertext tools boast some compatibility with mathematical typesetting: for instance, in any HTML-based tool it is possible to use MathML or, for better cross-browser support and easier authoring, import or MathJax. For instance: Logseq, Obsidian, and Notion all support rendering of LaTeX math code using either or MathJax. Unfortunately, the “support” provided is so limited that it is not usable for a working mathematician — so it is somewhat puzzling why the support is present in the first place. Here we will discuss some fundamental requirements for any tool that aims to support mathematical notes, without which it is not applicable for use by professionals.12326tfmt-000Ftfmt-000F.xmlNotational macros in mathematical authoring202317Jon SterlingMathematical writing tends to involve a variety of notations which (1) can be difficult to typeset by hand, and (2) will likely change over time. The difficulty of hand-typesetting is somewhat less important than the propensity of notation to change over time: when we change notations within a given mathematical work, we must update every occurrence of the notation: but when the representation of the notation is unstructured, it is not in fact possible for a tool (e.g. find-and-replace) to detect every instance that needs to be updated. Therefore, it is mandatory that the representation of mathematical notations be structured.LaTeX allows authors to structure their notations very simply using macros, which can be introduced using or . It is trivial to update all occurences of a notation by simply changing the definition of the corresponding macro.Unfortunately, most tools that purport to support the inclusion of mathematical expressions do not have adequate support for macros. Both and MathJax have excellent support for configuring macros, but these configuration options are not available in most of the tools that build on and MathJax: for instance, Logseq and Obsidian and Notion all support embedding mathematics, but they do not support configuring macros. In fact there is a community plugin for Obsidian that adds this functionality, but it only supports imposing a global macro library on the entire “vault”, which is inadequate.12328tfmt-000Htfmt-000H.xmlNotational macros are local, not global202317Jon SterlingIn LaTeX, macros are organized into packages that are then globally imported into a single document. Because a LaTeX document comprises just one project and thus any transclusions (via or ) are of components local to that one project, this model is adequate — although experienced users of LaTeX are nonetheless all too aware of the difficulties of namespacing macro commands when interacting with multiple packages or document classes.The requirements for a tool that aims to bring together multiple projects over a very long period of time are somewhat different: many distinct packages of notation will be used across the body of work, and it is not possible to fix a single global notation package.Indeed, it is not reasonable to expect that all notes within a person’s mathematical life shall share the same notations, and in many cases, it would moreover be necessary for the names of the macros associated to these notations to clash. This can happen because two projects are orthogonal, or it can happen as the author’s tastes change over time — and it is not reasonable for such a tool to force enormous and weighty refactorings (touching thousands or tens of thousands of notes) every time the author’s taste changes. The need for arduous refactorings of this kind is one of the main ways that large mathematical projects tend to collapse under their own weight.It follows that any tool for thought whose support for mathematical notations involves a globally-defined macro package is inadequate for mathematical uses. On the other hand, it is also not reasonable to require the author to define all their macros in each note: notes tend to be small, and there will always be large clusters of notes that share the same notations — and for which the small refactoring tasks involved when notations change are a positive feature rather than a negative one, as one of the goals of a cluster is to accumulate cohesion.Therefore, the precise requirement for macro library support is as follows:The author must be able to define (in their own files) multiple notational macro libraries.
A given note must be able to specify which macro libraries (if any) it employs.Finally, careful attention must be paid to the interaction between the above requirements and the transclusion of mathematical notes: a transcluded note must be rendered with respect to its own macro library, and not that of the parent note.12330tfmt-000Gtfmt-000G.xmlMathematical diagrams and macro support202317Jon SterlingA basic requirement of tools for scientific thought is to support the rendering of mathematical diagrams. What kinds of diagrams are needed depends, of course, on the problem domain: for my own work, the main diagram-forms needed are commutative diagrams and string diagrams.10767tfmt-000Ptfmt-000P.xmlMathematical expressions and diagrams are tightly coupled202317Jon SterlingAlthough diagramming may seem to non-mathematicians to be somewhat orthogonal to notational macro support, in reality any solution to the diagramming problem must be tightly and natively integrated with the rendering of mathematical expressions — simply because most diagrams involve mathematical expressions, and these invariably involve notational macros. The reason PGF/TikZ has been so successful is that it respects this tight coupling.The situation for hypertext mathematical tools is somewhat less advanced than that of LaTeX and PFG/TikZ, but there are several options which we discuss below.10769tfmt-000Jtfmt-000J.xmlCommutative diagrams in KaTeX202317Jon Sterling has a very rudimentary support for commutative diagrams built-in, by emulating the package. Unfortunately, this support is completely inadequate for usage by mathematicians today:Only square diagram shapes are supported: commutative diagrams in general have diagonal and curved lines, but these are not supported.
The rendering of the limited gamut of supported commutative diagrams is broken in most browsers (at least Safari and Firefox). In particular, lines are jagged as they are pieced together from pipes and arrows that are subtly misaligned.10771tfmt-000Ktfmt-000K.xmlCommutative diagrams in MathJax202317Jon SterlingLike , MathJax supports the commands for rudimentary square-shaped commutative diagrams. Unlike the implementation of , the supported diagrams are rendered correctly without jagged lines; this means that for the vanishingly small population of mathematicians whose needs are limited to square-shaped diagrams, MathJax’s builtin support is viable.On the other hand, there is a more advanced option available for users of MathJax: the XyJax-v3 plugin, which adds support for the full gamut of diagrams to MathJax. Notably, this plugin is used by the Stacks Project. The only downside of the support is that it interacts poorly with accessibility features (but no worse than any other solution to rendering non-trivial commutative diagrams), and diagrams created using look considerably less professional than those created using or quiver.Both and MathJax have the benefit that diagrams created using them will respect the ambient macro package with which the tool has been configured; therefore, if one looks past the rudimentary nature of the support for commutative diagrams, our main requirement is indeed satisfied. Another tool worth discussing is quiver.10773tfmt-000Itfmt-000I.xmlThe quiver interactive diagramming tool202317Jon SterlingThe quiver application is an excellent graphical interface for interactively constructing commutative diagrams, with very high-quality rendering.One positive aspect of quiver is that it is possible to load it with your own macro library, so that diagrams involving custom notations render correctly in the graphical interface. The downside of the approach here is that the macro library must be located on a publicly accessible URL that can be pasted into the quiver interface.Quiver also offers excellent support for embedding the resulting diagrams in existing LaTeX documents: after creating your diagram, you can request a LaTeX snippet that includes a URL which allows you to resume editing your diagram. For example, the following code corresponds to the URL https://q.uiver.app/?q=WzAsMixbMCwwLCJBIl0sWzEsMCwiQiJdLFswLDFdXQ==:Unfortunately, the support for embedding quiver diagrams in HTML documents is currently inadequate for professional use. The HTML embed code provided simply produces an ]]>, and it is not possible to style the interior of the embedded frame (e.g. to change the background color, or decrease the margins):
]]>Therefore, we must conclude that although quiver is an excellent tool for authors of traditional LaTeX documents, it is not currently a candidate for inclusion in tools for hypertext mathematical authoring.Because of the currently inadequate support of quiver for embedding diagrams in hypertext settings, we cannot consider it any further. There is a final option that turns out to be the most used in practice: generating SVG images statically from embedded LaTeX code.10775tfmt-000Ltfmt-000L.xmlGenerating images statically using LaTeX202317Jon SterlingBecause of the general inadequacy of the other available tools, most authors of hypertext mathematics with diagramming needs tend to rely on the static generation of images from LaTeX code using a local LaTeX toolchain. It is not difficult to instrument pandoc with a Lua filter to render tikz code to SVG images.There are also a variety of other tools that do something similar, which tend to be employed in static site generation:antex by Paolo Brasolin is used by Krater as well as jekyll-sheafy, both via jekyll-antex.
Forester by Jonathan Sterling is used by the present web site.The basic architecture of such a tool is to scan for LaTeX blocks, and then identify them by a hash of their contents. This hash is used as a filename for files, which are compiled to and thence to using the tool; the resulting file is then embedded in HTML using an ]]> tag. Alternatively, is also possible to transclude the resulting ]]> element directly, but then one must be careful to rename all identifiers in the ]]> element uniquely, as it is possible for two different ]]> elements on a single page to interfere one each other.Both antex and Forester support passing a macro library to be used when rendering. Both jekyll-sheafy and Forester set their macro libraries on a page-local basis.A serious downside of generating images from LaTeX code is the negative impact on accessibility tools. This seems only slightly mitigated by the transclusion of the ]]> element as opposed to using ]]>. Ultimately accessibility for mathematical diagrams remains an unsolved problem, and it does not seem that the existing discussion on accessibility of hypertext mathematics has much to say about this problem.Finally, we comment on more principled approaches using web standards such as SVG and MathML that we hope will take form in the future.10777tfmt-000Ntfmt-000N.xmlSVG is not an authoring language202317Jon SterlingSVG is an extremely powerful low-level language for vector images and diagrams with a variety of applications. Unfortunately, it is not reasonable to compose such diagrams directly in SVG as an author: in contrast to programmatic tools like PGF/TikZ, all positions in SVG are fixed, and there is no possibility to impose important abstractions (e.g. the concept of a line that is “glued” to a pair of nodes). On the other hand, there are many advantages to SVG, including the possibility to intermix SVG with other formats such as MathML.Because of the low level of abstraction, SVG images that appear in practice today are nearly always produced by a tool or compiler from an input that is defined at a much higher level of abstraction.10779tfmt-000Otfmt-000O.xmlMathML is not an authoring language202317Jon SterlingDespite some preliminary support for structured representation of high-level mathematical idioms via Content MathML, MathML is not intended to be an authoring language: it is a target language for other tools. Moreover, the content dictionaries (collections of basic elements) of Content MathML are chosen to pertain to the needs of grade-school and secondary-school mathematics and not at all to the needs of professional mathematics:The base set of content elements is chosen to be adequate for simple coding of most of the formulas used from kindergarten to the end of high school in the United States, and probably beyond through the first two years of college, that is up to A-Level or Baccalaureate level in Europe.Nonetheless, it seems that the goal was for the content dictionaries of Content MathML to be extended by the individual “communities of practice” to meet their specific needs:Hence, it is not in general possible for a user agent to automatically determine the proper interpretation for values without further information about the context and community of practice in which the MathML instance occurs.However, in contexts where highly precise semantics are required (e.g. communication between computer algebra systems, within formal systems such as theorem provers, etc.) it is the responsibility of the relevant community of practice to verify, extend or replace definitions provided by OpenMath CDs as appropriate.It seems that there is a possibility to use XSLT to define your own semantic notational macros, and this certainly bears further investigation. Due to the mutually reinforcing combination of historically poor vendor support and near-absolute isolation from actual communities of practice, i.e. working mathematicians, sophisticated direct use of MathML has never caught on. On the other hand, there is a great deal of MathML on the web today in the form of MathJax and output — tools which are not only currently necessary for obtaining consistent (and professional-quality) rendering of mathematics across browsers, but also are necessary for authoring due to their more succinct markup and easy support for macros.It seems that the future of MathML is brighter than it was in the past, as we are finally seeing a vital project to improve vendor support led by Igalia. Currently, even browsers that support the MathML standard do so with completely inadequate and unprofessional rendering quality, which means that tools like MathJax and may remain necessary for some time even after vendors finally support MathML. But we hope that with improved vendor support comes new and productive experiments with using semantic tools like XSLT to handle macros, etc. Unfortunately, given the tight coupling between the authoring of mathematical expressions and of mathematical diagrams, this transformation will not take place unless high-level hypertext-compatible tools for drawing diagrams are simultaneously developed.10781tfmt-000Mtfmt-000M.xmlTowards mixing SVG and MathML in hypertext mathematics202317Jon SterlingThe W3C MathML Core Working Draft points out that MathML can be embedded into ]]> elements using the ]]> element. This is a great strength of the modularity of the model, and I believe that in the future, we will be able to use this as a way to render accessible mathematical diagrams in hypertext.What is missing? Essentially the current issue preventing widespread use of this method is the fact that neither SVG nor MathML is an authoring language: they are both currently too low-level to be seriously used by authors.For exactly so long as diagrams must be drawn using LaTeX-based tools rather than something MathML-compatible, it would be non-negotiable for the support of notational macros to itself be based in LaTeX syntax (e.g. as in both and MathJax). But it is worth imagining a future in which mathematical diagrams are drawn using a high-level interface to SVG, and then a pure MathML approach to notational macros becomes quite viable. This is not currently the world we live in, but it is something to hope for.
12333jms-0088jms-0088.xmlCrowdfunding and sponsorship☕Jon SterlingApart from my day-job at the University of Cambridge, I am independently researching tools for scientific thought and developing software like Forester that you can use to unlock your brain. If you have benefited from this work or the writings on my blog, please considering supporting me with a sponsorship on Ko-fi.References17024stacks-projectstacks-project.xmlThe Stacks projectReference2018The Stacks Project Authorshttps://stacks.math.columbia.eduThe Stacks project is an ever growing open source textbook and reference work on algebraic stacks and the algebraic geometry needed to define them. Here are some quick facts:The Stacks project is not an introductory text. It is written for graduate students and researchers in algebraic geometry.
The aim is to build algebraic geometry and use this in laying the foundations for algebraic stacks. The theory of commutative algebra, schemes, varieties, and algebraic spaces forms an integral part of the Stacks project.
The Stacks project has a maintainer (currently Aise Johan de Jong) who accepts changes etc. proposed by contributors. Everyone is encouraged to participate.
The Stacks project is meant to be read online. Consequently we do not worry about length of the chapters, etc. With hyperlinks and the search function it is possible to quickly browse through the chapters to find the lemmas, theorems, etc. that a given result depends on.
We use tags to identify results, which are permanent identifiers for a result. You can read more about this on the tags explained page.For a longer discussion, please read the blog post What is the stacks project?.17026gerbygerby.xmlGerbyReferencePieter BelmansRaymond ChengAise Johan de Jonghttps://gerby-project.github.io/If you have a LaTeX document whichis large (probably several hundreds of pages at least)
is regularly updated
needs to be externally referenced oftenyou will run into the problem thatlarge PDFs are not easily navigable
PDFs of any size are not very searchable
the internal numbering changes often, making external references outdatedGerby addresses these problems by providing an online tag-based view, instead of just having a big PDF. Gerby is tailored towards making large online textbooks and reference works more accessible.In case you were wondering, a gerbe is a kind of stack (in the mathematical sense), and the software was originally meant for the Stacks project.Backlinks17030jms-007Ljms-007L.xmlBottom-up hierarchy via transclusion2023815Jon SterlingYou may be used to writing documents, where you work from the top down: you create some section headings, put some text under those headings, make some deeper section headings, put more text, etc. Forests work in the opposite way, from the bottom up: you start by writing independent, atomic notes/trees and then only later start to (sparingly) assemble these into a hierarchy in order to reify the emerging structure.Forester’s bottom-up approach to section hierarchy works via something called transclusion. The idea is that at any time, you can include (“transclude”) the full contents of another tree into the current tree as a subsection by adding the following code:This is kind of like ’s command, but much better behaved: for instance, section numbers are computed on the fly. This entire tutorial is cobbled together by transcluding many smaller trees, each with their own independent existence. For example, the following two sections are transcluded from an entirely different part of my forest:1051tfmt-0009tfmt-0009.xmlThe best structure to impose is relatively flat20221227Jon SterlingIt is easy to make the mistake of prematurely imposing a complex hierarchical structure on a network of notes, which leads to excessive refactoring. Hierarchy should be used sparingly, and its strength is for the large-scale organization of ideas. The best structure to impose on a network of many small related ideas is a relatively flat one. I believe that this is one of the mistakes made in the writing of the foundations of relative category theory, whose hierarchical nesting was too complex and quite beholden to my experience with pre-hypertext media.One of the immediate impacts and strengths of Forester’s transclusion model is that a given tree has no canonical “geographic” location in the forest. One tree can appear as a child of many other trees, which allows the same content to be incorporated into different textual and intellectual narratives.1053tfmt-0006tfmt-0006.xmlHierarchical structure as non-unique narrative20221226Jon SterlingMultiple hierarchical structures can be imposed on the same associative network of nodes; a hierarchical structure amounts to a “narrative” that contextualizes a given subgraph of the network. One example could be the construction of lecture notes; another example could be a homework sheet; a further example could be a book chapter or scientific article. Although these may draw from the same body of definitions, theorems, examples, and exercises, these objects are contextualized within a different narrative, often toward fundamentally different ends.As a result, any interface for navigating the neighbor-relation in hierarchically organized notes would need to take account of the multiplicity of parent nodes. Most hypertext tools assume that the position of a node in the hierarchy is unique, and therefore have a single “next/previous” navigation interface; we must investigate the design of interfaces that surface all parent/neighbor relations.17032jms-005Ujms-005U.xmlAbout this website2023717Jon SterlingThis website is a “forest” created using the Forester tool. I organize my thoughts here on a variety of topics at a granular level; sometimes these thoughts are self-contained, and at times I may organize them into larger notebooks or lecture notes. My nascent ideas about the design of tools for scientific thought are here. I welcome collaboration on any of the topics represented in my forest. To navigate my forest, press Ctrl-K.17034jms-0053jms-0053.xmlIntroducing Forester: a tool for scientific thought2023514Jon SterlingAfter spending two years exploring the design of tools for scientific thought that meet the unique needs of real, scalable scientific writing in hypertext, I have created a tool called Forester which has the following benefits:Forester is tag-based like Gerby, and can therefore power large-scale generational projects like Stacks and Kerodon.
Forester produces static content that can be uploaded to any web hosting service without needing to run or install any serverside software.
Forester is easy to install on your own machine.
To prevent bitrot, Forester is a single tool rather than a composition of several tools.
Forester satisfies all the requirements of serious scientific writing, including sophisticated notational macros, typesetting of diagrams, etc.Forester combines associative and hierarchical networks of evergreen notes (called “trees”) into hypertext sites called “forests”.1026tfmt-000Rtfmt-000R.xmlForests and trees of evergreen notesDefinition202334Jon SterlingA forest of evergreen notes (or a forest for short) is loosely defined to be a collection of evergreen notes in which multiple hierarchical structures are allowed to emerge and evolve over time. Concretely, one note may contextualize several other notes via transclusion within its textual structure; in the context of a forest, we refer to an individual note as a tree. Of course, a tree can be viewed as a forest that has a root node.Trees correspond roughly to what are referred to as “tags” in the Stacks Project.17036jms-0088jms-0088.xmlCrowdfunding and sponsorship☕Jon SterlingApart from my day-job at the University of Cambridge, I am independently researching tools for scientific thought and developing software like Forester that you can use to unlock your brain. If you have benefited from this work or the writings on my blog, please considering supporting me with a sponsorship on Ko-fi.