logo izquierdo de la pagina

PANDOC MANUAL

logo de la pagina

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

Synopsis
Description
    Using pandoc
    Creating a PDF
    hsmarkdown
Options
    General options
    Reader options
    General writer options
    Options affecting specific writers
    Citations
    Math rendering in HTML
    Options for wrapper scripts
Templates
Pandoc’s markdown
    Philosophy
    Paragraphs
    Headers
        Setext-style headers
        Atx-style headers
        Header identifiers in HTML, LaTeX, and ConTeXt
    Block quotations
    Verbatim (code) blocks
        Indented code blocks
        Delimited code blocks
    Lists
        Bullet lists
        The four-space rule
        Ordered lists
        Definition lists
        Numbered example lists
        Compact and loose lists
        Ending a list
    Horizontal rules
    Tables
    Title block
    Backslash escapes
    Smart punctuation
    Inline formatting
        Emphasis
        Strikeout
        Superscripts and subscripts
        Verbatim
    Math
    Raw HTML
    Raw TeX
        Macros
    Links
        Automatic links
        Inline links
        Reference links
        Internal links
    Images
        Pictures with captions
    Footnotes
    Citations
Producing slide shows with Pandoc
    Structuring the slide show
    Incremental lists
    Styling the slides
Literate Haskell support
Authors

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


W adorno

Using pandoc

If no input-file is specified, input is read from stdin. Otherwise, the input-files are concatenated (with a blank line between each) and used as input. Output goes to stdout by default (though output to stdout is disabled for the odt, docx, and epub output formats). For output to a file, use the -o option:

pandoc -o output.html input.txt

Instead of a file, an absolute URI may be given. In this case pandoc will fetch the content using HTTP:

pandoc -f html -t markdown http://www.fsf.org

If multiple input files are given, pandoc will concatenate them all (with blank lines between them) before parsing.

The format of the input and output can be specified explicitly using command-line options. The input format can be specified using the -r/--read or -f/--from options, the output format using the -w/--write or -t/--to options. Thus, to convert hello.txt from markdown to LaTeX, you could type:

pandoc -f markdown -t latex hello.txt

To convert hello.html from html to markdown:

pandoc -f html -t markdown hello.html

Supported output formats are listed below under the -t/--to option. Supported input formats are listed below under the -f/--from option. Note that the rst, textile, latex, and html readers are not complete; there are some constructs that they do not parse.

If the input or output format is not specified explicitly, pandoc will attempt to guess it from the extensions of the input and output filenames. Thus, for example,

pandoc -o hello.tex hello.txt

will convert hello.txt from markdown to LaTeX. If no output file is specified (so that output goes to stdout), or if the output file’s extension is unknown, the output format will default to HTML. If no input file is specified (so that input comes from stdin), or if the input files’ extensions are unknown, the input format will be assumed to be markdown unless explicitly specified.

Pandoc uses the UTF-8 character encoding for both input and output. If your local character encoding is not UTF-8, you should pipe input and output through iconv:

iconv -t utf-8 input.txt | pandoc | iconv -f utf-8
volver

© Servei d'Informática, Universitat de Valencia. email SIUV Mod: 23 febrero 2021 20:25  documentacion wiki traza de la pagina Editar