Writing OrgSynDB procedures in Org

Eine deutsche Fassung dieser Anleitung ist AUTHORING-ORG.de.org.

Start from a generated stub

If you write in Emacs, the orgsyndb package completes metadata keys and values in the file's header, called front matter. It shows problems while you write and after saving, keeps the modification time current and previews the page. For installation, see the application's README, section “Edit in Emacs”.

Create an Org procedure, from inside its collection, with:

  orgsyndb new "Product name"

The command creates a file such as org/procedures/OSDB-0003-product-name.org and fills its identifier, slug, title, and current Europe/Berlin timestamps.

When registry in the collection's orgsyndb.toml is an HTTP or HTTPS address, the lab application assigns the identifier. You need a personal access token: a secret that lets the command request an ID as your account. Sign in to the application, choose Access tokens beside your initials or open /lab/accounts/tokens/, enter a Name and choose Create. Copy the token immediately; it is shown only once.

Put it on the first line of ~/.config/orgsyndb/token on the computer running the command. If XDG_CONFIG_HOME is set and not empty, use $XDG_CONFIG_HOME/orgsyndb/token instead. You can also set ORGSYNDB_TOKEN in the command's environment; a non-empty value takes precedence over the file. Keep the token outside the collection. To stop a token working, choose Revoke on the same page. Deactivating its account also stops it.

If no token is available, the command reports no access token. If the application is unreachable or refuses the request, it shows the address and reason. In each case it exits 1 and creates no file. It waits up to 30 seconds; you cannot get an ID offline. For status 401, check your token and whether your account is active. For status 409 with no import of the collection has been accepted yet, so its IDs are not known, ask the owner to get the first collection import accepted, then try again.

With a registry file or no registry setting, the command takes the next ID above those in the Org sources, Markdown sources, exports and all available Git history. Deleted IDs are not reused. It warns if history is unavailable or the copy holds only part of it (a shallow clone), because older deleted IDs may be unseen. ORGSYNDB_REGISTRY does not change where new gets its ID. M-x orgsyndb-new-procedure runs the same command and uses the same token; Emacs waits for the request and shows its error if it fails.

The stub records no AI model. To record an assisting model, add #+AI_MODEL: example-model-1 by hand. The command creates the file exclusively and never overwrites an existing file.

The source template is templates/procedure.org. The complete field rules are in the procedure schema.

Understand the template header

The template describes a specific procedure, one run. For a shared method applied to several substrates, use a general procedure, as explained below.

Org keyword lines start at column zero. Keep every required keyword once, and do not indent it.

#+TITLE
The product name or general method shown as the page title.
#+CREATED
When the procedure was first written, as an inactive Org timestamp.
#+LAST_MODIFIED
When the procedure was last changed. Update this by hand after every change; the orgsyndb program does not update it, and only the Emacs package updates it when you save.
#+AI_MODEL (optional)
The identifier of a model that assisted. Omit the line or use none to record no model.
#+OPTIONS: author:nil
Prevents Org authorship metadata from becoming an invalid author field in the export.
#+HUGO_SLUG
The lowercase procedure identifier, such as osdb-0003.
#+HUGO_TAGS
Space-separated tags. Use lowercase letters and digits with single hyphens. The sample-data tag adds a warning banner on screen and on paper, so never use it for a real procedure.
#+HUGO_CUSTOM_FRONT_MATTER
Repeated lines that supply the procedure identifier, authors, status, reaction type, scale, products with their yields, hazards, and optional fields.

Choose :reaction_types from the lab registry’s reaction-types vocabulary.

Use :notebook to name the paper notebook entry the procedure comes from, and :project to assign it to a project. These two optional journal fields are built in for every collection; do not declare them in orgsyndb.toml. Your collection can declare other fields under [[fields.procedure]], such as the demo's working_time and inert_atmosphere. Add a #+HUGO_CUSTOM_FRONT_MATTER: line before :products, which stays last. The demo's salicylic-acid procedure sets this line after :scale:

  #+HUGO_CUSTOM_FRONT_MATTER: :notebook "AE-1/1" :project "first-year-practical" :working_time 3 :inert_atmosphere false

