This is a demo file for pandoc-crossref. With this filter, you can cross-reference figures (see figs. 2-4), display equations (see eq. 1), tables (see tbl. 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. 1-3
It’s possible to capitalize reference prefixes, like this: Fig. 2.
In case of multiple references, capitalization is determined by first reference. Figs. 2, 3 is capitalized, while figs. 2, 3 is not.
It is also possible to mix different references, like fig. 2, tbl. 1, lsts. 1, 2, figs. 3, 4, which will be grouped in order they are specified. You can even intermix this with regular citations, although it’s not recommended: fig. 2, tbl. 1, [@unprocessedCitation]
You can also have custom chapter reference labels, like sec. AppA.CustLab
Subfigures are supported, see figs. 5, 5 (b)
Display equations are labelled and numbered
Pi(x) = ∑iaixi (1)
Since 0.1.6.0 those can also appear in the middle of paragraph ax2 + bx2 + c = 0 (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 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 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 (3)
It’s also possible to show lists of figures and tables, like this: