Issue #44: Line numbers in listings are enabled by default and can be disabled with the option "listings-disable-line-numbers".

This commit is contained in:
Wandmalfarbe 2018-07-20 13:04:38 +02:00
parent e27058c5d4
commit 18a84f4f0f
2 changed files with 10 additions and 2 deletions

View File

@ -71,6 +71,9 @@ This template defines some new variables to control the appearance of the title
- `toc-own-page` default=`false`
begin new page after table of contents, when `true`
- `listings-disable-line-numbers` default=`false`
disables line numbers for all listings
## Examples

View File

@ -578,16 +578,21 @@ $endif$
$if(listings)$
\lstdefinestyle{eisvogel_listing_style}{
language = java,
$if(listings-disable-line-numbers)$
xleftmargin = 0.6em,
framexleftmargin = 0.4em,
$else$
numbers = left,
xleftmargin = 2.7em,
framexleftmargin = 2.5em,
$endif$
backgroundcolor = \color{listing-background},
basicstyle = \color{listing-text-color}\small\ttfamily{}\linespread{1.15}, % print whole listing small
xleftmargin = 2.7em,
breaklines = true,
frame = single,
framesep = 0.6mm,
rulecolor = \color{listing-rule},
frameround = ffff,
framexleftmargin = 2.5em,
tabsize = 4,
numberstyle = \color{listing-numbers},
aboveskip = 1.0em,