logo izquierdo de la pagina

PANDOC MANUAL

logo de la pagina

[<][<=][=>]Pandoc User's Guide

Synopsis
Description
    Using pandoc
    Specifying formats
    Character encoding
    Creating a PDF
    Reading from the Web
Options
    General options
    Reader options
    General writer options
    Options affecting specific writers
    Citation rendering
    Math rendering in HTML
    Options for wrapper scripts
Templates
    Metadata variables
    Language variables
    Variables for HTML slides
    Variables for Beamer slides
    Variables for LaTeX
        Layout
        Fonts
        Links
        Front matter
        BibLaTeX Bibliographies
    Variables for ConTeXt
    Variables for wkhtmltopdf
    Variables for man pages
    Variables for ms
    Structural variables
    Using variables in templates
Extensions
    Typography
            Extension: smart
    Headings and sections
            Extension: auto_identifiers
            Extension: ascii_identifiers
            Extension: gfm_auto_identifiers
    Math Input
    Raw HTML/TeX
            Extension: raw_html
            Extension: raw_tex
            Extension: native_divs
            Extension: native_spans
    Literate Haskell support
            Extension: literate_haskell
    Other extensions
            Extension: empty_paragraphs
            Extension: styles
            Extension: amuse
            Extension: citations
            Extension: ntb
Pandoc’s Markdown
    Philosophy
    Paragraphs
            Extension: escaped_line_breaks
    Headings
        Setext-style headings
        ATX-style headings
            Extension: blank_before_header
            Extension: space_in_atx_header
        Heading identifiers
            Extension: header_attributes
            Extension: implicit_header_references
    Block quotations
            Extension: blank_before_blockquote
    Verbatim (code) blocks
        Indented code blocks
        Fenced code blocks
            Extension: fenced_code_blocks
            Extension: backtick_code_blocks
            Extension: fenced_code_attributes
    Line blocks
            Extension: line_blocks
    Lists
        Bullet lists
        Block content in list items
        Ordered lists
            Extension: fancy_lists
            Extension: startnum
            Extension: task_lists
        Definition lists
            Extension: definition_lists
        Numbered example lists
            Extension: example_lists
        Compact and loose lists
        Ending a list
    Horizontal rules
    Tables
            Extension: table_captions
            Extension: simple_tables
            Extension: multiline_tables
            Extension: grid_tables
                Grid Table Limitations
            Extension: pipe_tables
    Metadata blocks
            Extension: pandoc_title_block
            Extension: yaml_metadata_block
    Backslash escapes
            Extension: all_symbols_escapable
    Inline formatting
        Emphasis
            Extension: intraword_underscores
        Strikeout
            Extension: strikeout
        Superscripts and subscripts
            Extension: superscript, subscript
        Verbatim
            Extension: inline_code_attributes
        Small caps
    Math
            Extension: tex_math_dollars
    Raw HTML
            Extension: raw_html
            Extension: markdown_in_html_blocks
            Extension: native_divs
            Extension: native_spans
            Extension: raw_tex
        Generic raw attribute
            Extension: raw_attribute
    LaTeX macros
            Extension: latex_macros
    Links
        Automatic links
        Inline links
        Reference links
            Extension: shortcut_reference_links
        Internal links
    Images
            Extension: implicit_figures
            Extension: link_attributes
    Divs and Spans
            Extension: fenced_divs
            Extension: bracketed_spans
    Footnotes
            Extension: footnotes
            Extension: inline_notes
    Citations
            Extension: citations
    Non-pandoc extensions
            Extension: old_dashes
            Extension: angle_brackets_escapable
            Extension: lists_without_preceding_blankline
            Extension: four_space_rule
            Extension: spaced_reference_links
            Extension: hard_line_breaks
            Extension: ignore_line_breaks
            Extension: east_asian_line_breaks
            Extension: emoji
            Extension: tex_math_single_backslash
            Extension: tex_math_double_backslash
            Extension: markdown_attribute
            Extension: mmd_title_block
            Extension: abbreviations
            Extension: autolink_bare_uris
            Extension: mmd_link_attributes
            Extension: mmd_header_identifiers
            Extension: compact_definition_lists
    Markdown variants
Producing slide shows with pandoc
    Structuring the slide show
    Incremental lists
    Inserting pauses
    Styling the slides
    Speaker notes
    Columns
    Frame attributes in beamer
    Background in reveal.js and beamer
Creating EPUBs with pandoc
    EPUB Metadata
    The epub:type attribute
    Linked media
Creating Jupyter notebooks with pandoc
Syntax highlighting
Custom Styles
    Output
    Input
Custom writers
A note on security
Authors

[<][<=][=>][*]


W adorno

Tables

Four kinds of tables may be used. The first three kinds presuppose the use of a fixed-width font, such as Courier. The fourth kind can be used with proportionally spaced fonts, as it does not require lining up columns.

Extension: table_captions

A caption may optionally be provided with all 4 kinds of tables (as illustrated in the examples below). A caption is a paragraph beginning with the string Table: (or just :), which will be stripped off. It may appear either before or after the table.

Extension: simple_tables

Simple tables look like this:

  Right     Left     Center     Default
-------     ------ ----------   -------
     12     12        12            12
    123     123       123          123
      1     1          1             1

Table:  Demonstration of simple table syntax.

The header and table rows must each fit on one line. Column alignments are determined by the position of the header text relative to the dashed line below it:3

  • If the dashed line is flush with the header text on the right side but extends beyond it on the left, the column is right-aligned.
  • If the dashed line is flush with the header text on the left side but extends beyond it on the right, the column is left-aligned.
  • If the dashed line extends beyond the header text on both sides, the column is centered.
  • If the dashed line is flush with the header text on both sides, the default alignment is used (in most cases, this will be left).

The table must end with a blank line, or a line of dashes followed by a blank line.

The column header row may be omitted, provided a dashed line is used to end the table. For example:

-------     ------ ----------   -------
     12     12        12             12
    123     123       123           123
      1     1          1              1
-------     ------ ----------   -------

When the header row is omitted, column alignments are determined on the basis of the first line of the table body. So, in the tables above, the columns would be right, left, center, and right aligned, respectively.

Extension: multiline_tables

Multiline tables allow header and table rows to span multiple lines of text (but cells that span multiple columns or rows of the table are not supported). Here is an example:

-------------------------------------------------------------
 Centered   Default           Right Left
  Header    Aligned         Aligned Aligned
----------- ------- --------------- -------------------------
   First    row                12.0 Example of a row that
                                    spans multiple lines.

  Second    row                 5.0 Here's another one. Note
                                    the blank line between
                                    rows.
-------------------------------------------------------------

Table: Here's the caption. It, too, may span
multiple lines.

These work like simple tables, but with the following differences:

  • They must begin with a row of dashes, before the header text (unless the header row is omitted).
  • They must end with a row of dashes, then a blank line.
  • The rows must be separated by blank lines.

In multiline tables, the table parser pays attention to the widths of the columns, and the writers try to reproduce these relative widths in the output. So, if you find that one of the columns is too narrow in the output, try widening it in the Markdown source.

The header may be omitted in multiline tables as well as simple tables:

----------- ------- --------------- -------------------------
   First    row                12.0 Example of a row that
                                    spans multiple lines.

  Second    row                 5.0 Here's another one. Note
                                    the blank line between
                                    rows.
----------- ------- --------------- -------------------------

: Here's a multiline table without a header.

It is possible for a multiline table to have just one row, but the row should be followed by a blank line (and then the row of dashes that ends the table), or the table may be interpreted as a simple table.

Extension: grid_tables

Grid tables look like this:

: Sample grid table.

+---------------+---------------+--------------------+
| Fruit         | Price         | Advantages         |
+===============+===============+====================+
| Bananas       | $1.34         | - built-in wrapper |
|               |               | - bright color     |
+---------------+---------------+--------------------+
| Oranges       | $2.10         | - cures scurvy     |
|               |               | - tasty            |
+---------------+---------------+--------------------+

The row of =s separates the header from the table body, and can be omitted for a headerless table. The cells of grid tables may contain arbitrary block elements (multiple paragraphs, code blocks, lists, etc.). Cells that span multiple columns or rows are not supported. Grid tables can be created easily using Emacs table mode.

Alignments can be specified as with pipe tables, by putting colons at the boundaries of the separator line after the header:

+---------------+---------------+--------------------+
| Right         | Left          | Centered           |
+==============:+:==============+:==================:+
| Bananas       | $1.34         | built-in wrapper   |
+---------------+---------------+--------------------+

For headerless tables, the colons go on the top line instead:

+--------------:+:--------------+:------------------:+
| Right         | Left          | Centered           |
+---------------+---------------+--------------------+
Grid Table Limitations

Pandoc does not support grid tables with row spans or column spans. This means that neither variable numbers of columns across rows nor variable numbers of rows across columns are supported by Pandoc. All grid tables must have the same number of columns in each row, and the same number of rows in each column. For example, the Docutils sample grid tables will not render as expected with Pandoc.

Extension: pipe_tables

Pipe tables look like this:

| Right | Left | Default | Center |
|------:|:-----|---------|:------:|
|   12  |  12  |    12   |    12  |
|  123  |  123 |   123   |   123  |
|    1  |    1 |     1   |     1  |

  : Demonstration of pipe table syntax.

The syntax is identical to PHP Markdown Extra tables. The beginning and ending pipe characters are optional, but pipes are required between all columns. The colons indicate column alignment as shown. The header cannot be omitted. To simulate a headerless table, include a header with blank cells.

Since the pipes indicate column boundaries, columns need not be vertically aligned, as they are in the above example. So, this is a perfectly legal (though ugly) pipe table:

fruit| price
-----|-----:
apple|2.05
pear|1.37
orange|3.09

The cells of pipe tables cannot contain block elements like paragraphs and lists, and cannot span multiple lines. If a pipe table contains a row whose printable content is wider than the column width (see --columns), then the table will take up the full text width and the cell contents will wrap, with the relative cell widths determined by the number of dashes in the line separating the table header from the table body. (For example ---|- would make the first column 3/4 and the second column 1/4 of the full text width.) On the other hand, if no lines are wider than column width, then cell contents will not be wrapped, and the cells will be sized to their contents.

Note: pandoc also recognizes pipe tables of the following form, as can be produced by Emacs’ orgtbl-mode:

| One | Two   |
|-----+-------|
| my  | table |
| is  | nice  |

The difference is that + is used instead of |. Other orgtbl features are not supported. In particular, to get non-default column alignment, you’ll need to add colons as above.

volver

© Servei d'Informática, Universitat de Valencia. email SIUV Mod: 12 diciembre 2019 02:38  documentacion wiki traza de la pagina Editar