mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-24 10:40:48 +00:00
4b33e60346
I do not commit the update to the following file since it has a non-trivial change: lib/layouts/jlreq-common.inc I'll ask for confirmation on the list before updating that file.
65 lines
1.8 KiB
Plaintext
65 lines
1.8 KiB
Plaintext
#\DeclareLyXModule{Hanging Paragraphs}
|
|
#\DeclareCategory{Paragraph Styles}
|
|
#DescriptionBegin
|
|
#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.
|
|
#DescriptionEnd
|
|
|
|
#Author: Richard Kimberly Heck
|
|
|
|
#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.
|
|
|
|
Format 106
|
|
|
|
Style Hanging
|
|
LatexType Environment
|
|
LatexName hangparagraphs
|
|
Align Block
|
|
Margin Static
|
|
LeftMargin "MMMM"
|
|
ParIndent "-MMMM"
|
|
Requires ifthen
|
|
Preamble
|
|
\newlength{\lyxhang}
|
|
\IfFileExists{hanging.sty}{
|
|
% Disable all character activation, as this interferes
|
|
% with other packages and some languages
|
|
\PassOptionsToPackage{%
|
|
notcomma,
|
|
notperiod,
|
|
notquote,
|
|
notquery,
|
|
notexcl,
|
|
notcolon,
|
|
notscolon
|
|
}{hanging}
|
|
\usepackage{hanging}
|
|
\newenvironment{hangparagraphs}
|
|
{%
|
|
\ifthenelse{\lengthtest{\parindent > 0pt}}%
|
|
{\setlength{\lyxhang}{\parindent}}%
|
|
{\setlength{\lyxhang}{2em}}%
|
|
\par\begin{hangparas}{\lyxhang}{1}%
|
|
}
|
|
{\end{hangparas}}
|
|
}{%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
|
|
DocBookTag para
|
|
DocBookAttr role='hanging'
|
|
End
|