File tree Expand file tree Collapse file tree 3 files changed +26
-3
lines changed Expand file tree Collapse file tree 3 files changed +26
-3
lines changed Original file line number Diff line number Diff line change @@ -497,6 +497,7 @@ if [ -n "${pdf_output}" -o -n "${latex_output}" ]; then
497
497
--filter=mermaid-filter
498
498
--lua-filter=informative-sections.lua
499
499
--lua-filter=convert-images.lua
500
+ --lua-filter=center-images.lua
500
501
--lua-filter=parse-html.lua
501
502
--lua-filter=apply-classes-to-tables.lua
502
503
--lua-filter=landscape-pages.lua
Original file line number Diff line number Diff line change
1
+ function Image (img )
2
+ -- Center images even if they aren't captioned.
3
+ if FORMAT :match ' latex' then
4
+ return {
5
+ pandoc .RawInline (' latex' , ' \\ begin{center}' ),
6
+ img ,
7
+ pandoc .RawInline (' latex' , ' \\ end{center}' ),
8
+ }
9
+ end
10
+ return img
11
+ end
Original file line number Diff line number Diff line change @@ -553,13 +553,24 @@ becomes:
553
553
554
554
{#fig:add-plus-button width=60%}
555
555
556
- The `{#fig:add-plus-button}` attribute (note there are no spaces between the `)` and the `{`!) does two things:
556
+ Including a figure title (`Adding an Image` between the `[]` above) causes the image to numbered, included in
557
+ the list of figures, and given a caption.
557
558
558
- 1. Includes the figure in the List of Figures (if you used `\listoffigures` as described in @sec:toc).
559
- 2. Numbers the figure so you can reference it as @fig:add-plus-button by just typing `@fig:add-plus-button`.
559
+ The `{#fig:add-plus-button}` attribute (note there are no spaces between the `)` and the `{`!) allows you to
560
+ reference it as @fig:add-plus-button by just typing `@fig:add-plus-button`.
560
561
561
562
Including `width=60%` here specifies that the image should take up 60% of the page's width.
562
563
564
+ Without the title and `#fig` attribute,
565
+
566
+ ```md
567
+ 
568
+ ```
569
+
570
+ looks like:
571
+
572
+ 
573
+
563
574
{#fig:sample-svg width=50%}
564
575
565
576
Even formats that are not natively supported by Pandoc are now supported, like the SVG in @fig:sample-svg.
You can’t perform that action at this time.
0 commit comments