Seite 1 von 1

Grafiken mit "Pfeilen" beschriften

Verfasst: So 30. Okt 2011, 17:49
von konze
Hallo zusammen,

ich habe folgendes Problem, ich habe eine Grafik in welcher ich die einzelnen Bestandteile gerne benennen möchte.

Also ein Pfeil darauf und dann ein Namen oder eine Nummer die mit einem Text an anderer Stelle verknüpft ist.

Gibt es diese Möglichkeit?

Ich bin für jeden Tipp dankbar.

Konze

Verfasst: So 30. Okt 2011, 18:52
von bloodworks
Hallo du kannst das mit tikz machen Stichwort: overlay und remember picture. (Oder du machst das alles innerhalb eines tikzpicture dann brauchts das nicht. )

Oder es geht auch mit dem LaTeX Befehlen \put
Zu beiden findest du auch hier im Forum Beispiele. (Forensuche)

Verfasst: Mo 31. Okt 2011, 09:48
von konze
@bloodworks
Danke für den Tipp mit "tikz", ich habe ein schönes Beispiel gefunden: http://www.texample.net/tikz/examples/c ... -graphics/

Aber jetzt habe ich ein neues Problem in den Beispielen, wird immer die Beamer-class verwendet und insbesondere "column" mit dem die Bilder neben den Text gesetzt werden. Wenn man das Beispiel nun in ein "article" übertragen will funktioniert "column" nicht.

Und wenn man versucht statt "column" "minipage" zu verwenden, werden diese untereinander gesetzt.

Mein Test:
\begin{minipage}{0.5\textwidth}
	
	\begin{tikzpicture}
            \node [inner sep=0pt,above right] {\includegraphics[width=4cm]{zelle.png}};
                
           % Zielkoordinaten
            \path (0.7,2) coordinate (zellwand)
                  (2,1.8) coordinate (zellmembran)
	\end{tikzpicture}	
	
\end{minipage}

\begin{minipage}{0.4\linewidth}

	\begin{itemize}
            \item Zellwand \tikz[na] \coordinate (s-zellwand);
            \item Zellmembran \tikz[na] \coordinate (s-zellmembran);
	\end{itemize}

	\begin{tikzpicture}[overlay]
                \path[->,red,thick] (s-zellwand) edge [bend left] (zellwand);
                \path[->,blue,thick] (s-zellmembran) edge [bend left] (zellmembran);
        \end{tikzpicture}

\end{minipage}


Verfasst: Mo 31. Okt 2011, 09:58
von bloodworks
Hallo das nächste Mal bitte mit Minimalbeispiel [2]
\documentclass{article} %
\usepackage{tikz}
\usepackage{verbatim}

\usetikzlibrary{arrows,shapes,backgrounds}

\begin{document}
% For every picture that defines or uses external nodes, you'll have to
% apply the 'remember picture' style. To avoid some typing, we'll apply
% the style to all pictures.
\tikzstyle{every picture}+=[remember picture]
\tikzstyle{na} = [baseline=-.5ex]





    \begin{minipage}{0.4\paperwidth}
        % define source coordinates
        \begin{itemize}
            \item Anode \tikz[na] \coordinate (s-anode);
            \item Cathode \tikz[na] \coordinate (s-cathode);
            \item Saline bridge \tikz[na] \coordinate (s-bridge);
        \end{itemize}
        
    \end{minipage}%Hier kein Umbruch
    \begin{minipage}{0.45\paperwidth}
        % Use a background grid to make it easier to find coordinates
        % When the coordinates have been found, remove the 
        % 'show background grid' option. 
        \tikzstyle{background grid}=[draw, black!50,step=.5cm]
        \begin{tikzpicture}[show background grid]
            % Put the graphic inside a node. This makes it easy to place the
            % graphic and to draw on top of it. 
            % The above right option is used to place the lower left corner
            % of the image at the (0,0) coordinate. 
            \node [inner sep=0pt,above right] 
                {\rule{4cm}{4cm}};
            % show origin
            \fill (0,0) circle (2pt);
            % define destination coordinates
            \path (0.7,2) coordinate (cathode)
                  (2,1.8) coordinate (bridge)
                  (2.75,2.5) coordinate (anode);
        \end{tikzpicture}
    \end{minipage}

% define overlays
% Note the use of the overlay option. This is required when 
% you want to access nodes in different pictures.
\begin{tikzpicture}[overlay]
        \path[->,red,thick] (s-anode) edge [bend left] (anode);
        \path[->,blue,thick] (s-cathode) edge [bend left] (cathode);
        \path[->,red,thick] (s-bridge) edge [out=0, in=-90] (bridge);
\end{tikzpicture}



\end{document}
Ein etwas einfacheres Beispiel:

\documentclass{article} %
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}
             \node [inner sep=0pt,above right] at (5,0)
                {\rule{4cm}{4cm}};
                 \path[->,red,thick, shorten <= 5pt] (0,2) edge [bend left]  (6,2) node {bla};
                 \path[->,blue,thick, shorten <= 7pt] (10,2) edge [bend left]  (7,3) node {bla};
\end{tikzpicture}

\end{document}

Verfasst: Mo 31. Okt 2011, 10:26
von konze
Danke, für die schnelle Hilfe.

(kein Umbruch nach \end{minipage})