Add options to change table/figure caption positions. #10161
Merged
+278
−40
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add command line options
--table-caption-position
and--figure-caption-position
. These allow the user to specify whether to put captions above or below tables and figures, respectively. The following output formats are supported: HTML (and related such as EPUB), LaTeX (and Beamer), Docx, ODT/OpenDocument, Typst.Text.Pandoc.Options: add
CaptionPosition
and newWriterOptions
fieldswriterFigureCaptionPosition
andwriterTableCaptionPosition
[API change].Text.Pandoc.Opt: add
Opt
fieldsoptFigureCaptionPosition
andoptTableCaptionPosition
[API change].Docx writer: make table/figure rendering sensitive to caption position settings.
OpenDocument writer: make table/figure rendering sensitive to caption position settings.
Typst writer/template: implement figure caption positions by triggering a show rule in the default template, which determines caption positions for figures and tables globally.
LaTeX writer: make table/figure rendering sensitive to caption position settings. Closes Provide a way to specify caption position in LaTeX output #5116.
HTML writer/template: make
<figcaption>
placement sensitive to caption position settings. For tables,<caption>
must be the first element, and positioning is determined by CSS, for here we set a variable which the default template is sensitive to.