git.iko.soy/typeable/pandoc
on master help sign in
Reorganized documentation of options, grouping into categories.
commit47bb165a657884d98aceb071d163cf1fc513405a authorJohn MacFarlane <fiddlosopher@gmail.com> dateWed 25 Jan 2012, 22:34 (15 years ago) parent60bf741
1 file changed+170−148
README+170−148
README+170−148
@@ -128,6 +128,9 @@ problems with its simulation of symbolic links.
128128Options
129129=======
130130
131+General options
132+---------------
133+
131134`-f` *FORMAT*, `-r` *FORMAT*, `--from=`*FORMAT*, `--read=`*FORMAT*
132135: Specify input format. *FORMAT* can be `native` (native Haskell),
133136 `json` (JSON version of native AST), `markdown` (markdown),
@@ -153,29 +156,44 @@ Options
153156 using the `-o/--output` option. If `+lhs` is appended to `markdown`, `rst`,
154157 `latex`, `html`, or `html5`, the output will be rendered as literate Haskell
155158 source: see [Literate Haskell support](#literate-haskell-support), below.
159+
156160 Production of `pdf` output requires that a LaTeX engine be installed
157161 (see `--latex-engine`, below), and assumes that the following LaTeX
158162 packages are available: `amssymb`, `amsmath`, `ifxetex`, `ifluatex`,
159163 `listings` (if the `--listings` option is used), `fancyvrb`,
160164 `enumerate`, `ctable`, `url`, `graphicx`, `hyperref`, `ulem`,
161− `babel` (if the `lang` variable is set)`, `fontspec` (if `xelatex`
165+ `babel` (if the `lang` variable is set), `fontspec` (if `xelatex`
162166 or `lualatex` is used as the LaTeX engine), `xltxtra` and
163167 `xunicode` (if `xelatex` is used).
164168
165−`-s`, `--standalone`
166−: Produce output with an appropriate header and footer (e.g. a
167− standalone HTML, LaTeX, or RTF file, not a fragment).
168−
169169`-o` *FILE*, `--output=`*FILE*
170170: Write output to *FILE* instead of *stdout*. If *FILE* is
171171 `-`, output will go to *stdout*. (Exception: if the output
172172 format is `odt`, `docx`, `pdf`, or `epub`, output to stdout is disabled.)
173173
174−`-p`, `--preserve-tabs`
175−: Preserve tabs instead of converting them to spaces (the default).
174+`--data-dir=`*DIRECTORY*
175+: Specify the user data directory to search for pandoc data files.
176+ If this option is not specified, the default user data directory
177+ will be used:
176178
177−`--tab-stop=`*NUMBER*
178−: Specify the number of spaces per tab (default is 4).
179+ $HOME/.pandoc
180+
181+ in unix and
182+
183+ C:\Documents And Settings\USERNAME\Application Data\pandoc
184+
185+ in Windows. A `reference.odt`, `reference.docx`, `default.csl`,
186+ `epub.css`, `templates`, `slidy`, or `s5` directory placed in this
187+ directory will override pandoc's normal defaults.
188+
189+`-v`, `--version`
190+: Print version.
191+
192+`-h`, `--help`
193+: Show usage message.
194+
195+Reader options
196+--------------
179197
180198`--strict`
181199: Use strict markdown syntax, with no pandoc extensions or variants.
@@ -183,14 +201,6 @@ Options
183201 equivalents in standard markdown (e.g. definition lists or strikeout
184202 text) will be parsed as raw HTML.
185203
186−`--normalize`
187−: Normalize the document after reading: merge adjacent
188− `Str` or `Emph` elements, for example, and remove repeated `Space`s.
189−
190−`--reference-links`
191−: Use reference-style links, rather than inline links, in writing markdown
192− or reStructuredText. By default inline links are used.
193−
194204`-R`, `--parse-raw`
195205: Parse untranslatable HTML codes and LaTeX environments as raw HTML
196206 or LaTeX, instead of ignoring them. Affects only HTML and LaTeX
@@ -215,9 +225,65 @@ Options
215225 a numeral is an en-dash, and `--` is an em-dash. This option is selected
216226 automatically for `textile` input.
217227
218−`-5`, `--html5`
219−: Produce HTML5 instead of HTML4. This option has no effect for writers
220− other than `html`. (*Deprecated:* Use the `html5` output format instead.)
228+`--base-header-level=`*NUMBER*
229+: Specify the base level for headers (defaults to 1).
230+
231+`--indented-code-classes=`*CLASSES*
232+: Specify classes to use for indented code blocks--for example,
233+ `perl,numberLines` or `haskell`. Multiple classes may be separated
234+ by spaces or commas.
235+
236+`--normalize`
237+: Normalize the document after reading: merge adjacent
238+ `Str` or `Emph` elements, for example, and remove repeated `Space`s.
239+
240+`-p`, `--preserve-tabs`
241+: Preserve tabs instead of converting them to spaces (the default).
242+
243+`--tab-stop=`*NUMBER*
244+: Specify the number of spaces per tab (default is 4).
245+
246+General writer options
247+----------------------
248+
249+`-s`, `--standalone`
250+: Produce output with an appropriate header and footer (e.g. a
251+ standalone HTML, LaTeX, or RTF file, not a fragment).
252+
253+`--template=`*FILE*
254+: Use *FILE* as a custom template for the generated document. Implies
255+ `--standalone`. See [Templates](#templates) below for a description
256+ of template syntax. If no extension is specified, an extension
257+ corresponding to the writer will be added, so that `--template=special`
258+ looks for `special.html` for HTML output. If the template is not
259+ found, pandoc will search for it in the user data directory
260+ (see `--data-dir`). If this option is not used, a default
261+ template appropriate for the output format will be used (see
262+ `-D/--print-default-template`).
263+
264+`-V` *KEY=VAL*, `--variable=`*KEY:VAL*
265+: Set the template variable *KEY* to the value *VAL* when rendering the
266+ document in standalone mode. This is generally only useful when the
267+ `--template` option is used to specify a custom template, since
268+ pandoc automatically sets the variables used in the default
269+ templates.
270+
271+`-D` *FORMAT*, `--print-default-template=`*FORMAT*
272+: Print the default template for an output *FORMAT*. (See `-t`
273+ for a list of possible *FORMAT*s.)
274+
275+`--no-wrap`
276+: Disable text wrapping in output. By default, text is wrapped
277+ appropriately for the output format.
278+
279+`--columns`=*NUMBER*
280+: Specify length of lines in characters (for text wrapping).
281+
282+`--toc`, `--table-of-contents`
283+: Include an automatically generated table of contents (or, in
284+ the case of `latex`, `context`, and `rst`, an instruction to create
285+ one) in the output document. This option has no effect on `man`,
286+ `docbook`, `slidy`, or `s5` output.
221287
222288`--no-highlight`
223289: Disables syntax highlighting for code blocks and inlines, even when
@@ -228,51 +294,30 @@ Options
228294 Options are `pygments` (the default), `kate`, `monochrome`,
229295 `espresso`, `haddock`, and `tango`.
230296
231−`-m` [*URL*], `--latexmathml`[=*URL*]
232−: Use the [LaTeXMathML] script to display embedded TeX math in HTML output.
233− To insert a link to a local copy of the `LaTeXMathML.js` script,
234− provide a *URL*. If no *URL* is provided, the contents of the
235− script will be inserted directly into the HTML header, preserving
236− portability at the price of efficiency. If you plan to use math on
237− several pages, it is much better to link to a copy of the script,
238− so it can be cached.
239−
240−`--mathml`[=*URL*]
241−: Convert TeX math to MathML. In standalone mode, a small javascript
242− (or a link to such a script if a *URL* is supplied) will be inserted that
243− allows the MathML to be viewed on some browsers.
244−
245−`--jsmath`[=*URL*]
246−: Use [jsMath] to display embedded TeX math in HTML output.
247− The *URL* should point to the jsMath load script (e.g.
248− `jsMath/easy/load.js`); if provided, it will be linked to in
249− the header of standalone HTML documents. If a *URL* is not provided,
250− no link to the jsMath load script will be inserted; it is then
251− up to the author to provide such a link in the HTML template.
252−
253−`--mathjax`[=*URL*]
254−: Use [MathJax] to display embedded TeX math in HTML output.
255− The *URL* should point to the `MathJax.js` load script.
256− If a *URL* is not provided, a link to the MathJax CDN will
257− be inserted.
258−
259−`--gladtex`
260−: Enclose TeX math in `<eq>` tags in HTML output. These can then
261− be processed by [gladTeX] to produce links to images of the typeset
262− formulas.
297+`-H` *FILE*, `--include-in-header=`*FILE*
298+: Include contents of *FILE*, verbatim, at the end of the header.
299+ This can be used, for example, to include special
300+ CSS or javascript in HTML documents. This option can be used
301+ repeatedly to include multiple files in the header. They will be
302+ included in the order specified. Implies `--standalone`.
263303
264−`--mimetex`[=*URL*]
265−: Render TeX math using the [mimeTeX] CGI script. If *URL* is not
266− specified, it is assumed that the script is at `/cgi-bin/mimetex.cgi`.
304+`-B` *FILE*, `--include-before-body=`*FILE*
305+: Include contents of *FILE*, verbatim, at the beginning of the
306+ document body (e.g. after the `<body>` tag in HTML, or the
307+ `\begin{document}` command in LaTeX). This can be used to include
308+ navigation bars or banners in HTML documents. This option can be
309+ used repeatedly to include multiple files. They will be included in
310+ the order specified. Implies `--standalone`.
267311
268−`--webtex`[=*URL*]
269−: Render TeX formulas using an external script that converts TeX
270− formulas to images. The formula will be concatenated with the URL
271− provided. If *URL* is not specified, the Google Chart API will be used.
312+`-A` *FILE*, `--include-after-body=`*FILE*
313+: Include contents of *FILE*, verbatim, at the end of the document
314+ body (before the `</body>` tag in HTML, or the
315+ `\end{document}` command in LaTeX). This option can be be used
316+ repeatedly to include multiple files. They will be included in the
317+ order specified. Implies `--standalone`.
272318
273−`-i`, `--incremental`
274−: Make list items in Slidy, DZSlides or S5 display incrementally (one by one).
275− The default is for lists to be displayed all at once.
319+Options affecting specific writers
320+----------------------------------
276321
277322`--self-contained`
278323: Produce a standalone HTML file with no external dependencies, using
@@ -289,6 +334,14 @@ Options
289334`--offline`
290335: Deprecated synonym for `--self-contained`.
291336
337+`-5`, `--html5`
338+: Produce HTML5 instead of HTML4. This option has no effect for writers
339+ other than `html`. (*Deprecated:* Use the `html5` output format instead.)
340+
341+`--reference-links`
342+: Use reference-style links, rather than inline links, in writing markdown
343+ or reStructuredText. By default inline links are used.
344+
292345`--chapters`
293346: Treat top-level headers as chapters in LaTeX, ConTeXt, and DocBook
294347 output. When the LaTeX template uses the report, book, or
@@ -306,6 +359,10 @@ Options
306359: Produce LaTeX output for the `beamer` document class.
307360 This has an effect only for `latex` or `pdf` output.
308361
362+`-i`, `--incremental`
363+: Make list items in slide shows display incrementally (one by one).
364+ The default is for lists to be displayed all at once.
365+
309366`--slide-level`=*NUMBER*
310367: Specifies that headers with the specified level create
311368 slides (for `beamer`, `s5`, `slidy`, `dzslides`). Headers
@@ -321,13 +378,6 @@ Options
321378 rather than the header itself.
322379 See [Section identifiers](#header-identifiers-in-html), below.
323380
324−`--no-wrap`
325−: Disable text wrapping in output. By default, text is wrapped
326− appropriately for the output format.
327−
328−`--columns`=*NUMBER*
329−: Specify length of lines in characters (for text wrapping).
330−
331381`--email-obfuscation=`*none|javascript|references*
332382: Specify a method for obfuscating `mailto:` links in HTML documents.
333383 *none* leaves `mailto:` links as they are. *javascript* obfuscates
@@ -341,63 +391,15 @@ Options
341391 in HTML output. This is useful for preventing duplicate identifiers
342392 when generating fragments to be included in other pages.
343393
344−`--indented-code-classes=`*CLASSES*
345−: Specify classes to use for indented code blocks--for example,
346− `perl,numberLines` or `haskell`. Multiple classes may be separated
347− by spaces or commas.
348−
349−`--toc`, `--table-of-contents`
350−: Include an automatically generated table of contents (or, in
351− the case of `latex`, `context`, and `rst`, an instruction to create
352− one) in the output document. This option has no effect on `man`,
353− `docbook`, `slidy`, or `s5` output.
354−
355−`--base-header-level=`*NUMBER*
356−: Specify the base level for headers (defaults to 1).
357−
358−`--template=`*FILE*
359−: Use *FILE* as a custom template for the generated document. Implies
360− `--standalone`. See [Templates](#templates) below for a description
361− of template syntax. If no extension is specified, an extension
362− corresponding to the writer will be added, so that `--template=special`
363− looks for `special.html` for HTML output. If the template is not
364− found, pandoc will search for it in the user data directory
365− (see `--data-dir`). If this option is not used, a default
366− template appropriate for the output format will be used (see
367− `-D/--print-default-template`).
368−
369−`-V` *KEY=VAL*, `--variable=`*KEY:VAL*
370−: Set the template variable *KEY* to the value *VAL* when rendering the
371− document in standalone mode. This is generally only useful when the
372− `--template` option is used to specify a custom template, since
373− pandoc automatically sets the variables used in the default
374− templates.
394+`-T` *STRING*, `--title-prefix=`*STRING*
395+: Specify *STRING* as a prefix at the beginning of the title
396+ that appears in the HTML header (but not in the title as it
397+ appears at the beginning of the HTML body). Implies
398+ `--standalone`.
375399
376400`-c` *URL*, `--css=`*URL*
377401: Link to a CSS style sheet.
378402
379−`-H` *FILE*, `--include-in-header=`*FILE*
380−: Include contents of *FILE*, verbatim, at the end of the header.
381− This can be used, for example, to include special
382− CSS or javascript in HTML documents. This option can be used
383− repeatedly to include multiple files in the header. They will be
384− included in the order specified. Implies `--standalone`.
385−
386−`-B` *FILE*, `--include-before-body=`*FILE*
387−: Include contents of *FILE*, verbatim, at the beginning of the
388− document body (e.g. after the `<body>` tag in HTML, or the
389− `\begin{document}` command in LaTeX). This can be used to include
390− navigation bars or banners in HTML documents. This option can be
391− used repeatedly to include multiple files. They will be included in
392− the order specified. Implies `--standalone`.
393−
394−`-A` *FILE*, `--include-after-body=`*FILE*
395−: Include contents of *FILE*, verbatim, at the end of the document
396− body (before the `</body>` tag in HTML, or the
397− `\end{document}` command in LaTeX). This option can be be used
398− repeatedly to include multiple files. They will be included in the
399− order specified. Implies `--standalone`.
400−
401403`--reference-odt=`*FILE*
402404: Use the specified file as a style reference in producing an ODT.
403405 For best results, the reference ODT should be a modified version
@@ -421,7 +423,7 @@ Options
421423`--epub-stylesheet=`*FILE*
422424: Use the specified CSS file to style the EPUB. If no stylesheet
423425 is specified, pandoc will look for a file `epub.css` in the
424− user data directory (see `--data-dir`, below). If it is not
426+ user data directory (see `--data-dir`). If it is not
425427 found there, sensible defaults will be used.
426428
427429`--epub-cover-image=`*FILE*
@@ -450,15 +452,8 @@ Options
450452 The default is `pdflatex`. If the engine is not in your PATH,
451453 the full path of the engine may be specified here.
452454
453−`-D` *FORMAT*, `--print-default-template=`*FORMAT*
454−: Print the default template for an output *FORMAT*. (See `-t`
455− for a list of possible *FORMAT*s.)
456−
457−`-T` *STRING*, `--title-prefix=`*STRING*
458−: Specify *STRING* as a prefix at the beginning of the title
459− that appears in the HTML header (but not in the title as it
460− appears at the beginning of the HTML body). Implies
461− `--standalone`.
455+Citations
456+---------
462457
463458`--bibliography=`*FILE*
464459: Specify bibliography database to be used in resolving
@@ -509,20 +504,53 @@ Options
509504`--biblatex`
510505: Use biblatex for citations in LaTeX output.
511506
512−`--data-dir=`*DIRECTORY*
513−: Specify the user data directory to search for pandoc data files.
514− If this option is not specified, the default user data directory
515− will be used:
507+Math rendering in HTML
508+----------------------
516509
517− $HOME/.pandoc
510+`-m` [*URL*], `--latexmathml`[=*URL*]
511+: Use the [LaTeXMathML] script to display embedded TeX math in HTML output.
512+ To insert a link to a local copy of the `LaTeXMathML.js` script,
513+ provide a *URL*. If no *URL* is provided, the contents of the
514+ script will be inserted directly into the HTML header, preserving
515+ portability at the price of efficiency. If you plan to use math on
516+ several pages, it is much better to link to a copy of the script,
517+ so it can be cached.
518518
519− in unix and
519+`--mathml`[=*URL*]
520+: Convert TeX math to MathML. In standalone mode, a small javascript
521+ (or a link to such a script if a *URL* is supplied) will be inserted that
522+ allows the MathML to be viewed on some browsers.
520523
521− C:\Documents And Settings\USERNAME\Application Data\pandoc
524+`--jsmath`[=*URL*]
525+: Use [jsMath] to display embedded TeX math in HTML output.
526+ The *URL* should point to the jsMath load script (e.g.
527+ `jsMath/easy/load.js`); if provided, it will be linked to in
528+ the header of standalone HTML documents. If a *URL* is not provided,
529+ no link to the jsMath load script will be inserted; it is then
530+ up to the author to provide such a link in the HTML template.
522531
523− in Windows. A `reference.odt`, `reference.docx`,
524− `epub.css`, `templates` directory, or `s5` directory placed in this
525− directory will override pandoc's normal defaults.
532+`--mathjax`[=*URL*]
533+: Use [MathJax] to display embedded TeX math in HTML output.
534+ The *URL* should point to the `MathJax.js` load script.
535+ If a *URL* is not provided, a link to the MathJax CDN will
536+ be inserted.
537+
538+`--gladtex`
539+: Enclose TeX math in `<eq>` tags in HTML output. These can then
540+ be processed by [gladTeX] to produce links to images of the typeset
541+ formulas.
542+
543+`--mimetex`[=*URL*]
544+: Render TeX math using the [mimeTeX] CGI script. If *URL* is not
545+ specified, it is assumed that the script is at `/cgi-bin/mimetex.cgi`.
546+
547+`--webtex`[=*URL*]
548+: Render TeX formulas using an external script that converts TeX
549+ formulas to images. The formula will be concatenated with the URL
550+ provided. If *URL* is not specified, the Google Chart API will be used.
551+
552+Options for wrapper scripts
553+---------------------------
526554
527555`--dump-args`
528556: Print information about command-line arguments to *stdout*, then exit.
@@ -544,12 +572,6 @@ Options
544572
545573 pandoc -o foo.html -s
546574
547−`-v`, `--version`
548−: Print version.
549−
550−`-h`, `--help`
551−: Show usage message.
552−
553575[LaTeXMathML]: http://math.etsu.edu/LaTeXMathML/
554576[jsMath]: http://www.math.union.edu/~dpvc/jsmath/
555577[MathJax]: http://www.mathjax.org/