GNOME Bugzilla – Bug 600418
text is not centred in boxes when drawing is exported to pgf
Last modified: 2009-11-06 16:01:31 UTC
When I draw flow charts in dia and then I export them to tex (pgf export), all the text in boxes is not centred anymore in the pdf outputted by pdflatex. I have to modified the tex file outputted by dia. Every node in the pgf code exported is anchored in west (with option [anchor=west]). When I replace west by 'base' or if I delete the anchor=west option, the text is still not centred ! I have to modified the coordinates of the node. Not very painful for small figures but annoying enough when you write a thesis... I work on ubuntu 9.04 with texlive 2007. Let me know if I can do anything to help. I'm not a developper but I can do some testing or french translations. PS : I have attached the file exported by dia.
Created attachment 146744 [details] Tex file with pgf macros exported by dia
Created attachment 146745 [details] This is how the inital drawing looks in Dia
Created attachment 146746 [details] this how the drawing looks like in pdf built with pdflatex
This issue is already fixed by 0.97, released about six month ago. *** This bug has been marked as a duplicate of bug 482173 ***
Dia 0.97 is part of Ubuntu 9.10 - you may want to upgrade.
I just install Dia 0.97 from deb package and I don't think the bug is fully solved. Now the text in the pdf document is perfectly centred horizontally but not vertically. I have to manually add [anchor=base] to the node. In the attached file, you can see three nodes. I have only modified the rhombus (add [anchor = base] to the node). Two others are not centred vertically. Does anybody got the same bug ? Should I file a new bug ?
Created attachment 146808 [details] Text not centred verticaly until I add [anchor=base] to the rhombus node
Please do and specifically mention the vertical alignment. I wonder though, what the tex vertical default might be, if not anchor=base. Rather than attaching the final output you should attach the input (diagram) and the corrected tex file. Given that Dia already writes anchor=(west|east|) I wonder how that needs to be combined with anchor=base.
I've attached the files you ask to the new bug (dedicated to the issue of vertical alignement in dia 0.97) I've reported : https://bugzilla.gnome.org/show_bug.cgi?id=600972 The wierd thing, as you mention, is that the default alignement in pgf macros is anchor=base. Normally, you don't have to put it explicitly to have a vertically centred text. Thanks, Stan