Hallo! Ich wollte dieses Bsp. bei TikZ.de posten. Allerdings enthält die 3 Warnungen.

Open in Online-Editor
122
Overfull \hbox (5.11084pt too wide) in paragraph at lines 122--122
 [][][][]$  []$
136
Overfull \hbox (6.42406pt too wide) in paragraph at lines 136--136
 [][][][]$[]$
163
Overfull \hbox (108.88939pt too wide) in paragraph at lines 163--164
 [][]

Hat jmd. eine Idee, wie ich diese beseitigen kann?

alt text

Open in Online-Editor
%\documentclass[varwidth, tikz, border=2mm]{standalone}
\documentclass[paper=a4]{scrbook}
%\usepackage[left=1cm, right=1cm]{geometry}

\usepackage{selinput}
\SelectInputMappings{adieresis={ä},  germandbls={ß}}
\usepackage[ngerman]{babel}

\usepackage{bera}
\renewcommand{\familydefault}{\sfdefault}

\usepackage{amsmath}
\usepackage{tikz}
\usepackage{pgfplots}
\usetikzlibrary{shapes,arrows,positioning}

\setlength\arrayrulewidth{0.905pt} 
\begin{document}
% Formeln
\def\KomMWdh{$\displaystyle \!\!\binom{n+k-1}{k}$}
\def\KomOWdh{$\displaystyle \binom{n}{k}$}
\def\VarMWdh{$\displaystyle n^k$}
\def\VarOWdh{$\displaystyle \frac{n!}{(n-k)!}$}
\def\PerMWdh{$\displaystyle \frac{n!}{k_1! k_2! \dots k_s!}$}
\def\PerOWdh{$\displaystyle n!$}

% Define common style
\tikzstyle{common} = [
inner sep = 1.5pt, 
outer sep = 0pt,
line width = \arrayrulewidth, 
font=\footnotesize,
]
% Define block styles
\tikzstyle{start} = [
common, 
rectangle, draw, 
rounded corners = 10pt, 
minimum width=15em,
minimum height=2em,
%text width=5em, 
text centered, 
]
\tikzstyle{decision} = [
common, 
diamond, draw, 
aspect=3.5,     % Höhe reduzieren
minimum width = 5em, 
text width=8.5em, 
text  badly centered, 
node distance=1.5cm, 
inner sep=0pt
]
\tikzstyle{block} = [
common, 
rectangle, draw, 
minimum width =10em, 
minimum height=2em,
%rounded corners, 
%text width=5em, 
text centered, 
font=\bfseries
]
\tikzstyle{block2} = [
block,
minimum width =0.5em, 
minimum height =4em, 
text width=4.5em, 
font=\footnotesize\bfseries
]
\tikzstyle{block3} = [block2, draw=none]
\tikzstyle{line} = [
common, 
->, draw, 
font=\tiny, 
%text=red,  % Test
align = center,
]
\tikzstyle{cloud} = [
common, 
draw, ellipse,fill=red!20, node distance=3cm,
minimum height=2em
]
\tikzstyle{JaNein} = [near start, above] %NodeStyle

