答案1
这里我说明了 可以做什么paracol
。但请注意,我并不是说我设计标题的方式是正确的。相反,您可以使用 titlesec 来设计章节、小节等等。但是,我想将这些事情分开,因此如果您在执行此操作时遇到问题,请您就此提出单独的问题。
这个答案的目的只是说从你的截图来看paracol
可能值得使用。这个 MWE 应该可以说明这一点。
\documentclass{article}
\usepackage{paracol}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric,fit,positioning}
\pgfdeclarelayer{front}
\pgfdeclarelayer{back}
\pgfdeclarelayer{behind back}
\pgfsetlayers{behind back,back,main,front}
\newcounter{trick}
\columnratio{0.3}
\begin{document}
\begin{paracol}{2}
\centering
{\large\sffamily Inverse function}\medskip
\begin{tikzpicture}[font=\sffamily,node distance=2mm and 1.6cm,scale=0.8]
\begin{scope}[local bounding box=L]
\node (1a){a};
\node[below=of 1a] (1b){b};
\node[below=of 1b] (1c){c};
\node[below=of 1c] (1d){d};
\node[right=of 1a] (1e){e};
\node[below=of 1e] (1f){f};
\node[below=of 1f] (1g){g};
\node[below=of 1g] (1h){h};
\begin{pgfonlayer}{back}
\node[ellipse,draw,fill=cyan,fit=(1a) (1d)] (fit1){};
\node[ellipse,draw,fill=cyan,fit=(1e) (1h)] (fit2){};
\end{pgfonlayer}
\foreach \X [count=\Y starting from 5] in {a,b,c,d}
{\setcounter{trick}{\Y}
\draw[-latex,red] (1\X) to[bend left=12] (1\alph{trick});}
\end{scope}
\begin{pgfonlayer}{behind back}
\node[draw,fill=blue!20,fit=(L.south west) (L.north east)] (Lfit){};
\end{pgfonlayer}
\end{tikzpicture}
\switchcolumn
\centering
{\Large\sffamily Inverse function}\medskip
\begin{tikzpicture}[font=\sffamily,node distance=2mm and 2cm]
\begin{scope}[local bounding box=L]
\node (1a){a};
\node[below=of 1a] (1b){b};
\node[below=of 1b] (1c){c};
\node[below=of 1c] (1d){d};
\node[right=of 1a] (1e){e};
\node[below=of 1e] (1f){f};
\node[below=of 1f] (1g){g};
\node[below=of 1g] (1h){h};
\begin{pgfonlayer}{back}
\node[ellipse,draw,fill=cyan,fit=(1a) (1d)] (fit1){};
\node[ellipse,draw,fill=cyan,fit=(1e) (1h)] (fit2){};
\end{pgfonlayer}
\foreach \X [count=\Y starting from 5] in {a,b,c,d}
{\setcounter{trick}{\Y}
\draw[-latex,red] (1\X) to[bend left=12] (1\alph{trick});}
\end{scope}
\begin{pgfonlayer}{behind back}
\node[draw,fill=blue!20,fit=(L.south west) (L.north east)] (Lfit){};
\end{pgfonlayer}
\begin{scope}[xshift=4.5cm,local bounding box=R]
\node (2a){a};
\node[below=of 2a] (2b){b};
\node[below=of 2b] (2c){c};
\node[below=of 2c] (2d){d};
\node[right=of 2a] (2e){e};
\node[below=of 2e] (2f){f};
\node[below=of 2f] (2g){g};
\node[below=of 2g] (2h){h};
\begin{pgfonlayer}{back}
\node[ellipse,draw,fill=cyan,fit=(2a) (2d)] (fit2){};
\node[ellipse,draw,fill=cyan,fit=(2e) (2h)] (fit2){};
\end{pgfonlayer}
\foreach \X [count=\Y starting from 5] in {a,b,c}
{\setcounter{trick}{\Y}
\draw[-latex,red] (2\X) to[bend left=12] (2\alph{trick});}
\draw[-latex,red] (2d) to[bend left=12] (2f);
\end{scope}
\begin{pgfonlayer}{behind back}
\node[draw,fill=red!20,fit=(R.south west) (R.north east)] (Rfit){};
\end{pgfonlayer}
\end{tikzpicture}
\end{paracol}
\end{document}
它确实有两个不同宽度的独立列,但它们以某种方式同步,从而可以直接生成类似于您的屏幕截图的内容(我实际上很喜欢)。