This is a demo file for pandoc-crossref. With this filter, you can cross-reference figures (see figs. 1.1-1.3), display equations (see eq. 2.1), tables (see tbl. 3.1) and sections (secs. 1, 2, 4.1-4.3)
For immediate example, see fig. 1
There is also support for code blocks, for example, lsts. 4.1-4.3
It’s possible to capitalize reference prefixes, like this: Fig. 1.1.
In case of multiple references, capitalization is determined by first reference. Figs. 1.1, 1.2 is capitalized, while figs. 1.1, 1.2 is not.
It is also possible to mix different references, like fig. 1.1, tbl. 3.1, lsts. 4.1, 4.2, figs. 1.2, 1.3, which will be grouped in order they are specified. You can even intermix this with regular citations, although it’s not recommended: fig. 1.1, tbl. 3.1, [@unprocessedCitation]
You can also have custom chapter reference labels, like sec. AppA.CustLab
Subfigures are supported, see figs. 1.4, 1.4 (b)
Display equations are labelled and numbered
Pi(x) = ∑iaixi (2.1)
Since 0.1.6.0 those can also appear in the middle of paragraph ax2 + bx2 + c = 0 (2.2) like this.
First Header | Second Header |
---|---|
Content Cell | Content Cell |
Content Cell | Content Cell |
Table without caption:
First Header | Second Header |
---|---|
Content Cell | Content Cell |
Content Cell | Content Cell |
There are a couple options for code block labels. Those work only if
code block id starts with lst:
,
e.g. {#lst:label}
caption
attributecaption
attribute will be treated as code block caption.
If code block has both id and caption
attributes, it will
be treated as numbered code block.
Enabled with codeBlockCaptions
metadata option. If code
block is immediately adjacent to paragraph, starting with
Listing:
or :
, said paragraph will be treated
as code block caption.
Listing 4.2: Listing caption
main :: IO ()
= putStrLn "Hello World!" main
Wrapping code block without label in a div with id
lst:...
and class, starting with listing
, and
adding paragraph before code block, but inside div, will treat said
paragraph as code block caption.
Listing 4.3: Listing caption
main :: IO ()
= putStrLn "Hello World!" main
This chapter doesn’t change chapter prefix of referenced elements, instead keeping number of previous chapter, e.g. S(x) = ∫x1x2ax + b dx (4.1)
It’s also possible to show lists of figures and tables, like this: