Re: [sphinx-dev] Re: graphiz and LaTeX layout issue

2010-09-16 Thread Doug Hellmann

On Sep 12, 2010, at 3:50 PM, Guenter Milde wrote:

 On 2010-09-12, Kevin Dunn wrote:
 On Sat, Sep 11, 2010 at 14:38, Doug Hellmann doug.hellm...@gmail.com wrote:
 On Sep 11, 2010, at 2:35 PM, Doug Hellmann wrote:
 
 I've run into a problem with the graphviz extension and LaTeX output,
 similar to the one described in this older thread
 http://groups.google.com/group/sphinx-dev/browse_thread/thread/b4d6b008d85e95a2/2b9a3bd468558cad?lnk=gstq=graphviz#
 
 
 So the image is inlined in the middle of a single paragraph that
 should be 2.
 
 Does anyone have any suggestions about how to work around this and
 insert the necessary paragraph breaks?
 
 Try with comments between:
 
 
 Consider this digraph:
 
 .. write here anything you want
 
 .. digraph:: pickle_example
 
root; snip
 
 .. or use an empty comment
 
 The graph includes several cycles, ...
 
 
 (Tested only with Docutils.)

That doesn't seem to have any effect on the output, I'm still not getting 
paragraph separation.

Doug

-- 
You received this message because you are subscribed to the Google Groups 
sphinx-dev group.
To post to this group, send email to sphinx-...@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.



Re: [sphinx-dev] Re: graphiz and LaTeX layout issue

2010-09-16 Thread Kevin Dunn
 I've run into a problem with the graphviz extension and LaTeX output,
 similar to the one described in this older thread
 http://groups.google.com/group/sphinx-dev/browse_thread/thread/b4d6b008d85e95a2/2b9a3bd468558cad?lnk=gstq=graphviz#


 So the image is inlined in the middle of a single paragraph that
 should be 2.

 Does anyone have any suggestions about how to work around this and
 insert the necessary paragraph breaks?

 Try with comments between:


 Consider this digraph:

 .. write here anything you want

 .. digraph:: pickle_example

    root; snip

 .. or use an empty comment

 The graph includes several cycles, ...


 (Tested only with Docutils.)

 That doesn't seem to have any effect on the output, I'm still not getting 
 paragraph separation.

I guess this approach should work, based on the LaTeX output you
showed in the first message.  However, this will place your figure
using LaTeX's  figure placement rules (i.e. which sometimes means the
figures appear where you don't want them).

http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions#Figures

.. raw:: latex

   \begin{figure}[htb]

.. digraph:: pickle_example

   root; snip

.. raw:: latex

   \end{figure}

Kevin


 Doug

-- 
You received this message because you are subscribed to the Google Groups 
sphinx-dev group.
To post to this group, send email to sphinx-...@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.



Re: [sphinx-dev] Re: graphiz and LaTeX layout issue

2010-09-12 Thread Kevin Dunn
On Sat, Sep 11, 2010 at 14:38, Doug Hellmann doug.hellm...@gmail.com wrote:

 On Sep 11, 2010, at 2:35 PM, Doug Hellmann wrote:

 I've run into a problem with the graphviz extension and LaTeX output, 
 similar to the one described in this older thread 
 http://groups.google.com/group/sphinx-dev/browse_thread/thread/b4d6b008d85e95a2/2b9a3bd468558cad?lnk=gstq=graphviz#

 I should have mentioned that I'm using Python 2.7 and Sphinx v1.0.3.


 I have this input:

       Consider this digraph:

       .. digraph:: pickle_example

            root;
            root - a;
            root - b;
            a - b;
            b - a;
            b - c;
            a - a;

       The graph includes several cycles, ...

 It is rendered to HTML as I want it, with 2 paragraphs surrounding the 
 image.  The LaTeX output doesn't split the paragraphs from the image, though:

       Consider the following digraph.
       \includegraphics{graphviz-b03aab1b73c0685a4371559e3962f4a0a7f366b0.pdf}
       The graph includes several cycles, ...

 So the image is inlined in the middle of a single paragraph that should be 2.

 Guenter's response to the original thread implied that this might be 
 solvable with styling instructions, either in rst or LaTeX, but I can't work 
 out what I should be doing differently in the input to achieve the results I 
 want.

 Does anyone have any suggestions about how to work around this and insert 
 the necessary paragraph breaks?

Would a hack like this work?  See
http://docutils.sourceforge.net/docs/ref/rst/directives.html#raw-data-pass-through
for more details.
I'm not sure whether you need the second newline, as I don't have
graphviz installed on my current machine to test this.
Kevin

Consider this digraph:

.. raw:: latex

\newline

.. digraph:: pickle_example

root; snip

.. raw:: latex

\newline

The graph includes several cycles, ...


 Thanks,
 Doug

-- 
You received this message because you are subscribed to the Google Groups 
sphinx-dev group.
To post to this group, send email to sphinx-...@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.



[sphinx-dev] Re: graphiz and LaTeX layout issue

2010-09-11 Thread Doug Hellmann

On Sep 11, 2010, at 2:35 PM, Doug Hellmann wrote:

 I've run into a problem with the graphviz extension and LaTeX output, similar 
 to the one described in this older thread 
 http://groups.google.com/group/sphinx-dev/browse_thread/thread/b4d6b008d85e95a2/2b9a3bd468558cad?lnk=gstq=graphviz#

I should have mentioned that I'm using Python 2.7 and Sphinx v1.0.3.

 
 I have this input:
 
   Consider this digraph:
 
   .. digraph:: pickle_example
 
root;
root - a;
root - b;
a - b;
b - a;
b - c;
a - a;
 
   The graph includes several cycles, ...
 
 It is rendered to HTML as I want it, with 2 paragraphs surrounding the image. 
  The LaTeX output doesn't split the paragraphs from the image, though:
 
   Consider the following digraph.
   \includegraphics{graphviz-b03aab1b73c0685a4371559e3962f4a0a7f366b0.pdf}
   The graph includes several cycles, ...
 
 So the image is inlined in the middle of a single paragraph that should be 2.
 
 Guenter's response to the original thread implied that this might be solvable 
 with styling instructions, either in rst or LaTeX, but I can't work out what 
 I should be doing differently in the input to achieve the results I want.
 
 Does anyone have any suggestions about how to work around this and insert the 
 necessary paragraph breaks?
 
 Thanks,
 Doug
 

-- 
You received this message because you are subscribed to the Google Groups 
sphinx-dev group.
To post to this group, send email to sphinx-...@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.