\centering \begin{tikzpicture}[node distance = 1.0cm,  > = latex, 
%xshift=-2cm, transform shape
]
% Blöcke
% Start
\node [start] (Start) {Gegeben sei eine $n$-Menge};
\node [decision, below = 0.5cm of Start] (Auswahl) {Liegt eine $k$-Auswahl vor?};
\node[below  = 1.25cm of Auswahl](LeerAuswahl){};
% Reihenfolge
\node [decision, left  = 1.5cm of LeerAuswahl] (Reihenfolge) {Ist die Reihenfolge zu berücksichtigen?};
\node[below  = 1.25cm of Reihenfolge](LeerReihenfolge){};
\node [block, right  = 1.25cm of LeerReihenfolge] (Variation) {Variation};
\def\Unterscheidbar{Elemente unterscheidbar (mehrfach)?}
\node [decision, below  = 1.0cm of Variation, aspect=1.5, text width=6em] (VariationEntscheidung) {\Unterscheidbar};
% Kombination
\def\MWdh{\emph{mit} \\ Wieder-\\holung}
\def\OWdh{\emph{ohne} \\ Wieder-\\holung}
\node [block, left  = 1.25cm of LeerReihenfolge] (Kombination) {Kombination};
\node [decision, below  = 1.0cm of Kombination, aspect=1.5, text width=6em] (KombinationEntscheidung) {\Unterscheidbar};
\node[below = 1cm of KombinationEntscheidung](LeerKombination){};
\node[block2, left = 1.25cm of LeerKombination](KombinationMWdh){\MWdh};
\node[block3, below = 0.25cm of KombinationMWdh]{\KomMWdh};
\node[block2, right = 1.25cm of LeerKombination](KombinationOWdh){\OWdh};
\node[block3, below = 0.25cm of KombinationOWdh]{\KomOWdh};
%Variation
\node[below = 1cm of VariationEntscheidung](LeerVariation){};
\node[block2, left = 1.25cm of LeerVariation](VariationMWdh){\MWdh};
\node[block3, below = 0.25cm of VariationMWdh]{\VarMWdh};
\node[block2, right = 1.25cm of LeerVariation](VariationOWdh){\OWdh};
\node[block3, below = 0.25cm of VariationOWdh](VariationOWdhFormel){\VarOWdh};
% Permutation
\node [block, right  = 2.75cm of Variation] (Permutation) {Permutation};
\node [decision, below  = 1.0cm of Permutation, aspect=1.5, text width=6em] (PermutationEntscheidung) {\Unterscheidbar};
\node[below = 1cm of PermutationEntscheidung](LeerPermutation){};
\node[block2, left = 1.25cm of LeerPermutation](PermutationMWdh){\MWdh};
\node[block3, below = 0.25cm of PermutationMWdh]{\PerMWdh};
\node[block2, right = 1.25cm of LeerPermutation](PermutationOWdh){\OWdh}; 
\node[block3, below = 0.25cm of PermutationOWdh](PermutationOWdhFormel){\PerOWdh};
% Sonderfall k=n
\node[block2,  below = 3.75cm of PermutationEntscheidung, text width=8em, minimum height =2.75em, xshift=-0.75cm, font=\footnotesize](Sonderfall){Sonderfall $k=n$ \\ (wobei $0! := 1$)};
% Linien
% Start
\path[line] (Start) -- (Auswahl);
% Reihenfolge
\path[line] (Auswahl) -| (Reihenfolge) node [JaNein] {ja};
%Kombination
\path[line] (Reihenfolge) -| (Kombination) node [JaNein] {ja} node [near end, left] {\emph{mit} \\Reihen-\\folge};
\path[line] (Kombination) -- (KombinationEntscheidung);
\path[line] (KombinationEntscheidung) -| (KombinationMWdh) node[JaNein]{ja};
\path[line] (KombinationEntscheidung) -| (KombinationOWdh)  node[JaNein]{nein};
%Variation
\path[line] (Reihenfolge) -| (Variation) node [JaNein] {nein} node[near end, right] {\emph{ohne} \\Reihen-\\folge};
\path[line] (Variation) -- (VariationEntscheidung);
\path[line] (VariationEntscheidung) -| (VariationMWdh) node[JaNein]{ja};
\path[line] (VariationEntscheidung) -| (VariationOWdh) node[JaNein]{nein};
% Permutation
\path[line] (Auswahl.east) -| (Permutation) node [JaNein] {nein};
\path[line] (Permutation) -- (PermutationEntscheidung);
\path[line] (PermutationEntscheidung) -| (PermutationMWdh) node[JaNein]{ja};
\path[line] (PermutationEntscheidung) -| (PermutationOWdh) node[JaNein]{nein};
% Sonderfall k=n
\path[line]  (VariationOWdhFormel) |- (Sonderfall) -|  (PermutationOWdhFormel);
\end{tikzpicture}

\end{document}

gefragt 01 Feb '16, 20:20

cis's gravatar image

cis
9.5k75452491
Akzeptiert-Rate: 29%

bearbeitet 07 Feb '16, 11:30

saputello's gravatar image

saputello
11.1k154365

1

Ich erhalte eine Warnung und drei overfull boxes. Die erste Warnung kann ich ganz leicht entfernen, indem ich einfach schreibe was in der Warnung steht.

(01 Feb '16, 20:26) Johannes

Wie? Ich habe mal die Warnungen ergänzt, die ich erhalte.

(01 Feb '16, 20:29) cis

Um die Warnung bezüglich compat zu entfernen, kannst Du entweder den Wert setzen oder besser/einfacher auf das nicht benötigte Paket pgfplots einfach zu verzichten. Die beiden Formeln für die Kombination bzw. Permutation mit Wiederholung brauchen mehr Breite als Du ihnen mit text width zugestehst. Und Deine Zeichnung ist insgesamt zu breit für den Textbereich im Hochformat. Wenn Du pdflscape lädst, kannst Du die Zeichnung in eine landscape Umgebung setzen. Dann musst Du zwar vermutlich die vertikalen Abstände etwas verkleinern, aber da sind ja noch Reserven vorhanden.

(02 Feb '16, 23:18) esdd
1

Wenn Du die Abstände anpassen musst, ist allerdings von Nachteil, dass Du da viele einzelne Werte fest eingegeben hast, also nicht an einer Stelle anpassen kannst. Außerdem ist \tikzstyle veraltete Syntax.

(02 Feb '16, 23:22) esdd

Ja, die Werte absolut einzugeben war blöd, aber irgendwie wurde es sonst nur noch größer.

(03 Feb '16, 17:47) cis

Du kannst einen Elefanten nicht in eine Handtasche pressen. Entweder du machst den Elefanten kleiner, oder die Tasche größer. Was bedeutet overfull hbox?

Permanenter link

beantwortet 01 Feb '16, 21:27

Johannes's gravatar image

Johannes
7.3k294566
Akzeptiert-Rate: 43%

Deine Antwort
Vorschau umschalten

Folgen dieser Frage

Per E-Mail:

Wenn sie sich anmelden, kommen Sie für alle Updates hier in Frage

Per RSS:

Antworten

Antworten und Kommentare

Markdown-Grundlagen

  • *kursiv* oder _kursiv_
  • **Fett** oder __Fett__
  • Link:[Text](http://url.com/ "Titel")
  • Bild?![alt Text](/path/img.jpg "Titel")
  • nummerierte Liste: 1. Foo 2. Bar
  • zum Hinzufügen ein Zeilenumbruchs fügen Sie einfach zwei Leerzeichen an die Stelle an der die neue Linie sein soll.
  • grundlegende HTML-Tags werden ebenfalls unterstützt

Frage-Themen:

×728
×13
×1

gestellte Frage: 01 Feb '16, 20:20

Frage wurde gesehen: 14,767 Mal

zuletzt geändert: 07 Jul '16, 15:08