Dia and TeX: PSTricks and PGF export



Hi all,

First I want to thank you for this very usefull program!
Here's my issue: I'm trying to export a diagram and use it in a TeX document, and I want nice TeX mathematical formulas to appear there. I tried both PSTricks and PGF export formats, and it appears to me that both are buggy... Here is the problem on a simple example:

1) I draw an arrow and call it $\overrightarrow{e_\theta}$ in a textbox.

2) I export the diagram (PSTricks or PGF) and include it in my TeX document. The arrow is fine but the text is displayed "$\overrightarrow{e_\theta}$" with the "$" the backslash and all the stuff...

3) To display it properly, I have to edit the Diagram.tex file generated by Dia and make these changes:
- In the PSTricks output, replace
\rput[l](12.000000,15.000000){\psscalebox{1 -1}{\$\textbackslash{}overrightarrow\}e\_\textbackslash{}theta\}\$}}
by
\rput[l](12.000000,15.000000){\psscalebox{1 -1}{$\overrightarrow{e_\theta}$}}
- In the PGF output, replace
\node[anchor=west] at (12.000000\du,15.000000\du){\$\ensuremath{\backslash}overrightarrow\{e\_\ensuremath{\backslash}theta\}\$};
by
\node[anchor=west] at (12.000000\du,15.000000\du){$\overrightarrow{e_\theta}$};

Maybe I'm doing something wrong in Dia, but now that I've found this workaround I have to say it's quite a pain to do it for all math formulas in all diagrams... So I'd like to know whether you can give me a hint or change a piece of code in the next Dia version!

I attached to this message the Dia file and both outputs (with my edits), however I don't know whether attachments are allowed in the mailing list. Please tell me if you need something more!

Regards,

A.Bourgeois

Attachment: Diagramme1.dia
Description: application/dia

Attachment: Diagramme1_PGF.tex
Description: Text document

Attachment: Diagramme1_PSTricks.tex
Description: Text document



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]