| Age | Commit message (Collapse) | Author |
|
The first (and often only) `<aside id=footnotes>` block remains
unchanged, however any additional blocks from `--reference-location` are
distinguished as `#footnotes-2`, `#footnotes-3`, and so on. No other
existing writer seems to implement per-section IDs, including HTML4.
|
|
+ When the optional base level parameter is provided, we no
longer ensure that the sequence of heading levels is gapless
[behavior change]. Instead, we set the lowest heading level to
the specified base level, and adjust the others accordingly. If
an author wants to skip a level, e.g. from level 1 to level 3,
they can do that. In general, the heading levels specified
in the source document are preserved; `makeSections` only
puts them into a hierarchical structure. Closes #9398.
+ Section numbers are now assigned so that the top level
gets `1`, no matter what heading level is used. So, even
if the top heading level is 2, numbers will be `1`, `2`, etc.
rather than `0.1`, `0.2`, as in the past. Closes #5071.
+ We revert to the old behavior when the `--number-offset` option
is used. So, for example, if a document begins with a level-3
heading, and `--number-offset=1,2` is used, the top-level section
numbers will be `1.2.1`, `1.2.2`, etc. This is mainly for
backwards-compatibility.
|
|
This commit adds roles to some html element within epub in order to comply with accessibility best practices. Footnote references are given role "doc-noteref",footnote text gets "doc-footnote", and nav gets "doc-toc".
|
|
This seems to be required by iBooks; even an empty alt attribute
will satisfy it. Closes #9354.
|
|
* To conform to validator's expectations, `doc-footnote` role is used
with `aside` and `doc-endnotes` with `section`.
* `aside` is used only for notes at ends of sections or blocks;
if all the notes come at the end of the document, `section` is
used so we can have the `doc-endnotes` role.
|
|
|
|
for isRawHtml.
|
|
See #9058.
|
|
In general, the ID prefix makes it possible to combine multiple pieces
of Pandoc-generated HTML with no possibility that IDs will conflict. One
exception to this was that the footnotes were always put into an element
like
<aside id="foonotes" ...>
This commit applies the ID prefix to this ID as well.
|
|
Closes #8952.
|
|
Closes: #8729
|
|
This reverts commit b208eb2a560b8571af577667d5df8706f4ba8892.
|
|
The `<label>` element ensures that the item description is associated
with the checkbox, which is important for accessibility.
See: #8729
|
|
Now that we're doing `nubOrd` on classes at the end (when changing
pandoc attributes to HTML attributes), we don't need to do it here.
|
|
|
|
Closes #8705.
|
|
and .png.gz etc.
Closes #8699.
|
|
When `--reference-location=section` or `=block`, use an
`aside` element for the notes rather than a `section`.
When `--reference-location=section`, include the `aside`
element inside the section element, rather than outside.
(In slide shows, this option causes footnotes on a slide
to be displayed at the bottom of the slide.)
Closes #8695.
|
|
|
|
Many EPUB readers are thrown off by pandoc's current footnote
output. Both the ol and the fact that the footnote backlink is
at the end of the note seem to pose problems.
With this commit, we now create a list of aside (or div) elements,
instead of an ordered list. Each element begins with a note number
that is linked back to the note reference. (So, the backlink occurs
at the beginning rather than the end.)
References:
- https://kindlegen.s3.amazonaws.com/AmazonKindlePublishingGuidelines.pdf
- http://kb.daisy.org/publishing/docs/html/notes.html
See #8672, closes #5583.
Thanks to @Porges and @lewer.
|
|
Use this in HTML and OpenDocument writers.
|
|
|
|
Closes #8562.
|
|
It has been removed from pandoc-types.
|
|
Thanks and credit go to Aner Lucero, who laid the groundwork for this
feature in the 2021 GSoC project. He contributed many changes, including
modifications to the readers for HTML, JATS, and LaTeX, and to the HTML
and JATS writers.
Shared (Albert Krewinkel):
- The new function `figureDiv`, exported from `Text.Pandoc.Shared`,
offers a standardized way to convert a figure into a Div element.
Readers (Aner Lucero):
- HTML reader: `<figure>` elements are parsed as figures, with the
caption taken from the respective `<figcaption>` elements.
- JATS reader: The `<fig>` and `<caption>` elements are parsed into
figure elements, even if the contents is more complex.
- LaTeX reader: support for figures with non-image contents and for
subfigures.
- Markdown reader: paragraphs containing just an image are treated as
figures if the `implicit_figures` extension is enabled. The identifier
is used as the figure's identifier and the image description is also
used as figure caption; all other attributes are treated as belonging
to the image.
Writers (Aner Lucero, Albert Krewinkel):
- DokuWiki, Haddock, Jira, Man, MediaWiki, Ms, Muse, PPTX, RTF, TEI,
ZimWiki writers: Figures are rendered like Div elements.
- Asciidoc writer: The figure contents is unwrapped; each image in the
the figure becomes a separate figure.
- Classic custom writers: Figures are passed to the global function
`Figure(caption, contents, attr)`, where `caption` and `contents` are
strings and `attr` is a table of key-value pairs.
- ConTeXt writer: Figures are wrapped in a "placefigure" environment
with `\startplacefigure`/`\endplacefigure`, adding the features
caption and listing title as properties. Subfigures are place in a
single row with the `\startfloatcombination` environment.
- DocBook writer: Uses `mediaobject` elements, unless the figure contains
subfigures or tables, in which case the figure content is unwrapped.
- Docx writer: figures with multiple content blocks are rendered as
tables with style `FigureTable`; like before, single-image figures are
still output as paragraphs with style `Figure` or `Captioned Figure`,
depending on whether a caption is attached.
- DokuWiki writer: Caption and "alt-text" are no longer combined. The
alt text of a figure will now be lost in the conversion.
- FB2 writer: The figure caption is added as alt text to the images in
the figure; pre-existing alt texts are kept.
- ICML writer: Only single-image figures are supported. The contents of
figures with additional elements gets unwrapped.
- HTML writer: the alt text is no longer constructed from the caption,
as was the case with implicit figures. This reduces duplication, but
comes at the risk of images that are missing alt texts. Authors should
take care to provide alt texts for all images.
Some readers, most notably the Markdown reader with the
`implicit_figures` extension, add a caption that's identical to the
image description. The writer checks for this and adds an
`aria-hidden` attribute to the `<figcaption>` element in that case.
- JATS writer: The `<fig>` and `<caption>` elements are used write
figures.
- LaTeX writer: complex figures, e.g. with non-image contents and
subfigures, are supported. The `subfigure` template variable is set if
the document contains subfigures, triggering the conditional loading
of the *subcaption* package. Contants of figures that contain tables
are become unwrapped, as longtable environments are not allowed within
figures.
- Markdown writer: figures are output as implicit figures if possible,
via HTML if the `raw_html` extension is enabled, and as Div elements
otherwise.
- OpenDocument writer: A separate paragraph is generated for each block
element in a figure, each with style `FigureWithCaption`. Behavior for
single-image figures therefore remains unchanged.
- Org writer: Only the first element in a figure is given a caption;
additional block elements in the figure are appended without any
caption being added.
- RST writer: Single-image figures are supported as before; the contents
of more complex images become nested in a container of type `float`.
- Texinfo writer: Figures are rendered as float with type `figure`.
- Textile writer: Figures are rendered with the help of HTML elements.
- XWiki: Figures are placed in a group.
Co-authored-by: Aner Lucero <4rgento@gmail.com>
|
|
|
|
This was a shim we used to include for mathml support.
We don't do anything with this any more, so this is dead code.
|
|
commands or environments that can be interpreted as math e.g. by
MathJax. See #8469.
|
|
This will cause raw LaTeX prooftree environments to be rendered
appropriately when `--mathjax` is used.
Closes #8462.
|
|
to Writers/Shared.hs
The functions htmlAddStyle and htmlAlignmentToString are moved from Writers/HTML.hs, where they were called 'addStyle' and 'alignmentToString' respectively.
The function htmlAttrs is split off from tagWithAttrs in Writers/Shared.hs. It creates a representation of an Attr object, as one would see in a tagWithAttrs (but without the tag)
|
|
This will no doubt produce a bunch of warnings and hence CI
failures, which we'll need to work around with explicit imports.
|
|
This is just `nubOrd` from Data.Containers.ListUtils.
|
|
|
|
Previously we got two separate `class` attributes in the `p`
tag. Closes #8363.
|
|
`doc-biblioentry` -> `listitem`
`doc-bibliography` -> `list`
Closes #8354.
|
|
This is still an unexported internal module.
Export `urlEncode`, `escapeURI`, `isURI`, `schemes`, `uriPathToPath`.
Re-export `escapeURI` and `isURI` from T.P.Shared (as they
were exported before); drop exports of `schemes` and `uriPathToPath`
[API change].
With this change, T.P.Class no longer depends on T.P.Shared.
|
|
This makes T.P.Class more self-contained, and suitable for extraction
into a separate package if desired.
[API changes]
- T.P.Data is now an exported module, providing `readDataFile`,
`readDefaultDataFile` (both formerly provided by T.P.Class),
and also `getDataFileNames` (formerly unexported in
T.P.App.CommandLineOptions).
- T.P.Translations is now an exported module (along with
T.P.Translations.Types), providing `readTranslations`,
`getTranslations`, `setTranslations`, `translateTerm`,
`lookupTerm`, `readTranslations`, `Term(..)`, and `Translations`.
- T.P.Class: `readDataFile`, `readDefaultDataFile`, `setTranslations`,
and `translateTerm` are no longer exported.
`checkUserDataDir` is now exported.
- Text.Pandoc now exports Text.Pandoc.Data and `setTranslations`
and `translateTerm`.
|
|
If a link text contains a link, we replace it with a span.
See #7585.
|
|
...and not in regular HTML output.
Closes #8281.
|
|
These should not be generated by any pandoc readers, but they
might be produced programatically. Technically that's a misuse
of the AST, but since the expectation that the classes are
nonempty strigs is not encoded in the types, it can happen. This patch
limits the damage if it does, preventing invalid markdown attributes
like `{.}` from being written.
Cloess #8251.
|
|
|
|
Closes #8241.
This requires depending on a new (still unreleased)
version of skylighting-format-blaze-html.
|
|
instead of customAttribute.
|
|
It is not valid in HTML4.
See #8241.
|
|
The default `flex` and `overflow-x` properties of a column are set to
`auto`. In combination, these changes allow to get good results when
using columns with or without explicit widths.
|
|
Fixes: #8232
|
|
Previously classes like "underline" and "marked" had to
be the first class in a span in order for the span to be
interpreted as a "ul" or "mark" element. This commit allows
these special classes to be "stacked," e.g.
`[test]{.mark .underline}`; in addition, the special classes are no
longer required to come first in the list of classes.
See #8194 for context.
|
|
Browser will display the extra newline character between checkbox and
text as a space, which make tasklist items cannot be aligned.
I just remove it.
|
|
This formerly caused section divs to be produced, even
when `--section-divs` was not specified. Closes #8097.
|
|
when height and width are added to style because of an image,
but the image already has a style attribute.
Closes #8047.
|