Skip to content

Pandoc extension that allows for fancier table formatting by separating data and layout

License

Notifications You must be signed in to change notification settings

pragdave/pandoc-tableau

Repository files navigation

Tableau: Enhanced Markdown Tables for Quarto

Tableau is a Quarto extension that simplifies table layout by separating data from layout.

Here are some sample tables:

  • Easy spans, partial underlines

    An APA Style table

  • Different heading styles

  • Lines under every n rows

    County data

  • Block level cell content (single cell and spanned)

    Lorem

  • Nontraditional layout

    Various layouts

The layout language is vaguely dynamic. The following example shows the markup on the left and the result on the right. The layout section uses the special variables $r (the number of rows), and @r (the current row being generated. It also does arithmetic.

Multiplication table

Installation

$ quarto add pragdave/pandoc-tableau

Status

  • HTML generation: working
  • PDF generation:
    • prototype/poc working
    • development starting

Documentation

A combined guide and reference is available.

Installation

The Tableau extension is available in the _extensions directory.

Adding to Your Document

This extension must be run prior to the bulk of Quarto processing. Add it to your _quarto.yml file like this:

filters:
  - _extensions/tableau_pre/tableau_pre.lua
  - quarto
  - other_filters_go_here

You'll need to add the tableau_pre extension at the top of your filters, and then add the - quarto line (if it isn't already there). This second line tells Quarto where in the filter chain it should run.

Using

See the guide.

License

Copyright © 2023, Dave Thomas (pragdave)

See LICENSE.md

About

Pandoc extension that allows for fancier table formatting by separating data and layout

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published