2019-04-07 09:21:21 +00:00
|
|
|
#\DeclareLyXModule{Hanging Paragraphs}
|
2019-04-04 16:43:29 +00:00
|
|
|
#\DeclareCategory{Paragraph Styles}
|
2008-01-09 18:51:02 +00:00
|
|
|
#DescriptionBegin
|
2008-07-07 22:59:40 +00:00
|
|
|
#Adds an environment for hanging paragraphs.
|
|
|
|
#Hanging paragraph is a paragraph in which the first line is set to the left margin, but all subsequent lines are indented.
|
2008-01-09 18:51:02 +00:00
|
|
|
#DescriptionEnd
|
|
|
|
|
2020-12-05 22:09:17 +00:00
|
|
|
#Author: Richard Kimberly Heck
|
2007-09-23 05:46:22 +00:00
|
|
|
|
|
|
|
#Hanging paragraph code adapted from hanging.sty, available at:
|
|
|
|
# http://www.ctan.org/tex-archive/macros/latex/contrib/hanging/
|
|
|
|
#Copyright Peter R. Wilson.
|
|
|
|
#Released under the LaTeX Project Public License.
|
|
|
|
|
2024-07-24 14:14:34 +00:00
|
|
|
Format 106
|
2007-09-23 05:46:22 +00:00
|
|
|
|
|
|
|
Style Hanging
|
|
|
|
LatexType Environment
|
|
|
|
LatexName hangparagraphs
|
|
|
|
Align Block
|
|
|
|
Margin Static
|
|
|
|
LeftMargin "MMMM"
|
|
|
|
ParIndent "-MMMM"
|
2008-01-07 17:32:47 +00:00
|
|
|
Requires ifthen
|
2007-09-23 05:46:22 +00:00
|
|
|
Preamble
|
|
|
|
\newlength{\lyxhang}
|
|
|
|
\IfFileExists{hanging.sty}{
|
2023-12-05 16:07:10 +00:00
|
|
|
% Disable all character activation, as this interferes
|
|
|
|
% with other packages and some languages
|
2023-12-05 17:36:04 +00:00
|
|
|
\PassOptionsToPackage{%
|
2023-12-05 16:07:10 +00:00
|
|
|
notcomma,
|
|
|
|
notperiod,
|
|
|
|
notquote,
|
|
|
|
notquery,
|
|
|
|
notexcl,
|
|
|
|
notcolon,
|
|
|
|
notscolon
|
2023-12-05 17:36:04 +00:00
|
|
|
}{hanging}
|
2007-09-23 05:46:22 +00:00
|
|
|
\usepackage{hanging}
|
|
|
|
\newenvironment{hangparagraphs}
|
|
|
|
{%
|
|
|
|
\ifthenelse{\lengthtest{\parindent > 0pt}}%
|
|
|
|
{\setlength{\lyxhang}{\parindent}}%
|
|
|
|
{\setlength{\lyxhang}{2em}}%
|
2008-12-15 15:00:21 +00:00
|
|
|
\par\begin{hangparas}{\lyxhang}{1}%
|
2007-09-23 05:46:22 +00:00
|
|
|
}
|
2008-12-15 15:00:21 +00:00
|
|
|
{\end{hangparas}}
|
2007-09-23 05:46:22 +00:00
|
|
|
}{%else
|
|
|
|
\newenvironment{hangparagraphs}
|
|
|
|
{%
|
|
|
|
\ifthenelse{\lengthtest{\parindent > 0pt}}%
|
|
|
|
{\setlength{\lyxhang}{\parindent}}%
|
|
|
|
{\setlength{\lyxhang}{2em}}%
|
|
|
|
\begin{hangparas}%
|
|
|
|
}
|
|
|
|
{\end{hangparas}}
|
|
|
|
\newcommand{\hangpara}{\hangindent \lyxhang \hangafter 1 \noindent}
|
|
|
|
\newenvironment{hangparas}{\setlength{\parindent}{\z@}
|
|
|
|
\everypar={\hangpara}}{\par}
|
|
|
|
}
|
|
|
|
EndPreamble
|
2023-08-01 01:28:15 +00:00
|
|
|
DocBookTag para
|
|
|
|
DocBookAttr role='hanging'
|
2007-09-23 05:46:22 +00:00
|
|
|
End
|