3

How do I encode problems 3.) and 5.) that is consistent with the remaining code? The display is what I want.

\documentclass{amsart}
\usepackage{amsmath}
\usepackage{amsfonts}
\newlength\labelwd
\settowidth\labelwd{\bfseries viii.)}
\usepackage{tasks}
\settasks{counter-format =tsk[a].), label-format=\bfseries, label-offset=1em, label-align=right, label-width
=\labelwd, before-skip =\smallskipamount, after-item-skip=0pt}
\usepackage{enumitem}
\setlist[enumerate,1]{% (
leftmargin=*, itemsep=12pt, label={\textbf{\arabic*.)}}}


\begin{document}


\begin{center}\Large{\textbf{Elementary Number Theory}}\end{center}\vskip0.25in

\begin{enumerate}[itemsep=\baselineskip]
\item How many positive integers less than 100 have a remainder of 3 upon division by 7?
        \begin{tasks}(3)
          \task 10
          \task 11
          \task 12
          \task 13
          \task 14
        \end{tasks}
\end{enumerate}

\begin{enumerate}[start=2, itemsep=\baselineskip]
\item For every natural number $n$, $\tau(n)$ is the number of positive divisors of $n$. Evaluate $\tau^{3}(12)$.
        \begin{tasks}(3)
          \task 1
          \task 2
          \task 3
          \task 4
          \task 6
        \end{tasks}
\end{enumerate}



\noindent {\textbf{3.) }}$p$ and $q$ are prime numbers greater than 2. which of the following statements must be true? \\
\hspace*{3em} \hphantom{3.)\ }
\begin{tabular}{r l}
{\bf I}     &   \hspace*{-0.5em}$p + q$ is even. \\
{\bf II}    &   \hspace*{-0.5em}$pq$ is odd. \\
{\bf III}   &   \hspace*{-0.5em}$p^{2} - q^{2}$ is even
\end{tabular}
\begin{tabbing}
\hspace*{2em} \= \hspace{2.5in} \= \kill
\> {\textbf{a.) }}I only        \> {\textbf{b.) }}II only \\
\> {\textbf{c.) }}I and II only \> {\textbf{d.) }}I and III only \\
\> {\textbf{e.) }}I, II, and III
\end{tabbing}
\vskip0.25in


\begin{enumerate}[start=4, itemsep=\baselineskip]
\item How many integers less than 1000 are such that the remainder upon division by each of 2, 3, 4, 5, 6, and 7 is 1?
        \begin{tasks}(3)
          \task 0
          \task 1
          \task 2
          \task 3
          \task 4
        \end{tasks}
\end{enumerate}


\noindent {\textbf{5.) }}$n$ is a positive integer. Which of the following quantities is divisible by 3? \\
\hspace*{3em} \hphantom{3.)\ }
\begin{tabular}{r l}
{\bf I}     &   \hspace*{-0.5em}$n^{3} - 1$ \\
{\bf II}    &   \hspace*{-0.5em}$n^{3} + 1$ \\
{\bf III}   &   \hspace*{-0.5em}$n^{3} + 2n$
\end{tabular}
\begin{tabbing}
\hspace*{2em} \= \hspace{2.5in} \= \kill
\> {\textbf{a.) }}I only        \> {\textbf{b.) }}II only \\
\> {\textbf{c.) }}I and II only \> {\textbf{d.) }}II and III only \\
\> {\textbf{e.) }}I, II, and III
\end{tabbing}

\end{document}
3

I would do it this way:

\documentclass{amsart}
\usepackage[showframe]{geometry}
\usepackage{amsmath}
\usepackage{amsfonts}
\newlength\labelwd
\settowidth\labelwd{\bfseries viii.)}
\usepackage{tasks}
\settasks{counter-format =tsk[a].), label-format=\bfseries, label-offset=1em, label-align=right, label-width
=\labelwd, before-skip =\smallskipamount, after-item-skip=0pt}
\usepackage[inline]{enumitem}
\setlist[enumerate]{% (
labelindent = 0pt, leftmargin=*, itemsep=12pt, label={\textbf{\arabic*.)}}}


\begin{document}


