Howdy,
I was trying to create a multiple choice quiz. To number the questions, I am using the enumerate environment. There is also a blank space for each question. The questions and letter choice are aligned to the right. For letter choices, I am using inparaenum.
This may seem obsessive, but is there a way to create a nested environment so that I wouldn't have to start and end the inparaenum environment for each item in the enumerate environment? Perhaps there is an easier way to get around this problem. Here is a sample of the code I am using. Thanks in advance for any help!
\item{In general, higher stability is correlated with \ldots \begin{myinparaenum} \item lower energy \item higher energy \item not correlated \end{myinparaenum}}
\item{In the \blank model, bonding is localized. In the \blank model, electrons are "smeared" throughout the molecule. \begin{myinparaenum} \item lewis, molecular orbital \item molecular orbital, lewis \item VSEPR, lewis \item lewis, VSEPR\end{myinparaenum}}
General ⇒ Nested environments for multiple choice
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Nested environments for multiple choice
It took me a long time to find out that the inparaenum environment comes with paralist. Nevertheless you have to provide a minimal working example (MWE) that shows what you want to do. Especially because you obviously declared an own environment called myinparaenum. Follow the instructions on the site behind the link. I have no interest to build a MWE on my own. With the complete code it will be much easier to give specific help.
Best regards and welcome to the board
Thorsten¹
Best regards and welcome to the board
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 2
- Joined: Tue Sep 09, 2008 9:32 pm
Re: Nested environments for multiple choice
Here you go...
\documentclass[fleqn,11pt]{article}
\usepackage{amsmath,amssymb,paralist}
\usepackage[top=1in, bottom =1in]{geometry}
\newcommand{\blank}{\line(1,0){35} \hspace{5 pt}}
\newenvironment{myinparaenum}
{\\ \begin{inparaenum}[A)]}
{\end{inparaenum}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\centering Chm1046 Quiz 1 \\
Wednesday, September 3, 2008 \\
15 points, 20 minutes \\
\raggedright Name: \line(1,0){100} \hspace{150 pt} Section \# : \line(1,0){35} \\
Conversion factors are provided where necessary and show all your work in numerical problems to get the full credit. For multiple choice circle the answer and write the letter in the space provided.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{enumerate}[1. \blank]
\setcounter{enumi}{1}
\item{Suppose you start with 5 atomic orbitals. How many molecular orbitals are available for bonding?}
\item{What is the first element on the periodic table called?}
\item{In general, higher stability is correlated with \ldots \begin{myinparaenum} \item lower energy \item higher energy \item not correlated \end{myinparaenum}}
\item{In the \blank model, bonding is localized. In the \blank model, electrons are "smeared" throughout the molecule. \begin{myinparaenum} \item lewis, molecular orbital \item molecular orbital, lewis \item VSEPR, lewis \item lewis, VSEPR\end{myinparaenum}}
\item{Which orbital is shaped like a sphere? \begin{myinparaenum} \item p \(_x\) \item d\(_{xy}\) \item s \item d\(_{x^2-y^2}\) \end{myinparaenum}}
\item{How many electrons can be found in the 2p subshell? \begin{myinparaenum} \item 2 \item 6 \item \item 10 \end{myinparaenum}}
\end{enumerate}
\end{document}
\documentclass[fleqn,11pt]{article}
\usepackage{amsmath,amssymb,paralist}
\usepackage[top=1in, bottom =1in]{geometry}
\newcommand{\blank}{\line(1,0){35} \hspace{5 pt}}
\newenvironment{myinparaenum}
{\\ \begin{inparaenum}[A)]}
{\end{inparaenum}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\centering Chm1046 Quiz 1 \\
Wednesday, September 3, 2008 \\
15 points, 20 minutes \\
\raggedright Name: \line(1,0){100} \hspace{150 pt} Section \# : \line(1,0){35} \\
Conversion factors are provided where necessary and show all your work in numerical problems to get the full credit. For multiple choice circle the answer and write the letter in the space provided.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{enumerate}[1. \blank]
\setcounter{enumi}{1}
\item{Suppose you start with 5 atomic orbitals. How many molecular orbitals are available for bonding?}
\item{What is the first element on the periodic table called?}
\item{In general, higher stability is correlated with \ldots \begin{myinparaenum} \item lower energy \item higher energy \item not correlated \end{myinparaenum}}
\item{In the \blank model, bonding is localized. In the \blank model, electrons are "smeared" throughout the molecule. \begin{myinparaenum} \item lewis, molecular orbital \item molecular orbital, lewis \item VSEPR, lewis \item lewis, VSEPR\end{myinparaenum}}
\item{Which orbital is shaped like a sphere? \begin{myinparaenum} \item p \(_x\) \item d\(_{xy}\) \item s \item d\(_{x^2-y^2}\) \end{myinparaenum}}
\item{How many electrons can be found in the 2p subshell? \begin{myinparaenum} \item 2 \item 6 \item \item 10 \end{myinparaenum}}
\end{enumerate}
\end{document}