Skip to content

pandoc no header span ids

Benct Philip Jonsson edited this page Jul 25, 2015 · 5 revisions

This is the documentation for pandoc-no-header-span-ids.pl.

NAME

pandoc-no-header-span-ids.pl - pandoc filter to make sure spans embedded in headers have no id.

VERSION

0.003

SYNOPSIS

pandoc --to=latex -F pandoc-no-header-span-ids.pl [OPTIONS] [FILE]...

DESCRIPTION

Works around a pandoc bug where spans with an id inside a header causes invalid LaTeX to be generated, by transferring the span's id to the header, unless there is a metadata entry -M keep_header_ids=true. It is especially useful when you convert HTML fetched from the Web.

Warning

You should run this filter after any other filters which rely on span ids!

OPTIONS

You can pass options to the filter as Pandoc metadata values:

-M <option>=<value>

Currently all the options expect boolean values true or false.

The currently recognised options are:

-M keep_header_ids=<true|false>

Don't replace the ids of headers with the id of the first contained span, if any.

-M optimize_attrless=<true|false>

Optimize away divs and spans which have no attributes, replacing them with their contents in their parent's contents.

WARNING: This affects all divs and spans in the whole document, not just those which have had their id removed by this filter!

Clone this wiki locally