Thanks for looking at this. There is no hurry though.
Basically, for an output format to be available for Book Reports, its
document generator must support the DrawDoc interface.
This only consists of 8 methods that need to be implemented:
draw_box(style, text, x, y, w, h)
draw_text(style, text, x1, y1)
center_text(style, text, x1, y1)
rotate_text(style, text, x, y, angle)
draw_line(style, x1, y1, x2, y2)
My patch is a very basic attempt to implement these using the LaTeX
Gramps reports handle the pagination of charts. start_page() and
end_page() are called at the start and end of each page.
The drawing area is calculated using the page size and margins.
Co-ordinates for the drawing commands are specified in cm within this
drawing area. The origin is the top-left corner of the drawing area.
The commands used in most graphical reports are draw_box, draw_text and
draw_line. I have ignored the styles at the moment.
I started to implement center_text, this is like draw_text, but the
co-ordinates specify the center of the text not the corner.
draw_path and rotate_text are only used for two reports, so I have left
them at the moment.
I need to set the LaTeX page size and margins and set the Picture size
accordingly. So far the drawing area size is hard-coded and you have to
set the report margins to 4.5cm to get sensible results.
Having said all that, my patch does produce reasonable results for most
At this point my LaTeX knowledge runs out, and I need some advice.
Should we consider TikZ? Or embedding images (PIL is already used in
On 01/03/12 08:01, Harald Rosemann wrote:
> Thank you for reminding me.
> Here a first short answer:
> Yes, I noticed but couldn't reply instantly.
> Yes, graphics in many formats may be included using
> PIL and its ability to transform to an appropriate format.
> The wanted characteristics (layout) must be defined
> (one sided or inside of the text or several graphics together or/and ...).
> I'll read the feature request #5600 and related files
> and will go into more detail then.
> Best regards
> Am 29.02.2012 17:05, schrieb Paul Franklin:
>> I'm not sure if you read gramps-devel. FYI.
>> ---------- Forwarded message ----------
>> From: Nick Hall<nick__hall@...>
>> Date: Tue, 28 Feb 2012 22:56:54 +0000
>> Subject: [Gramps-devel] 5600: Enhance the LaTeX document generator to
>> include graphical reports
>> To: Gramps Development List<gramps-devel@...>
>> When I started work on feature request #5326, I was hoping to generate a
>> TOC and index for Pdf, Odf and LaTeX file formats. The actual
>> implementation adds special pages to Book reports. The LaTeX document
>> generator doesn't support graphical reports so we can't add an Index or
>> TOC to LaTeX report from within Gramps. This can easily be done by
>> editing the generated source file though.
>> This got me thinking about how easy it would be to enhance the LaTeX
>> output to support graphical reports.
>> I have attached a very simple prototype to feature request #5600:
>> To use the reports you must set 4.5cm margins (top, bottom, left and right).
>> I have not implemented the methods required for TimeLine and FanChart
>> reports yet.
>> I have used the Picture environment which is probably not the best solution.
>> I don't know LaTeX well enough to take this any further. Harald, are
>> you interested in investigating this?
> Virtualization& Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> Gramps-devel mailing list