diff options
author | ax006ho <j.hoffmann@fh-aachen.de> | 2020-01-31 11:31:28 +0100 |
---|---|---|
committer | ax006ho <j.hoffmann@fh-aachen.de> | 2020-01-31 11:31:28 +0100 |
commit | cfd414219ca14c4c49f709cb1129baeec274454b (patch) | |
tree | 4a72a0907ae0d05f994d97bb023d3b000a4782db | |
parent | cdf458ac0c4046165f47bd3cabcd1809af38a1b8 (diff) | |
parent | 8dd1d186d3c3cb2d4688fbc2c41214b6e004bad7 (diff) | |
download | listings-cfd414219ca14c4c49f709cb1129baeec274454b.tar.gz listings-cfd414219ca14c4c49f709cb1129baeec274454b.tar.bz2 |
Merge branch 'master' of ssh://git.gnu.org.ua/listings
-rw-r--r-- | testing/issues/larsson/README.md | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/testing/issues/larsson/README.md b/testing/issues/larsson/README.md new file mode 100644 index 0000000..1e51f22 --- /dev/null +++ b/testing/issues/larsson/README.md @@ -0,0 +1,49 @@ +# Line numbers that match the linerange specification # + +<file:///home/ax006ho/TeX/texmf/source/latex/listings/issues/larsson/linerange_specification_00a.tex> +shows the standard behaviour of the linerange option: line numbering +happens to start at 1, lines omitted by the use of linerange aren't counted +at all. + +The user Werner asked for a method to synchronize linerange and printed +line numbers. + +The question put in [Line numbers that match the linerange +specification](https://tex.stackexchange.com/questions/110187/listings-line-numbers-that-match-the-linerange-specification +"linerange specifications") got several answers: + + * patch the \lst@GLI@ command by using the etoolbox package: + <file:///home/ax006ho/TeX/texmf/source/latex/listings/issues/larsson/linerange_specification_00b.tex> + * introduce a new option "matchrangestart": + <file:///home/ax006ho/TeX/texmf/source/latex/listings/issues/larsson/linerange_specification_01.tex> + * enhance the keyword numbers by the value leftliteral: + <file:///home/ax006ho/TeX/texmf/source/latex/listings/issues/larsson/linerange_specification_02.tex> + * redefine the macro \lst@MSkipToFirst: + <file:///home/ax006ho/TeX/texmf/source/latex/listings/issues/larsson/linerange_specification_03.tex> + +None of these solutions is perfect. + +Here's a solution which comprises both of the aspects of the last example. + +There are two new options: + * consecutivenumbering (true, false) -> true + + this describes how ranges are numbered + * consecutivenumbering=true stands for the standard numbering, that is + the numbering of different ranges is consecutive. It can be used + for documenting code: + + comment + declaration + comment + code + + + + + + + + + + * rangegap (dimension) -> 0pt |