0

I'm using dia.exe to produce graphics which I can use with texstudio. I'm already able to include them without a problem but there are other problems which I can not solve.

Dia graphic

If I export this and include it into texstudio the fonts become really really small. Also the formulas are not displayed correctly. Is there a special way to write formulas with math mode in dia? This is the output in my pdf Output in PDF

I know I can change the text to formulas if I delete the "\" but I want to get it automatically from dia. This is the tex file from dia :

e\ifx\setlinejoinmode\undefined

 \newcommand{\setlinejoinmode}[1]{}
\fi
\ifx\setlinecaps\undefined
  \newcommand{\setlinecaps}[1]{}

\fi
% This way define your own fonts mapping (for example with ifthen)
\ifx\setfont\undefined
  \newcommand{\setfont}[2]{}

\fi
\pspicture(-3.295722,-6.084993)(12.059877,-2.742428)
\psscalebox{0.183607 -0.183607}{
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\newrgbcolor{diafillcolor}{1.000000 1.000000 1.000000}%
\psset{fillcolor=diafillcolor}
\newrgbcolor{dialinecolor}{1.000000 1.000000 1.000000}%
\psset{linecolor=dialinecolor}
\pspolygon*(15.152800,15.025100)(15.152800,19.965286)(28.562312,19.965286)(28.562312,15.025100)
\psset{linewidth=0.100000cm}
\psset{linestyle=solid}
\psset{linestyle=solid}
\setlinejoinmode{0}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\pspolygon(15.152800,15.025100)(15.152800,19.965286)(28.562312,19.965286)(28.562312,15.025100)
\setfont{Helvetica-Bold}{1.587500}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\rput(21.857556,17.177693){\psscalebox{1 -1}{Wavelet Packet}}
\setfont{Helvetica-Bold}{1.587500}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\rput(21.857556,18.765193){\psscalebox{1 -1}{Transformation}}
\newrgbcolor{dialinecolor}{1.000000 1.000000 1.000000}%
\psset{linecolor=dialinecolor}
\pspolygon*(41.012400,14.986400)(41.012400,19.942498)(55.859408,19.942498)(55.859408,14.986400)
\psset{linewidth=0.100000cm}
\psset{linestyle=solid}
\psset{linestyle=solid}
\setlinejoinmode{0}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\pspolygon(41.012400,14.986400)(41.012400,19.942498)(55.859408,19.942498)(55.859408,14.986400)
\setfont{Helvetica-Bold}{1.587500}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\rput(48.435904,17.146949){\psscalebox{1 -1}{Teager Energie }}
\setfont{Helvetica-Bold}{1.587500}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\rput(48.435904,18.734449){\psscalebox{1 -1}{Operator}}
\newrgbcolor{dialinecolor}{1.000000 1.000000 1.000000}%
\psset{linecolor=dialinecolor}
\pspolygon*(-9.098480,26.020700)(-9.098480,30.869950)(9.104020,30.869950)(9.104020,26.020700)
\psset{linewidth=0.100000cm}
\psset{linestyle=solid}
\psset{linestyle=solid}
\setlinejoinmode{0}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\pspolygon(-9.098480,26.020700)(-9.098480,30.869950)(9.104020,30.869950)(9.104020,26.020700)
\setfont{Helvetica-Bold}{1.587500}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\rput(0.002770,28.127825){\psscalebox{1 -1}{Schwellwert Vergleich mit }}
\setfont{Helvetica-Bold}{1.587500}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\rput(0.002770,29.715325){\psscalebox{1 -1}{SAKF jedes Segmentes}}
\newrgbcolor{dialinecolor}{1.000000 1.000000 1.000000}%
\psset{linecolor=dialinecolor}
\pspolygon*(16.070400,25.517400)(16.070400,31.379900)(32.260442,31.379900)(32.260442,25.517400)
\psset{linewidth=0.100000cm}
\psset{linestyle=solid}
\psset{linestyle=solid}
\setlinejoinmode{0}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\pspolygon(16.070400,25.517400)(16.070400,31.379900)(32.260442,31.379900)(32.260442,25.517400)
\setfont{Helvetica-Bold}{1.587500}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\rput(24.165421,27.337400){\psscalebox{1 -1}{Schwellwert-}}
\setfont{Helvetica-Bold}{1.587500}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\rput(24.165421,28.924900){\psscalebox{1 -1}{ermittlung in den}}
\setfont{Helvetica-Bold}{1.587500}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\rput(24.165421,30.512400){\psscalebox{1 -1}{ersten 40 ms}}
\newrgbcolor{dialinecolor}{1.000000 1.000000 1.000000}%
\psset{linecolor=dialinecolor}
\pspolygon*(41.240800,26.070200)(41.240800,30.946662)(55.011160,30.946662)(55.011160,26.070200)
\psset{linewidth=0.100000cm}
\psset{linestyle=solid}
\psset{linestyle=solid}
\setlinejoinmode{0}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\pspolygon(41.240800,26.070200)(41.240800,30.946662)(55.011160,30.946662)(55.011160,26.070200)
\setfont{Helvetica-Bold}{1.587500}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\rput(48.125980,28.984681){\psscalebox{1 -1}{Autokorrelation}}
\psset{linewidth=0.300000cm}
\psset{linestyle=solid}
\psset{linestyle=solid}
\setlinecaps{0}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\psline(6.162930,17.508300)(14.393782,17.501426)
\psset{linestyle=solid}
\setlinejoinmode{0}
\setlinecaps{0}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\pspolygon*(14.768782,17.501113)(14.268991,17.751531)(14.393782,17.501426)(14.268574,17.251531)
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\pspolygon(14.768782,17.501113)(14.268991,17.751531)(14.393782,17.501426)(14.268574,17.251531)
\psset{linewidth=0.300000cm}
\psset{linestyle=solid}
\psset{linestyle=solid}
\setlinecaps{0}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\psline(28.562300,17.495200)(40.252272,17.477112)
\psset{linestyle=solid}
\setlinejoinmode{0}
\setlinecaps{0}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\pspolygon*(40.627272,17.476531)(40.127659,17.727305)(40.252272,17.477112)(40.126886,17.227305)
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\pspolygon(40.627272,17.476531)(40.127659,17.727305)(40.252272,17.477112)(40.126886,17.227305)
\newrgbcolor{dialinecolor}{1.000000 1.000000 1.000000}%
\psset{linecolor=dialinecolor}
\pspolygon*(-9.914570,15.033300)(-9.914570,19.983300)(6.162930,19.983300)(6.162930,15.033300)
\psset{linewidth=0.100000cm}
\psset{linestyle=solid}
\psset{linestyle=solid}
\setlinejoinmode{0}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\pspolygon(-9.914570,15.033300)(-9.914570,19.983300)(6.162930,19.983300)(6.162930,15.033300)
\setfont{Helvetica-Bold}{1.587500}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\rput(-1.875820,17.190800){\psscalebox{1 -1}{Aufteilen des Audios in }}
\setfont{Helvetica-Bold}{1.587500}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\rput(-1.875820,18.778300){\psscalebox{1 -1}{Segmente (16ms)}}
\psset{linewidth=0.300000cm}
\psset{linestyle=solid}
\psset{linestyle=solid}
\setlinejoinmode{0}
\setlinecaps{0}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\psline(55.859400,17.464400)(56.909400,17.464400)(56.909400,28.508400)(55.721610,28.508400)
\psset{linestyle=solid}
\setlinejoinmode{0}
\setlinecaps{0}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\pspolygon*(55.346610,28.508400)(55.846610,28.258400)(55.721610,28.508400)(55.846610,28.758400)
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\pspolygon(55.346610,28.508400)(55.846610,28.258400)(55.721610,28.508400)(55.846610,28.758400)
\psset{linewidth=0.300000cm}
\psset{linestyle=solid}
\psset{linestyle=solid}
\setlinecaps{0}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\psline(41.240800,28.508400)(32.970808,28.488969)
\psset{linestyle=solid}
\setlinejoinmode{0}
\setlinecaps{0}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\pspolygon*(32.595809,28.488088)(33.096395,28.239264)(32.970808,28.488969)(33.095221,28.739262)
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\pspolygon(32.595809,28.488088)(33.096395,28.239264)(32.970808,28.488969)(33.095221,28.739262)
\psset{linewidth=0.300000cm}
\psset{linestyle=solid}
\psset{linestyle=solid}
\setlinecaps{0}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\psline(16.070400,28.448700)(9.814430,28.445737)
\psset{linestyle=solid}
\setlinejoinmode{0}
\setlinecaps{0}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\pspolygon*(9.439430,28.445559)(9.939549,28.195796)(9.814430,28.445737)(9.939312,28.695796)
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\pspolygon(9.439430,28.445559)(9.939549,28.195796)(9.814430,28.445737)(9.939312,28.695796)
\psset{linewidth=0.300000cm}
\psset{linestyle=solid}
\psset{linestyle=solid}
\setlinecaps{0}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\psline(-17.799600,17.537400)(-10.674953,17.524380)
\psset{linestyle=solid}
\setlinejoinmode{0}
\setlinecaps{0}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\pspolygon*(-10.299954,17.523695)(-10.799496,17.774608)(-10.674953,17.524380)(-10.800410,17.274609)
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\pspolygon(-10.299954,17.523695)(-10.799496,17.774608)(-10.674953,17.524380)(-10.800410,17.274609)
\psset{linewidth=0.300000cm}
\psset{linestyle=solid}
\psset{linestyle=solid}
\setlinecaps{0}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\psline(-9.148208,28.454190)(-16.397190,28.461212)
\psset{linestyle=solid}
\setlinejoinmode{0}
\setlinecaps{0}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\pspolygon*(-16.772190,28.461575)(-16.272432,28.211091)(-16.397190,28.461212)(-16.271948,28.711091)
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\pspolygon(-16.772190,28.461575)(-16.272432,28.211091)(-16.397190,28.461212)(-16.271948,28.711091)
\setfont{Helvetica}{1.587500}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\rput[l](-15.846200,16.530400){\psscalebox{1 -1}{Audio}}
\setfont{Helvetica}{0.800000}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\rput[l](10.300200,15.674400){\psscalebox{1 -1}{}}
\setfont{Helvetica}{1.587500}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\rput[l](9.200220,16.474400){\psscalebox{1 -1}{X(n)}}
\setfont{Helvetica}{0.800000}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\rput[l](34.199700,15.674400){\psscalebox{1 -1}{}}
\setfont{Helvetica}{1.587500}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\rput[l](31.349700,16.524400){\psscalebox{1 -1}{\$W\_\}j,m\}(n)\$  }}
\setfont{Helvetica}{0.800000}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\rput[l](58.356600,22.378700){\psscalebox{1 -1}{}}
\setfont{Helvetica}{1.587500}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\rput[l](58.155600,24.303600){\psscalebox{1 -1}{\$T\_\}j,m\}(n)\$}}
\setfont{Helvetica}{0.800000}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\rput[l](37.931600,32.105000){\psscalebox{1 -1}{}}
\setfont{Helvetica}{0.800000}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\rput[l](35.402800,31.002700){\psscalebox{1 -1}{}}
\setfont{Helvetica}{1.587500}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\rput[l](32.348800,32.473700){\psscalebox{1 -1}{\$SAKF\_\}j,m\}(n)\$}}
\setfont{Helvetica}{0.800000}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\rput[l](10.827900,30.629800){\psscalebox{1 -1}{}}
\setfont{Helvetica}{1.587500}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\rput[l](7.968390,32.878900){\psscalebox{1 -1}{\$SAKF\_\}j,m\}(n)\$}}
\setfont{Helvetica}{1.587500}
\newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000}%
\psset{linecolor=dialinecolor}
\rput[l](-14.790900,30.674300){\psscalebox{1 -1}{SAE}}
}\endpspicturenter code here

