Debian Codegraph @

texmf-dist/doc/latex/ehhline/ehhline.tex

raw
1 % Copyright (c) 2015-2019 Robert Ryszard Paciorek <[email protected]>
2 %
3 % MIT License
4 %
5 % Permission is hereby granted, free of charge, to any person obtaining a copy
6 % of this software and associated documentation files (the "Software"), to deal
7 % in the Software without restriction, including without limitation the rights
8 % to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 % copies of the Software, and to permit persons to whom the Software is
10 % furnished to do so, subject to the following conditions:
11 %
12 % The above copyright notice and this permission notice shall be included in all
13 % copies or substantial portions of the Software.
14 %
15 % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 % IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 % FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 % AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 % LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 % OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 % SOFTWARE.
22
23 \documentclass[a4paper]{article}
24
25 \usepackage{ehhline, dashrule}
26
27 \begin{document}
28
29 \title{The \texttt{ehhline} package}
30 \author{Robert Ryszard Paciorek <[email protected]>}
31 \date{2019-05-13}
32 \maketitle
33
34 This package extend (via \verb$\AtBeginDocument$ and \verb$\patchcmd$) \verb$\hhline$ command with a \verb$!{...}$ token, which allows build line with \LaTeX command.
35
36 When is used \texttt{colortbl} package this package must be load AFTER \texttt{colortbl} (because \texttt{colortbl} package redefine \verb$\HH@loop$ command in \verb$\AtBeginDocument$).
37
38 \section{Example}
39
40 \begin{verbatim}
41 \hhline{%
42 !{\leaders\hrule height 1pt\hfil}%
43 !{\leaders\hbox{\tiny$\star$}\hfil}%
44 !{\hfil...\hfil...\hfil}%
45 !{\leaders\hbox{\hdashrule{1.5mm}{1pt}{0.5mm 0.5mm 0.5mm 0mm}}\hfil}%
46 }
47 \end{verbatim}
48
49 \begin{center}
50 \begin{tabular}{| c | c | c | c}
51 aaa & bbb & ccc & ddd\\
52 \hhline{%
53 !{\leaders\hrule height 1pt\hfil}%
54 !{\leaders\hbox{\tiny$\star$}\hfil}%
55 !{\hfil...\hfil...\hfil}%
56 !{\leaders\hbox{\hdashrule{1.5mm}{1pt}{0.5mm 0.5mm 0.5mm 0mm}}\hfil}%
57 }
58 \end{tabular}
59 \end{center}
60 \end{document}