\begin{center}\Large{\textbf{Elementary Number Theory}}\end{center}\vskip0.25in
%\setlist[enumerate, 1]{itemsep=\baselineskip}
\begin{enumerate}
  \item How many positive integers less than 100 have a remainder of 3 upon division by 7?
        \begin{tasks}(3)
          \task 10
          \task 11
          \task 12
          \task 13
          \task 14
        \end{tasks}

  \item For every natural number $n$, $\tau(n)$ is the number of positive divisors of $n$. Evaluate $\tau^{3}(12)$.
        \begin{tasks}(3)
          \task 1
          \task 2
          \task 3
          \task 4
          \task 6
        \end{tasks}

  \item $p$ and $q$ are prime numbers greater than 2. Consider the following statements:

        \begin{tasks}[counter-format = tsk[R], label-format=\normalfont, after-skip=1\medskipamount](3)
          \task $p + q$ is even.
          \task $pq$ is odd.
          \task $p^{2} - q^{2}$ is even
        \end{tasks}
        Which of the following must be true?
        \begin{tasks}(3)
          \task I only
          \task II only
          \task I and II only
          \task I and III only
          \task I, II, and III
        \end{tasks}

  \item How many integers less than 1000 are such that the remainder upon division by each of 2, 3, 4, 5, 6, and 7 is 1?
        \begin{tasks}(3)
          \task 0
          \task 1
          \task 2
          \task 3
          \task 4
        \end{tasks}

  \item $n$ is a positive integer. Consider the following quantities:
  \begin{tasks}[counter-format = tsk[R], label-format=\normalfont,  after-  skip=1\medskipamount](3)
        \task $n^{3} - 1$ \
        \task $n^{3} + 1$
        \task $n^{3} + 2n$
  \end{tasks}
  Which is divisible by 3?
  \begin{tasks}(3)
    \task I only
    \task II only
    \task I and II only
    \task II and III only
    \task I, II, and III
  \end{tasks}
\end{enumerate}

\end{document} 

enter image description here

A variant:

\documentclass{amsart}
\usepackage{amsmath}
\usepackage{amsfonts}
\newlength\labelwd
\settowidth\labelwd{\bfseries viii.)}
\usepackage{tasks}
\settasks{counter-format =tsk[a].), label-format=\bfseries, label-offset=1em, label-align=right, label-width
=\labelwd, item-indent=\dimexpr\labelwd+1em\relax, before-skip =\smallskipamount, after-item-skip=0pt}
\usepackage{enumitem}
\setlist[enumerate,1]{% (
leftmargin=*, itemsep=12pt, label={\textbf{\arabic*.)}}}

\begin{document}

\begin{center}\Large{\textbf{Elementary Number Theory}}\end{center}\vskip0.25in

\begin{enumerate}[itemsep=\baselineskip]
\item How many positive integers less than 100 have a remainder of 3 upon division by 7?
        \begin{tasks}(3)
          \task 10
          \task 11
          \task 12
          \task 13
          \task 14
        \end{tasks}
\end{enumerate}

\begin{enumerate}[start=2, itemsep=\baselineskip]
\item For every natural number $n$, $\tau(n)$ is the number of positive divisors of $n$. Evaluate $\tau^{3}(12)$.
        \begin{tasks}(3)
          \task 1
          \task 2
          \task 3
          \task 4
          \task 6
        \end{tasks}
\end{enumerate}

\noindent {\textbf{3.) }}$p$ and $q$ are prime numbers greater than 2. which of the following statements must be true?
\begin{tasks}[counter-format =tsk[R], item-indent=5.1em](1)
\task $p + q$ is even.
\task $pq$ is odd. 
\task $p^{2} - q^{2}$ is even
\end{tasks}
\begin{tasks}[ item-indent=\dimexpr\labelwd+2.85em](2)
\task I only
\task II only
\task I and II only
\task I and III only
\task I, II, and III
\end{tasks}

\begin{enumerate}[start=4, itemsep=\baselineskip]
\item How many integers less than 1000 are such that the remainder upon division by each of 2, 3, 4, 5, 6, and 7 is 1?
        \begin{tasks}(3)
          \task 0
          \task 1
          \task 2
          \task 3
          \task 4
        \end{tasks}
\end{enumerate}