Double-quote text and choice keys; leave numbers and true or false unquoted. Numbers use a decimal point and no unit. A multiple choice uses a quoted list, such as :funding '("first-year-practical" "advanced-practical") when the collection declares funding with multiple = true and uses the demo registry’s projects vocabulary. :project takes one quoted key, not a list. required = true requires a value on every procedure, including general procedures. unique = true requires a value no other procedure uses; translations of one procedure count as one. The demo's four fields are optional.

Write a notebook reference as <code>/<number>, such as AE-1/1 for entry 1 of notebook AE-1. The code uses capital letters and digits joined by single hyphens; the entry number runs from 1 to 9999 and has no leading zero. The exact pattern is [A-Z0-9]+(-[A-Z0-9]+)*/[1-9][0-9]{0,3}. Register the notebook in the lab application at /lab/journal/ before validating or importing the procedure. If you see unknown notebook, check the code and that the collection's registry snapshot lists the notebook. No other procedure may use the same entry; translations of one procedure share it. The entry's contents stay on paper. On the procedure page the reference links to the notebook's page in the lab.

Working time is in hours and at least zero. Project keys come from the lab registry’s projects vocabulary. A choice field’s vocabulary names chemical-classes, inventory-groups, projects or reaction-types. See the field reference for all rules.

The export with ox-hugo/tomelr has a typing limit: it writes strings without quotes if they read true or false, have the form of a date or date-time (2026-01-01, 2026-01-01T10:00:00+01:00), or are integers consisting of an optional sign followed by digits and underscores (1234, -7, 7_000, 0012). Quoting the source does not prevent this, including inside lists. Such values cannot be text or choice keys in Org, including entries of a multiple choice. Validation reports must be a string, or the exported front matter fails to parse; unquoted 0012 is invalid TOML. Choose field patterns and vocabulary keys that avoid these forms if you use Org sources. Markdown sources have no such limit.

For a specific procedure, set :products to a quoted list with one entry per product. Each entry contains its compound key and yield_percent. A key is the key of a substance in the lab application’s registry. Keep :products alone on the last custom-front-matter line. The exporter also keeps table-valued metadata last so later fields do not become members of the last [[products]] table.

Name starting materials in an optional :substrates line before :products. For example:

  #+HUGO_CUSTOM_FRONT_MATTER: :substrates '("methyl-salicylate")
  #+HUGO_CUSTOM_FRONT_MATTER: :products '(((compound . "salicylic-acid") (yield_percent . 80)))

To add another product, add another entry of the form ((compound . "key") (yield_percent . N)) inside the outer list. Every yield is a number from 0 to 100 without quotes or %. Do not list a key twice in either list or list a product as a starting material.

The site links the starting materials to their lab substance pages. It derives Precursors from other procedures that make those compounds and Used in from procedures that start from your products. You do not write these procedure links yourself; they work across procedure languages.

Put all tags on the #+HUGO_TAGS line, separated by spaces:

  #+HUGO_TAGS: esterification fragrance

Product names, chemical data and molfiles come from the lab registry. The build takes structure images from that registry's source, as described next.

Use the template's quoting and list forms. Authors and hazards use quoted Lisp lists. For authors, write the lab account user names of everyone who wrote the procedure, each once, for example :authors '("klehmann" "aschmidt"). Each account must appear in the collection's registry snapshot; it may be inactive. Replace the template's a.example with your user name before validating. checked_by is a separate, free-text list of names.

In Emacs, completion for authors offers the registry's account user names, each annotated with the account's name. Completion for checked_by offers names already used under that key in procedures; you can also enter other names. Consult docs/SCHEMA.md for the exact required values, optional fields, reaction vocabulary, and file-name rules.

For a general procedure, replace the top-level :products and :substrates with a named scope table, as shown below. Keep :scale as the typical scale.

Find or add the compounds

The compound registry is the lab application's list of substances, shared by every procedure that makes or uses them. Choose Chemicals › Substances in the lab application or open /lab/registry/ and look for an existing substance before adding one. The key identifies the compound; the site does not compare structures to find duplicates.

Create and edit substances in the lab application. Use the substance's key in :products or :substrates, for example ethyl-acetate. Keys use lowercase letters and digits separated by single hyphens. Replace the stub's example-compound with the key you actually use. Creating a procedure stub does not create a substance.

