我的代码是:
\centering {\huge{\textbf{Class name}}}
\vspace{2cm}
\raggedright
Due date: Monday, January 1, 2017, 11:11 PM\\[1.5em]
Textbook: \textbf{Textbook name} \ by \ \textbf{Authors}\\[1.5em]
Solve the following problems: 1, 2, 3, 4.\\[1.5em]
\begin{enumerate}
\item[\textbf{Exercise 1}] Question!
\item[\textbf{Solve}] My answer!
\\[2\baselineskip]
\item[\textbf{Exercise 2}] Question!
\item[\textbf{Solve}] My answer!
\\[2\baselineskip]
\item[\textbf{Exercise 3}] Question!
\item[\textbf{Solve}] My answer!
\\[2\baselineskip]
\item[\textbf{Exercise 4}] Question!
\item[\textbf{Solve}] My answer!
\end{enumerate}
\end{document}
问题是问题的索引从左对齐突出。图片是结果。
答案1
您可以在以下文档中找到解决方案:枚举项包。将选项传递wide
给enumerate
环境,如下所示:\begin{enumerate}[wide]
。
这是 MWE。
\documentclass{article}
\usepackage{enumitem}
\begin{document}
{\centering\huge\textbf{Class name}\par}
\vspace{2cm}
\raggedright
Due date: Monday, January 1, 2017, 11:11 PM\\[1.5em]
Textbook: \textbf{Textbook name} \ by \ \textbf{Authors}\\[1.5em]
Solve the following problems: 1, 2, 3, 4.\\[1.5em]
\begin{enumerate}[wide]
\item[\textbf{Exercise 1}] Question!
\item[\textbf{Solve}] My answer!
\vspace{2\baselineskip}
\item[\textbf{Exercise 2}] Question!
\item[\textbf{Solve}] My answer!
\vspace{2\baselineskip}
\item[\textbf{Exercise 3}] Question!
\item[\textbf{Solve}] My answer!
\vspace{2\baselineskip}
\item[\textbf{Exercise 4}] Question!
\item[\textbf{Solve}] My answer!
\end{enumerate}
\end{document}