von bloodworks » Mo 31. Okt 2011, 09:58
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}
Hallo das nächste Mal bitte mit Minimalbeispiel [2]
[code]\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}[/code]
Ein etwas einfacheres Beispiel:
[code]
\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}
[/code]