i want to generate the code block and i try example and it work. but when i try to select the code from the pdf, the number also get selected. how to generate code block that when select the code w/o select the number? example :
Given the file testing.md as follows:
public void update() {
updatedAt();
super.update();
}
get template from JLDiaz
% Contents of listings-setup.tex
\usepackage{xcolor}
\lstset{
basicstyle=\ttfamily,
numbers=left,
numberstyle=\footnotesize,
stepnumber=2,
numbersep=5pt,
backgroundcolor=\color{black!10},
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2,
captionpos=b,
breaklines=true,
breakatwhitespace=true,
breakautoindent=true,
linewidth=\textwidth
}
Using those settings, i.e. running pandoc with options:
pandoc test.md --listings -H listings-setup.tex -o output.pdf
you will get
1 public void update() {
2 updatedAt();
3 super.update();
4 }
i like the line number. but, i think user or like me find it annoying when copying the code with the line number especially with long code block.
how to generate code block with line number but when selecting the code w/o selecting the line number ?