Skip to main content

A CLI script to convert a markdown note to a polished PDF tech memo using Quarto.

Project description

Quarto Tech Memo

See the companion medium article for more background.

This is a quarto extension to create brief technical memos in PDF with the modern and ⚡fast Typst engine (built into Quarto). The memo style provides a professional single-column PDF layout with ample room for sidenotes and small figures in the margin. Inspired by Tufte handout style. The intended use is for brief technical memos and preprints of scientific articles. In addition, a 2-column compact variant and a 3-column A3 poster variants are provided. For reference, a legacy IEEE paper style is also included---using the LaTeX engine. Finally a slide deck variant using the Clean Slide Theme is provided.

The following screenshot shows all variants of the same document. All are formatted from the same source in a few seconds (the IEEE style, with the legacy Latex engine, dominates the rendering time). All generated PDF files are included in the examples folder.

Usage as Python CLI tool

Install the tool, together with all dependencies, with:

pip install quarto-tech-memo

# preferably in a isolated environment with one of:
# pipx install quarto_tech_memo
# uv tool install quarto_tech_memo

Then use the quarto-tech-memo command to convert a markdown file to a polished PDF memo:

quarto-tech-memo you-file.md (--to memo1) (--preview)

Usage within the provided example

Install the dependencies with:

pip install cookiecutter quarto-tech-memo

To render the provided example:

cookiecutter -f gh:gael-close/quarto-tech-memo; cd new-dir;
quarto-tech-memo new-tech-memo.md

For the variants, use one of the flags --to memo2, --to memo3, --to slides, --to poster, or --to ieee

Edit new-tech-memo.md in your favorite editor and re-run the render command or preview changes (one every save) live with:

quarto-tech-memo new-tech-memo.md --preview

Usage in an existing quarto project

To use in an existing Quarto project as an extension, run

# Install the extension (one time only)
quarto add gael-close/quarto-tech-memo

# render with: 
quarto render your-file.md --to memo1-typst

Usage inside a data science project

See this repo https://github.com/gael-close/quarto-tech-paper for usage inside a data science project.


Details

Development

Run a test suite with Invoke. This will format the example memo in all variants.

invoke test (--gh) (--no-ieee)

The --gh flag uses the GitHub repo instead of a local copy of the extension. The --no-ieee flag skips the legacy IEEE format which requires a LaTeX installation (install via: quarto install tinytex)

To extract the conversion time for a given format:

invoke conversion-time --format memo1-typst

Lua filters

To run the Lua filter standalone on a test file dev.md:

cd _extensions/meme1/lua-filters
quarto pandoc dev.md -t typst --lua-filter custom.lua

Run as uv tool

Install the tool from the local copy of the repo with:

z quarto-tech-memo
uv tool install . -e

Upload to PyPI

rm -fr dist/*
uv build
uvx uv-publish

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quarto_tech_memo-0.2.2.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

quarto_tech_memo-0.2.2-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file quarto_tech_memo-0.2.2.tar.gz.

File metadata

  • Download URL: quarto_tech_memo-0.2.2.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.17

File hashes

Hashes for quarto_tech_memo-0.2.2.tar.gz
Algorithm Hash digest
SHA256 96e92546ee19548f43be9461e15fdeab1a4d734135202cb2506026494f197ed7
MD5 6c7cad4fc9f496c576387627f86136af
BLAKE2b-256 38038031a0c3088d0fd9b1ae449e3b2eb2f930869a697028ae6249f07cf04cb9

See more details on using hashes here.

File details

Details for the file quarto_tech_memo-0.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for quarto_tech_memo-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e01f30fd48f1fbed4e4a42f047989756232f686af91f79aa1dfba81eea92875e
MD5 616f3e0b9f573e609a77474435ff524c
BLAKE2b-256 2348d1eba80c21bb69574b82a395d2506bedaec89d5a1b34eecf09b01caa7484

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page