Ronny Pfannschmidt | 7 Jun 2012 13:48
Picon
Picon

using grapviz

Hi,

anyone aware of a premade graphviz directive i can use?
google didn't yield anything usable other than something tightly 
integrated with sphinx.

-- Ronny

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Roberto Alsina | 7 Jun 2012 14:47
Picon
Gravatar

Re: using grapviz

On 6/7/2012 8:48 AM, Ronny Pfannschmidt wrote:
> Hi,
>
> anyone aware of a premade graphviz directive i can use?
> google didn't yield anything usable other than something tightly
> integrated with sphinx.

The graphviz directive in docutils is fairly portable. It may need a 
little refactoring.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Roberto Alsina | 7 Jun 2012 14:49
Picon
Gravatar

Re: using grapviz

On 6/7/2012 9:47 AM, Roberto Alsina wrote:
> On 6/7/2012 8:48 AM, Ronny Pfannschmidt wrote:
>> Hi,
>>
>> anyone aware of a premade graphviz directive i can use?
>> google didn't yield anything usable other than something tightly
>> integrated with sphinx.
> The graphviz directive in docutils is fairly portable. It may need a
> little refactoring.

Sorry, I meant "in rst2pdf".

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Ronny Pfannschmidt | 7 Jun 2012 14:51
Picon
Picon

Re: using grapviz

On 06/07/2012 02:47 PM, Roberto Alsina wrote:
> On 6/7/2012 8:48 AM, Ronny Pfannschmidt wrote:
>> Hi,
>>
>> anyone aware of a premade graphviz directive i can use?
>> google didn't yield anything usable other than something tightly
>> integrated with sphinx.
>
> The graphviz directive in docutils is fairly portable. It may need a
> little refactoring.
>

Is it documented somewhere?

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Roberto Alsina | 7 Jun 2012 14:55
Picon
Gravatar

Re: using grapviz

On 6/7/2012 9:51 AM, Ronny Pfannschmidt wrote:
>
>
> Is it documented somewhere?

Forget it, I remembered the code wrong.

The sphinx directive generates a custom node, and rst2pdf only has a way 
to handle the node.
The "right" way to implement a graphviz directive would be (I believe) 
to make it just generate a figure
with the rendered image in it, so it doesn't need to be reimplemented 
for every output format.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Ronny Pfannschmidt | 7 Jun 2012 14:58
Picon
Picon

Re: using grapviz

On 06/07/2012 02:55 PM, Roberto Alsina wrote:
> On 6/7/2012 9:51 AM, Ronny Pfannschmidt wrote:
>>
>>
>> Is it documented somewhere?
>
> Forget it, I remembered the code wrong.
>
> The sphinx directive generates a custom node, and rst2pdf only has a way
> to handle the node.
> The "right" way to implement a graphviz directive would be (I believe)
> to make it just generate a figure
> with the rendered image in it, so it doesn't need to be reimplemented
> for every output format.

it needs reimplementation for different output formats anyway,
for a pdf or tex one needs a different output than for a website

btw, i checked out rst2pdf, the output quality seems not that good
cant use it for my thesis if its like that

also it doesnt seem to have a good way to make a custom title page 
(which is required)

same goes for control of page numering syles

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
(Continue reading)

Roberto Alsina | 7 Jun 2012 15:20
Picon
Gravatar

Re: using grapviz

On 6/7/2012 9:58 AM, Ronny Pfannschmidt wrote:
> On 06/07/2012 02:55 PM, Roberto Alsina wrote:
>> On 6/7/2012 9:51 AM, Ronny Pfannschmidt wrote:
>>>
>>>
>>> Is it documented somewhere?
>>
>> Forget it, I remembered the code wrong.
>>
>> The sphinx directive generates a custom node, and rst2pdf only has a way
>> to handle the node.
>> The "right" way to implement a graphviz directive would be (I believe)
>> to make it just generate a figure
>> with the rendered image in it, so it doesn't need to be reimplemented
>> for every output format.
>
> it needs reimplementation for different output formats anyway,
> for a pdf or tex one needs a different output than for a website
>
> btw, i checked out rst2pdf, the output quality seems not that good
> cant use it for my thesis if its like that

It's probably using PNG, and you need to tweak it to use PDF output from 
graphviz.
I have not used it much myself, I just wrote it ;-)

> also it doesnt seem to have a good way to make a custom title page 
> (which is required)

Actually, you can do anything for a title page. You could have a SVG as 
(Continue reading)

Ronny Pfannschmidt | 7 Jun 2012 15:23
Picon
Picon

Re: using grapviz

