View Source ExTypst.Format (ExTypst v0.1.3)

Contains helper functions for converting elixir datatypes into the format that Typst expects

Link to this section Summary

Functions

Converts a series of columns mapped as a nested list to a format that can be plugged in an existing table.

Link to this section Types

@type column_data() :: String.t() | integer()

Link to this section Functions

@spec table_content([[column_data()]]) :: String.t()

Converts a series of columns mapped as a nested list to a format that can be plugged in an existing table.

examples

Examples

iex> columns = [["John", 10, 20], ["Alice", 20, 30]]
iex> ExTypst.Format.table_content(columns)
~s/"John", "10", "20",\n  "Alice", "20", "30"/