- Support portal
- Evaluation Kits and partner products
u-blox Support
- Product documentation
Documentation
- About
- Sustainability
- Partners and Alliances
- Contact
About u-blox
- Investor relations
Investor relations
Tables can be written using the standard Github Flavoured Markdown syntax:
Markdown:
| foo | bar | | --- | --- | | baz | bim |
Rendered Output:
foo | bar |
---|---|
baz | bim |
Cells in a column can be aligned using the :
character:
Markdown:
| left | center | right | | :--- | :----: | ----: | | a | b | c |
Rendered Output:
left | center | right |
---|---|---|
a | b | c |
:::{admonition} Aligning cells in Sphinx HTML themes :class: tip dropdown
Text is aligned by assigning text-left
, text-center
, or text-right
to the cell.
It is then necessary for the theme you are using to include the appropriate css styling.
<table class="colwidths-auto table"> <thead> <tr><th class="text-left head"><p>left</p></th></tr> </thead> <tbody> <tr><td class="text-left"><p>a</p></td></tr> </tbody> </table>
:::
A table can be styled by nesting it wihtin a ‘div’ tag with a class property. Availbale options are ‘docs-table-green’, ‘docs-table-grey’, ‘highlight-head-X-green’ (replace X with 1-5 to highlight the corresponding header), ‘highlight-column-X-green’ (replace X with 1-5 to highlight the corresponding colum), ‘docs-rotated-heading-table’
Markdown:
<div class="docs-table-green"> | left | center | right | | :--- | :----: | ----: | | a | b | c | </div>
Rendered Output:
left | center | right |
---|---|---|
a | b | c |
Markdown:
<div class="docs-table-grey"> | left | center | right | | :--- | :----: | ----: | | a | b | c | </div>
Rendered Output:
left | center | right |
---|---|---|
a | b | c |
Markdown:
<div class="docs-table-grey highlight-head-2-green highlight-column-2-green"> | left | center | right | | :--- | :----: | ----: | | a | b | c | </div>
Rendered Output:
left | center | right |
---|---|---|
a | b | c |
Markdown:
<div class="docs-rotated-heading-table"> | left | center | right | | :--- | :----: | ----: | | a | b | c | </div>
Rendered Output:
left | center | right |
---|---|---|
a | b | c |
The list-table
directive is used to create a table from data in a uniform two-level bullet list.
“Uniform” means that each sublist (second-level list) must contain the same number of list items.
Markdown:
:::{list-table} Frozen Delights! :widths: 15 10 30 :header-rows: 1 * - Treat - Quantity - Description * - Albatross - 2.99 - On a stick! * - Crunchy Frog - 1.49 - If we took the bones out, it wouldn't be crunchy, now would it? * - Gannet Ripple - 1.99 - On a stick! :::
Rendered Output:
:::{list-table} Frozen Delights! :widths: 15 10 30 :header-rows: 1
Treat
Quantity
Description
Albatross
2.99
On a stick!
Crunchy Frog
1.49
If we took the bones out, it wouldn’t be crunchy, now would it?
Gannet Ripple
1.99
On a stick! :::
The following options are recognized:
:::{admonition} List table options :class: hint
align
: “left”, “center”, or “right”
: The horizontal alignment of the table.
header-rows
: integer
: The number of rows of list data to use in the table header. Defaults to 0.
stub-columns
: integer
: The number of table columns to use as stubs (row titles, on the left). Defaults to 0.
width
: length or percentage
: Sets the width of the table to the specified length or percentage of the line width.
: If omitted, the renderer determines the width of the table based on its contents or the column widths.
widths
: integer [integer...]
or “auto”
: A list of relative column widths. The default is equal-width columns (100%/#columns).
: “auto” delegates the determination of column widths to the output builder.
class
: A space-separated list of CSS classes to add to the table.
name
: A reference target for the admonition (see cross-referencing).
:::
The csv-table
directive is used to create a table from Comma-Separated-Values data.
Markdown:
```{csv-table} Frozen Delights! :header: > : "Treat", "Quantity", "Description" :widths: 15, 10, 30 "Albatross", 2.99, "On a stick!" "Crunchy Frog", 1.49, "If we took the bones out, it wouldn't be crunchy, now would it?" "Gannet Ripple", 1.99, "On a stick!" ```
Rendered Output:
Treat | Quantity | Description |
---|---|---|
Albatross | 2.99 | On a stick! |
Crunchy Frog | 1.49 | If we took the bones out, it wouldn’t be crunchy, now would it? |
Gannet Ripple | 1.99 | On a stick! |
The following options are recognized:
:::{admonition} CSV table options :class: hint
align
: “left”, “center”, or “right”
: The horizontal alignment of the table.
delim
: char | “tab” | “space”
: A one-character string used to separate fields. Defaults to , (comma).
May be specified as a Unicode code point; see the unicode directive for syntax details.
encoding
: string
: The text encoding of the external CSV data (file or URL).
Defaults to the document’s input_encoding.
escape
: char
: A one-character string used to escape the delimiter or quote characters. May be specified as a Unicode code point; see the unicode directive for syntax details. Used when the delimiter is used in an unquoted field, or when quote characters are used within a field. The default is to double-up the character, e.g. “He said, “”Hi!”””
file
: string (newlines removed)
: The local filesystem path to a CSV data file.
header
: CSV data
: Supplemental data for the table header, added independently of and before any header-rows from the main CSV data. Must use the same CSV format as the main CSV data.
header-rows
: integer
: The number of rows of CSV data to use in the table header. Defaults to 0.
keepspace
: flag
: Treat whitespace immediately following the delimiter as significant. The default is to ignore such whitespace.
quote
: char
: A one-character string used to quote elements containing the delimiter or which start with the quote character. Defaults to “ (quote). May be specified as a Unicode code point; see the unicode directive for syntax details.
stub-columns
: integer
: The number of table columns to use as stubs (row titles, on the left). Defaults to 0.
url
: string (whitespace removed)
: An Internet URL reference to a CSV data file.
widths
: integer, [integer...]
or “auto”
: A list of relative column widths. The default is equal-width columns (100%/#columns).
: “auto” delegates the determination of column widths to the backend renderer.
width
: length or percentage
: Sets the width of the table to the specified length or percentage of the line width. If omitted, the renderer determines the width of the table based on its contents or the column widths.
class
: A space-separated list of CSS classes to add to the table.
name
: A reference target for the admonition (see cross-referencing).
:::