Hi,
I think there is no way to wrap lines with using :linenos: option.
However, I can suggest a workaround for the problem of long lines
protrude from the screen.
1. add _static/custom.css file as::
table.highlighttable {
table-layout: fixed;
width: 100%;
}
table.highlighttable td.linenos {
width: 1em;
}
table.highlighttable td.linenos div.linenodiv {
text-align: right;
}
2. add setup function to conf.py as::
def setup(app):
app.add_stylesheet('custom.css')
Then, you'll get similar looks as non :linenos: output.
Regards,
--
Takayuki SHIMIZUKAWA
http://about.me/shimizukawa
2014-06-28 2:44 GMT+09:00 Jan Ulrich Hasecke <[email protected]>:
> Hi,
>
> I include a file with literalinclude. Some lines of the file are too
> long to be displayed inside the text margins. I cannot alter the file
> and I want to preserve line counting because I refer to line numbers in
> my explanations.
>
> Can I somehow wrap long lines in literal includes automatically?
>
> juh
>
> --
> Software-Dokumentation mit Sphinx
> http://www.amazon.de/dp/1497448689/
> Paperback: 224 Seiten
>
> --
> You received this message because you are subscribed to the Google Groups
> "sphinx-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sphinx-users.
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.