b82a01b688
Until now, the pptx writer only supported four slide layouts: “Title Slide” (used for the automatically generated metadata slide), “Section Header” (used for headings above the slide level), “Two Column” (used when there’s a columns div containing at least two column divs), and “Title and Content” (used for all other slides). This commit adds support for three more layouts: Comparison, Content with Caption, and Blank. - Support “Comparison” slide layout This layout is used when a slide contains at least two columns, at least one of which contains some text followed by some non-text (e.g. an image or table). The text in each column is inserted into the “body” placeholder for that column, and the non-text is inserted into the ObjType placeholder. Any extra content after the non-text is overlaid on top of the preceding content, rather than dropping it completely (as currently happens for the two-column layout). + Accept straightforward test changes Adding the new layout means the “-deleted-layouts” tests have an additional layout added to the master and master rels. + Add new tests for the comparison layout + Add new tests to pandoc.cabal - Support “Content with Caption” slide layout This layout is used when a slide’s body contains some text, followed by non-text (e.g. and image or a table). Before now, in this case the image or table would break onto a new slide: to get that output again, users can add a horizontal rule before the image or table. + Accept straightforward tests The “-deleted-layouts” tests all have an extra layout and relationship in the master for the Content with Caption layout. + Accept remove-empty-slides test Empty slides are still removed, but the Content with Caption layout is now used. + Change slide-level-0/h1-h2-with-text description This test now triggers the content with caption layout, giving a different (but still correct) result. + Add new tests for the new layout + Add new tests to the cabal file - Support “Blank” slide layout This layout is used when a slide contains only blank content (e.g. non-breaking spaces). No content is inserted into any placeholders in the layout. Fixes #5097. + Accept straightforward test changes Blank layout now copied over from reference doc as well, when layouts have been deleted. + Add some new tests A slide should use the blank layout if: - It contains only speaker notes - It contains only an empty heading with a body of nbsps - It contains only a heading containing only nbsps - Change ContentType -> Placeholder This type was starting to have a constructor for each placeholder on each slide (e.g. `ComparisonUpperLeftContent`). I’ve changed it instead to identify a placeholder by type and index, as I think that’s clearer and less redundant. - Describe layout-choosing logic in manual |
||
---|---|---|
.circleci | ||
.github | ||
app | ||
benchmark | ||
citeproc/biblatex-localization | ||
data | ||
doc | ||
linux | ||
macos | ||
man | ||
prelude | ||
src/Text | ||
test | ||
tools | ||
trypandoc | ||
windows | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
.hlint.yaml | ||
.mailmap | ||
.stylish-haskell.yaml | ||
AUTHORS.md | ||
BUGS | ||
cabal.project | ||
changelog.md | ||
CONTRIBUTING.md | ||
COPYING.md | ||
COPYRIGHT | ||
default.nix | ||
INSTALL.md | ||
Makefile | ||
MANUAL.txt | ||
pandoc.cabal | ||
README.md | ||
README.template | ||
RELEASE-CHECKLIST | ||
release.nix | ||
SECURITY.md | ||
Setup.hs | ||
shell.nix | ||
stack.yaml |
Pandoc
The universal markup converter
Pandoc is a Haskell library for converting from one markup format to another, and a command-line tool that uses this library. It can convert from
bibtex
(BibTeX bibliography)biblatex
(BibLaTeX bibliography)commonmark
(CommonMark Markdown)commonmark_x
(CommonMark Markdown with extensions)creole
(Creole 1.0)csljson
(CSL JSON bibliography)csv
(CSV table)docbook
(DocBook)docx
(Word docx)dokuwiki
(DokuWiki markup)epub
(EPUB)fb2
(FictionBook2 e-book)gfm
(GitHub-Flavored Markdown), or the deprecated and less accuratemarkdown_github
; usemarkdown_github
only if you need extensions not supported ingfm
.haddock
(Haddock markup)html
(HTML)ipynb
(Jupyter notebook)jats
(JATS XML)jira
(Jira/Confluence wiki markup)json
(JSON version of native AST)latex
(LaTeX)markdown
(Pandoc’s Markdown)markdown_mmd
(MultiMarkdown)markdown_phpextra
(PHP Markdown Extra)markdown_strict
(original unextended Markdown)mediawiki
(MediaWiki markup)man
(roff man)muse
(Muse)native
(native Haskell)odt
(ODT)opml
(OPML)org
(Emacs Org mode)rtf
(Rich Text Format)rst
(reStructuredText)t2t
(txt2tags)textile
(Textile)tikiwiki
(TikiWiki markup)twiki
(TWiki markup)vimwiki
(Vimwiki)
It can convert to
asciidoc
(AsciiDoc) orasciidoctor
(AsciiDoctor)beamer
(LaTeX beamer slide show)bibtex
(BibTeX bibliography)biblatex
(BibLaTeX bibliography)commonmark
(CommonMark Markdown)commonmark_x
(CommonMark Markdown with extensions)context
(ConTeXt)csljson
(CSL JSON bibliography)docbook
ordocbook4
(DocBook 4)docbook5
(DocBook 5)docx
(Word docx)dokuwiki
(DokuWiki markup)epub
orepub3
(EPUB v3 book)epub2
(EPUB v2)fb2
(FictionBook2 e-book)gfm
(GitHub-Flavored Markdown), or the deprecated and less accuratemarkdown_github
; usemarkdown_github
only if you need extensions not supported ingfm
.haddock
(Haddock markup)html
orhtml5
(HTML, i.e. HTML5/XHTML polyglot markup)html4
(XHTML 1.0 Transitional)icml
(InDesign ICML)ipynb
(Jupyter notebook)jats_archiving
(JATS XML, Archiving and Interchange Tag Set)jats_articleauthoring
(JATS XML, Article Authoring Tag Set)jats_publishing
(JATS XML, Journal Publishing Tag Set)jats
(alias forjats_archiving
)jira
(Jira/Confluence wiki markup)json
(JSON version of native AST)latex
(LaTeX)man
(roff man)markdown
(Pandoc’s Markdown)markdown_mmd
(MultiMarkdown)markdown_phpextra
(PHP Markdown Extra)markdown_strict
(original unextended Markdown)mediawiki
(MediaWiki markup)ms
(roff ms)muse
(Muse),native
(native Haskell),odt
(OpenOffice text document)opml
(OPML)opendocument
(OpenDocument)org
(Emacs Org mode)pdf
(PDF)plain
(plain text),pptx
(PowerPoint slide show)rst
(reStructuredText)rtf
(Rich Text Format)texinfo
(GNU Texinfo)textile
(Textile)slideous
(Slideous HTML and JavaScript slide show)slidy
(Slidy HTML and JavaScript slide show)dzslides
(DZSlides HTML5 + JavaScript slide show),revealjs
(reveal.js HTML5 + JavaScript slide show)s5
(S5 HTML and JavaScript slide show)tei
(TEI Simple)xwiki
(XWiki markup)zimwiki
(ZimWiki markup)- the path of a custom Lua writer, see Custom writers below
Pandoc can also produce PDF output via LaTeX, Groff ms, or HTML.
Pandoc’s enhanced version of Markdown includes syntax for tables, definition lists, metadata blocks, footnotes, citations, math, and much more. See the User’s Manual below under Pandoc’s Markdown.
Pandoc has a modular design: it consists of a set of readers, which parse text in a given format and produce a native representation of the document (an abstract syntax tree or AST), and a set of writers, which convert this native representation into a target format. Thus, adding an input or output format requires only adding a reader or writer. Users can also run custom pandoc filters to modify the intermediate AST (see the documentation for filters and Lua filters).
Because pandoc’s intermediate representation of a document is less expressive than many of the formats it converts between, one should not expect perfect conversions between every format and every other. Pandoc attempts to preserve the structural elements of a document, but not formatting details such as margin size. And some document elements, such as complex tables, may not fit into pandoc’s simple document model. While conversions from pandoc’s Markdown to all formats aspire to be perfect, conversions from formats more expressive than pandoc’s Markdown can be expected to be lossy.
Installing
Here’s how to install pandoc.
Documentation
Pandoc’s website contains a full User’s Guide. It is also available here as pandoc-flavored Markdown. The website also contains some examples of the use of pandoc and a limited online demo.
Contributing
Pull requests, bug reports, and feature requests are welcome. Please make sure to read the contributor guidelines before opening a new issue.
License
© 2006-2021 John MacFarlane (jgm@berkeley.edu). Released under the GPL, version 2 or greater. This software carries no warranty of any kind. (See COPYRIGHT for full copyright and warranty notices.)