Als ich parskip umgestellt habe, ist mir aufgefallen, dass es Probleme mit TikZ-Bildern gibt, die zuvor problemlos funktioniert haben. Es kommt ein TeX capacity error bezüglich der grouping levels. Sieht nach Rekursion aus, aber mir war nicht klar, warum. Eigentlich dachte ich, dass es zwischen den Optionen keinen Zusammenhang geben dürfte, aber das Minimalbeispiel s.u. zeigt das gleiche Verhalten. Ohne parskip-Einstellungen klappts.
Die Bilder sind aus den TeXamples, ich kopier den Quelltext aber auch mit rein.
\documentclass[% %draft, % Entwurfsstadium final, % fertiges Dokument % --- Paper Settings --- paper=a4,% [Todo: add alternatives] %%PW: A5 soll man nicht machen. Univerlag will A4 auch bei Druck in A5. A5 erfordert Nacharbeit bei Skalierung von Titelblatt, TikZ-Bildern, Langen Formeln paper=portrait, % landscape pagesize=auto, % driver % --- Base Font Size --- fontsize=11pt,% % --- Koma Script Version --- version=last, % ]{scrbook} % Classes: scrartcl, scrreprt, scrbook \KOMAoptions{% parskip=relative, % change indentation according to fontsize (recommended) %parskip=absolute, % do not change indentation according to fontsize % parskip=false % indentation of 1em % parskip=true % parksip of 1 line - with free space in last line of 1em % parskip=full- % parksip of 1 line - no adjustment % parskip=full+ % parksip of 1 line - with free space in last line of 1/4 % parskip=full* % parksip of 1 line - with free space in last line of 1/3 %% TeX Grouping Capacity Fehler wenn TikZ-Bilder kommen. Seltsam. % parskip=half % parksip of 1/2 line - with free space in last line of 1em % parskip=half- % parksip of 1/2 line - no adjustment % parskip=half+ % parksip of 1/2 line - with free space in last line of 1/3 % parskip=half* % parksip of 1/2 line - with free space in last line of 1em }% \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing} % noisy shapes \usetikzlibrary{fit} % fitting shapes to coordinates \usetikzlibrary{backgrounds} % drawing the background after the foreground \usetikzlibrary{arrows} \pagestyle{empty} \begin{document} \input{TikZpolarizingmicroscope.tex} \input{kalman-filter_tikz_img.tex} \end{document}
TikZpolarizingmicroscope.tex:
% Polarizing microscope % Author: Cyril Langlois % This TikZ code sketches the light behavior during its travel in a polarizing % petrographic microscope when a birefringent crystal thin section is inserted % between the polarizing devices. % % The goal was to correctly show the vectorial relationships between light % electric fields during its travel through the first polaroid, the mineral % section and the second polaroid. %%%< \begin{tikzpicture}[x={(0.866cm,-0.5cm)}, y={(0.866cm,0.5cm)}, z={(0cm,1cm)}, scale=1.0, %Option for nice arrows >=stealth, % inner sep=0pt, outer sep=2pt,% axis/.style={thick,->}, wave/.style={thick,color=#1,smooth}, polaroid/.style={fill=black!60!white, opacity=0.3}, ] % Colors \colorlet{darkgreen}{green!50!black} \colorlet{lightgreen}{green!80!black} \colorlet{darkred}{red!50!black} \colorlet{lightred}{red!80!black} % Frame \coordinate (O) at (0, 0, 0); \draw[axis] (O) -- +(14, 0, 0) node [right] {x}; \draw[axis] (O) -- +(0, 2.5, 0) node [right] {y}; \draw[axis] (O) -- +(0, 0, 2) node [above] {z}; \draw[thick,dashed] (-2,0,0) -- (O); % monochromatic incident light with electric field \draw[wave=blue, opacity=0.7, variable=\x, samples at={-2,-1.75,...,0}] plot (\x, { cos(1.0*\x r)*sin(2.0*\x r)}, { sin(1.0*\x r)*sin(2.0*\x r)}) plot (\x, {-cos(1.0*\x r)*sin(2.0*\x r)}, {-sin(1.0*\x r)*sin(2.0*\x r)}); \foreach \x in{-2,-1.75,...,0}{ \draw[color=blue, opacity=0.7,->] (\x,0,0) -- (\x, { cos(1.0*\x r)*sin(2.0*\x r)}, { sin(1.0*\x r)*sin(2.0*\x r)}) (\x,0,0) -- (\x, {-cos(1.0*\x r)*sin(2.0*\x r)}, {-sin(1.0*\x r)*sin(2.0*\x r)}); } \filldraw[polaroid] (0,-2,-1.5) -- (0,-2,1.5) -- (0,2,1.5) -- (0,2,-1.5) -- (0,-2,-1.5) node[below, sloped, near end]{Polaroid};% %Direction of polarization \draw[thick,<->] (0,-1.75,-1) -- (0,-0.75,-1); % Electric field vectors \draw[wave=blue, variable=\x,samples at={0,0.25,...,6}] plot (\x,{sin(2*\x r)},0)node[anchor=north]{$\vec{E}$}; %Polarized light between polaroid and thin section \foreach \x in{0, 0.25,...,6} \draw[color=blue,->] (\x,0,0) -- (\x,{sin(2*\x r)},0); \draw (3,1,1) node [text width=2.5cm, text centered]{Polarized light}; %Crystal thin section \begin{scope}[thick] \draw (6,-2,-1.5) -- (6,-2,1.5) node [above, sloped, midway]{Crystal section} -- (6, 2, 1.5) -- (6, 2, -1.5) -- cycle % First face (6, -2, -1.5) -- (6.2, -2,-1.5) (6, 2, -1.5) -- (6.2, 2,-1.5) (6, -2, 1.5) -- (6.2, -2, 1.5) (6, 2, 1.5) -- (6.2, 2, 1.5) (6.2,-2, -1.5) -- (6.2, -2, 1.5) -- (6.2, 2, 1.5) -- (6.2, 2, -1.5) -- cycle; % Second face %Optical indices \draw[darkred, ->] (6.1, 0, 0) -- (6.1, 0.26, 0.966) node [right] {$n_{g}'$}; % index 1 \draw[darkred, dashed] (6.1, 0, 0) -- (6.1,-0.26, -0.966); % index 1 \draw[darkgreen, ->] (6.1, 0, 0) -- (6.1, 0.644,-0.173) node [right] {$n_{p}'$}; % index 2 \draw[darkgreen, dashed] (6.1, 0, 0) -- (6.1,-0.644, 0.173); % index 2 \end{scope} %Rays leaving thin section \draw[wave=darkred, variable=\x, samples at={6.2,6.45,...,12}] plot (\x, {0.26*0.26*sin(2*(\x-0.5) r)}, {0.966*0.26*sin(2*(\x-0.5) r)}); %n'g-oriented ray \draw[wave=darkgreen, variable=\x, samples at={6.2,6.45,...,12}] plot (\x, {0.966*0.966*sin(2*(\x-0.1) r)},{-0.26*0.966*sin(2*(\x-0.1) r)}); %n'p-oriented ray \draw (10,1,1) node [text width=2.5cm, text centered] {Polarized and dephased light}; \foreach \x in{6.2,6.45,...,12} { \draw[color=darkgreen, ->] (\x, 0, 0) -- (\x, {0.966*0.966*sin(2*(\x-0.1) r)}, {-0.26*0.966*sin(2*(\x-0.1) r)}); \draw[color=darkred, ->] (\x, 0, 0) -- (\x, {0.26*0.26*sin(2*(\x-0.5) r)}, {0.966*0.26*sin(2*(\x-0.5) r)}); } %Second polarization \draw[polaroid] (12, -2, -1.5) -- (12, -2, 1.5) %Polarizing filter node [above, sloped,midway] {Polaroid} -- (12, 2, 1.5) -- (12, 2, -1.5) -- cycle; \draw[thick, <->] (12, -1.5,-0.5) -- (12, -1.5, 0.5); %Polarization direction %Light leaving the second polaroid \draw[wave=lightgreen,variable=\x, samples at={12, 12.25,..., 14}] plot (\x,{0}, {0.966*0.966*0.26*sin(2*(\x-0.5) r)}); %n'g polarized ray \draw[wave=lightred, variable=\x, samples at={12, 12.25,..., 14}] plot (\x,{0}, {-0.26*0.966*sin(2*(\x-0.1) r)}); %n'p polarized ray \node[text width=14cm, anchor=north west, yshift=-2mm] at (current bounding box.south west) {Light behavior in a petrographic microscope with light polarizing device. Only one incident wavelength is shown (monochromatic light). The magnetic field, perpendicular to the electric one, is not drawn.}; \end{tikzpicture}
kalman-filter_tikz_img.tex
\begin{figure}[htbp] \centering % The state vector is represented by a blue circle. % "minimum size" makes sure all circles have the same size % independently of their contents. \tikzstyle{state}=[circle, thick, minimum size=1.2cm, draw=blue!80, fill=blue!20] % The measurement vector is represented by an orange circle. \tikzstyle{measurement}=[circle, thick, minimum size=1.2cm, draw=orange!80, fill=orange!25] % The control input vector is represented by a purple circle. \tikzstyle{input}=[circle, thick, minimum size=1.2cm, draw=purple!80, fill=purple!20] % The input, state transition, and measurement matrices % are represented by gray squares. % They have a smaller minimal size for aesthetic reasons. \tikzstyle{matrx}=[rectangle, thick, minimum size=1cm, draw=gray!80, fill=gray!20] % The system and measurement noise are represented by yellow % circles with a "noisy" uneven circumference. % This requires the TikZ library "decorations.pathmorphing". \tikzstyle{noise}=[circle, thick, minimum size=1.2cm, draw=yellow!85!black, fill=yellow!40, decorate, decoration={random steps, segment length=2pt, amplitude=2pt}] % Everything is drawn on underlying gray rectangles with % rounded corners. \tikzstyle{background}=[rectangle, fill=gray!10, inner sep=0.2cm, rounded corners=5mm] \begin{tikzpicture}[>=latex,text height=1.5ex,text depth=0.25ex] % "text height" and "text depth" are required to vertically % align the labels with and without indices. % The various elements are conveniently placed using a matrix: \matrix[row sep=0.5cm,column sep=0.5cm] { % First line: Control input & \node (u_k-1) [input]{$\mathbf{u}_{k-1}$}; & & \node (u_k) [input]{$\mathbf{u}_k$}; & & \node (u_k+1) [input]{$\mathbf{u}_{k+1}$}; & \\ % Second line: System noise & input matrix \node (w_k-1) [noise] {$\mathbf{w}_{k-1}$}; & \node (B_k-1) [matrx] {$\mathbf{B}$}; & \node (w_k) [noise] {$\mathbf{w}_k$}; & \node (B_k) [matrx] {$\mathbf{B}$}; & \node (w_k+1) [noise] {$\mathbf{w}_{k+1}$}; & \node (B_k+1) [matrx] {$\mathbf{B}$}; & \\ % Third line: State & state transition matrix \node (A_k-2) {$\cdots$}; & \node (x_k-1) [state] {$\mathbf{x}_{k-1}$}; & \node (A_k-1) [matrx] {$\mathbf{A}$}; & \node (x_k) [state] {$\mathbf{x}_k$}; & \node (A_k) [matrx] {$\mathbf{A}$}; & \node (x_k+1) [state] {$\mathbf{x}_{k+1}$}; & \node (A_k+1) {$\cdots$}; \\ % Fourth line: Measurement noise & measurement matrix \node (v_k-1) [noise] {$\mathbf{v}_{k-1}$}; & \node (H_k-1) [matrx] {$\mathbf{H}$}; & \node (v_k) [noise] {$\mathbf{v}_k$}; & \node (H_k) [matrx] {$\mathbf{H}$}; & \node (v_k+1) [noise] {$\mathbf{v}_{k+1}$}; & \node (H_k+1) [matrx] {$\mathbf{H}$}; & \\ % Fifth line: Measurement & \node (z_k-1) [measurement] {$\mathbf{z}_{k-1}$}; & & \node (z_k) [measurement] {$\mathbf{z}_k$}; & & \node (z_k+1) [measurement] {$\mathbf{z}_{k+1}$}; & \\ }; % The diagram elements are now connected through arrows: \path[->] (A_k-2) edge[thick] (x_k-1) % The main path between the (x_k-1) edge[thick] (A_k-1) % states via the state (A_k-1) edge[thick] (x_k) % transition matrices is (x_k) edge[thick] (A_k) % accentuated. (A_k) edge[thick] (x_k+1) % x -> A -> x -> A -> ... (x_k+1) edge[thick] (A_k+1) (x_k-1) edge (H_k-1) % Output path x -> H -> z (H_k-1) edge (z_k-1) (x_k) edge (H_k) (H_k) edge (z_k) (x_k+1) edge (H_k+1) (H_k+1) edge (z_k+1) (v_k-1) edge (z_k-1) % Output noise v -> z (v_k) edge (z_k) (v_k+1) edge (z_k+1) (w_k-1) edge (x_k-1) % System noise w -> x (w_k) edge (x_k) (w_k+1) edge (x_k+1) (u_k-1) edge (B_k-1) % Input path u -> B -> x (B_k-1) edge (x_k-1) (u_k) edge (B_k) (B_k) edge (x_k) (u_k+1) edge (B_k+1) (B_k+1) edge (x_k+1) ; % Now that the diagram has been drawn, background rectangles % can be fitted to its elements. This requires the TikZ % libraries "fit" and "background". % Control input and measurement are labeled. These labels have % not been translated to English as "Measurement" instead of % "Messung" would not look good due to it being too long a word. \begin{pgfonlayer}{background} \node [background, fit=(u_k-1) (u_k+1), label=left:Entrance:] {}; \node [background, fit=(w_k-1) (v_k-1) (A_k+1)] {}; \node [background, fit=(z_k-1) (z_k+1), label=left:Measure:] {}; \end{pgfonlayer} \end{tikzpicture} \caption[Shortened for TOC: System model of the (linear) Kalman filter.]{This is the system model of the (linear) Kalman filter. At each time step the state vector $\mathbf{x}_k$ is propagated to the new state estimation $\mathbf{x}_{k+1}$ by multiplication with the constant state transition matrix $\mathbf{A}$. The state vector $\mathbf{x}_{k+1}$ is additionally influenced by the control input vector $\mathbf{u}_{k+1}$ multiplied by the input matrix $\mathbf{B}$, and the system noise vector $\mathbf{w}_{k+1}$. The system state cannot be measured directly. The measurement vector $\mathbf{z}_k$ consists of the information contained within the state vector $\mathbf{x}_k$ multiplied by the measurement matrix $\mathbf{H}$, and the additional measurement noise $\mathbf{v}_k$.} \end{figure}
Die Einstellung ist durchaus als experimentell zu betrachten
Die Einstellung
parskip=relative
ist durchaus als experimentell zu betrachten. Um das überhaupt zu ermöglichen, wird bei jeder Schriftwahl ggf. eine Berechnung durchgeführt. Das kann in besonderen Umgebungen – und dazu gehört tikz mit Sicherheit – durchaus zu Problemen führen. Ich habe darauf aber wenig Einfluss.Nach einem ersten, oberflächlichen Test funktioniert folgendes in der Präambel nach dem Laden von pgf/tikz: