Issue #668 resolved

Enable line numbering to start > 1

Evan Goer
created an issue

When documenting a long code example, it's useful to break up the literalinclude into smaller snippets. Unfortunately Sphinx line numbering always displays as starting at 1, which is misleading. Would it be possible to add a "start" option?

{{{ .. literalinclude:: :linenos: :lines: 123-145 :start: 123 }}}

Comments (17)

  1. Jeppe Pihl

    I may be a bit late to the party, but I have a question to this coming feature. Will it somehow support literalinclude's start-after and/or end-before parameters?

    I would like to use literalinclude without hardcoding the line numbers in my documentation.

  2. Log in to comment