I am using Sphinx to document parts of Javascript code on a web page.
I use
.. literalinclude:: ../examples/mapviz-step1-simple.html
:language: javascript
:lines: 47-51
:linenos:
I get

The code snippet comes from lines 47-51 of the actual source code file, not 1-5.
How can I display the actual line numbers along with this snippet of code?
This was not possible when the question was asked in 2011, but since Sphinx 1.3 there is
lineno-startoption. See this enhancement request: https://github.com/sphinx-doc/sphinx/issues/668.Current documentation:
literalincludecode-block