-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Zilupe schrieb:
> There are Java code snippets in my documentation. I indent code with
> tabs (not spaces). When I generate HTML output, it sets tab width to 8
> characters which is annoying to me (i like 4). How do I change this
> value?
>
> I have found that there is a Pygments lexer option "tabsize", but I
> have no idea how to specify it for project-wide or snippet-specific
> use.
You can do something like this in your conf.py:
def setup(app):
from sphinx.highlighting import lexers
from pygments.lexers.compiled import JavaLexer
lexers['java'] = JavaLexer(tabsize=4)
cheers,
Georg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
iEYEARECAAYFAkr237kACgkQN9GcIYhpnLDHkQCeJnufsGRlHbzu52wwOWG422qp
8hgAoIHqSMubSffcntjQ2TstTGTo06b+
=OVd5
-----END PGP SIGNATURE-----
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sphinx-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sphinx-dev?hl=en
-~----------~----~----~----~------~----~------~--~---