tudalgo / AlgoTeX

Die LaTeX-Vorlage der Algo-Gruppe der TU Darmstadt - für FoP und AuD
GNU General Public License v3.0
1 stars 3 forks source link

Provide Option for Codeblock Line Number Alignment #22

Closed sidibu closed 2 years ago

sidibu commented 2 years ago

I would like to align the number one to nine, not centered, but on the right-hand side. Could you provide an option argument for the codeBlock environment to configure the alignment of line numbers?

Rdeisenroth commented 2 years ago

Providing an Option here would probably mess with the freedom to customize \theFancyVerbLine yourself...

For tudalgo anyways, the standardized centered text ensures an uniform look across all documents.

If you want to use the template for other purposes you can just put something similar to this in the preamble:

\renewcommand{\theFancyVerbLine}{\tikz{\node[text width=5mm,inner sep=0pt,text align=right]{\ttfamily\textcolor{white}{\scriptsize\arabic{FancyVerbLine}}};}}