After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 600418 - text is not centred in boxes when drawing is exported to pgf
text is not centred in boxes when drawing is exported to pgf
Status: RESOLVED DUPLICATE of bug 482173
Product: dia
Classification: Other
Component: exports
0.96.1
Other Linux
: Normal normal
: ---
Assigned To: Dia maintainers
Dia maintainers
Depends on:
Blocks:
 
 
Reported: 2009-11-02 13:47 UTC by Stanislas Couix
Modified: 2009-11-06 16:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Tex file with pgf macros exported by dia (3.43 KB, text/x-tex)
2009-11-02 13:49 UTC, Stanislas Couix
Details
This is how the inital drawing looks in Dia (8.38 KB, image/png)
2009-11-02 13:54 UTC, Stanislas Couix
Details
this how the drawing looks like in pdf built with pdflatex (11.48 KB, image/png)
2009-11-02 13:55 UTC, Stanislas Couix
Details
Text not centred verticaly until I add [anchor=base] to the rhombus node (6.59 KB, image/png)
2009-11-03 09:32 UTC, Stanislas Couix
Details

Description Stanislas Couix 2009-11-02 13:47:37 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.
Comment 1 Stanislas Couix 2009-11-02 13:49:42 UTC
Created attachment 146744 [details]
Tex file with pgf macros exported by dia
Comment 2 Stanislas Couix 2009-11-02 13:54:33 UTC
Created attachment 146745 [details]
This is how the inital drawing looks in Dia
Comment 3 Stanislas Couix 2009-11-02 13:55:29 UTC
Created attachment 146746 [details]
this how the drawing looks like in pdf built with pdflatex
Comment 4 Hans Breuer 2009-11-02 19:50:33 UTC
This issue is already fixed by 0.97, released about six month ago.

*** This bug has been marked as a duplicate of bug 482173 ***
Comment 5 Steffen Macke 2009-11-02 19:51:39 UTC
Dia 0.97 is part of Ubuntu 9.10 - you may want to upgrade.
Comment 6 Stanislas Couix 2009-11-03 09:30:36 UTC
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 ?
Comment 7 Stanislas Couix 2009-11-03 09:32:06 UTC
Created attachment 146808 [details]
Text not centred verticaly until I add [anchor=base] to the rhombus node
Comment 8 Hans Breuer 2009-11-06 15:39:31 UTC
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.
Comment 9 Stanislas Couix 2009-11-06 16:01:31 UTC
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