This is a demo file for pandoc-crossref. With this filter, you can cross-reference figures (see figs.~\ref{fig:figure1}, \ref{fig:figure2}, \ref{fig:figure3}), display equations (see eq.~\ref{eq:eqn1}), tables (see tbl.~\ref{tbl:table1}) and sections (secs.~\ref{sec:sec1}, \ref{sec:sec2}, \ref{sec:caption-attr}, \ref{sec:table-capts}, \ref{sec:wrapping-div}) For immediate example, see fig.~\ref{fig:figure0} \hypertarget{fig:figure0}{% \begin{figure} \centering \includegraphics{img1.jpg} \caption{A figure}\label{fig:figure0} \end{figure} } There is also support for code blocks, for example, lsts.~\ref{lst:captionAttr}, \ref{lst:tableCaption}, \ref{lst:wrappingDiv} It's possible to capitalize reference prefixes, like this: Fig.~\ref{fig:figure1}. In case of multiple references, capitalization is determined by first reference. Figs.~\ref{fig:figure1}, \ref{fig:figure2} is capitalized, while figs.~\ref{fig:figure2}, \ref{fig:figure1} is not. It is also possible to mix different references, like fig.~\ref{fig:figure1}, tbl.~\ref{tbl:table1}, lsts.~\ref{lst:captionAttr}, \ref{lst:tableCaption}, figs.~\ref{fig:figure2}, \ref{fig:figure3}, which will be grouped in order they are specified. You can even intermix this with regular citations, although it's not recommended: fig.~\ref{fig:figure1}, tbl.~\ref{tbl:table1}, {[}@unprocessedCitation{]} You can also have custom chapter reference labels, like sec.~\ref{sec:custlabs} Subfigures are supported, see figs.~\ref{fig:subfigures}, \ref{fig:subfigureB} \hypertarget{sec:sec1}{% \section{Chapter 1. Figures}\label{sec:sec1}} \hypertarget{fig:figure1}{% \begin{figure} \centering \includegraphics{img1.jpg} \caption{First figure}\label{fig:figure1} \end{figure} } \hypertarget{fig:figure2}{% \begin{figure} \centering \includegraphics{img2.jpg} \caption{Second figure}\label{fig:figure2} \end{figure} } \hypertarget{fig:figure3}{% \begin{figure} \centering \includegraphics{img3.jpg} \caption{Third figure}\label{fig:figure3} \end{figure} } \begin{figure} \centering \includegraphics{img1.jpg} \caption{Unlabelled image} \end{figure} \begin{figure} \centering \subfloat[Subfigure a]{\includegraphics{img1.jpg}} \subfloat[Subfigure b]{\includegraphics{img1.jpg}\label{fig:subfigureB}} \caption{Subfigures caption} \label{fig:subfigures} \end{figure} \hypertarget{sec:sec2}{% \section{Chapter 2. Equations}\label{sec:sec2}} Display equations are labelled and numbered \begin{equation} P_i(x) = \sum_i a_i x^i \label{eq:eqn1}\end{equation} Since 0.1.6.0 those can also appear in the middle of paragraph \begin{equation}a x^2 + b x^2 + c = 0\label{eq:quadr}\end{equation} like this. \hypertarget{sec:chapter-3.-tables}{% \section{Chapter 3. Tables}\label{sec:chapter-3.-tables}} \hypertarget{tbl:table1}{} \begin{longtable}[]{@{}ll@{}} \caption{\label{tbl:table1}Table example}\tabularnewline \toprule First Header & Second Header\tabularnewline \midrule \endfirsthead \toprule First Header & Second Header\tabularnewline \midrule \endhead Content Cell & Content Cell\tabularnewline Content Cell & Content Cell\tabularnewline \bottomrule \end{longtable} Table without caption: \begin{longtable}[]{@{}ll@{}} \toprule First Header & Second Header\tabularnewline \midrule \endhead Content Cell & Content Cell\tabularnewline Content Cell & Content Cell\tabularnewline \bottomrule \end{longtable} \hypertarget{sec:chapter-4.-code-blocks}{% \section{Chapter 4. Code blocks}\label{sec:chapter-4.-code-blocks}} There are a couple options for code block labels. Those work only if code block id starts with \texttt{lst:}, e.g. \texttt{\{\#lst:label\}} \hypertarget{sec:caption-attr}{% \subsection{\texorpdfstring{\texttt{caption} attribute}{caption attribute}}\label{sec:caption-attr}} \texttt{caption} attribute will be treated as code block caption. If code block has both id and \texttt{caption} attributes, it will be treated as numbered code block. \begin{codelisting} \caption{Listing caption} \hypertarget{lst:captionAttr}{% \label{lst:captionAttr}}% \begin{Shaded} \begin{Highlighting}[] \OtherTok{main ::} \DataTypeTok{IO}\NormalTok{ ()} \NormalTok{main }\FunctionTok{=}\NormalTok{ putStrLn }\StringTok{"Hello World!"} \end{Highlighting} \end{Shaded} \end{codelisting} \pagebreak \hypertarget{sec:table-capts}{% \subsection{Table-style captions}\label{sec:table-capts}} Enabled with \texttt{codeBlockCaptions} metadata option. If code block is immediately adjacent to paragraph, starting with \texttt{Listing:} or \texttt{:}, said paragraph will be treated as code block caption. \begin{codelisting} \caption{Listing caption} \hypertarget{lst:tableCaption}{% \label{lst:tableCaption}}% \begin{Shaded} \begin{Highlighting}[] \OtherTok{main ::} \DataTypeTok{IO}\NormalTok{ ()} \NormalTok{main }\FunctionTok{=}\NormalTok{ putStrLn }\StringTok{"Hello World!"} \end{Highlighting} \end{Shaded} \end{codelisting} \hypertarget{sec:wrapping-div}{% \subsection{Wrapping div}\label{sec:wrapping-div}} Wrapping code block without label in a div with id \texttt{lst:...} and class, starting with \texttt{listing}, and adding paragraph before code block, but inside div, will treat said paragraph as code block caption. \begin{codelisting} \caption{Listing caption} \hypertarget{lst:wrappingDiv}{% \label{lst:wrappingDiv}}% \begin{Shaded} \begin{Highlighting}[] \OtherTok{main ::} \DataTypeTok{IO}\NormalTok{ ()} \NormalTok{main }\FunctionTok{=}\NormalTok{ putStrLn }\StringTok{"Hello World!"} \end{Highlighting} \end{Shaded} \end{codelisting} \hypertarget{sec:unnumbered-chapter.}{% \section*{Unnumbered chapter.}\label{sec:unnumbered-chapter.}} \addcontentsline{toc}{section}{Unnumbered chapter.} This chapter doesn't change chapter prefix of referenced elements, instead keeping number of previous chapter, e.g. \begin{equation} S(x) = \int_{x_1}^{x_2} a x+b \ \mathrm{d}x \label{eq:eqn2}\end{equation} \hypertarget{sec:chapter-5.-reference-lists}{% \section{Chapter 5. Reference lists}\label{sec:chapter-5.-reference-lists}} It's also possible to show lists of figures and tables, like this: \listoffigures \listoftables \listoflistings \hypertarget{sec:appendix-a.-custom-labels}{% \section{Appendix A. Custom labels}\label{sec:appendix-a.-custom-labels}} \hypertarget{sec:custlabs}{% \subsection{This section will have custom label}\label{sec:custlabs}}
http://lierdakil.github.io/pandoc-crossref/demo/output.latex
lierdakil.github.io
crawl=CC-MAIN-2022-21
7046
application/http; msgtype=response
sha1:LZNA5E5Q3IIMXSKAHOVPIK6J2YLEK4OB
<urn:uuid:1ead0aff-5172-4115-8019-42187bae0ec2>
2022-05-18T07:28:15Z
185.199.109.153
application/x-latex
sha1:T6WU5WAQCZA7TRUXEJKBMGAJKSJ5JJHP
<urn:uuid:10a83ef3-43c0-43d8-8b34-a138b5058bf5>
http://lierdakil.github.io/pandoc-crossref/demo/output.latex
response
<urn:uuid:3e54e76a-a0d1-4f6f-9acf-38c376da9b23>
isPartOf: CC-MAIN-2022-21
publisher: Common Crawl
description: Wide crawl of the web for May 2022
operator: Common Crawl Admin (info@commoncrawl.org)
hostname: ip-10-67-67-76
software: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)
robots: checked via crawler-commons 1.3-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)
format: WARC File Format 1.1
conformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/