Reputation: 501
I've read the guide http://johnmacfarlane.net/pandoc/README.html#verbatim-code-blocks
In the example
~~~~ {#mycode .haskell .numberLines startFrom="100"}
qsort [] = []
qsort (x:xs) = qsort (filter (< x) xs) ++ [x] ++
qsort (filter (>= x) xs)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
How can I add a latex label \label{code}
to this block of code so I can reference it by \ref{code}
?
Upvotes: 2
Views: 1786
Reputation: 46346
According to the page you link to the #mycode
bit is the identifier for the code block, this is equivalent to LaTeX's \label
. You can reference this code block using an internal link and the identifier #mycode
.
Upvotes: 1