The collection's orgsyndb.toml names the registry in registry: the address of the lab application's snapshot, a saved copy of its registry, such as http://localhost:8000/lab/registry/snapshot.json, or a snapshot file's path. A relative path starts at the collection folder. A non-empty ORGSYNDB_REGISTRY environment variable overrides this setting. Ask the owner to set it if the collection has no registry.

Names and chemical data come from the substance in that registry: formula, molar mass in g/mol, SMILES (a text notation for molecular structures) and CAS Registry Number. An English site uses name; a German site uses name_de when supplied, otherwise name. Article number, short name, chemical classes and group remain built-in registry fields. The site shows article number and short name after compound links; find chemical classes and group in the lab application. The schema reference gives the details.

To show a compound's structure, open its record in the lab registry and choose Structure (molfile) on the new or edit form. Upload a molfile, a text file describing the molecular structure and its drawing coordinates. It must be UTF-8 text, at most 1 MB (1,000,000 bytes), from which RDKit, the lab's chemistry toolkit, can read a molecule with at least one atom. An invalid file shows an error at the field and saves nothing.

A chosen file replaces the existing molfile. To remove it, check Remove structure on the edit form; this box appears only when the substance has a molfile. Choosing neither keeps the existing structure. Choosing a file and checking the box together is an error. The lab draws the structure in black on white when you save and shows it on the substance's page. It keeps the file's coordinates and wedges; coordinates are computed only when all atoms are at the origin. Formula, molar mass and SMILES are not computed from the molfile. A substance without a molfile has no structure image. The site shows the image on a white panel in dark mode. The white background also keeps the drawing legible on paper.

The build takes the SVG from the registry source. If the collection uses a snapshot file, the SVG must be at substances/<key>/structure.svg in that file's directory; without it, the substance has no image on the site. static/structures/ holds procedure scheme images only. Ask the owner to add the molfile if you cannot edit the lab registry.

You may register a starting material even if no procedure makes it. A compound that no procedure uses is also allowed. Open a substance's lab page at /lab/registry/substances/<key>/ to see its chemical data, its structure when supplied, and its containers. Made by lists procedures with yields when known and status when set; Used in lists procedures with status when set. A general procedure appears under Made by once per entry that makes the compound, as <ID> <title> · entry <n> · <yield> % · <status> when the yield and status are known. Used in lists each procedure once. Both lists are ordered by procedure ID, with entries of one general procedure in entry order. Sequences follows Used in and links the sequences that name this compound as their target, by title and in sequence ID order. Each section appears only when it has matching records. The lab omits procedures, entries and sequences removed from the collection by an accepted import.

Routes follows Sequences when present, if a route goes beyond one step: a procedure makes a starting material for another step. The tree shows steps that make the compound, then each step's starting materials, then the steps that make those, down to compounds no procedure makes. Under a compound, any one step will do; under a step, all starting materials are needed. Each step shows the procedure link, entry number when needed, yield when known and status when set, as in Made by. Steps are ordered by procedure ID, with entries of one general procedure in entry order. The tree uses the collection's procedures and entries kept in the lab, excluding those removed by an accepted import. Draft, checked and retired procedures can all appear. A general procedure's entry uses only its own starting materials. Each starting material links to its lab substance page.

A step is omitted if it starts from a compound already above it on the same branch, so the tree never follows a cycle. If all steps would loop back, the compound appears without steps and must be obtained another way. The display uses a fixed depth limit of 6 steps and a fixed budget of 200 steps per tree. A larger tree is drawn to the largest depth that fits. When more than 200 steps make the compound directly, the tree shows only those. A compound cut off by a limit ends with more steps on its page; follow its link to continue. The lab draws the routes from the procedures it keeps. You write nothing extra in a procedure or orgsyndb.toml.

Write a general procedure

When one method covers several substrates, write it once as a general procedure. Its scope records each application of the method, with its starting materials, products and yields. The presence of scope makes the procedure general; do not add a kind field.

