我试图将 \begin{enumerate} 内的所有内容(包括数字)加粗。但我收到编译错误
\textbf{
\begin{enumerate}
\item {What git actions does developers do at the beginning and end of an IDE session ?.\\
\item Do developers commit their code after a successful build or test ?\\
\item
\end{enumerate}
}
答案1
列表环境中不需要\\
s ,正如 David 所说,您有一个虚假的左括号{
。 此外,由于您只希望列表为粗体,因此最好\bfseries
在列表开头添加 。
\documentclass[12pt,a4paper]{article}
\begin{document}
\begin{enumerate}\bfseries
\item What git actions does developers do at the beginning and end of an IDE session?
\item Do developers commit their code after a successful build or test?
\item Forget this ..
\end{enumerate}
\end{document}