API
Pandoc.Pandoc
— ModulePandoc
Pandoc wrapper to read JSON AST from pandoc
See https://hackage.haskell.org/package/pandoc-types-1.23/docs/Text-Pandoc-Definition.html
Pandoc.Attr
— TypeAttr: identifier, classes, key-value pairs
identifier::String
classes::Vector{String}
attributes::Vector{Tuple{String, String}}
Pandoc.BlockQuote
— TypeBlock quote (list of blocks)
content::Vector{Pandoc.Block}
Pandoc.BulletList
— TypeBullet list (list of items, each a list of blocks)
content::Vector{Vector{Pandoc.Block}}
Pandoc.Caption
— TypeThe caption of a table or figure, with optional short caption.
caption::Pandoc.ShortCaption
content::Vector{Pandoc.Block}
Pandoc.Cell
— TypeA table cell.
attr::Pandoc.Attr
alignment::Pandoc.Alignment.T
rowspan::Int64
colspan::Int64
content::Vector{Pandoc.Block}
Pandoc.Citation
— TypeCitation
id::String
prefix::Vector{Pandoc.Inline}
suffix::Vector{Pandoc.Inline}
mode::Pandoc.CitationMode.T
note_num::Int64
hash::Int64
Pandoc.Cite
— TypeCitation (list of inlines)
citations::Vector{Pandoc.Citation}
content::Vector{Pandoc.Inline}
Pandoc.Code
— TypeInline code (literal)
attr::Pandoc.Attr
content::String
Pandoc.CodeBlock
— TypeCode block (literal) with attributes
attr::Pandoc.Attr
content::String
Pandoc.ColSpan
— TypeThe number of columns occupied by a cell; the width of a cell.
Pandoc.ColSpec
— TypeThe specification for a single table column.
alignment::Pandoc.Alignment.T
colwidth::Pandoc.ColWidth
Pandoc.ColWidth
— TypeThe width of a table column, as a percentage of the text width.
width::Union{Float64, Symbol}
Pandoc.Converter
— TypeThis is a Converter
options struct. It supports all of pandoc's command line arguments.
You can use it like so:
julia> run(Converter(; input = "# Header level 1"))
"<h1 id="header-level-1">Header level 1</h1>
"
julia> c = Pandoc.Converter(; input = "# Header level 1")
`pandoc`
julia> c.from = "markdown";
julia> c.to = "rst";
julia> c
`pandoc -f markdown -t rst`
julia> run(c)
"Header level 1
==============
"
mutable struct Converter
input::Union{String, FilePathsBase.AbstractPath, Pandoc.Document, Vector{<:FilePathsBase.AbstractPath}}
from::Union{Nothing, String}
to::Union{Nothing, String}
output::Union{Nothing, String}
defaults::Union{Nothing, String}
file_scope::Bool
sandbox::Bool
data_dir::Union{Nothing, String}
template::Union{Nothing, String}
metadata::Vector{Tuple{String, String}}
metadata_file::Union{Nothing, FilePathsBase.AbstractPath}
standalone::Bool
variables::Vector{Tuple{String, String}}
wrap::Union{Nothing, String}
ascii::Bool
toc::Bool
toc_depth::Union{Nothing, Int64}
number_sections::Bool
number_offset::Union{Int64, Vector{Int64}}
top_level_division::Union{Nothing, String}
extract_media::Union{Nothing, FilePathsBase.AbstractPath}
resource_path::Union{Nothing, FilePathsBase.AbstractPath}
include_in_header::Vector{<:FilePathsBase.AbstractPath}
include_before_body::Vector{<:FilePathsBase.AbstractPath}
include_after_body::Vector{<:FilePathsBase.AbstractPath}
no_highlight::Bool
highlight_style::Union{Nothing, String, FilePathsBase.AbstractPath}
syntax_definition::Union{Nothing, FilePathsBase.AbstractPath}
dpi::Union{Nothing, Int64}
eol::Union{Nothing, String}
columns::Union{Nothing, Int64}
preserve_tabs::Bool
tab_stop::Union{Nothing, Int64}
pdf_engine::Union{Nothing, String}
pdf_engine_opt::Union{Nothing, String}
reference_doc::Union{Nothing, FilePathsBase.AbstractPath}
self_contained::Bool
embed_resources::Bool
request_header::Vector{Tuple{String, String}}
no_check_certificate::Bool
abbreviations::Union{Nothing, FilePathsBase.AbstractPath}
indented_code_classes::Union{Nothing, String}
default_image_extension::Union{Nothing, String}
filter::Vector{String}
lua_filter::Vector{<:FilePathsBase.AbstractPath}
shift_heading_level_by::Union{Nothing, Int64}
base_header_level::Union{Nothing, Int64}
track_changes::Union{Nothing, String}
strip_comments::Bool
reference_links::Bool
reference_location::Union{Nothing, String}
markdown_headings::Union{Nothing, String}
list_tables::Bool
listings::Bool
incremental::Bool
slide_level::Union{Nothing, Int64}
section_divs::Bool
html_q_tags::Bool
email_obfuscation::Union{Nothing, String}
id_prefix::Union{Nothing, String}
title_prefix::Union{Nothing, String}
css::Union{Nothing, String}
epub_subdirectory::Union{Nothing, FilePathsBase.AbstractPath}
epub_cover_image::Union{Nothing, FilePathsBase.AbstractPath}
epub_title_page::Union{Nothing, Bool}
epub_metadata::Union{Nothing, FilePathsBase.AbstractPath}
epub_embed_font::Union{Nothing, FilePathsBase.AbstractPath}
split_level::Union{Nothing, Int64}
chunk_template::Union{Nothing, FilePathsBase.AbstractPath}
epub_chapter_level::Union{Nothing, Int64}
ipynb_output::Union{Nothing, String}
citeproc::Bool
bibliography::Union{Nothing, FilePathsBase.AbstractPath}
csl::Union{Nothing, FilePathsBase.AbstractPath}
citation_abbreviations::Union{Nothing, String}
natbib::Bool
biblatex::Bool
mathml::Bool
webtex::Union{Nothing, Bool, String}
mathjax::Union{Nothing, Bool, String}
katex::Union{Nothing, Bool, String}
gladtex::Bool
trace::Bool
dump_args::Bool
ignore_args::Bool
verbose::Bool
quiet::Bool
fail_if_warnings::Bool
log::Union{Nothing, String}
bash_completion::Bool
list_input_formats::Bool
list_output_formats::Bool
list_extensions::Union{Nothing, Bool, String}
list_highlight_languages::Bool
list_highlight_styles::Bool
print_default_template::Union{Nothing, FilePathsBase.AbstractPath}
print_default_data_file::Union{Nothing, FilePathsBase.AbstractPath}
print_highlight_style::Union{Nothing, String, FilePathsBase.AbstractPath}
Pandoc.DefinitionList
— TypeDefinition list. Each list item is a pair consisting of a term (a list of inlines) and one or more definitions (each a list of blocks)
content::Vector{Pair{Vector{Pandoc.Inline}, Vector{Vector{Pandoc.Block}}}}
Pandoc.Div
— TypeGeneric block container with attributes
attr::Pandoc.Attr
content::Vector{Pandoc.Block}
Pandoc.Document
— TypeDocument
data::Dict{Symbol, Any}
pandoc_api_version::VersionNumber
meta::Pandoc.MetaValue
blocks::Vector{Pandoc.Block}
Pandoc.Emph
— TypeEmphasized text (list of inlines)
content::Vector{Pandoc.Inline}
Pandoc.Figure
— TypeFigure
attr::Pandoc.Attr
caption::Pandoc.Caption
content::Vector{Pandoc.Block}
Pandoc.Header
— TypeHeader - level (integer) and text (inlines)
level::Int64
attr::Pandoc.Attr
content::Vector{Pandoc.Inline}
Pandoc.HorizontalRule
— TypeHorizontal rule
Pandoc.Image
— TypeImage: alt text (list of inlines), target
attr::Pandoc.Attr
content::Vector{Pandoc.Inline}
target::Pandoc.Target
Pandoc.LineBlock
— TypeMultiple non-breaking lines
content::Vector{Vector{Pandoc.Inline}}
Pandoc.LineBreak
— TypeHard line break
Pandoc.Link
— TypeHyperlink: alt text (list of inlines), target
attr::Pandoc.Attr
content::Vector{Pandoc.Inline}
target::Pandoc.Target
Pandoc.ListAttributes
— TypeList attributes.
The first element of the triple is the start number of the list.
number::Int64
style::Pandoc.ListNumberStyle.T
delim::Pandoc.ListNumberDelim.T
Pandoc.Math
— TypeTeX math (literal)
math_type::Pandoc.MathType.T
content::String
Pandoc.Note
— TypeFootnote or endnote
content::Vector{Pandoc.Block}
Pandoc.OrderedList
— TypeOrdered list (attributes and a list of items, each a list of blocks)
attr::Pandoc.ListAttributes
content::Vector{Vector{Pandoc.Block}}
Pandoc.Para
— TypeParagraph
content::Vector{Pandoc.Inline}
Pandoc.Plain
— TypePlain text, not a paragraph
content::Vector{Pandoc.Inline}
Pandoc.Quoted
— TypeQuoted text (list of inlines)
quote_type::Pandoc.QuoteType.T
content::Vector{Pandoc.Inline}
Pandoc.RawBlock
— TypeRaw block
format::String
content::String
Pandoc.RawInline
— TypeRaw inline
format::String
content::String
Pandoc.Row
— TypeRow
attr::Pandoc.Attr
cells::Vector{Pandoc.Cell}
Pandoc.RowHeadColumns
— TypeThe number of columns taken up by the row head of each row of a 'TableBody'. The row body takes up the remaining columns.
Pandoc.RowSpan
— TypeThe number of rows occupied by a cell; the height of a cell.
Pandoc.ShortCaption
— TypeA short caption, for use in, for instance, lists of figures.
content::Union{Nothing, Vector{Pandoc.Inline}}
Pandoc.SmallCaps
— TypeSmall caps text (list of inlines)
content::Vector{Pandoc.Inline}
Pandoc.SoftBreak
— TypeSoft line break
Pandoc.Space
— TypeInter-word space
Pandoc.Span
— TypeGeneric inline container with attributes
attr::Pandoc.Attr
content::Vector{Pandoc.Inline}
Pandoc.Str
— TypeText (string)
content::String
Pandoc.Strikeout
— TypeStrikeout text (list of inlines)
content::Vector{Pandoc.Inline}
Pandoc.Strong
— TypeStrongly emphasized text (list of inlines)
content::Vector{Pandoc.Inline}
Pandoc.Subscript
— TypeSubscripted text (list of inlines)
content::Vector{Pandoc.Inline}
Pandoc.Superscript
— TypeSuperscripted text (list of inlines)
content::Vector{Pandoc.Inline}
Pandoc.Table
— TypeTable, with attributes, caption, optional short caption, column alignments and widths (required), table head, table bodies, and table foot
attr::Pandoc.Attr
caption::Pandoc.Caption
colspec::Vector{Pandoc.ColSpec}
head::Pandoc.TableHead
bodies::Vector{Pandoc.TableBody}
foot::Pandoc.TableFoot
Pandoc.TableBody
— TypeA body of a table, with an intermediate head, intermediate body, and the specified number of row header columns in the intermediate body.
attr::Pandoc.Attr
rowheadcolumns::Int64
head::Vector{Pandoc.Row}
content::Vector{Pandoc.Row}
Pandoc.TableFoot
— TypeThe foot of a table.
attr::Pandoc.Attr
content::Vector{Pandoc.Row}
Pandoc.TableHead
— TypeThe head of a table.
attr::Pandoc.Attr
rows::Vector{Pandoc.Row}
Pandoc.Target
— TypeLink target (URL, title).
url::String
title::String
Pandoc.Underline
— TypeUnderlined text (list of inlines)
content::Vector{Pandoc.Inline}
Base.run
— Methodrun(c::Pandoc.Converter) -> String
Execute command generated by Converter
.
Example
julia> run(Pandoc.Converter(input = "# header level 1", from="markdown", to="html"))
"<h1 id="header-level-1">header level 1</h1>
"
Pandoc.metadata
— Functionmetadata(data::Union{String, AbstractPath})
julia> Pandoc.metadata(p"my-unicode-cheat-sheet/index.qmd")
Dict{Symbol, Any} with 7 entries:
:categories => ["neovim", "python", "julia", "rust"]
:keywords => "python, julia, vim, rust, unicode"
:title => "My Unicode cheat sheet"
:summary => "References for various things associated with unicode in Vim, P…
:date => "2020-09-19T02:29:49-06:00"