use parskip=half
and not half*
:
\documentclass[11pt, a4paper,
parskip=half,% <=====
bibliography=totoc,
final,
numbers=noenddot]{scrartcl}
Read the documentation of KOMA-Script for the difference.
The tikzpicture
environment only takes one optional argument. I.e., if LaTeX sees a [
after \begin{tikzpicture}
, it grabs everything up to the first ]
it sees, and that is the options for the environment. When you have \begin{tikzpicture}[..][..]
, the second bracket pair is actually just read as normal text I think, and TiKZ generally tries to suppress anything that isn't a pgf
/TikZ command, so it is basically ignored.
So in summary, all the options for a tikzpicture
has to be placed in the same bracket pair.
If you change your code accordingly (and remove the misplaced ?
after stealth
), you will find that your node distance
setting works as expected.
That said, you might want to follow TeXnicians advice to use the positioning
library, and say e.g. right=of
instead of right of=
. Some discussion on this is found in Difference between "right of=" and "right=of" in PGF/TikZ.
Another reason for using the positioning
library is that you can set the horizontal and vertical node distances separately, by writing node distance=Ycm and Xcm
, an example is seen in the code below. As gernot mentions in a comment, in that case one would probably also want to add on grid
to the node style. on grid
means that the distances are calculated from the center point of the nodes.
Final note: you can put one style inside another, so if dangling node
has the same style as node
, with the addition of the fill
, then you can say dangling node/.style={node,fill=black!30}
. This reduces code duplication, and makes it easier to modify.
\documentclass[12pt, oneside]{amsart}
\usepackage{geometry}
\geometry{a4paper}
\usepackage{tikz}
\usetikzlibrary{positioning}
\tikzset{
node/.style={circle, draw=black!100, thick, on grid}, % on grid added
dangling node/.style={node, fill=black!30}
}
\begin{document}
\begin{center}
\begin{tikzpicture}[
minimum size=5mm,
node distance=4cm and 7cm,
>=stealth,
bend angle=45,
auto
]
% grid to easier see that the node centers line up
\draw [help lines] (-1,-9) grid (9,1);
\node[node](page 1){1};
\node[node](page 2)[right=of page 1]{22};
\node[node](page 3)[below=of page 1]{3333};
\node[node](page 4)[below=of page 2]{4555555};
\node[dangling node](page 5)[below=of page 3, xshift=5mm]{5};
\end{tikzpicture}
\end{center}
\end{document}
Best Answer
The
tabto
package does what you want. If a\tabto
requires a leftward tab, it will issue a linefeed, unless you use the\tabto*
invocation. Below, I show successive\tabto
's with and without the*
variant.Note that a blank line appears between the two versions in the output because the
\tabto{1.2pt}cat
is a leftward tab relative to the\parindent
value (so a linefeed was inserted). If I had added a\noindent
prior to the invocation, no blank line would have appeared.