我正在尝试将未缩进的文本/图像/图形块插入大纲。我想避免嵌套enumerate
环境。有人有使用与我下面类似的简单解决方案吗?谢谢!
\documentclass{article}
\usepackage{outlines}
\usepackage{enumitem}
\setenumerate[1]{label=\Roman*.}
\setenumerate[2]{label=\Alph*.}
\setenumerate[3]{label=\roman*.}
\setenumerate[4]{label=\alph*.}
\begin{document}
\begin{outline}[enumerate]
\1 Some text
\2 Other Text
\3 Other other text
WANTED: to be able to insert text and graph here that is NOT indented
\3 More other other text
\2 More other text
\end{outline}
\end{document}
答案1
您可以使用\hspace*{\dimexpr\linewidth-\textwidth\relax}
将以下文本一直移动到左侧边缘:
\documentclass{article}
\usepackage{xcolor}
\begin{document}
\noindent\raisebox{0pt}[0pt][0pt]{\color{red}\rule[-2in]{0.4pt}{2in}}
\begin{itemize}
\item Random stuff. blah blah blah. More random stuff.
\item Random stuff. blah blah blah. More random stuff.
\begin{itemize}
\item Random stuff. blah blah blah. More random stuff.
\item Random stuff. blah blah blah. More random stuff.
\begin{itemize}
\item Random stuff. blah blah blah. More random stuff.
\item Random stuff. blah blah blah. More random stuff.
\hspace*{\dimexpr\linewidth-\textwidth\relax}\fbox{\color{blue}Nonindented material}
\item Random stuff. blah blah blah. More random stuff.
\end{itemize}
\item Random stuff. blah blah blah. More random stuff.
\end{itemize}
\item Random stuff. blah blah blah. More random stuff.
\item Random stuff. blah blah blah. More random stuff.
\end{itemize}
\end{document}
垂直红线显示左边距的位置。
如果您有更多文本需要插入,您可以将其放在宽度设置为的小页面中\textwidth
。
\documentclass{article}
\usepackage{xcolor}
\usepackage{lipsum}
\pagestyle{empty}
\begin{document}
\noindent\raisebox{0pt}[0pt][0pt]{\color{red}\rule[-2in]{0.4pt}{2in}}
\begin{itemize}
\item Random stuff. blah blah blah. More random stuff.
\item Random stuff. blah blah blah. More random stuff.
\begin{itemize}
\item Random stuff. blah blah blah. More random stuff.
\item Random stuff. blah blah blah. More random stuff.
\begin{itemize}
\item Random stuff. blah blah blah. More random stuff.
\item Random stuff. blah blah blah. More random stuff.
\hspace*{\dimexpr\linewidth-\textwidth\relax}%
\begin{minipage}[t]{\textwidth}%
\lipsum[1]
\end{minipage}
\item Random stuff. blah blah blah. More random stuff.
\end{itemize}
\item Random stuff. blah blah blah. More random stuff.
\end{itemize}
\item Random stuff. blah blah blah. More random stuff.
\item Random stuff. blah blah blah. More random stuff.
\end{itemize}
\end{document}
答案2
如果您希望允许在“WANTED”文本中进行分页,那么使用minipage
不会有帮助(因为它将包含的文本保持在一个框中。为此,您可以使用mdframed
\parshape
或者临时重排文本块边界的原语:
\documentclass{article}
\usepackage{enumitem,lipsum}% http://ctan.org/pkg/{enumitem,lipsum}
\setenumerate[1]{label=\Roman*.}
\setenumerate[2]{label=\Alph*.}
\setenumerate[3]{label=\roman*.}
\setenumerate[4]{label=\alph*.}
\begin{document}
\lipsum[1]
\begin{enumerate}
\item Some text
\begin{enumerate}
\item Other Text
\begin{enumerate}
\item Other other text \par
{\parshape 1 -\itemindent \textwidth
\lipsum[2-5]}
\item More other other text
\item More other text
\end{enumerate}
\item Some more text
\end{enumerate}
\item Some other text
\end{enumerate}
\lipsum[4]
\end{document}
我已经将设置分组\parshape
,以将其效果本地化为“WANTED”文本的范围。虽然没有包括在内,但showframe
包裹被添加以产生可见的文本块边界。
看页面右下角环绕徽标简要讨论一下 的使用\parshape
。