编码到“枚举”环境中

编码到“枚举”环境中

我确信我需要对enumerate环境中各种文件中的列表进行编码。我已从中抽取样本并将它们放入一个文件中,并将其包含在这篇文章中。

它看起来像多项选择题测试,只是每个问题的选项数量不一样。选项的小写罗马数字 - i.)、ii.)、iii.) ... - 应以粗体排版,问题的阿拉伯数字应以粗体排版。在每个问题中,我希望小写罗马数字的右括号在每一列中垂直对齐。(我确实从以下代码中得到了这一点。)在问题之间,我只希望第一列中小写罗马数字的右括号垂直对齐。问题的阿拉伯数字应与左边距齐平。

从本网站上的其他代码中,我知道label=\textbf{\roman{enumi}.)}用于排版小写罗马数字。阿拉伯数字以粗体排版的选项是什么?我认为应该加宽边距以适应其中一个问题的选择。

这应该是 环境enumerate内的环境吗enumerate?我的TikZ代码中有两个环境。

\documentclass{amsart}
\usepackage{amsmath}
\usepackage{amsfonts}

\usepackage{tikz}
\usetikzlibrary{calc}

\setlength{\topmargin}{0.0in} \setlength{\textheight}{9in}

\begin{document}


\begin{center}\Large{\textbf{Review}}\end{center}\vskip0.3in



\noindent \textbf{1.) }Express the following decimals as fractions.
\begin{alignat*}{8}
{\mathrm{i.})} \ &1
\qquad \quad
&{\mathrm{ii.})} \ &0.25
\qquad \quad
&{\mathrm{iii.})} \ &0.025
\qquad \quad
&{\mathrm{iv.})} \ &0.0025 \\
{\mathrm{v.})} \ &0.125
\qquad \quad
&{\mathrm{vi.})} \ &0.0125
\qquad \quad
&{\mathrm{vii.})} \ &1.25
\qquad \quad
&{\mathrm{viii.})} \ &0.0625
\end{alignat*}
\vskip0.25in

\noindent \textbf{2.) }Express the following numbers as percents.
\begin{alignat*}{8}
{\mathrm{i.})} \ &\frac{1}{8}
\qquad \quad
&{\mathrm{ii.})} \ &\frac{1}{80}
\qquad \quad
&{\mathrm{iii.})} \ &\frac{1}{800}
\qquad \quad
&{\mathrm{iv.})} \ &1 \\
{\mathrm{v.})} \ &10
\qquad \quad
&{\mathrm{vi.})} \ &100
\qquad \quad
&{\mathrm{vii.})} \ &1.75
\qquad \quad
&{\mathrm{viii.})} \ &1.075
\end{alignat*}
\vskip0.25in


\noindent \textbf{3.) }$\triangle\mathit{ABC}$ is a right triangle, and its right angle is at $C$. $P$ is the foot of the altitude from $C$, and the lengths of $\overline{AP}$ and $\overline{BP}$ are 16 and 4, respectively. What is the length of $\overline{CP}$?
\begin{tabbing}
\hspace*{3em} \= \hspace{2.5in} \= \kill
\> {\textbf{a.) }}4             \> {\textbf{b.) }}$4\sqrt{2}$ \\
\> {\textbf{c.) }}$4\sqrt{3}$   \> {\textbf{d.) }}8 \\
\> {\textbf{e.) }}$8\sqrt{2}$
\end{tabbing}
\vskip0.2in

\begin{center}
\begin{tikzpicture}

%P is located at the origin and is the foot of the altitude of right triangle
%$\triangle{ABC}$ from C. The right angle of the triangle is at C.
\path (-4,0) coordinate (A) (0,0) coordinate (P) (1,0) coordinate (B) (0,2) coordinate (C);
\draw (A) -- (B) -- (C) -- cycle;

%The altitude from C is drawn.
\draw (P) -- (C);


%The labels for the vertices of $\triangle{ABC}$ are typeset.
\node[anchor=north, inner sep=0] at ($(A)!0.15cm!-90:(B)$){$A$};
\node[anchor=north, inner sep=0] at ($(B)!-0.15cm!-90:(A)$){$B$};
\node[anchor=south, inner sep=0] at ($(C) +(0,0.15)$){$C$};

\node[anchor=north, inner sep=0] at ($(P)!-0.15cm!(C)$){$P$};


%The lengths of AP and BP are labeled 16 and 4, respectively.
\node[anchor=south, inner sep=0, font=\footnotesize] at ($($(A)!1.5mm!90:(P)$)!0.5!($(P)!1.5mm!-90:(A)$)$){$16$};
\node[anchor=south, inner sep=0, font=\footnotesize] at ($($(B)!1.5mm!-90:(P)$)!0.5!($(P)!1.5mm!90:(B)$)$){$4$};


