1 #\DeclareLyXModule{Hanging Paragraphs}
2 #\DeclareCategory{Paragraph Styles}
4 #Adds an environment for hanging paragraphs.
5 #Hanging paragraph is a paragraph in which the first line is set to the left margin, but all subsequent lines are indented.
10 #Hanging paragraph code adapted from hanging.sty, available at:
11 # http://www.ctan.org/tex-archive/macros/latex/contrib/hanging/
12 #Copyright Peter R. Wilson.
13 #Released under the LaTeX Project Public License.
19 LatexName hangparagraphs
27 \IfFileExists{hanging.sty}{
29 \newenvironment{hangparagraphs}
31 \ifthenelse{\lengthtest{\parindent > 0pt}}%
32 {\setlength{\lyxhang}{\parindent}}%
33 {\setlength{\lyxhang}{2em}}%
34 \par\begin{hangparas}{\lyxhang}{1}%
38 \newenvironment{hangparagraphs}
40 \ifthenelse{\lengthtest{\parindent > 0pt}}%
41 {\setlength{\lyxhang}{\parindent}}%
42 {\setlength{\lyxhang}{2em}}%
46 \newcommand{\hangpara}{\hangindent \lyxhang \hangafter 1 \noindent}
47 \newenvironment{hangparas}{\setlength{\parindent}{\z@}
48 \everypar={\hangpara}}{\par}