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.1.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.1-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: quarto_tech_memo-0.2.1.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.1.tar.gz
Algorithm Hash digest
SHA256 638a7ea5ee56cbee1f6db4c1f211caec995fd7a1a903bc33df86cc7af203e960
MD5 23b7bca029e44facb51e692523012986
BLAKE2b-256 433b5ad3388076dea926c93af36df1a64e8c9e821d9e0d049c69f0da186ce7f7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quarto_tech_memo-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8303f7bc4ff4a5fcff707b2ad5e26c8709745d5ef836e7ff311bf76e5e0337d8
MD5 d8603797adf8c009d30cc2a5b1b87d10
BLAKE2b-256 1cd47732b2cb0f98f9fa042b1d9e06b24dbe288a3ddf79515f78c67293eefbfb

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