Remove the template's top-level :products and :substrates lines. Keep all other required fields, including :scale for the typical scale. Write one Org table directly after #+NAME: scope, anywhere outside a block. The table name is case-insensitive. The first row names the columns; follow it with a separator line and one row per entry. This excerpt from the export fixture shows an entry with two products:

  #+NAME: scope
  | substrates          | products                     | yield_percent | time   | temperature | note       |
  |---------------------+------------------------------+---------------+--------+-------------+------------|
  | acetic-acid ethanol | ethyl-acetate propyl-acetate | 45,5 30       | 2 h    | 80          | Reflux     |
  | acetic-acid         | benzyl-acetate               | 78            |        | 25          | Stir only  |
  | ethanol             | methyl-benzoate              | 72,5          | 30 min | 60,5        | Two phases |

The required columns are substrates, products and yield_percent. Separate compound keys by spaces, and give one yield per product, in product order, also separated by spaces. Yields are numbers from 0 to 100 without %. Each entry needs at least one starting material and product. Within an entry, do not repeat a key or list a product as a starting material. A compound may be a starting material in one entry and a product in another. Entries are numbered from 1 in row order. Two entries of one procedure must not have the same substrates and the same product compounds, even in a different order or with different yields. This lets a sequence step identify one entry by its compounds.

Optional columns are scale, time, temperature and note. Scale is text with a number and unit, such as 5 mmol. Time is a number followed by min, h or d, such as 30 min. Temperature is one number in °C, without a unit. Note is text. Numbers in the table may use a decimal comma, as 45,5 does above. An empty cell leaves its key unset; required entry fields are still checked by validation. Keep column names English in every language.

Export writes scope front matter and removes the table and its #+NAME line from the exported body. Keep the eight body headings and describe the shared method there. The complete Org fixture shows this table in a procedure. The demo's ninth procedure, OSDB-0009, shows the same scope data format in Markdown for three aryl methyl ketones reduced with sodium borohydride. These are sample data, not experimentally verified procedures.

To show the overall reaction, place an SVG or PNG under static/structures/ and add:

  #+HUGO_CUSTOM_FRONT_MATTER: :scheme_image "structures/aryl-ketone-reduction.svg"

The path must start with structures/, contain no .. component and name an existing .svg or .png file under static/. Any procedure may set scheme_image; it replaces product structures in the title block. A general procedure without it shows No structure image.

Understand the finished page

Every compound link on the site opens the substance page at /lab/registry/substances/<key>/. These links work when the site is served at / and the lab application at /lab/ on the same host.

The labels below are those of an English site; a German site, the default, shows them in German, such as Kopieren for Copy. The title block shows the procedure ID and a status badge above #+TITLE. When :status is checked and :checked_by is set, the checkers' names follow the badge, so the line reads checked by followed by the names. Under the title, :scale appears as Scale and product yields as Yield. For a specific procedure, one product shows only its percentage; several show a percentage and compound name for each, in product order. The Print / Save as PDF button follows them. A general procedure shows the typical top-level scale and the yield range over all products of all entries, <min>–<max> %, or one percentage when all yields are equal.

Without scheme_image, a specific procedure shows one structure figure per product whose compound has an image, in product order. The figures open the Compound box (Products for several products), the first box of the metadata panel, on screen and in print. When neither a scheme nor product figures are shown, the screen shows a No structure image placeholder, which is omitted from printouts. A rule closes the title block on screen.

The metadata panel always links the product names to their lab substance pages under Product or Products, even when a name equals the title. For one product it also shows formula, molecular weight, CAS when set, and SMILES. For several products, find those data on their lab substance pages. Starting materials links the compounds in :substrates. For a general procedure, both lists include all entries, each compound once in order of first appearance. Precursor and used-in links consider every entry. The panel then shows reaction type, tags, authors, checkers when set for draft or retired procedures under Checked by, journal fields, declared procedure fields, created and modified times, and precursor or used-in links. When your procedure is a step of a sequence, Sequences follows Used in and links those sequences by title, ordered by sequence ID. Formula digits appear as subscripts. Molecular weight gains g/mol, yield gains a percent sign, and SMILES has a Copy button. Reaction type and tag values link to pages that list related procedures. Under Authors, each account's name links to /authors/<user name>/, for example /authors/klehmann/. The site shows names exactly as the accounts have them, including capitalization. The author directory, author pages and catalogue's Author filter show these names too. The panel has up to three boxes: Compound (the products and their data), Details (reaction type to modified time) and Synthesis context (starting materials, precursor and used-in links, sequences; shown only when it has one of them). Each of the eight body sections follows in a box of its own. On a wide screen the panel's boxes stand side by side above the body, and Notes stands beside Procedure and Workup and Purification, which refer to it; in a narrow window and in print the boxes follow one another in order.

