What can I control with YAML header options in pandoc?

后端 未结 3 1026
广开言路
广开言路 2020-12-07 13:37

Only by chance did I see an example document using the toc: true line in their YAML header options in a Markdown file to be processed by Pandoc. And the Pandoc

3条回答
  •  误落风尘
    2020-12-07 14:36

    It is a rather long list that you can browse by running man pandoc in the command line and navigating to "Variables set by pandoc" section under "TEMPLATES."

    The top of the list includes the following among many other options:

    Variables set by pandoc
       Some variables are set automatically by pandoc.  These vary somewhat depending  on  the
       output format, but include metadata fields as well as the following:
    
       title, author, date
              allow identification of basic aspects of the document.  Included in PDF metadata
              through LaTeX and ConTeXt.  These can be set through a pandoc title block, which
              allows for multiple authors, or through a YAML metadata block:
    
                     ---
                     author:
                     - Aristotle
                     - Peter Abelard
                     ...
    
       subtitle
              document subtitle; also used as subject in PDF metadata
    
       abstract
              document summary, included in LaTeX, ConTeXt, AsciiDoc, and Word docx
    
       keywords
              list  of  keywords  to  be  included in HTML, PDF, and AsciiDoc metadata; may be
              repeated as for author, above
    
       header-includes
              contents specified by -H/--include-in-header (may have multiple values)
    
       toc    non-null value if --toc/--table-of-contents was specified
    
       toc-title
              title of table of contents (works only with EPUB and docx)
    
       include-before
              contents specified by -B/--include-before-body (may have multiple values)
    
       include-after
              contents specified by -A/--include-after-body (may have multiple values)
    
       body   body of document
    

    ```

提交回复
热议问题