\noindent {\textbf{5.) }}$n$ is a positive integer. Which of the following quantities is divisible by 3? 
    \begin{tasks}[counter-format =tsk[R], item-indent=5.1em](1)
   \task $n^{3} - 1$ 
    \task   $n^{3} + 1$ 
    \task $n^{3} + 2n$
    \end{tasks}
    \begin{tasks}[item-indent=\dimexpr\labelwd+2.85em](2)
    \task I only
    \task II only
    \task I and II only
    \task II and III only
    \task I, II, and III
    \end{tasks}

\end{document} 

enter image description here

| improve this answer | |
  • No. I am imitating the display on standardized tests. Do you know how to get the display that I have with an align environment using an enumerate environment (and the tasks package)? – Adelyn Mar 11 '16 at 12:18
  • I sent you a pdf file of my display yesterday. Can you help me with getting the display that I want? – Adelyn Mar 13 '16 at 17:20
  • @Adelyn: I've added another code, more like what you want. Is it ? – Bernard Mar 15 '16 at 0:05
  • I looked at the e-TeX manual at http://texdoc.net/texmf-dist/doc/etex/base/etex_man.pdf for an explanation for the use of \dimexpr and \relax. I am not familiar with computer science, though. Why do you have item-indent=\dimexpr\labelwd+1em\relax instead of item-indent=\labelwd+3em? – Adelyn Mar 15 '16 at 15:19
  • 1
    I'll check the point you mention. For the rest, will you also define \HeightOfDisplayFractionsWithIntegrals or whatever? – Bernard Mar 16 '16 at 20:23
1

The only edit that I made to the original code is that I added \newlength\HeightOfRadicalNotation and \settoheight\HeightOfRadicalNotation{$\sqrt{1}$} in the preamble and after-item-skip=\HeightOfRadicalNotation as an option to the tasks environment in the first example. It does give me more appropriate spacing between the expressions in the first example. What is the inter-line spacing? It is not as big as the height of $\sqrt{1}$.

\documentclass[10pt]{amsart}
\usepackage{amsmath}
\usepackage{array,booktabs}

\newlength\labelwd
\settowidth\labelwd{ iii.)}

\newlength\HeightOfRadicalNotation
\settoheight\HeightOfRadicalNotation{$\sqrt{1}$}

\usepackage{tasks}
\settasks{counter-format =tsk[r].), label-format=\bfseries, label-offset=1em, label-align=right, label-width
=\labelwd, item-indent=\labelwd+3em, before-skip =\smallskipamount, after-item-skip=0pt}

\usepackage{tikz}
\usetikzlibrary{calc,angles,positioning,intersections,quotes,decorations.markings,backgrounds,patterns}

\usepackage{mathtools}

\usepackage{pgfplots}
\pgfplotsset{compat=1.11}

\setlength{\oddsidemargin}{0.0in}
\setlength{\evensidemargin}{0.0in} \setlength{\textwidth}{6.1in}
\setlength{\topmargin}{0.0in} \setlength{\textheight}{9in}


\begin{document}


\noindent \textbf{Example} \vskip1.25mm
\noindent State any vertical asymptotes of the following functions.
\begin{tasks}[after-item-skip=\HeightOfRadicalNotation](1)
\task  $(x - 1)\big\slash \bigl(\sqrt{x} - 1\bigr)$
\task  $1 \big\slash \bigl(\sqrt{x} - 1\bigr)$
\task  $1 \big\slash \sqrt[\uproot{1} \leftroot{-1} 3]{x}$
\task  $\displaystyle (x - 1) \big\slash  \bigl(\sqrt[\uproot{1} \leftroot{-1} 3]{x} - 1\bigr)$
\end{tasks}
\vskip0.25in


\noindent \textbf{Example} \vskip1.25mm
Show that the following functions are increasing functions on the interval $[0, \, \infty)$.
\begin{tasks}(1)
\task $x^{2} + x + 1$
\task $x^{2} + bx$ for any $b > 0$
\task $x^{3} + 2x^{2} + 3x - 7$
\end{tasks}

\end{document}
| improve this answer | |
  • See below my answer to your comments. – Bernard Mar 16 '16 at 19:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.