Debian Codegraph @

texmf-dist/source/latex/cals/cals.dtx

raw
1 % \iffalse meta-comment
2 %
3 % Copyright (C) 2010-2017 by Oleg Parashchenko <[email protected]>
4 % -------------------------------------------------------
5 %
6 % This file may be distributed and/or modified under the
7 % conditions of the LaTeX Project Public License, either version 1.2
8 % of this license or (at your option) any later version.
9 % The latest version of this license is in:
10 %
11 % http://www.latex-project.org/lppl.txt
12 %
13 % and version 1.2 or later is part of all distributions of LaTeX
14 % version 1999/12/01 or later.
15 %
16 % \fi
17 %
18 % \iffalse
19 %<*driver>
20 \ProvidesFile{cals.dtx}
21 %</driver>
22 %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
23 %<package>\ProvidesPackage{cals}
24 %<*package>
25 [2016/11/23 CALS tables v.2.4.2]
26 %</package>
27 %
28 %<*driver>
29 \documentclass{ltxdoc}
30 \usepackage{hyperref}
31 \EnableCrossrefs
32 \CodelineIndex
33 \RecordChanges
34 \begin{document}
35 \DocInput{cals.dtx}
36 \PrintChanges
37 \PrintIndex
38 \end{document}
39 %</driver>
40 % \fi
41 %
42 % \CheckSum{0}
43 %
44 % \CharacterTable
45 % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
46 % Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
47 % Digits \0\1\2\3\4\5\6\7\8\9
48 % Exclamation \! Double quote \" Hash (number) \#
49 % Dollar \$ Percent \% Ampersand \&
50 % Acute accent \' Left paren \( Right paren \)
51 % Asterisk \* Plus \+ Comma \,
52 % Minus \- Point \. Solidus \/
53 % Colon \: Semicolon \; Less than \<
54 % Equals \= Greater than \> Question mark \?
55 % Commercial at \@ Left bracket \[ Backslash \\
56 % Right bracket \] Circumflex \^ Underscore \_
57 % Grave accent \` Left brace \{ Vertical bar \|
58 % Right brace \} Tilde \~}
59 %
60 %
61 % \changes{v2.4.2}{2017/01/20}{Bug fixes to allow table inside straddled cell.}
62 % \changes{v2.4.1}{2016/11/23}{Bug fixes for row separation lines.}
63 % \changes{v2.4}{2014/11/12}{Built-in RTL (right-to-left) support.}
64 % \changes{v2.2}{2013/05/27}{Hooks for bidi support.}
65 % \changes{v2.1}{2013/05/24}{Alignment of tables works.}
66 % \changes{v2.0}{2010/10/08}{Complete rewrite with different approach}
67 % \changes{v1.0}{2010/06/17}{Initial version from skeleton.dtx}
68 %
69 % \GetFileInfo{cals.dtx}
70 %
71 % \DoNotIndex{\newcommand,\newenvironment}
72 %
73 %
74 % \title{The \textsf{cals} package\thanks{This document
75 % corresponds to \textsf{cals}~\fileversion, dated \filedate.}}
76 % \author{Oleg Parashchenko \\ \texttt{[email protected]}}
77 %
78 % \maketitle
79 %
80 % \section{Introduction}
81 %
82 % The |cals| package is a set of macros to typeset multipage tables
83 % with repeatable headers and footers, with cells spanned over
84 % rows and columns. Decorations are supported: padding, background
85 % color, width of separation rules. The code is compatible with
86 % multicol and bidi.
87 %
88 % The work is released to public (\LaTeX{} license)
89 % by \url{bitplant.de}~GmbH, a company which provides technical
90 % documentation services to industry.
91 %
92 % \section{Usage}
93 %
94 % The users' guide is a separate document, published in TUGboat 2011:2:
95 % \url{http://tug.org/TUGboat/tb32-2/tb101parashchenko.pdf}. There are
96 % examples on CTAN: \url{https://www.ctan.org/pkg/cals}.
97 %
98 % The most important feature: the table (its rows) must start in a
99 % vertical mode, the cells content should switch to a horizontal mode.
100 % For using the commands with the |@| symbol you might need to say
101 % |\makeatletter| first.
102 %
103 % Please post questions and suggestions to the |texhax| mailing list
104 % (\url{http://tug.org/mailman/listinfo/texhax}) or on \TeX-\LaTeX{}
105 % Stack Exchange site (\url{http://tex.stackexchange.com/}) with the
106 % tag |cals|.
107 %
108 % Summary of the user interface:
109 % \begin{verbatim}
110 % \begin{calstable} % [n|l|c|r]
111 % \colwidths{{100pt}{200pt}}
112 % \brow \cell{a} \cell{b} \erow
113 % \end{calstable}
114 % \end{verbatim}
115 %
116 % Table elements: |\thead|, |\tfoot|, |\tbreak{\penalty-10000}|, |\lastrule|.
117 %
118 % Table alignment: |l|, |c|, |r| for left, center and right;
119 % |n| for none, using the default |\leftskip| and |\rightskip|.
120 %
121 % In-cell alignment: |\alignL|, |\alignC|, |\alignR|, |\vfill|.
122 %
123 % Padding: lengths |\cals@paddingL| (|...T,R,B|), set by |\cals@setpadding{Ag}|,
124 % baseline alignment |\cals@paddingD|, set by |\cals@setcellprevdepth{Al}|.
125 %
126 % Color: |\cals@bgcolor|.
127 %
128 % Rules: |\cals@cs@width|, |\cals@framecs@width|, |\cals@rs@width|,
129 % |\cals@framers@width|, |\cals@bodyrs@width|. Overrides:
130 % |\cals@borderL| (|...T,R,B|).
131 %
132 % Hooks: |\cals@AtBeginTable|, |\cals@AtEndTable|,
133 % |\cals@AtBeginCell|, |\cals@AtEndCell|.
134 %
135 % Spanning: |\nullcell|, |\spancontent|.
136 %
137 % \StopEventually{}
138 %
139 % \section{Implementation}
140 %
141 % What happens. |\cell| creates a table cell, puts it to the
142 % current row and updates decorations. At the end of the row
143 % (|\erow|) we have the box |\cals@current@row|, the box
144 % |\cals@current@cs|---column separation and cells background---and
145 % the macros |\cals@current@rs@above| and |\cals@current@rs@below|---all
146 % the required data to typeset row separation.
147 % Before dispatching the row, all the cells are repacked
148 % to the common height. The row dispatcher (|\cals@row@dispatch|)
149 % usually just uses |\cals@issue@row|, which
150 % outputs |current@cs|, then joins the previous row |cs@below| with the
151 % current row |rs@above| and typesets the resulting row separation, and
152 % finally prints the row itself. If a table break is required, the
153 % dispatcher backups the current row and first typesets the table footer,
154 % a page break and the table header. In case of a row span, the set
155 % of the rows is converted to one big row.
156 %
157 % I tried to code as good and robust as I can. In particular,
158 % the package contains unit tests. However, being an unexperienced
159 % \TeX{} programmer, I could write bad code, especially in the section
160 % ``List list of tokens''. Do not hesitate to send me suggestions
161 % and corrections, also in the use of English.
162 %
163 % The description is split on two parts: main functionality and
164 % decorations. The first part is bottom-up: creating cells,
165 % collecting cells to a row, dispatching a row, top-level table
166 % elements. The second part starts with the common code,
167 % then explains in-row decorations (column separation and cells
168 % background) and between-row decorations (row separation).
169
170 %
171 % \input{cell.dtx}
172 % \input{span.dtx}
173 % \input{table.dtx}
174 % \input{lltokens.dtx}
175 % \input{decor.dtx}
176 % \input{colsep.dtx}
177 % \input{rowsep.dtx}
178 % \input{rtl.dtx}
179
180 %
181 % \Finale
182 \endinput