-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Georg Brandl schrieb:
> 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)

PS: While this is more or less a workaround, there is an issue (#207)
which will eventually result in a proper API :)

cheers,
Georg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)

iEYEARECAAYFAkr24kUACgkQN9GcIYhpnLAcwwCeMMcz0rMAS+l07pG1WvD/FsuI
hsYAnjXpN9ezvA4mdxxZjR5MEnr9Zx+G
=xWQv
-----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
-~----------~----~----~----~------~----~------~--~---

Reply via email to