General ⇒ Nested environments for multiple choice
-
- Posts: 2
- Joined: Tue Sep 09, 2008 9:32 pm
Nested environments for multiple choice
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}}
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Nested environments for multiple choice
Best regards and welcome to the board
Thorsten¹
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
\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}