Re: Indicating level by font size in the table of contents

2008-11-16 Thread Georg Brandl

Roger Binns schrieb:
 Roger Binns wrote:
 If you are in the process of fixing styles, it would be nice to apply
 them to code-blocks too.  For example if I have:
 
   .. code-block:: python
 
 Then have the CSS classes be highlight (currently done) and
 highlight-python.  (I want to mess with highlight-text to format
 output.)
 
 Thanks for implementing this.  Is there an easy way to specify an
 additional HTML/CSS stylesheet.  I can use html_style in the config or
 put a different default.css in static to change the main style sheet,
 but in this case I want to add one line (to set background colour of
 highlight-text) so I'd rather specify an additional stylesheet.

You can either put a style link into the HTML template, or just use
the CSS construct @import url() in the new file, to include the main
style sheet.

 Also I'd suggest creating the highlights the other way around.
 Currently it does this but it would be better if the outside div was
 highlight and the inside one was highlight-language.
 
 div class=highlight-python
   div class=highlight
 blah blah
 /div/div
 
 You can actually make this even shorter by doing:
 
 div class=highlight highlight-python
   blah blah
 /div

That's true. I did it this way because the inner div is generated
by Pygments, while the outer is added by Sphinx. This is easy to
prevent for normal code blocks, but for code blocks that use line
numbers the div class=highlight is actually inside the table that
contains the line numbers.

Georg

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sphinx-dev group.
To post to this group, send email to sphinx-dev@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Indicating level by font size in the table of contents

2008-11-02 Thread Roger Binns

 Those are reasonable choices, but not everybody will want them.
 However, if there were class attributes on the levels in the TOC
 (e.g., toc-tree-l1, toc-tree-l2, etc.), then it would be easier
 than it is currently to create specific styles for them. So I would
 modify your request in that way.
 
 That sounds reasonable. I'll look at implementing it.

If you are in the process of fixing styles, it would be nice to apply
them to code-blocks too.  For example if I have:

  .. code-block:: python

Then have the CSS classes be highlight (currently done) and
highlight-python.  (I want to mess with highlight-text to format
output.)

Roger


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sphinx-dev group.
To post to this group, send email to sphinx-dev@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Indicating level by font size in the table of contents

2008-11-01 Thread Georg Brandl

Janet Swisher schrieb:
 On Tue, Oct 28, 2008 at 5:47 PM, Gael Varoquaux
 [EMAIL PROTECTED] wrote:

 Hi sphinx-devs (Hi Georg),

 As our documentation is gorwing, we are starting to have a fairly deep
 tree of sections:
 http://code.enthought.com/projects/mayavi/docs/development/html/mayavi/

 As a result the table of content is a bit harder to read. I could limit
 its depth, but I would like to prefer avoiding this, as I believe having
 the title of the sub-(-sub-sub-sub...)sections in the table of content
 helps the users finding where is the relevent information.

 An easy way to make the information stand out a bit better is to vary the
 font size: sections larger, and maybe bold, and sub-sub-section smaller.

 Would it be possible to make this the default?
 
 Those are reasonable choices, but not everybody will want them.
 However, if there were class attributes on the levels in the TOC
 (e.g., toc-tree-l1, toc-tree-l2, etc.), then it would be easier
 than it is currently to create specific styles for them. So I would
 modify your request in that way.

That sounds reasonable. I'll look at implementing it.

Georg

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sphinx-dev group.
To post to this group, send email to sphinx-dev@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Indicating level by font size in the table of contents

2008-10-29 Thread Janet Swisher

On Tue, Oct 28, 2008 at 5:47 PM, Gael Varoquaux
[EMAIL PROTECTED] wrote:

 Hi sphinx-devs (Hi Georg),

 As our documentation is gorwing, we are starting to have a fairly deep
 tree of sections:
 http://code.enthought.com/projects/mayavi/docs/development/html/mayavi/

 As a result the table of content is a bit harder to read. I could limit
 its depth, but I would like to prefer avoiding this, as I believe having
 the title of the sub-(-sub-sub-sub...)sections in the table of content
 helps the users finding where is the relevent information.

 An easy way to make the information stand out a bit better is to vary the
 font size: sections larger, and maybe bold, and sub-sub-section smaller.

 Would it be possible to make this the default?

Those are reasonable choices, but not everybody will want them.
However, if there were class attributes on the levels in the TOC
(e.g., toc-tree-l1, toc-tree-l2, etc.), then it would be easier
than it is currently to create specific styles for them. So I would
modify your request in that way.


--Janet

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sphinx-dev group.
To post to this group, send email to sphinx-dev@googlegroups.com
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
-~--~~~~--~~--~--~---