Linie durch Pfeile (tikz) Thema ist als GELÖST markiert

Tabellen und Grafiken erstellen und anordnen


basti-fantasti-48
Forum-Century
Forum-Century
Beiträge: 214
Registriert: So 4. Apr 2021, 14:27

Linie durch Pfeile (tikz)

Beitrag von basti-fantasti-48 »

\documentclass[
11pt,					% Schriftgröße
paper=a4,
DIV=13,				% Seitenlayout (Satzspiegel)
parskip=half,			% Abstand zwischen Absätzen
%twoside,				% Doppelseitig
%openright,			% neues Kapitel rechts
%  cleardoublepage,
bibtotoc,				% Literaturverzeichis in Inhaltsverzeichnis
headsepline,			% Kopfzeilentrennlinie
headings,	
%  draft,				% Korrekturfassung
]{scrreprt}		% scrartcl	

% Eingabecodierung
\usepackage[utf8]{inputenc}

% Schriftcodierung
\usepackage[T1]{fontenc}

% Sprachraum
\usepackage[ngerman]{babel}

% Blindtext
\usepackage{blindtext}

% Schrifteinstellungen
\usepackage{lmodern} 		% Vektorschrift
\renewcommand{\familydefault}{\sfdefault} % Serifenlose Schrift
%\usepackage{sansmath}  	% Mathe-Schrift ohne Serifen
%\sansmath 							% aktiviert serifenlose Matheschrift
\usepackage{microtype}	% harmonische Typenverteilung
%\usepackage{hyperref}

% Literatur einbinden
\usepackage{csquotes}	% Steuerung der Anführungszeichen
\usepackage[
backend=biber,			% Sortier-Compiler
style=numeric-comp,	% Zitationsstil
block=ragged,
]{biblatex}

\addbibresource{ref/Bibliothek.bib}

\usepackage{booktabs}

% Mathemodus
\usepackage{amsmath,amssymb}

% Trennung
\hyphenation{Crash-zo-ne}

% Bilder einbinden
\usepackage{graphicx}
\graphicspath{{bilder/}}
\usepackage{svg}

% Kopf- und Fußzeile
\usepackage[headsepline,automark]{scrlayer-scrpage}
\clearpairofpagestyles
\ihead{\rightmark}
\cfoot{\pagemark}
\renewcommand*\chaptermarkformat{}
\renewcommand*\chapterpagestyle{scrheadings}

%Nummerierung durchgehend im gesamten Dokument
\usepackage{chngcntr}% Nummerierung ohne Kapitel 
\counterwithout{equation}{section} 
\counterwithout{equation}{chapter}
\counterwithout{figure}{section}
\counterwithout{figure}{chapter}
\counterwithout{table}{section}
\counterwithout{table}{chapter}


\usepackage{pgfkeys}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric, arrows}

\usepackage{struktex}

\tikzstyle{startstop} = [rectangle, rounded corners, 
minimum width=3cm, 
minimum height=1cm,
text centered, 
draw=black, 
fill=red!30]

\tikzstyle{io} = [trapezium, 
trapezium stretches=true, % A later addition
trapezium left angle=70, 
trapezium right angle=110, 
minimum width=3cm, 
minimum height=1cm, text centered, 
draw=black, fill=blue!30]

\tikzstyle{process} = [rectangle, 
minimum width=3cm, 
minimum height=1cm, 
text centered, 
text width=3cm, 
draw=black, 
fill=orange!30]

\tikzstyle{decision} = [diamond, 
minimum width=3cm, 
minimum height=1cm, 
text centered, 
draw=black, 
fill=green!30]
\tikzstyle{arrow} = [thick,->,>=stealth]
\usepackage{pgfplots}\pgfplotsset{compat=newest}
\usetikzlibrary{arrows.meta,positioning,calc}

%für lange Tabelle
\usepackage{longtable} 
\usepackage{algorithm}
\usepackage{algpseudocode}
\usepackage[export]{adjustbox}
% für tikz
\pgfplotsset{select coords between index/.style 2 args={
		x filter/.code={
			\ifnum\coordindex<#1\def\pgfmathresult{}\fi
			\ifnum\coordindex>#2\def\pgfmathresult{}\fi
		}
}}
\usepackage{subcaption}
\usepackage{pdfpages}
\usepackage{acronym}%abkürzung
\usetikzlibrary{arrows, decorations.markings}
\makeatletter
\tikzset{
	nomorepostaction/.code=\makeatletter\let\tikz@postactions\pgfutil@empty,
	my axis/.style={
		postaction={
			decoration={
				markings,
				mark=at position 1 with {
					\arrow[ultra thick]{latex}
				}
			},
			decorate,
			nomorepostaction
		},
		thin,
		-, % switch off other arrow tips
		every path/.append style=my axis % this is necessary
		%so it works both with "axis lines=left" and "axis lines=center"
	}
}

