[sphinx-users] Re: Adding background color of notes and attention to Sphinx-generated PDF files

2016-10-16 Thread Peter Burdine
\usepackage{xcolor}

...

\makeatletter
\definecolor{shadecolor}{RGB}{220,220,220}

...

\renewcommand{\py@noticestart@note}{\py@lightbox\begin{snugshade*}}
\renewcommand{\py@noticeend@note}{\end{snugshade*}\py@endlightbox}

...

\makeatother

Adding the above to your preamble will enable "notes" to have a background 
color.  Using the above, you should be able to figure out the other 
admonitions.  Note that this is only one method of doing it, I'm sure there 
are others.

On Wednesday, October 12, 2016 at 5:33:15 PM UTC-7, Peter Burdine wrote:
>
> This is where you need to learn about LaTeX.  Those commands include the 
> character '@', so you need "\makeatletter" before those commands and 
> "\makeatother" after those commands.  The @ sign is a special character in 
> LaTeX, so you need to tell the system that you are using it as a letter, 
> then put it back into the regular mode.  I don't recall the special terms 
> that I should be using here, but hopefully the point comes across.
>
> On Wednesday, October 12, 2016 at 1:04:29 AM UTC-7, Minkai Li wrote:
>>
>> I add this commands to my conf.py preamble,But it does not work. It can 
>> not compile. I use restructuredtext and sphinx in Ubuntu environment
>>
>> 在 2016年10月12日星期三 UTC+8上午7:34:18,Peter Burdine写道:
>>>
>>> You will need to add some Latex commands to your preamble.  For example, 
>>> the following will make notes centered:
>>> \renewcommand{\py@noticestart@note}{\py@lightbox\begin{center}}
>>> \renewcommand{\py@noticeend@note}{\end{center}\py@endlightbox}
>>>
>>> This will make the admonition title be upper case:
>>> \renewenvironment{notice}[2]{
>>>   \def\py@noticetype{#1}
>>>   \csname py@noticestart@#1\endcsname
>>>   % Make the admonition type be upper case and on its own line
>>>   \strong{\MakeUppercase{#2}} \\
>>> }{\csname py@noticeend@\py@noticetype\endcsname}
>>>
>>> Modifying the PDF output of Sphinx isn't easy because you have to do a 
>>> few things:
>>>
>>>- Learn enough Latex to understand the Sphinx style files
>>>- Learn enough Latex to do what you want
>>>- Figure out how to modify it using a preamble that doesn't break 
>>>the output
>>>
>>> So far there isn't any general guide on how to do it.
>>>
>>>
>>> On Monday, October 10, 2016 at 5:10:16 PM UTC-7, Minkai Li wrote:

 I am able to generate notes using the Sphinx directive .. notes:: and 
 .. attention::. However, the notes and the attention in html file have 
 a background color while those from the generated PDF don’t. How can I add 
 color to Sphinx-generated PDF files? Is it in conf.py?

>>>

-- 
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 sphinx-users+unsubscr...@googlegroups.com.
To post to this group, send email to sphinx-users@googlegroups.com.
Visit this group at https://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.


[sphinx-users] Re: how do I add revision history table?

2016-10-16 Thread Peter Burdine
In the latex output, all of the front matter ouput (title page, toc, etc) 
is controlled by the \maketitle command.  If you want to change the front 
matter you need to renew that command to change its behavior.

On Friday, October 14, 2016 at 4:41:39 PM UTC-7, Fiona Hanington wrote:
>
> Hi there
> I would like to include a revision history table as part of the front 
> matter of my documents (PDF). I'd like this to appear after the title page 
> and before the toc if possible. Does sphinx/rst support this? If so how 
> would I go about it?
> Thanks
> Fiona
>

-- 
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 sphinx-users+unsubscr...@googlegroups.com.
To post to this group, send email to sphinx-users@googlegroups.com.
Visit this group at https://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.


[sphinx-users] Re: Table of Contents bar on the left is not correct.

2016-10-16 Thread Shatnerz
This was exactly what I needed. Thank you.

On Wednesday, October 12, 2016 at 10:15:01 PM UTC-4, Komiya Takeshi wrote:
>
> Hi,
>
> I think globaltoc helps you.
> Please add following settings to your conf.py:
> html_sidebars = {
> '**': ['globaltoc.html', 'relations.html', 'sourcelink.html', 
> 'searchbox.html'],
> }
>
> In detail, please see the document: 
> http://www.sphinx-doc.org/en/stable/config.html#confval-html_sidebars
>
> Thanks,
> Takeshi KOMIYA
>
>
> 2016年10月9日日曜日 18時31分33秒 UTC+9 Shatnerz:
>>
>> I have a simple little side project that I thought I'd add some 
>> documentation for: https://github.com/Shatnerz/ringplus
>>
>> Everything seems fine with the exception of the table of contents listed 
>> on the left of the page. The items are "{Project Name}" and "Indices and 
>> tables", which are the subsections of my index.rst. I was expecting the 
>> items to be "Getting Started", "Authentication Tutorial", and "API". 
>> Nothing I try changes anything. I am completely lost as to what may cause 
>> this. I've asked on the #python and #sphinx-doc freenode channels to no 
>> success.
>>
>> Is there a chance it is a dependency issue or something of that sort? I 
>> tried to build the tweepy docs and I see the same issue.
>>
>> Any help would be greatly appreciated. Thanks
>>
>

-- 
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 sphinx-users+unsubscr...@googlegroups.com.
To post to this group, send email to sphinx-users@googlegroups.com.
Visit this group at https://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.