Skip to main content

Stamp FAQ

What is the Stamp extension?

Stamp is a Quarto extension that automatically adds system, session, and document information to your Quarto documents. It helps with reproducibility by documenting the environment in which your document was created.

What information can Stamp provide?

Stamp can provide several categories of information about how the document was rendered:

  • System Information (OS, Lua version)
  • Quarto Environment Variables
  • Document Properties
  • Project Properties
  • Session Information (versions of Quarto, Pandoc, R, Python)
  • Extension Information

How do I install Stamp?

You can install Stamp using Quarto’s by running the following command in Terminal within Quarto project directory:

quarto add coatless-quarto/stamp

This will install the extension under the _extensions subdirectory. If you’re using version control, you will want to check in this directory.

How do I enable Stamp in my document?

Add the extension to your YAML frontmatter:

---
title: "My Document"
format: html
filters:
  - stamp
---

What are the different information levels available?

Stamp supports two levels of information:

  • minimal: Shows system, session, and extensions information
  • full: Shows all available information categories

If you don’t set level, or set level: default, Stamp uses minimal.

We will likely add more levels in the future.

How do I configure what information is shown?

You can configure Stamp using the stamp key in your YAML frontmatter:

---
stamp:
  level: minimal  # or 'full'
  sections:       # Add specific sections
    - system
    - session
    - extensions
---

Can I control where the information appears?

Yes, you can control placement using the placement option:

  • bottom (default): Places information at the end of the document
  • top: Places information at the beginning of the document
  • custom: Places information at a specific div location

For custom placement, use:

---
stamp:
  placement: custom
  placement-id: my-custom-location
---

::: {#my-custom-location}
:::
Note

When using custom placement, the div with placement-id will be completely replaced by the stamp information div (which has the ID document-information). For example, with the above configuration:

Before rendering:

:::{#my-custom-location}
:::

After rendering:

:::{#document-information}
<!-- stamp information here -->
:::

How do I add specific sections?

You can add specific sections using the sections option:

stamp:
  sections:
    - system
    - environment
    - extensions

Can I combine the level setting with additional sections?

Yes, you can use both level and sections. By default, sections are added to the base level. Use mode: replace to override instead of add:

stamp:
  level: minimal
  sections:
    - extensions
  mode: replace  # Only shows extensions

Why isn’t version information showing for R/Python?

Version information requires R and/or Python to be installed and accessible from the command line. Stamp runs R --version and python --version; it does not look for python3. If you see “not installed”, check that:

  1. The software is installed
  2. It’s available in your system PATH
  3. The --version command works in your terminal

Why are some environment variables showing as “not set”?

This is normal if those Quarto environment variables aren’t configured on your system. The extension will show "not set" for any undefined variables.

How can I verify the extension is working?

The extension adds a div with the ID "document-information". You can check your rendered document’s HTML to verify it’s present. All information sections also have specific CSS classes for styling.

Can I style the output?

Yes. The entire stamp is contained within a div with ID document-information, and each section and its table have their own classes. Each section also has an ID, which you can link to, as in [Session](#stamp-session):

Section Section ID Section class Table class
System Information #stamp-system .system-info .system-info-table
Quarto Environment Variables #stamp-environment .quarto-env-info .quarto-env-vars
Quarto Document Properties #stamp-document .quarto-doc-info .quarto-doc-props
Quarto Project Properties #stamp-project .quarto-project-info .quarto-project-props
Session Information #stamp-session .session-info .session-info-table
Extensions #stamp-extensions .extensions-info .extensions-table

Example CSS:

/* Style all stamp tables */
#document-information table {
  margin: 2em 0;
}

/* Style a specific table */
.system-info-table {
  width: 100%;
  border-collapse: collapse;
}

Does the stamp include anything private?

It can. The environment, document, and project sections show absolute paths from the computer that rendered the document, such as /Users/<name>/projects/report/report.qmd, which can reveal your user name and folder layout. These sections only appear with level: full or when you add them with sections. The default minimal level shows the operating system, Lua version, software versions, and installed extensions, without paths.

Check the stamp before you publish a document rendered with level: full.

Does it work with all Quarto formats?

Yes, Stamp works with all Quarto output formats including HTML, PDF, and Word. The information is formatted appropriately for each output format.

Can I use Stamp programmatically?

Yes, you can use Stamp as part of automated document generation workflows. The extension respects all configuration options when run programmatically through Quarto.

Document Information

System Information

Property
Value
Operating System
Linux
Lua Version
Lua 5.4

Session Information

Software
Version
Quarto Version
1.12.0
Pandoc Version
3.10
R Version
4.6.2
Python Version
3.12.3

Extensions

Name
Version
Location
stamp
0.0.0-dev.1
local