% 
\usepackage{adjustbox}
\makeatother


\usepackage{multirow}
%\usepackage{multicolumn}



% Unterschrift
\newcommand*{\signature}{
	\hspace{7.3cm} %verschiebt Überschrift ganz nach rechts xDD
	\includegraphics[height=1.2cm]{unterschrift/unterschrift.pdf}%high 1,2cm
	%\flushright
}

\renewcommand*{\chapterheadstartvskip}{\vspace*{-1\baselineskip}}% Abstand einstellen
\renewcommand*\chapterheadendvskip{%
	\vspace*{1\baselineskip plus -1\baselineskip minus .167\baselineskip}}

\begin{document}

	

\begin{figure}[H]
	
	\begin{tikzpicture}[node distance=2.5cm]
		
		\node (pro1) [process, minimum width=3cm, fill=white, text width=3cm] 
		{pro1};
		
		\node (pro2) [process, below of= pro1,minimum height=1.5cm,minimum width=3cm, fill=white, text width=3cm] {pro2};
	
		
		\node (pro4) [process,  right of=pro2, xshift=1.8cm, fill=white] 
		{pro4};
		
		\node (pro5) [process, below of= pro4, fill=white, yshift = -1.8cm] 
		{pro5};
		
		\node (pro6) [process,right of= pro4,xshift=3.5cm, fill=white,minimum width=3.8cm, minimum height=1cm,text width=3.8cm] 
		{pro6};
		
		\node (pro7) [process, below of= pro5, ellipse, fill=white,yshift=-1cm, minimum width=2.5cm, minimum height=1cm] {pro7};
		
	
		
		\node (pro9) [process,below of= pro6, fill=white,minimum width=3.8cm, minimum height=1cm,text width=3.8cm, yshift=-2cm] 
		{pro9};
		
		\node (pro10) [process, below of= pro9, ellipse, fill=white,yshift=-1cm] 
	{	pro10};
		
		
		
		
		% Pfeile
	
	
		\draw [arrow] (pro4) --  node[anchor=south] {nein}(pro6);
		
	
		\draw [arrow] (pro7.east) -- ++(0.2cm,0) |- ++(0,7.8cm) node[right, yshift=-2cm] {ja};
	
		
	\end{tikzpicture}

	
\end{figure}
\end{document}
hallo mein Pfeil (von pro7) geht nach der Pfeilspitze noch weiter. Wie löse ich das? Zuerst hatte ich [->] anstatt [arrow] da passt es. Aber ich will gleiche Pfeile

Benutzeravatar
Stefan Kottwitz
Admin
Admin
Beiträge: 2759
Registriert: Di 8. Jul 2008, 00:39
Kontaktdaten:

Re: Linie durch Pfeile (tikz)

Beitrag von Stefan Kottwitz »

Du könntest die Pfeilspitze als postaction/decoration definieren:
\tikzstyle{arrow} = [thick, postaction={decorate,
  decoration={markings, mark=at position 1 with {\arrow{stealth};}}}]
Oder mit der neueren Syntax stattdessen:
\tikzset{arrow/.style = {thick, postaction={decorate,
  decoration={markings, mark=at position 1 with {\arrow{stealth};}}}}}
Stefan

basti-fantasti-48
Forum-Century
Forum-Century
Beiträge: 214
Registriert: So 4. Apr 2021, 14:27

Re: Linie durch Pfeile (tikz)

Beitrag von basti-fantasti-48 »

ändert nichts bei mir. Habe es in der Präambel

Benutzeravatar
Stefan Kottwitz
Admin
Admin
Beiträge: 2759
Registriert: Di 8. Jul 2008, 00:39
Kontaktdaten:

Re: Linie durch Pfeile (tikz)

Beitrag von Stefan Kottwitz »

Dann machst Du irgendwas anders, denn bei mir geht es, und sieht wie folgt aus:
pfeile.png
Stefan

basti-fantasti-48
Forum-Century
Forum-Century
Beiträge: 214
Registriert: So 4. Apr 2021, 14:27

Re: Linie durch Pfeile (tikz)

Beitrag von basti-fantasti-48 »

mit der zweiten Lösung passt es. Erste komischerweise nicht aber eine reicht mir ja xd. danke

Antworten