是否可以将 changepage 和 hanging 包一起使用?

是否可以将 changepage 和 hanging 包一起使用?

我正在尝试更改一些带有悬挂缩进的段落周围的边距,但 LaTeX 会抛出错误,并且不会真正解释错误所在。我是 LaTeX 新手,所以如果我犯了一个简单的错误,请原谅我。感谢您的帮助。

\documentclass[a4paper,11pt]{article}

\usepackage{fullpage}
\usepackage{hanging}
\usepackage{changepage}

%\setlength{\parindent}{0pt}
\setlength{\parskip}{16pt}

\begin{document}

\begin{adjustwidth}{.25in}{0in}
\begin{hangparas}{.25in}{1}

    \setlength{\parindent}{0in}

    \textbf{One.}
    \hspace{6pt}
    Some text.  Some text.  Some text.  Some text.  Some text.  Some text.
    Some text.  Some text.  Some text.  Some text.  Some text.  Some text.
    Some text.

    \textbf{Two.}
    \hspace{6pt}
    Some more text.  Some more text.  Some more text.  Some more text.  Some
    more text.  Some more text.  Some more text.  Some more text.  Some more
    text.  Some more text.  Some more text.

\end{hangparas}
\end{adjustwidth}

\end{document}


This is XeTeX, Version 3.1415926-2.4-0.9998 (TeX Live 2012/Debian)
 restricted \write18 enabled.
entering extended mode
(./test.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, fa
rsi, arabic, monogreek, greek, ibycus, ancientgreek, loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo))
(/usr/share/texlive/texmf-dist/tex/latex/preprint/fullpage.sty)
(/usr/share/texlive/texmf-dist/tex/latex/hanging/hanging.sty)
(/usr/share/texlive/texmf-dist/tex/latex/changepage/changepage.sty) (./test.aux
)

! LaTeX Error: Something's wrong--perhaps a missing \item.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...

l.30 \end{adjustwidth}

?

答案1

你既不需要adjustwidth也不需要hangparas

\documentclass[a4paper,11pt]{article}
\usepackage{lipsum}

\newenvironment{outpar}
 {\par\setlength{\parindent}{-0.25in}}
 {\par}

\begin{document}

\lipsum[1]

\begin{outpar}
\textbf{One.}\quad
  Some text.  Some text.  Some text.  Some text.  Some text.  Some text.
  Some text.  Some text.  Some text.  Some text.  Some text.  Some text.
  Some text.

\textbf{Two.}\quad
  Some more text.  Some more text.  Some more text.  Some more text.  Some
  more text.  Some more text.  Some more text.  Some more text.  Some more
  text.  Some more text.  Some more text.
\end{outpar}

\lipsum[2]

\end{document}

在此处输入图片描述

我删除了设置,\parskip因为我认为它不符合良好的排版。无论如何,16pt 对于任何受人尊敬的文档来说都太多了。;-)

相关内容