Thanks!

  • This would be simpler to do directly with pstricks, more precisely with the psmatrix environment from pst-node. – Bernard Nov 3 '17 at 11:18
  • Thanks for your answer. I don't have this much time to learn psmatrix, that is the reason why I use a gui. – s kop Nov 3 '17 at 11:19
  • I'll try to post a sketch as soon as possible. pstricks is not very hard to get in, as it is a set of LaTeX commands and environments which interface with PostScript, and is well documented, with many examples – Bernard Nov 3 '17 at 11:38
  • Thanks I'll look it up after I finished writing my thesis :) – s kop Nov 3 '17 at 13:12
1

Here is a code with pstricks:

\documentclass[a4paper,german, x11names]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage[hmargin=2cm]{geometry}

\usepackage{pst-node}
\usepackage{auto-pst-pdf}

\newcommand\framenode[2]{\Rnode{#1}{\psframebox{\parbox{3.2cm}{\centering\bfseries#2}}}}

\begin{document}

\psset{framesep =5pt, arrows =->, arrowinset= 0.12, arrowsize = 6pt, linejoin=1, shortput=nab, npos=0.4}
\sffamily\small\noindent\sansmath
\begin{psmatrix}[rowsep=1.2, colsep=2, mnode =r]%
%%% nodes
\pnode{Beg} & \framenode{A}{Aufteilen des Audios \\ in Segmente (16 ms)} & \framenode{B}{Wavelet Packet \\ Transformation} & \framenode{C}{Teager Energie \\ Operator} \\
\pnode{End} & \framenode{F}{Schwellwert Vergleich mit SAKF\\ jedes Segmentes} & \framenode{E}{Schellwertermittlung\\ in den ersten 40 ms} & \framenode{D}{Autokorrelation}
%%% nodes connections
\ncline{Beg}{A}\naput[npos=0.4]{Audio}
\ncline{A}{B}^{$ \mathsf{X(n) }$}
\ncline{B}{C}^{$ \mathsf{W_{j, m}(n)} $}
\ncbar[linearc=0.15, arm =5mm]{C}{D}\naput[labelsep=0.5em, npos=1.5]{$ T_{j, m}(n) $}
\ncline{D}{E}_{$\mathsf{SAKF_{j, m}(n)} $}
\ncline{E}{F}_{$\mathsf{SAKF_{1, m}(n)} $}
\ncline{F}{End}\nbput[npos=0.5]{SAE}
\end{psmatrix}

\end{document} 

enter image description here

  • Is there an option to scale the boxes with equal height? I tried several things but nothing workes for me.... – s kop Dec 4 '17 at 14:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.