Rosewood lay summary

This is a lay summary of the formal language specification!

Rosewood is a structured table language that creates universal, text-based, versatile table representations. Rosewood tables are an intermediate, human-readable, pre-publication form, although their content could easily be imported into a publication-ready table, and contain additional information relating to table styling. The separation between table content and table style elements makes it easier for users to focus on content, before worrying about table formatting. It simplifies cross-platform development, as tables from different sources can be generated in Rosewood, before being combined for publication or dissemination.

Philosophy

  1. Correct
  2. Flexible (various table structures)
  3. Simple to use
  4. Can be generated from many sources (Stata, SAS, Excel, etc.)
  5. Able to include other source of tables (hand-made, download, etc.)
  6. Convertible to Word and other formats

Structure

The elements of the language for each table are:

  1. The title
  2. The content
  3. The footnote
  4. The rule section

Each of these sections is separated by +++ (including start and end). Each cell ends with a |, each new row starts on a new line

Cell-specific rules

Rule section commands for contents cells are either merge or style:

merge row row_range col col_range
style row row_range col col_range style_name
  • The order of row and col can be switched.
  • When row or col is missing the command applies to all rows or columns.
  • row_range and col_range take the form 1:7,9,11: as combinations of either single numbers, comma-separated lists of numbers or ranges, closed ranges, or open ranges (11: means 11 through last; :11 means 1:11).
  • Range stepping is allowed, e.g., 5:3:17 is every third row starting at 5 and ending at 17.
  • Merge commands can only apply to continuous ranges of cells (e.g., merge row 1:3 col 5,7 leads to an error).
  • All references to cells are in respect to the underlying rectangular grid.
  • The style style_name refers to a CSS style for the cells.
  • Style commands are applied to the merged grid.
  • In case commands conflict the later command takes precedence.
  • All commands and parameters are case insensitive and can contain whitespace, except the separation code +++.

Others

29/08/2018