After each product or starting-material link, the panel shows the substance’s article number and short name when supplied, in that order. The link text stays the compound's name. One space and a muted note in parentheses follow it, for example Acetic anhydride (Ac2O) in the demo. Values appear without labels, separated by a comma and a space. A compound with none of these values gets no note. Procedure search finds these values because the panel is indexed. The yield line, catalogue Details, image alt texts and page titles carry no note.

The panel shows the journal fields you set first, then the collection's fields in declaration order, before Created and after Checked by when that label is present. The demo shows Lab notebook, Project, Working time and Inert atmosphere. Choices use vocabulary labels, such as Teaching › First-year practical. Working time appears as 3 h, and booleans as Yes or No. A German site uses the declared German labels, decimal commas and Ja or Nein. Catalogue search finds these displayed values. Project and fields declared with facet = true offer filters between Status and Tag in procedure catalogues, including term and general-procedure pages. The demo offers Project and Inert atmosphere; choosing a parent project includes procedures under its descendants.

A general procedure adds Scope before Summary, one row per entry. The columns Entry, Starting materials, Products and Yield always appear. Scale, Time, Temperature and Note appear only when some entry sets the field; unset values leave empty cells. Compounds link to their lab substance pages, and products show small structure images when the build has staged their images from the registry source. The compound links carry the same notes as the panel. Entry 1 of OSDB-0009 makes the same alcohol as OSDB-0005, so its lab substance page lists both under Made by.

Use exact timestamps

#+CREATED and #+LAST_MODIFIED use this exact form:

  [YYYY-MM-DD Day hh:mm:ss]

Use Europe/Berlin local wall-clock time, an English three-letter weekday, and seconds. Org timestamps do not carry the UTC offset. The exporter adds the Berlin offset in force at that instant. A time skipped during the spring clock change is invalid. During the repeated autumn hour, export uses the earlier summer offset for #+CREATED.

orgsyndb new supplies valid timestamps and English weekday names. For timestamps inserted interactively by Emacs, make its time locale English:

  (setq system-time-locale "C")

Keep #+CREATED unchanged. Set #+LAST_MODIFIED to the current local time whenever you change the procedure. It must not be earlier than #+CREATED. See the procedure schema for the exact validation rules around clock changes.

Write the body

Keep these top-level headings in this order:

  1. Summary
  2. Reagents
  3. Procedure
  4. Workup and Purification
  5. Characterization
  6. Notes
  7. Hazards and Waste Disposal
  8. References

Use one leading star for each of these headings. Lower-level headings may use more stars. Use an Org table for reagents and numbered lists for steps and notes. Include quantities, temperatures, times, observations, workup, purification, characterization, hazards, and waste handling. Write None. under References when there is no reference.

To let readers jump from a step to a note, number the notes as an ordered list under Notes. In the Org body, write a reference as plain text (Note 2): the word Note, a space and the number, in parentheses. After export, the site links it to note 2 if that note exists. Forms such as (Notes 2 and 3), (Note 2a) and see Note 2 stay plain text. References inside source blocks or inline code are not linked.

Keep the Reagents table's six columns in this order: Reagent, CAS, MW (g/mol), Amount, mmol, and Equiv. A wide table scrolls sideways inside its own area on screen and wraps to fit the paper when printed.

Write chemical subscripts and superscripts with braces:

  H_{2}O
  10^{-3}

Plain CO_2 stays plain text. Dollar-delimited text such as $x$ and LaTeX delimiters such as \(y^2\) also stay literal because the site has no math renderer.

The sample OSDB-0001-salicylic-acid.org in the demo collection shows the expected structure. It is sample data, not an experimentally verified procedure.

Export, validate, and preview

Export Org sources with:

  orgsyndb export

Before exporting anything, the command checks Org file names, the required file-level keywords, the named scope table, and routes that could set the exported dates, AI model, or file name. It reports each problem as <path>:<field>: error|warning: <message>, the same line format as the validator. An error stops the export and leaves build/export/ unchanged.

A malformed scope table reports field scope and stops export. These messages identify the source problem; row numbers start at 1 after the separator:

