我正在写一份设计简介的清单,如下所示:
\begin{enumerate}
\item \textbf{Feasibility guarantee:} \label{req1}
\begin{itemize}
\item[Specification:] The solution of the hydraulic model bla bla bla 3 lines of text
\item[Test:] The error found when comparing bla bla bla 5 lines of text
\end{itemize}
\item \textbf{Certifiable optimality:} \label{req2}
\begin{itemize}
\item[Specification:] The optimality bla bla bla 6 lines of text
\item[Test:] It must be possible to prove bla bla bla 3 lines of text
\end{itemize}
\end{enumerate}
如您所见,黄色突出显示的部分位于文本框之外。
所以我的问题是:如何将项目缩进进一步向右移动,或者更好的是,还有哪些其他乳胶方法可以制作这样的设计简介。我试过一张桌子,但看起来不太好看。
答案1
问题出在标签的对齐方式上:对于enumerate
和itemize
,默认情况下,它们放置在列表左边距的左侧并右对齐。对于description
环境,标签放置在左边距上,并左对齐;对于的选项text
也是如此,只是标签放置在文本左边距的固定距离处(默认为列表文本leftmargin=` 键。wide
enumitem
parindent), and the
left margin is the
left margin; this maybe changed with the
举例来说,有 3 种可能性:
\documentclass{article}
\usepackage[showframe]{geometry}%
\usepackage{enumitem}
\begin{document}
\begin{enumerate}
\item \textbf{Feasibility guarantee:} \label{req1}
\begin{itemize}[wide=0pt, font=\normalfont\itshape]
\item[Specification:] The solution of the hydraulic model bla bla bla 3 lines of text bla bla bla 3 lines of textl bla bla bla 3 lines of text bla bla bla 3 lines of text bla bla bla 3 lines of text bla bla bla 3 lines of textl bla bla bla 3 lines of text bla bla bla 3 lines of text
\item[Test:] The error found when comparing bla bla bla 5 lines of text. The error found when comparing bla bla bla 5 lines of text. The error found when comparing bla bla bla 5 lines of text. The error found when comparing bla bla bla 5 lines of text. The error found when comparing bla bla bla 5 lines of text.
\end{itemize}
\item \textbf{Certifiable optimality:} \label{req2}
\begin{itemize}[wide=0pt, leftmargin=*, font=\normalfont\itshape]
\item[Specification:] The optimality bla bla bla 6 lines of text
\item[Test:] It must be possible to prove bla bla bla 3 lines of text
\end{itemize}
\end{enumerate}
\bigskip
\begin{enumerate}
\item \textbf{Feasibility guarantee:} \label{req1}
\begin{itemize}[wide=0pt, leftmargin=*, font=\normalfont\itshape]
\item[Specification:] The solution of the hydraulic model bla bla bla 3 lines of text bla bla bla 3 lines of textl bla bla bla 3 lines of text bla bla bla 3 lines of text bla bla bla 3 lines of text bla bla bla 3 lines of textl bla bla bla 3 lines of text bla bla bla 3 lines of text
\item[Test:] The error found when comparing bla bla bla 5 lines of text. The error found when comparing bla bla bla 5 lines of text. The error found when comparing bla bla bla 5 lines of text. The error found when comparing bla bla bla 5 lines of text. The error found when comparing bla bla bla 5 lines of text.
\end{itemize}
\item \textbf{Certifiable optimality:} \label{req2}
\begin{itemize}[wide=0pt, leftmargin=*, font=\normalfont\itshape]
\item[Specification:] The optimality bla bla bla 6 lines of text
\item[Test:] It must be possible to prove bla bla bla 3 lines of text
\end{itemize}
\end{enumerate}
\bigskip
\begin{enumerate}
\item \textbf{Feasibility guarantee:} \label{req1}
\begin{description}[font=\normalfont\itshape]
\item[Specification:] The solution of the hydraulic model bla bla bla 3 lines of text bla bla bla 3 lines of textl bla bla bla 3 lines of text bla bla bla 3 lines of text bla bla bla 3 lines of text bla bla bla 3 lines of textl bla bla bla 3 lines of text bla bla bla 3 lines of text
\item[Test:] The error found when comparing bla bla bla 5 lines of text. The error found when comparing bla bla bla 5 lines of text. The error found when comparing bla bla bla 5 lines of text. The error found when comparing bla bla bla 5 lines of text. The error found when comparing bla bla bla 5 lines of text.
\end{description}
\item \textbf{Certifiable optimality:} \label{req2}
\begin{description}[font=\normalfont\itshape]
\item[Specification:] The optimality bla bla bla 6 lines of text
\item[Test:] It must be possible to prove bla bla bla 3 lines of text
\end{description}
\end{enumerate}
\end{document}