我无法重现图片中的内容。我不确定是否需要使用小页面或表格。我不需要二维码。这是我有的。我缺少方程式,希望我的表格居中,以及文本和表格下方的图像,如您在图片中看到的那样。任何帮助都将不胜感激。
\documentclass{article}
\usepackage{graphicx} % Required for inserting images
\usepackage{parskip,multicol}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric}
\usepackage{pgfplots}
\usepackage[margins=.5]{geometry}
\pgfplotsset{compat=newest,width=6cm}
\begin{document}
\subsection*{Example 3} Find each of the following limits.
\begin{multicols}{2}
\begin{enumerate}
\item[(a).] The graph of \(f(x)\) is shown below.
\begin{tikzpicture}
\begin{axis}[grid=both,axis lines=middle,
xmin=-5,
xmax=8,
ymin=-5,
ymax=5,
xtick distance=2,
ytick distance 2,
]
\draw[thick,red,samples=100] (-2,0)--(2,2)--(4,-2)--(7,-2);
\end{axis}
\end{tikzpicture}
\quad
\item[(b).] The function \(f(x)\) and \(g(x)\) are differentiable for all \(x\) use the following table to help find the limit.
\begin{tabular}{|c|c|c|c|c|}
\hline
\(x|\)&\(f(x)\)&\(f^\prime(x)\)&\(g(x)\)&\(g^\prime(x)\) \\ \hline
2&4&-2&0&3 \\ \hline
\end{tabular}
\end{enumerate}
\end{multicols}
\end{document}
答案1
您的代码出现多个错误。我已修复这些错误,但无法确定我是否猜到了您的意图。
我建议不要将图像或表格居中。我认为这会导致看起来相当奇怪的结果。如果相对于列宽居中,则当前面的文本短于列宽时,结果看起来不居中。但是,如果相对于当前面的文本居中,则居中的内容不会彼此对齐,结果会很混乱。
我倾向于用或将其制作Find ...
成标题,但如果它们只是文本的一部分,我会使用我对图形和表格使用的任何对齐方式。\captionof
capt-of
caption
以下将图像和表格以及它们关联的Find ...
使用center
环境居中。为了确保第一个问题的所有部分保持在一起并且 (a) 和 (b) 在顶部对齐,我们使用\columnbreak
。如果您使用 ,我不明白\quad
应该做什么multicols
。
我也曾经使用过enumitem
配置,enumerate
所以我们不必硬连线项目标签。
\documentclass{article}
\usepackage{parskip,multicol}
\usepackage{enumitem}
\usepackage{pgfplots}
\usepackage[margin=15mm]{geometry}
\pgfplotsset{compat=newest,width=6cm}
\usepackage{amsmath}
\begin{document}
\subsection*{Example 3} Find each of the following limits.
\begin{multicols}{2}
\begin{enumerate}[label=(\alph*).]
\item The graph of \(f(x)\) is shown below.
\begin{center}
\begin{tikzpicture}
\begin{axis}[grid=both,axis lines=middle,
xmin=-5,
xmax=8,
ymin=-5,
ymax=5,
xtick distance=2,
ytick distance=2,
]
\draw[thick,red,samples=100] (-2,0)--(2,2)--(4,-2)--(7,-2);
\end{axis}
\end{tikzpicture}
Find $\displaystyle\lim_{x\rightarrow 3} \frac{f(x)}{x^2-9} $
\end{center}
\columnbreak
\item The function \(f(x)\) and \(g(x)\) are differentiable for all \(x\) use the following table to help find the limit.
\begin{center}
\begin{tabular}{|c|c|c|c|c|}
\hline
\(x|\)&\(f(x)\)&\(f^\prime(x)\)&\(g(x)\)&\(g^\prime(x)\) \\ \hline
2&4&-2&0&3 \\ \hline
\end{tabular}
Find $\displaystyle \lim_{x\rightarrow 2} \frac{f(x)-4}{g(x)\cdot x^2}$
\end{center}
\end{enumerate}
\end{multicols}
\end{document}
答案2
参见此代码
\documentclass{article}
\usepackage[margin=1cm]{geometry}
\usepackage{graphicx} % Required for inserting images
\usepackage{parskip,multicol}
\usepackage{mathtools}
\usepackage{tikz}
\usepackage{pgfplots}
\usetikzlibrary{shapes.geometric}
\usepackage{stackrel}
\pgfplotsset{compat=newest,width=6cm}
\begin{document}
\subsection*{Example 3} Find each of the following limits.
\begin{multicols}{2}
\begin{enumerate}
\item The graph of $f(x)$ is shown below.
$\stackrel[\text{\large find }\displaystyle \lim\limits_{x\rightarrow\infty}f(x)=\frac{x}{x+h}]{
\begin{tikzpicture}
\begin{axis}[grid=both,axis lines=middle,
xmin=-5,
xmax=8,
ymin=-5,
ymax=5,
xtick distance=2,
ytick distance=2,
]
\draw[thick,red,samples=100] (-2,0)--(2,2)--(4,-2)--(7,-2);
\end{axis}
\end{tikzpicture}}{}$
\quad
\item The function $f(x)$ and $g(x)$are differentiable for all $x$ use the following table to help find the limit.
$\stackrel[\text{\large find } \displaystyle{f(x)=\frac{x}{x+h}}]{\begin{tabular}{|c|c|c|c|c|}
\hline
\(x|\)&\(f(x)\)&\(f^\prime(x)\)&\(g(x)\)&\(g^\prime(x)\) \\ \hline
2&4&-2&0&3 \\ \hline
\end{tabular}}{}$
\end{enumerate}
\end{multicols}
\end{document}
答案3
你只犯了几个小错误,但最严重的错误是你没有\end{document}
。
\documentclass{article}
\usepackage[margin=1cm]{geometry}
\usepackage{graphicx} % Required for inserting images
\usepackage{parskip,multicol}
\usepackage{mathtools}
\usepackage{tikz}
\usepackage{pgfplots}
\usetikzlibrary{shapes.geometric}
\usepackage{stackrel}
\pgfplotsset{compat=newest,width=6cm}
\begin{document}
\subsection*{Example 3} Find each of the following limits.
\begin{multicols}{2}
\begin{enumerate}
\item The graph of $f(x)$ is shown below.
$\stackrel[\displaystyle \lim\limits_{x\rightarrow\infty}f(x)=\frac{x}{x+h}]{
\begin{tikzpicture}
\begin{axis}[grid=both,axis lines=middle,
xmin=-5,
xmax=8,
ymin=-5,
ymax=5,
xtick distance=2,
ytick distance=2,
]
\draw[thick,red,samples=100] (-2,0)--(2,2)--(4,-2)--(7,-2);
\end{axis}
\end{tikzpicture}}{}$
\quad
\item The function $f(x)$ and $g(x)$are differentiable for all $x$ use the following table to help find the limit.
$\stackrel[\displaystyle{f(x)=\frac{x}{x+h}}]{\begin{tabular}{|c|c|c|c|c|}
\hline
\(x|\)&\(f(x)\)&\(f^\prime(x)\)&\(g(x)\)&\(g^\prime(x)\) \\ \hline
2&4&-2&0&3 \\ \hline
\end{tabular}}{}$
\end{enumerate}
\end{multicols}
\end{document}