%A right-angle mark is drawn at P.
\coordinate (U) at ($(P)!3mm!45:(B)$);
\draw (U) -- ($(P)!(U)!(B)$);
\draw (U) -- ($(P)!(U)!(C)$);

%A right-angle mark is drawn at P.
\coordinate (V) at ($(C)!3mm!45:(A)$);
\draw (V) -- ($(C)!(V)!(A)$);
\draw (V) -- ($(C)!(V)!(B)$);

\end{tikzpicture}
\end{center}
\vskip0.25in


\noindent \begin{minipage}[b]{4.65in}
\textbf{4.) }The area of a rectangle is 168 square inches, and its perimeter is 62 inches. What is the product of the magnitudes of its diagonals?
\begin{tabbing}
\hspace*{3em} \= \hspace{2.5in} \= \kill
\> {\textbf{a.) }}625   \> {\textbf{b.) }}300 \\
\> {\textbf{c.) }}200   \> {\textbf{d.) }}150 \\
\> {\textbf{e.) }}125
\end{tabbing}
\end{minipage}
%
%
%The baseline for the bounding box of the tikzpicture is by default "south."
\hspace{0.1cm}
\begin{tikzpicture}

%Vertices A, B, C, and D are located.
\path (0,0) coordinate (A) (20:{7/8}) coordinate (B) ($(B) +(110:3)$) coordinate (C) ($(C) +(-160:{7/8})$) coordinate (D);
\draw (A) -- (B) -- (C) -- (D) -- cycle;

%The diagonals are drawn.
\draw[dashed] (A) -- (C);
\draw[dashed] (B) -- (D);


%The length and width of the rectangle are typeset.
\node[anchor={20+90}, inner sep=0, font=\footnotesize] at ($($(A)!1.5mm!-90:(B)$)!0.5!($(B)!1.5mm!90:(A)$)$){$w$};
\node[anchor={110+90}, inner sep=0, font=\footnotesize] at ($($(B)!1.5mm!-90:(C)$)!0.5!($(C)!1.5mm!90:(B)$)$){$\ell$};

\end{tikzpicture}
\vskip0.25in

\noindent \textbf{5.) }If $a - b = 1$, $b - c = 2$, and $c - a = d$, evaluate $d$.
\begin{tabbing}
\hspace*{3em} \= \hspace{2.5in} \= \kill
\> {\textbf{a.) }}$-3$  \> {\textbf{b.) }}$-1$ \\
\> {\textbf{c.) }}1     \> {\textbf{d.) }}3 \\
\> {\textbf{e.) }}4
\end{tabbing}
\vskip0.25in

\noindent \textbf{6.) }Evaluate the following logarithmic expressions.
\begin{alignat*}{6}
{\mathrm{i.})} \ &\log_{2}8
\qquad \quad
&{\mathrm{ii.})} \ &\log_{2}64
\qquad \quad
&{\mathrm{iii.})} \ &\log_{2}\frac{1}{8} \\
{\mathrm{iv.})} \ &\log 10
\qquad \quad
&{\mathrm{v.})} \ &\log 100
\qquad \quad
&{\mathrm{vii.})} \ &\log \left(\frac{1}{100}\right)
\end{alignat*}
\vskip0.25in


\noindent \textbf{7.) }Solve the following logarithmic equations.
\begin{alignat*}{6}
{\mathrm{i.})} \ &\log_{2}(3x + 7) = 3
\qquad \quad
&{\mathrm{ii.})} \ &2\log(x + 1) = 16
\qquad \quad
&{\mathrm{iii.})} \ &\log_{3}\left(\frac{x}{x - 4}\right) = 1 \\
{\mathrm{iv.})} \ &\log(x + 1) -  \log(x - 2) = 2
\qquad \quad
&{\mathrm{v.})} \ &\log\left(\frac{x + 1}{x - 2}\right) = 2
\end{alignat*}


\end{document}

答案1

这是一些入门知识。我其实不擅长排版数学,所以我不想明确地建议你使用multicolandenumerate而不是alignnat,但它似乎确实依赖于大量的手动操作,特别指定代码。那么这个怎么样:

% We want multiple columns
\usepackage{multicol}
% We want to control our lists
\usepackage{enumitem}
% ... so, for first-level: numbers set flushleft, with a generous space between items, with the labels in bold
\setlist[enumerate,1]{% 
  leftmargin=*, itemsep=12pt, label={\textbf{\arabic*.)}}}