Message Correction
appears more than once Keep one table named scope.
"<name>" is not a scope column Use one of the seven column names.
column "<name>" missing Add the required column.
column "<name>" appears more than once Keep the column once.
row <n>: <p> products but <y> yields Give one yield per product in order.
row <n>: "<cell>" is not a number Write a numeric yield or temperature without units.

Export runs Emacs in an isolated batch environment. It does not load or write the owner's Emacs configuration. On the first run it fetches pinned copies of ox-hugo and tomelr into the application's .emacs-batch/. Exported Markdown goes to the collection's build/export/, and Emacs output goes to build/export.log.

An Org check error, another Emacs failure, and an org/procedures that is not a directory produce these messages, respectively. For the second case, the command prints the log first.

  orgsyndb: error: the Org sources have errors; build/export/ is unchanged
  orgsyndb: error: export failed; Emacs output is in build/export.log
  orgsyndb: error: org/procedures is not a directory

Org files remain the source of truth. Do not edit build/export/. Each export rebuilds the complete directory, removes orphaned exports, and produces byte-identical output when the sources and tool versions have not changed.

The export has deliberate limits:

  • It does not render LaTeX or dollar-delimited mathematics.
  • It interprets only braced Org subscript and superscript forms.
  • It never evaluates source blocks.
  • It ignores file-local variables.

Check the Org sources, all exported or hand-written Markdown and synthesis sequences in md/sequences/ against the registry with:

  orgsyndb validate

orgsyndb validate reads the registry, then runs the export. If the export reports an Org error, validation stops there and does not start the Markdown validator. Otherwise, errors in procedures, sequences or the registry fail validation and warnings do not. The lab application checks substance values. The command passes --registry build/registry.json, --static-dir static and --sequences md/sequences to the validator. A field such as products[1].yield_percent names the yield in the first product entry; counting starts at 1. unknown compound means you must check the key in the lab registry. The summary counts procedure and sequence files, including language variants.

An unknown author error under authors means the registry snapshot has no account with that user name. Check the spelling and ask staff to create the account if needed. "<name>" is named twice means you must remove the repeated user name. must be a list of user names, e.g. ["a.example"] asks for a list of quoted user names; must not be empty asks for at least one author. Use the plural key authors; author reports use authors, a list of user names.

For scope entries, scope[2].time means the time in entry 2; scope[2].products[1].yield_percent means that entry's first product yield. must not be empty under scope requires at least one entry. A top-level field with a general procedure lists them in scope; move <key> into its entries must be moved into the relevant entries. Time errors ask for a number followed by min, h or d; temperature errors ask for an unquoted number in °C. The schema explains every field and the validator's exit statuses. has the same substrates and products as entry <m> under scope[n] means entry n repeats entry m's compounds; keep only one such entry.

Sequence fields such as steps[2].product name the product used to select step 2's scope entry. name its entry by a product: <keys> asks you to choose a product key. If the message says it is a product of several entries, give the chosen entry's complete substrates and products lists instead of product. steps[2].entry reports not a key of a step; name the entry by its product. must list at least two steps requires a longer sequence; not found in any content root means the procedure ID is missing. starts from none of the products of step 1 under steps[2] means that step 2 takes no product of step 1 as a starting material. Check the order and chosen scope entries. is not a product of the last step under target means the final step does not make the named target. See the schema reference for the remaining sequence messages.

Build and preview the site with:

  orgsyndb serve

Open http://127.0.0.1:8000/ after the command prints that it is serving. The server is reachable only from the same machine. It has no live reload, so stop it with Ctrl-C and run it again after an edit.

The navigation sits in a left sidebar below the site title and search field. It stays in view while you scroll; in narrow windows it sits above the page. The menu button before the site title collapses the sidebar and opens it again: collapsed, a wide window keeps only a narrow strip with the button, a narrow one only the title's row. The browser remembers the choice for every page of the site. Under Collection, choose Sequences or Procedures; Help follows on its own. Sites with the lab application also show a Lab group first, with Overview, Inventory, Planning and Tasks; then Chemicals, with Substances; and, after Collection, Master data, with Chemical classes, Inventory groups, Projects, Reaction types, Lab notebooks and Imports. On a procedure page, the search hint is Product, CAS or SMILES; keywords still match. Choose the magnifier at the field's right end or press Enter to search procedures.

