![\item[带有非常长的要点],制作设计简介](https://linux22.com/image/346447/%5Citem%5B%E5%B8%A6%E6%9C%89%E9%9D%9E%E5%B8%B8%E9%95%BF%E7%9A%84%E8%A6%81%E7%82%B9%5D%EF%BC%8C%E5%88%B6%E4%BD%9C%E8%AE%BE%E8%AE%A1%E7%AE%80%E4%BB%8B.png)
我正在写一份设计简介的清单,如下所示:
\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}