Seite 1 von 1

Tikz png exportieren

Verfasst: Mo 12. Jan 2015, 16:04
von Kaeseknacker
Hallo,

ich würde gerne ein Float Chart, das ich mit tikz erstellt habe, als .png oder ähnliches exportieren, damit ich die Grafik in meiner Powerpoint Präsentation verwenden kann.
Habe dazu auch schon Beispiele im Internet gefunden und folgendes Minimalbeispiel erstellt:
\documentclass{scrartcl}

\usepackage[latin1]{inputenc}		%Fuer ae, oe, ue und
\usepackage[T1]{fontenc}			%damit diese richtig im PDF dargestellt werden

\usepackage[ngerman]{babel}			%Fuer deutsche Formatierung: Datum, ", ... 
\usepackage{babelbib}

\usepackage{tikz}
\usetikzlibrary{external} 
 \tikzexternalize
 
\tikzstyle{decision} = [diamond, aspect=2.1, text width=2cm, text centered, draw=black, fill=green!30, execute at begin node=\footnotesize]
\tikzstyle{startstop} = [rectangle, rounded corners, minimum width=2.5cm, minimum height=1cm,text centered, draw=black, fill=red!30, execute at begin node=\footnotesize]
\tikzstyle{io} = [trapezium, trapezium left angle=70, trapezium right angle=110, minimum width=3cm, minimum height=1cm, text centered, text width=2.3cm, draw=black, fill=blue!30, execute at begin node=\footnotesize]
\tikzstyle{process} = [rectangle, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=orange!30, execute at begin node=\footnotesize]

\tikzstyle{arrow} = [thick,->,>=stealth]

\begin{document}

\tikzsetnextfilename{FloatChart}
\begin{tikzpicture}[node distance=2cm]

\node (start) [startstop] {Start};
\node (pro1) [process, left of=start, xshift=-2cm] {pro1};
\node (pro2) [process, left of=pro1, xshift=-4cm] {pro2};
\node (pro3) [process, below of=pro2] {pro3};
\node (pro4) [process, below of=pro3] {pro4};
\node (dec1) [decision, below of=pro4, yshift=-0.5cm] {erste Entscheidung};
\node (pro5) [process, below of=dec1, yshift=-0.5cm] {pro5};
\node (pro6) [process, below of=pro5, xshift=3cm] {pro6};
\node (dec2) [decision, right of=dec1, xshift=4cm] {zweite Entscheidung};
\node (dec3) [decision, right of=pro5, xshift=4cm] {dritte Entscheidung};
\node (stop) [startstop, right of=dec2, xshift=2cm] {Ende};

\draw [arrow] (start) -- (pro1);
\draw [arrow] (pro1) -- (pro2);
\draw [arrow] (pro2) -- (pro3);
\draw [arrow] (pro3) -- (pro4);
\draw [arrow] (pro4) -- (dec1);
\draw [arrow] (dec1) -- (dec2) node[pos=0.2, anchor=south, execute at begin node=\footnotesize] {Nein};
\draw [arrow] (dec1) -- (pro5) node[pos=0.3, anchor=west, execute at begin node=\footnotesize] {Ja};
\draw [arrow] (pro5) |- (pro6);
\draw [arrow] (pro6) -| (dec3);
\draw [arrow] (dec2) -- (stop) node[pos=0.3, anchor=south, execute at begin node=\footnotesize] {Ja};
\draw [arrow] (dec2) |- (pro3) node[pos=0.1, anchor=west, execute at begin node=\footnotesize] {Nein};
\draw [arrow] (dec3) -| (stop) node[pos=0.1, anchor=south, execute at begin node=\footnotesize] {Ja};
\draw [arrow] (dec3) -- (dec2) node[pos=0.3, anchor=west, execute at begin node=\footnotesize] {Nein};

\end{tikzpicture}

\end{document}
Das ganze würde ich jetzt gerne aus dem Texmaker starten, nur weis ich nicht welche Option hier richtig ist (Schnelles Übersetzen, LaTeX, Dvi -> PS, ...).
Für meine standard Dokumente nutze ich immer das Schnelle Übersetzen, was mir das PDF liefert und auch alles ok ist.
Bei obigem MB treten aber Fehler auf. Hab die anderen Optionen auch alle mal durchprobiert - manche laufen durch, andere liefern wiederum Fehler.
Teilweise wird auch ein .ps oder .pdf File erstellt, worin die Rauten aber als Quader dargestellt werden:
\tikzstyle{decision} = [diamond, aspect=2.1, text width=2cm, text centered, draw=black, fill=green!30, execute at begin node=\footnotesize]
Meine Fagen sind nun folgende:
1. was ist die richtige Option/der richtige Weg zum exportieren des Float Charts als .png mit Texmaker
2. warum wird die Raute nicht richtig dargestellt?

Vielen Dank und Gruß
Käseknacker

Verfasst: Mo 12. Jan 2015, 16:16
von Johannes_B
Dokumentclass standalone kennt ein simples user interface zum Export nach png. Aber warum? Kann powerpoint kein pdf?


Wenn es nur um ein einzelnes Bild geht, kannst du das auch mit einem Bildbearbeitungsprogramm deiner Wahl von Hand machen.
Und wenn du den Qualitätsverlust durch umwandeln in ein Rasterformat in Kauf nimmst, kannst du auch auf die Grafik zoomen und nen Screenshot erstellen.