The home page's Browse list includes Substances with their count, linking /lab/registry/, and Sequences with a count. The sequence link and the navigation open /sequences/, ordered by ID with linked titles and targets, step counts and overall yields. A sequence page shows its ID and title, Steps and Overall yield, a scheme, the linked procedures with entry numbers where needed, reaction type, yield and status, then your notes. The scheme shows starting materials, intermediates and target with matching structure images staged from the registry source by the build, where available. Compound links in the scheme and the directory's targets open the lab substance pages and carry the same notes as the panel. A plus joins the first step's starting materials; arrows show step number, reaction type and yield. In narrow windows the scheme runs down the page. Sequence pages are absent from the procedure search index; use their links to find them.

On a procedure page, choose Print / Save as PDF to open the browser's print dialog. The print layout is complete A4 output in black on white. Firefox omits the running header and page numbers that WeasyPrint adds to PDFs created by orgsyndb pdf.

To find general procedures, use the catalogue's Kind filter: Specific procedure or General procedure. Its tabs are All procedures, General procedures, Reaction types, Tags and Authors. General procedures opens /general-procedures/, a catalogue restricted to general procedures, with the sidebar search labelled Search general procedures and the hint Search these procedures. Only general procedures · Browse all procedures links to the full catalogue. Clear all keeps the restriction; Browse all procedures removes it and carries the query, other filters, sort and view. In the full catalogue, kind=general in the address selects this kind. Without JavaScript the general-procedures page still lists its procedures by ID. Catalogue Details includes all entries' products and the yield range.

Write in German or translate

The site has one language, set by locale in the application's site/hugo.toml: "de" by default, or "en". A file name may carry a language code before its suffix, .de or .en; files with the same ID are variants of one procedure. Every procedure is published once: the variant tagged with the site's language, else the one without a code, else one tagged with the other language. Create a German stub with:

  orgsyndb new --lang de "Produktname"

It fills templates/procedure.de.org and names the file OSDB-NNNN-produktname.de.org. Umlauts and ß in the title are written out in the slug: Größe becomes groesse. The German body uses these top-level headings, in this order: Zusammenfassung, Reagenzien, Durchführung, Aufarbeitung und Reinigung, Charakterisierung, Anmerkungen, Gefahren und Entsorgung, Literatur. Its Reagents table has the columns Reagenz, CAS, M (g/mol), Menge, mmol and Äquiv., and its text uses decimal commas. Org keywords, custom-front-matter keys, status values and tags stay English, and so do the weekday names in #+CREATED and #+LAST_MODIFIED.

Use slugs from the registry’s reaction-types vocabulary unchanged in every language. Create and edit reaction types in the lab application. The reaction-type reference explains the values and messages.

Use the German procedure style guide for the wording and the German organic-synthesis glossary for terms, fixed phrases, reusable sentences, and their English equivalents.

A file without a code may use the English or the German headings. To state its language, add a custom-front-matter line, before :products in a specific procedure:

  #+HUGO_CUSTOM_FRONT_MATTER: :language "de"

On a tagged file the field must name the code's language; the build adds it when it is missing. A page whose procedure is in another language than the site carries a lang attribute.

To translate a procedure, copy OSDB-0001-x.org to OSDB-0001-x.de.org and translate the title, the hazards, the references if needed, and the body. Set both timestamps to the time of the translation. Leave :status, :reaction_types, #+HUGO_TAGS, :products, :substrates and :scheme_image unchanged. Repeat every journal field and declared procedure field with the same value, or omit it in both variants. Do not translate these values; German field labels come from label_de. Keep the scope table's entry order and all values except note, which you translate. The validator compares the shared fields with the original and reports differences as errors. Numeric yields compare by value, so 85 and 85.0 agree. Compound names come from name and name_de in the lab registry; add or edit name_de in the lab application for the German name. The original and its translation may use different formats.

The export keeps the language code: OSDB-0001-x.de.org becomes build/export/OSDB-0001-x.de.md. On a German site it is published at /procedures/osdb-0001/ in place of OSDB-0001-x.org, and orgsyndb pdf prints it to pdf/OSDB-0001-x.de.pdf with a German page footer. The procedure schema gives the exact rules.

Write a synthesis sequence in Markdown