On 06/07/2012 03:20 PM, Roberto Alsina wrote:
> On 6/7/2012 9:58 AM, Ronny Pfannschmidt wrote:
>> On 06/07/2012 02:55 PM, Roberto Alsina wrote:
>>> On 6/7/2012 9:51 AM, Ronny Pfannschmidt wrote:
>>>>
>>>>
>>>> Is it documented somewhere?
>>>
>>> Forget it, I remembered the code wrong.
>>>
>>> The sphinx directive generates a custom node, and rst2pdf only has a way
>>> to handle the node.
>>> The "right" way to implement a graphviz directive would be (I believe)
>>> to make it just generate a figure
>>> with the rendered image in it, so it doesn't need to be reimplemented
>>> for every output format.
>>
>> it needs reimplementation for different output formats anyway,
>> for a pdf or tex one needs a different output than for a website
>>
>> btw, i checked out rst2pdf, the output quality seems not that good
>> cant use it for my thesis if its like that
>
> It's probably using PNG, and you need to tweak it to use PDF output from
> graphviz.
> I have not used it much myself, I just wrote it ;-)
>
>> also it doesnt seem to have a good way to make a custom title page
>> (which is required)
>
(Continue reading)

Roberto Alsina | 7 Jun 2012 15:27
Picon
Gravatar

Re: using grapviz

On 6/7/2012 10:23 AM, Ronny Pfannschmidt wrote:
> On 06/07/2012 03:20 PM, Roberto Alsina wrote:
>> On 6/7/2012 9:58 AM, Ronny Pfannschmidt wrote:
>>> On 06/07/2012 02:55 PM, Roberto Alsina wrote:
>>>> On 6/7/2012 9:51 AM, Ronny Pfannschmidt wrote:
>>>>>
>>>>> Is it documented somewhere?
>>>> Forget it, I remembered the code wrong.
>>>>
>>>> The sphinx directive generates a custom node, and rst2pdf only has a way
>>>> to handle the node.
>>>> The "right" way to implement a graphviz directive would be (I believe)
>>>> to make it just generate a figure
>>>> with the rendered image in it, so it doesn't need to be reimplemented
>>>> for every output format.
>>> it needs reimplementation for different output formats anyway,
>>> for a pdf or tex one needs a different output than for a website
>>>
>>> btw, i checked out rst2pdf, the output quality seems not that good
>>> cant use it for my thesis if its like that
>> It's probably using PNG, and you need to tweak it to use PDF output from
>> graphviz.
>> I have not used it much myself, I just wrote it ;-)
>>
>>> also it doesnt seem to have a good way to make a custom title page
>>> (which is required)
>> Actually, you can do anything for a title page. You could have a SVG as
>> a title page
>> if you wanted. It may or may not be difficult to do.
> i dont see how i'd make a titlepage
(Continue reading)

Ronny Pfannschmidt | 7 Jun 2012 15:47
Picon
Picon

Re: using grapviz

On 06/07/2012 03:27 PM, Roberto Alsina wrote:
> On 6/7/2012 10:23 AM, Ronny Pfannschmidt wrote:
>> On 06/07/2012 03:20 PM, Roberto Alsina wrote:
>>> On 6/7/2012 9:58 AM, Ronny Pfannschmidt wrote:
>>>> On 06/07/2012 02:55 PM, Roberto Alsina wrote:
>>>>> On 6/7/2012 9:51 AM, Ronny Pfannschmidt wrote:
>>>>>>
>>>>>> Is it documented somewhere?
>>>>> Forget it, I remembered the code wrong.
>>>>>
>>>>> The sphinx directive generates a custom node, and rst2pdf only has a way
>>>>> to handle the node.
>>>>> The "right" way to implement a graphviz directive would be (I believe)
>>>>> to make it just generate a figure
>>>>> with the rendered image in it, so it doesn't need to be reimplemented
>>>>> for every output format.
>>>> it needs reimplementation for different output formats anyway,
>>>> for a pdf or tex one needs a different output than for a website
>>>>
>>>> btw, i checked out rst2pdf, the output quality seems not that good
>>>> cant use it for my thesis if its like that
>>> It's probably using PNG, and you need to tweak it to use PDF output from
>>> graphviz.
>>> I have not used it much myself, I just wrote it ;-)
>>>
>>>> also it doesnt seem to have a good way to make a custom title page
>>>> (which is required)
>>> Actually, you can do anything for a title page. You could have a SVG as
>>> a title page
>>> if you wanted. It may or may not be difficult to do.
(Continue reading)

Roberto Alsina | 7 Jun 2012 15:52
Picon
Gravatar

Re: using grapviz


You can use these options in the sphinx configuration file:

# If false, no coverpage is generated.
#pdf_use_coverpage = True

# Name of the cover page template to use
#pdf_cover_template = 'sphinxcover.tmpl'


The templace can do anything, like setting a SVG as background and
nothing else :-)

im not using sphinx for my thesis, should i - and why?

whats supposed to go into the template btw (i have literaly no idea)


I don't know if you should or not, it's your call :-)

If you don't use it, you can use rst2pdf's option:

--custom-cover=FILE
  Template file used for the cover page. Default: cover.tmpl

That is a Jinja template that generates restructured text, but here's a basic example:

https://code.google.com/searchframe#VQTM2ZJeCqA/trunk/rst2pdf/templates/cover.tmpl


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

Gmane