| 1 |
\documentclass[a4paper]{ltxdoc} |
| 2 |
\usepackage{hang} |
| 3 |
\usepackage{polyglossia} |
| 4 |
\setdefaultlanguage{english} |
| 5 |
\setotherlanguage{latin} |
| 6 |
\newcommand{\lipsumone}{\textlatin{Lorem ipsum dolor sit amet, consectetuer |
| 7 |
adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, |
| 8 |
felis.}} |
| 9 |
\newcommand{\lipsumtwo}{\textlatin{Curabitur dictum gravida mauris. Nam arcu |
| 10 |
libero, nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue |
| 11 |
eu neque.}} |
| 12 |
\setlength{\parindent}{1em} |
| 13 |
|
| 14 |
\frenchspacing |
| 15 |
\sloppy |
| 16 |
|
| 17 |
\begin{document} |
| 18 |
\title{Sample use of the \textsf{hang} package} |
| 19 |
\author{Andreas Nolda} |
| 20 |
\date{2017/02/18} |
| 21 |
\maketitle |
| 22 |
|
| 23 |
\section{Hanging paragraphs and list items} |
| 24 |
|
| 25 |
\subsection{Hanging paragraphs} |
| 26 |
|
| 27 |
\begin{hangingpar} |
| 28 |
\DescribeMacro{hangingpar}\lipsumone |
| 29 |
\end{hangingpar} |
| 30 |
\begin{hangingpar} |
| 31 |
\DescribeMacro{hangingpar}\lipsumtwo |
| 32 |
\end{hangingpar} |
| 33 |
|
| 34 |
\subsection{Hanging list items} |
| 35 |
|
| 36 |
\begin{hanginglist} |
| 37 |
\item\DescribeMacro{hanginglist}\lipsumone |
| 38 |
\item\lipsumtwo |
| 39 |
\end{hanginglist} |
| 40 |
|
| 41 |
\begin{compacthang} |
| 42 |
\item\DescribeMacro{compacthang}\lipsumone |
| 43 |
\item\lipsumtwo |
| 44 |
\end{compacthang} |
| 45 |
|
| 46 |
\section{Labeled paragraphs and list items} |
| 47 |
|
| 48 |
\subsection{Labeled paragraphs} |
| 49 |
|
| 50 |
\begin{labeledpar}{Label 10}{Label 9} |
| 51 |
\DescribeMacro{labeledpar}\lipsumone |
| 52 |
\end{labeledpar} |
| 53 |
\begin{labeledpar}{Label 10}{Label 10} |
| 54 |
\DescribeMacro{labeledpar}\lipsumtwo |
| 55 |
\end{labeledpar} |
| 56 |
|
| 57 |
\subsection{Labeled list items} |
| 58 |
|
| 59 |
\begin{labeledlist}{Label 10} |
| 60 |
\item[Label 9]\DescribeMacro{labeledlist}\lipsumone |
| 61 |
\item[Label 10]\lipsumtwo |
| 62 |
\end{labeledlist} |
| 63 |
|
| 64 |
\pagebreak |
| 65 |
\begin{compactlabel}{Label 10} |
| 66 |
\item[Label 9]\DescribeMacro{compactlabel}\lipsumone |
| 67 |
\item[Label 10]\lipsumtwo |
| 68 |
\end{compactlabel} |
| 69 |
|
| 70 |
|
| 71 |
\end{document} |