To record a route through several procedures, write a synthesis sequence: an ordered list of the procedures you run, with the chosen scope entry for a general procedure. The site checks that the steps connect and calculates the overall yield. Sequences are written in Markdown, even when all their procedures are Org sources. There is no Org sequence export. A sequence records the route your group runs; the lab draws the substance page's Routes tree from the procedures it keeps.

From inside the collection, create a stub with:

  orgsyndb new --sequence "Aspirin route"

The command uses templates/sequence.md to create md/sequences/SEQ-NNNN-aspirin-route.md, where NNNN is the assigned number from 0001 to 9999. orgsyndb init creates this directory. The command fills id, its lowercase slug, the title and both dates. Leave id and slug as supplied. With a registry address it requests the ID from the lab application using your token, as for a procedure. With a registry file or no setting it takes the next ID above those in md/sequences/ and all its available Git history, including deleted files. The same failure messages and history warnings apply.

Do not add --md or --lang to --sequence; either combination exits 2. There is no Emacs command for creating a sequence. The file name has the form SEQ-NNNN-short-slug.md; use lowercase letters, digits and single hyphens in the short slug. For a German version, copy the file with .de before .md and translate the title and notes. There is no German sequence template.

The information block is TOML, between two +++ lines. Text values use double quotes; lists of compound keys use square brackets. Fill title, date and lastmod. Unlike Org timestamps, these dates are unquoted offset datetimes, with +01:00 in Berlin winter time or +02:00 in summer. lastmod must not precede date. Set target to the final compound's registry key and replace the template's steps with your procedures in execution order. This is the demo's second sequence:

  +++
  id = "SEQ-0002"
  slug = "seq-0002"
  title = "1-(Biphenyl-4-yl)ethanol from 4′-bromoacetophenone"
  date = 2026-10-23T10:05:00+02:00
  lastmod = 2026-10-23T10:20:00+02:00
  target = "1-biphenyl-4-yl-ethanol"
  steps = [{ procedure = "OSDB-0004" }, { procedure = "OSDB-0009", product = "1-biphenyl-4-yl-ethanol" }]
  +++

  ## Notes

  The 4-acetylbiphenyl from step 1 is reduced in step 2 as entry 1 of the
  general procedure.

Each step's procedure must name an existing procedure; at least two steps are required. For a general procedure, set product to a compound key made by exactly one scope entry. If that product belongs to several entries, give substrates and products instead. Both lists must contain the chosen entry's compound keys in full, in any order, without repeats. Write product keys without yields. This is the complete-list form for the same demo entry:

  { procedure = "OSDB-0009", substrates = ["4-acetylbiphenyl"], products = ["1-biphenyl-4-yl-ethanol"] }

Use one form only. A specific procedure takes none of product, substrates or products. entry is not a step key. Reordering the procedure's scope keeps the step on the same chemistry; the build determines the entry number for the page and manifest.

In Emacs, complete inside the product string to choose from the named general procedure's products. Each appears once in file order, with the entry numbers that make it, for Markdown and Org general procedures alike. Completion inside substrates and products lists offers compound keys. A specific procedure offers no product candidates; there is no completion after entry =.

Each step after the first must start from a product of the previous step; for a general procedure, use only the chosen entry's starting materials and products. The target must be a product of the last step. Add no authors: the steps credit their procedures' authors. The Markdown body holds notes, such as which intermediate is dried or purified. It needs none of the eight procedure-body sections.

The demo also has SEQ-0001, “Aspirin from oil of wintergreen”, OSDB-0001 → OSDB-0002, with an overall yield of 60 %. SEQ-0002 uses entry 1 of OSDB-0009 and gives 77 %. These are sample data. Overall yield multiplies each step's yield of the product used by the next step and the last step's yield of the target. If several products carry on, the first in product order supplies the yield. The display rounds to a whole percent, with halves rounded up. Enter no yield in the sequence itself.

For a translation, copy the file with .de or .en before .md. Keep the base name, id, slug, target and ordered steps exactly as written, including the order within substrates and products lists. Translate the title and notes and set the dates for that version. Both demo sequences have German variants. The site publishes one variant per ID: the site's language first, then an untagged file, then the other language. Run orgsyndb validate and restart orgsyndb serve to check the sequence and its links. The schema reference gives the full rules.