% For the second-level lists, we want roman numerals and a less generous space between items
\setlist[enumerate,2]{% (
  label={\textbf{\roman*.)}}, itemsep=8pt}

综合起来:

\documentclass{amsart}
\usepackage{amsmath}
\usepackage{amsfonts}

\usepackage{tikz}
\usetikzlibrary{calc}

\setlength{\topmargin}{0.0in} \setlength{\textheight}{9in}
\usepackage{multicol}
\usepackage{enumitem}
\setlist[enumerate,1]{% (
  leftmargin=*, itemsep=12pt, label={\textbf{\arabic*.)}}}
\setlist[enumerate,2]{% (
  label={\textbf{\roman*.)}}, itemsep=8pt}

\begin{document}

\begin{center}\Large{\textbf{Review}}\end{center}\vskip0.3in

\begin{enumerate}
\item Express the following decimals as fractions.
  \begin{multicols}{4}
    \begin{enumerate}
    \item 1
    \item 0.25
    \item 0.025
    \item 0.0025
    \item 0.125
    \item 0.0125
    \item 1.25
    \item 0.0625
    \end{enumerate}
  \end{multicols}

\item Express the following decimals as fractions
  \begin{multicols}{4}
    \begin{enumerate}
    \item $\frac{1}{8}$
    \item $\frac{1}{80}$
    \item $\frac{1}{800}$
    \item 1
    \item 10
    \item 100
    \item 1.75
    \item 1.075
    \end{enumerate}
  \end{multicols}

\item $\triangle\mathit{ABC}$ is a right triangle, and its right angle
  is at $C$. $P$ is the foot of the altitude from $C$, and the lengths
  of $\overline{AP}$ and $\overline{BP}$ are 16 and 4,
  respectively. What is the length of $\overline{CP}$?

  \begin{multicols}{2}
    \begin{enumerate}
    \item 4
    \item $4\sqrt{2}$
    \item $4\sqrt{3}$
    \item 8
    \item $8\sqrt{2}$
    \end{enumerate}

%\begin{center}
  \begin{tikzpicture}

    % P is located at the origin and is the foot of the altitude of
    % right triangle $\triangle{ABC}$ from C. The right angle of the
    % triangle is at C.
    \path (-4,0) coordinate (A) (0,0) coordinate (P) (1,0) coordinate
    (B) (0,2) coordinate (C); \draw (A) -- (B) -- (C) -- cycle;

    % The altitude from C is drawn.
    \draw (P) -- (C);


    % The labels for the vertices of $\triangle{ABC}$ are typeset.
    \node[anchor=north, inner sep=0] at ($(A)!0.15cm!-90:(B)$){$A$};
    \node[anchor=north, inner sep=0] at ($(B)!-0.15cm!-90:(A)$){$B$};
    \node[anchor=south, inner sep=0] at ($(C) +(0,0.15)$){$C$};

    \node[anchor=north, inner sep=0] at ($(P)!-0.15cm!(C)$){$P$};


    % The lengths of AP and BP are labeled 16 and 4, respectively.
    \node[anchor=south, inner sep=0, font=\footnotesize] at
    ($($(A)!1.5mm!90:(P)$)!0.5!($(P)!1.5mm!-90:(A)$)$){$16$};
    \node[anchor=south, inner sep=0, font=\footnotesize] at
    ($($(B)!1.5mm!-90:(P)$)!0.5!($(P)!1.5mm!90:(B)$)$){$4$};


    % A right-angle mark is drawn at P.
    \coordinate (U) at ($(P)!3mm!45:(B)$); \draw (U) --
    ($(P)!(U)!(B)$); \draw (U) -- ($(P)!(U)!(C)$);

    % A right-angle mark is drawn at P.
    \coordinate (V) at ($(C)!3mm!45:(A)$); \draw (V) --
    ($(C)!(V)!(A)$); \draw (V) -- ($(C)!(V)!(B)$);

  \end{tikzpicture}
%\end{center}

  \end{multicols}
\end{enumerate}

\noindent \begin{minipage}[b]{4.65in}
  \begin{enumerate}[start=4]
  \item The area of a rectangle is 168 square inches, and its
    perimeter is 62 inches. What is the product of the magnitudes of
    its diagonals?
  \end{enumerate}
\vspace*{2cm}
\end{minipage}
%
%
\hspace{0.1cm}
\begin{tikzpicture}

%Vertices A, B, C, and D are located.
\path (0,0) coordinate (A) (20:{7/8}) coordinate (B) ($(B) +(110:3)$) coordinate (C) ($(C) +(-160:{7/8})$) coordinate (D);
\draw (A) -- (B) -- (C) -- (D) -- cycle;

