我正在尝试制作一张通过面积图比较分数的工作表。
两个问题。
首先,为什么这个内容要跨两页?为什么一页放不下?
二、如何更加恰当的放置左栏的内容?
\documentclass{article}
\usepackage[left=1.75cm,right=1.75cm,top=2cm,bottom=2cm]{geometry}
\usepackage{tabularx}
\newcolumntype{C}[1]{>{\centering\arraybackslash}m{#1}}
\newcolumntype{Y}{>{\centering\arraybackslash}X}
\usepackage{tikz}
\begin{document}
\begin{tabularx}{18cm}{C{5cm}Y}
\begin{tikzpicture}[scale=0.4]
\node at (0,0) {2 \tikz[baseline=-0.3cm]{\draw (0,-0.1) circle (0.5cm);} \(\frac{5}{3}\)};
\end{tikzpicture}
\vspace{4cm}
\begin{tikzpicture}
\node at (0,0) {\(\frac{2}{3}\) \tikz[baseline=-0.3cm]{\draw (0,-0.1) circle (0.5cm);} \(\frac{9}{10}\)};
\end{tikzpicture}
\vspace{4cm}
\begin{tikzpicture}
\node at (0,0) {\(1\frac{1}{4}\) \tikz[baseline=-0.3cm]{\draw (0,-0.1) circle (0.5cm);} \(\frac{5}{4}\)};
\end{tikzpicture}
\vspace{4cm}
&
\begin{tikzpicture}[scale=0.6]
\draw[help lines, thin][gray] (18,0) grid (35,35);
\end{tikzpicture}
\end{tabularx}
\end{document}
答案1
这更接近正确的想法。现在所有内容都在一页上。
我怎么知道网格可以包含多少行tikz
?目前有 28 行。看起来还有更多空间。但如果我添加第 29 行,文档就会分成两页。为什么?
\documentclass{article}
\usepackage[left=1.75cm,right=1.75cm,top=2cm,bottom=2cm]{geometry}
\usepackage{tabularx}
\newcolumntype{C}[1]{>{\centering\arraybackslash}m{#1}}
\newcolumntype{Y}{>{\centering\arraybackslash}X}
\usepackage{tikz}
\begin{document}
\begin{tabularx}{18cm}{C{5cm}Y}
\begin{tikzpicture}[scale=0.4]
\node at (0,0) {2 \tikz[baseline=-0.3cm]{\draw (0,-0.1) circle (0.5cm);} \(\frac{5}{3}\)};
\end{tikzpicture}
\vspace{4cm}
\begin{tikzpicture}
\node at (0,0) {\(\frac{2}{3}\) \tikz[baseline=-0.3cm]{\draw (0,-0.1) circle (0.5cm);} \(\frac{9}{10}\)};
\end{tikzpicture}
\vspace{4cm}
\begin{tikzpicture}
\node at (0,0) {\(1\frac{1}{4}\) \tikz[baseline=-0.3cm]{\draw (0,-0.1) circle (0.5cm);} \(\frac{5}{4}\)};
\end{tikzpicture}
\vspace{4cm}
&
\begin{flushleft}
\begin{tikzpicture}[scale=0.6]
\draw[help lines, thin][gray] (0,0) grid (12,28);
\end{tikzpicture}
\end{flushleft}
\end{tabularx}
\end{document}