Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add options to change table/figure caption positions. #10161

Merged
merged 1 commit into from
Sep 8, 2024
Merged

Conversation

jgm
Copy link
Owner

@jgm jgm commented Sep 8, 2024

  • 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 new WriterOptions fields writerFigureCaptionPosition and writerTableCaptionPosition [API change].

  • Text.Pandoc.Opt: add Opt fields optFigureCaptionPosition and optTableCaptionPosition [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.

@jgm jgm force-pushed the caption-position branch from 973f2f7 to dfceda6 Compare September 8, 2024 01:27
+ 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 new
  `WriterOptions` fields `writerFigureCaptionPosition` and
  `writerTableCaptionPosition` [API change].

+ Text.Pandoc.Opt: add `Opt` fields `optFigureCaptionPosition` and
  `optTableCaptionPosition` [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 #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.
@jgm jgm force-pushed the caption-position branch from dfceda6 to 19c7a89 Compare September 8, 2024 02:17
@jgm jgm merged commit a27dad6 into main Sep 8, 2024
18 of 21 checks passed
@jgm jgm deleted the caption-position branch September 8, 2024 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide a way to specify caption position in LaTeX output
1 participant