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 304974 - Text position error in the exported Tex PSTrick file
Text position error in the exported Tex PSTrick file
Status: RESOLVED FIXED
Product: dia
Classification: Other
Component: exports
0.94
Other Windows
: Normal normal
: 0.95
Assigned To: Dia maintainers
Dia maintainers
Depends on:
Blocks:
 
 
Reported: 2005-05-21 08:53 UTC by Yu Zhuliang
Modified: 2006-01-14 16:08 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Yu Zhuliang 2005-05-21 08:53:45 UTC
Distribution/Version: XP

I am using Dia 0.94 in drawing diagram then exporting them to Tex PsTrick file. 
I found that the exported Tex file has a problem:

When add text object in the diagram, the y-coordinate of the text object in the 
exported PsTrick script is wrong. We must add a negative sign before its y-
corrdinate to get correct result.

This is a example:

........
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}
\psset{linecolor=dialinecolor}
\rput[l](15.000000,12.400000){\scalebox{1 -1}{$y^2_i(k)$}}
\setfont{Helvetica}{0.800000}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}
\psset{linecolor=dialinecolor}
\rput[l](3.495000,9.295000){\scalebox{1
-1}{$y(n)=\sum_{i=1}^Mx_i(n)$}} }\endpspicture 


we must change it to:
........
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}
\psset{linecolor=dialinecolor}
\rput[l](15.000000,-12.400000){\scalebox{1 -1}{$y^2_i(k)$}}
\setfont{Helvetica}{0.800000}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}
\psset{linecolor=dialinecolor}
\rput[l](3.495000,-9.295000){\scalebox{1
-1}{$y(n)=\sum_{i=1}^Mx_i(n)$}} }\endpspicture
Comment 1 Hans Breuer 2005-06-11 19:45:10 UTC
Doing that change would be rather simple, see 
plug-ins/pstricks/render_pstricks.c in
function draw_string()
But I would like to be able to test this change.
Can you provide a working tex file with a short
description ? I'm just getting as far as bug
http://bugzilla.gnome.org/show_bug.cgi?id=166136
describes.

Thanks,
    Hans
Comment 2 Hans Breuer 2006-01-14 16:08:07 UTC
2006-01-14  Hans Breuer  <hans@breuer.org>

	* plug-ins/pstricks/render_pstricks.c(draw_string) : now that I've
	found the nice samples from bug #156171 it was quite simple to
	confirm that the y value need indeed to be inverted. Fixes bug #304974.
	Also special case strings starting with \tex - i.e. dont escape them -
	to keep the use-case of direct tex input.