使用 TikZ 和 Paracol 的问题

使用 TikZ 和 Paracol 的问题

我一页上有几张TikZ图。为了在图片右侧添加描述,我使用了包paracol(有没有更好的方法?)。

正如您在下图中看到的,最后一张图片并不适合第 1 页。这甚至会导致脚注的位置不正确,例如,脚注 1 应该出现在第 1 页。

如果不手动添加,如何解决这个问题\newpage

在此处输入图片描述

在此处输入图片描述

平均能量损失

\documentclass{article}
\usepackage{paracol}
\footnotelayout{m}

\usepackage{tikz}

\begin{document}

\begin{paracol}{2} % left column
\begin{tikzpicture}[scale=0.55]
% help lines
\draw[step=1,help lines,black!20] (-5,-5) grid (5,5);
% axis
\draw[thick,->,black!75] (-5,0) -- (5,0);
\draw[very thick,->] (0,-5) -- (0,5) node[pos=0.97,left] {$y$};
\end{tikzpicture}
\switchcolumn % right column
I'm a description.
\end{paracol}

\begin{paracol}{2} % left column
\begin{tikzpicture}[scale=0.55]
% help lines
\draw[step=1,help lines,black!20] (-5,-5) grid (5,5);
% axis
\draw[thick,->,black!75] (-5,0) -- (5,0);
\draw[very thick,->] (0,-5) -- (0,5) node[pos=0.97,left] {$y$};
\end{tikzpicture}
\switchcolumn % right column
I'm a description.\footnote{I'm a footnote.}
\end{paracol}

\begin{paracol}{2} % left column
\begin{tikzpicture}[scale=0.55]
% help lines
\draw[step=1,help lines,black!20] (-5,-5) grid (5,5);
% axis
\draw[thick,->,black!75] (-5,0) -- (5,0);
\draw[very thick,->] (0,-5) -- (0,5) node[pos=0.97,left] {$y$};
\end{tikzpicture}
\switchcolumn % right column
I'm a description.
\end{paracol}

\begin{paracol}{2} % left column
\begin{tikzpicture}[scale=0.55]
% help lines
\draw[step=1,help lines,black!20] (-5,-5) grid (5,5);
% axis
\draw[thick,->,black!75] (-5,0) -- (5,0);
\draw[very thick,->] (0,-5) -- (0,5) node[pos=0.97,left] {$y$};
\end{tikzpicture}
\switchcolumn % right column
I'm a description.\footnote{I'm a footnote.}
\end{paracol}
\end{document}

如果将 tikz 图片的比例更改为 0.59,则可以看到以下内容

在此处输入图片描述

答案1

我认为你可以用tabular(虽然你必须手动中断)或来做类似的事情minipages。下面我提出了一个解决方案tcolorbox。每对图形+注释都包含在 中tcolorbox。每个图形都是upperpart,每个注释都是lowerpart

\documentclass{article}
\usepackage[most]{tcolorbox}
%\footnotelayout{m}

\usepackage{tikz}

\newtcolorbox{mybox}{empty, sidebyside, notitle, lower separated=false}

\begin{document}

\begin{mybox}
\begin{tikzpicture}[scale=0.55]
% help lines
\draw[step=1,help lines,black!20] (-5,-5) grid (5,5);
% axis
\draw[thick,->,black!75] (-5,0) -- (5,0);
\draw[very thick,->] (0,-5) -- (0,5) node[pos=0.97,left] {$y$};
\end{tikzpicture}
\tcblower % right column
I'm a description.
\end{mybox}

\begin{mybox}
\begin{tikzpicture}[scale=0.55]
% help lines
\draw[step=1,help lines,black!20] (-5,-5) grid (5,5);
% axis
\draw[thick,->,black!75] (-5,0) -- (5,0);
\draw[very thick,->] (0,-5) -- (0,5) node[pos=0.97,left] {$y$};
\end{tikzpicture}
\tcblower % right column
I'm a description.\footnote{I'm a footnote.}
\end{mybox}

\begin{mybox}
\begin{tikzpicture}[scale=0.55]
% help lines
\draw[step=1,help lines,black!20] (-5,-5) grid (5,5);
% axis
\draw[thick,->,black!75] (-5,0) -- (5,0);
\draw[very thick,->] (0,-5) -- (0,5) node[pos=0.97,left] {$y$};
\end{tikzpicture}
\tcblower % right column
I'm a description.
\end{mybox}

\begin{mybox}
\begin{tikzpicture}[scale=0.55]
% help lines
\draw[step=1,help lines,black!20] (-5,-5) grid (5,5);
% axis
\draw[thick,->,black!75] (-5,0) -- (5,0);
\draw[very thick,->] (0,-5) -- (0,5) node[pos=0.97,left] {$y$};
\end{tikzpicture}
\tcblower % right column
I'm a description.\footnote{I'm a footnote.}
\end{mybox}
\end{document}

在此处输入图片描述

相关内容