我做错了什么?(我对 LaTeX 很陌生,这是我的第一个问题,请原谅我的无知)
\section*{TERM 2}
\textbf{10 weeks} (30 hrs)
\begin{itemize}
\subsection*{UNIT 1: Number \& Algebra (9 wks)}
\subsubsection*{Topic 1.2: Real Numbers}
\begin{itemize}
\item \underline{Week 1:} Sub-Topic 5
\item \underline{Week 2:} Sub-Topic 6
\item \underline{Week 3:} Sub-Topic 7
\item \underline{Week 4:} Sub-Topic 8
\item \underline{Week 5:} Sub-Topic 9
\item \underline{Week 6:} Sub-Topic 10
\item \underline{Week 7:} Sub-Topic 11
\item \underline{Week 8:} Sub-Topic 12
\end{itemize}
错误出现在“子主题 5”(第 7 行)。我使用的是 Overleaf,这部分是 100 页文档的一部分。同样的错误出现了四次。不过,它在 PDF 上显示得很好。如果您能提供任何帮助,我将不胜感激。
答案1
我认为那些部分、子部分等是用于更改字体大小和形状的。标准itemize
环境不是很有用。因此,我们需要加载enumitem
额外的选项。
我不确定您希望列表看起来到底是什么样子,所以我添加了一些内容,例如粗体,斜体,不同的字体大小等,希望下面的代码可以为进一步的实验提供一个良好的开端。
\documentclass{article}
\usepackage{enumitem}
%%% Sets global keys
\SetEnumitemKey{cancelfont}{
before=\normalfont\normalsize}
\SetEnumitemKey{customlabel}{label={}}
%%% Sets formatting per each level of itemize
\setlist[itemize,1]{
customlabel,
cancelfont, before*=\LARGE\bfseries}
\setlist[itemize,2]{
customlabel,
cancelfont, before*=\large\bfseries\slshape}
\setlist[itemize,3]{
customlabel,
cancelfont, before*=\bfseries}
\setlist[itemize,4]{customlabel, cancelfont}
%%% Document
\begin{document}
\noindent
\begin{itemize}
\item TERM 1
\item 10 weeks (30 hrs)
\begin{itemize}
\item UNIT 1: Number \& Algebra (9 wks)
\begin{itemize}
\item Topic 1.2: Real Numbers
\begin{itemize}
\item \underline{Week 1:} Sub-Topic 5
\item \underline{Week 2:} Sub-Topic 6
\item \underline{Week 3:} Sub-Topic 7
\item \underline{Week 4:} Sub-Topic 8
\item \underline{Week 5:} Sub-Topic 9
\item \underline{Week 6:} Sub-Topic 10
\item \underline{Week 7:} Sub-Topic 11
\item \underline{Week 8:} Sub-Topic 12
\end{itemize}
\end{itemize}
\item UNIT 2: Number \& Algebra (9 wks)
\begin{itemize}
\item Topic 1.2: Real Numbers
\begin{itemize}
\item \underline{Week 1:} Sub-Topic 5
\item \underline{Week 2:} Sub-Topic 6
\item \underline{Week 3:} Sub-Topic 7
\item \underline{Week 4:} Sub-Topic 8
\item \underline{Week 5:} Sub-Topic 9
\item \underline{Week 6:} Sub-Topic 10
\item \underline{Week 7:} Sub-Topic 11
\item \underline{Week 8:} Sub-Topic 12
\end{itemize}
\end{itemize}
\end{itemize}
\item TERM 2
\item 10 weeks (30 hrs)
\begin{itemize}
\item UNIT 3: Number \& Algebra (9 wks)
\begin{itemize}
\item Topic 1.2: Real Numbers
\begin{itemize}
\item \underline{Week 1:} Sub-Topic 5
\item \underline{Week 2:} Sub-Topic 6
\item \underline{Week 3:} Sub-Topic 7
\item \underline{Week 4:} Sub-Topic 8
\item \underline{Week 5:} Sub-Topic 9
\item \underline{Week 6:} Sub-Topic 10
\item \underline{Week 7:} Sub-Topic 11
\item \underline{Week 8:} Sub-Topic 12
\end{itemize}
\end{itemize}
\end{itemize}
\end{itemize}
\end{document}
答案2
您可以组合两种不同类型的结构:
- 大纲(章节、小节、小小节)
- (嵌套)列表
(嵌套)列表应完全位于大纲的同一层级内,例如
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\begin{document}
\section{abc}
\begin{itemize}
\item a
\item b
\item c
\end{itemize}
\subsection{def}
\begin{itemize}
\item d
\item e
\item f
\end{itemize}
\end{document}