%The diagonals are drawn.
\draw[dashed] (A) -- (C);
\draw[dashed] (B) -- (D);


%The length and width of the rectangle are typeset.
\node[anchor={20+90}, inner sep=0, font=\footnotesize] at ($($(A)!1.5mm!-90:(B)$)!0.5!($(B)!1.5mm!90:(A)$)$){$w$};
\node[anchor={110+90}, inner sep=0, font=\footnotesize] at ($($(B)!1.5mm!-90:(C)$)!0.5!($(C)!1.5mm!90:(B)$)$){$\ell$};

\end{tikzpicture}


\begin{enumerate}[start=5]
\item  If $a - b = 1$, $b - c = 2$, and $c - a = d$, evaluate $d$.
  \begin{multicols}{2}
    \begin{enumerate}
    \item $-3$
    \item $-1$
    \item $1$
    \item $3$
    \item $4$
    \end{enumerate}
  \end{multicols}


\item Evaluate the following logarithmic expressions.
  \begin{multicols}{3}
    \begin{enumerate}
    \item $\log_{2}8$
    \item $\log_{2}64$
    \item $\log_{2}\frac{1}{8}$
    \item $\log 10$
    \item $\log 100$
    \item $\log \left(\frac{1}{100}\right)$
    \end{enumerate}
  \end{multicols}

\item Solve the following logarithmic equations.
  \begin{multicols}{3}
    \begin{enumerate}
    \item $\log_{2}(3x + 7) = 3$
    \item $2\log(x + 1) = 16$
    \item $\log_{3}\left(\frac{x}{x - 4}\right) = 1$
    \item $\log(x + 1) - \log(x - 2) = 2$
    \item $\log\left(\frac{x + 1}{x - 2}\right) = 2$
    \end{enumerate}
  \end{multicols}

\end{enumerate}

\end{document}

我没有动过 TikZ 代码。

编辑

如果您希望能够itemsep以半自动方式进行更改,可以执行以下操作:

\newlength{\adelyn}
\settoheight{\adelyn}{MM}% <-- use whatever you want here
\newcommand{\setitemsep}[1]{\settoheight{\adelyn}{#1}}

然后你可以按照以下方式使用它:

\documentclass{amsart}
\usepackage{amsmath}
\usepackage{amsfonts}

\usepackage{multicol}
\usepackage{enumitem}
\setlist[enumerate,1]{% (
  leftmargin=*, itemsep=12pt, label={\textbf{\arabic*.)}}}

% set up length
\newlength{\adelyn}
% set default length
\settoheight{\adelyn}{MM}
% simplify process of setting length?
\newcommand{\setitemsep}[1]{\settoheight{\adelyn}{#1}}

\setlist[enumerate,2]{% (
  itemsep=1.25\adelyn,
  label={\textbf{\roman*.)}}, itemsep=8pt}


\begin{document}

\begin{center}\Large{\textbf{Review}}\end{center}\vskip0.3in

\begin{enumerate}
\item Express the following decimals as fractions.
  \begin{multicols}{4}
    % uses pre-defined length of \adelyn
    \begin{enumerate}
    \item $\frac{1}{8}$
    \item $\frac{1}{80}$
    \item $\frac{1}{800}$
    \item 1
    \item 10
    \item 100
    \item 1.75
    \item 1.075
    \end{enumerate}
  \end{multicols}

\item Express the following decimals as fractions
  \begin{multicols}{4}
    % reset 'base height'
    % \settoheight{\adelyn}{$\sqrt{b^2}$}
    \setitemsep{$\sqrt{b^2}$}

    \begin{enumerate}
    \item $\frac{1}{8}$
    \item $\frac{1}{80}$
    \item $\frac{1}{800}$
    \item 1
    \item 10
    \item 100
    \item 1.75
    \item 1.075
    \end{enumerate}
  \end{multicols}


\item Express the following decimals as fractions

  \begin{multicols}{4}

    % reset 'base height'
    % \settoheight{\adelyn}{$\frac{1}{8}$}
    \setitemsep{$\frac{1}{8}$}

    % reset how 'base height' is used
    \begin{enumerate}[itemsep=3\adelyn]
    \item $\frac{1}{8}$
    \item $\frac{1}{80}$
    \item $\frac{1}{800}$
    \item 1
    \item 10
    \item 100
    \item 1.75
    \item 1.075
    \end{enumerate}
  \end{multicols}


\end{enumerate}

\end{document}

这样,您可以通过改变 的值来改变“基准高度”,\adelyn并且可以使用 来改变该高度的倍数itemsep=<value>\adelyn

相关内容