summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/xhfill/xhfill-doc.tex
blob: 709a836f6b39060ebb9afcc483dbdfb9bc2ae7d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
%% $Id: xhfill-doc.tex 501 2011-05-14 09:41:09Z herbert $
\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage[scaled=0.85]{beramono}
\usepackage{berasans}
\usepackage{beraserif}
\usepackage{xhfill}
\let\FileVersion\fileversion
\usepackage{listings}
\lstset{language=[LaTeX]TEX,basicstyle=\ttfamily\small,%
        extendedchars=true,numbers=left,numberstyle=\tiny,%
        xleftmargin=2em,breaklines=true}

\newcommand{\xfill}[2][1ex]{{%
  \dimen0=#2\advance\dimen0 by #1
  \leaders\hrule height \dimen0 depth -#1\hfill%
}}
\newcommand{\xfilll}[2][1ex]{%
  \dimen0=#2\advance\dimen0 by #1%
  \leaders\hrule height \dimen0 depth -#1\hfill%
}

\begin{document}
\title{Package \texttt{xhfill}\\v\FileVersion}
\author{Herbert Vo\ss}
\date{\today}
\maketitle
blah\xfill{1pt}blub
\begin{lstlisting}
blah\xfill{1pt}blub
\end{lstlisting}

blah\xfill{3pt}blub
\begin{lstlisting}
blah\xfill{3pt}blub
\end{lstlisting}

blah\xfill[0pt]{4pt}blub
\begin{lstlisting}
blah\xfill[0pt]{4pt}blub
\end{lstlisting}

blah\xfill[-12pt]{12pt}blub
\begin{lstlisting}
blah\xfill[-12pt]{12pt}blub
\end{lstlisting}

blah\xfilll{1pt}blub
\begin{lstlisting}
blah\xfilll{1pt}blub
\end{lstlisting}
blah\xfilll{1pt}blub
\begin{lstlisting}
blah\xfilll{1pt}blub
\end{lstlisting}

blah\xfilll[0pt]{4pt}blub
\begin{lstlisting}
blah\xfilll[0pt]{4pt}blub
\end{lstlisting}

blah\xfilll[-12pt]{12pt}blub
\begin{lstlisting}
blah\xfilll[-12pt]{12pt}blub
\end{lstlisting}

blah\xrfill{1pt}[blue]blub blah\xrfill{2pt}[cyan]blub
\begin{lstlisting}
blah\xrfill{1pt}[blue]blub blah\xrfill{2pt}[cyan]blub
\end{lstlisting}

laber\xrfill[0pt]{4pt}[green]blub blub
\begin{lstlisting}
laber\xrfill[0pt]{4pt}[green]blub blub
\end{lstlisting}

blah\xrfill[-1ex]{1pt}[red]blub
\begin{lstlisting}
blah\xrfill[-1ex]{1pt}[red]blub
\end{lstlisting}

blah \xhrulefill{cyan}{1cm} blub
\begin{lstlisting}
blah \xhrulefill{cyan}{1cm} blub
\end{lstlisting}

blah \xhrectanglefill{0.5cm}{1pt} blubber
\begin{lstlisting}
blah \xhrectanglefill{0.5cm}{1pt} blubber
\end{lstlisting}

blah\xdotfill{1pt}[blue]blah\xdotfill{2pt}[red]blub
\begin{lstlisting}
blah\xdotfill{1pt}[blue]blah\xdotfill{2pt}[red]blub
\end{lstlisting}


\subsection*{The code}

\lstinputlisting{xhfill.sty}


\end{document}