diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/cals/cals.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/cals/cals.dtx | 168 |
1 files changed, 168 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/cals/cals.dtx b/Master/texmf-dist/source/latex/cals/cals.dtx new file mode 100644 index 00000000000..e0ae6dbac16 --- /dev/null +++ b/Master/texmf-dist/source/latex/cals/cals.dtx @@ -0,0 +1,168 @@ +% \iffalse meta-comment +% +% Copyright (C) 2010 by Oleg Parashchenko <olpa@uucode.com> +% ------------------------------------------------------- +% +% This file may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.2 +% of this license or (at your option) any later version. +% The latest version of this license is in: +% +% http://www.latex-project.org/lppl.txt +% +% and version 1.2 or later is part of all distributions of LaTeX +% version 1999/12/01 or later. +% +% \fi +% +% \iffalse +%<*driver> +\ProvidesFile{cals.dtx} +%</driver> +%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] +%<package>\ProvidesPackage{cals} +%<*package> + [2010/10/07 CALS tables v.2.0] +%</package> +% +%<*driver> +\documentclass{ltxdoc} +\usepackage{hyperref} +\EnableCrossrefs +\CodelineIndex +\RecordChanges +\begin{document} + \DocInput{cals.dtx} + \PrintChanges + \PrintIndex +\end{document} +%</driver> +% \fi +% +% \CheckSum{0} +% +% \CharacterTable +% {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 +% 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 +% Digits \0\1\2\3\4\5\6\7\8\9 +% Exclamation \! Double quote \" Hash (number) \# +% Dollar \$ Percent \% Ampersand \& +% Acute accent \' Left paren \( Right paren \) +% Asterisk \* Plus \+ Comma \, +% Minus \- Point \. Solidus \/ +% Colon \: Semicolon \; Less than \< +% Equals \= Greater than \> Question mark \? +% Commercial at \@ Left bracket \[ Backslash \\ +% Right bracket \] Circumflex \^ Underscore \_ +% Grave accent \` Left brace \{ Vertical bar \| +% Right brace \} Tilde \~} +% +% +% \changes{v2.0}{2010/10/08}{Complete rewrite with different approach} +% \changes{v1.0}{2010/06/17}{Initial version from skeleton.dtx} +% +% \GetFileInfo{cals.dtx} +% +% \DoNotIndex{\newcommand,\newenvironment} +% +% +% \title{The \textsf{cals} package\thanks{This document +% corresponds to \textsf{cals}~\fileversion, dated \filedate.}} +% \author{Oleg Parashchenko \\ \texttt{olpa@uucode.com}} +% +% \maketitle +% +% \section{Introduction} +% +% The |cals| package is a set of macros to typeset multipage tables +% with repeatable headers and footers, with cells spanned over +% rows and columns. Decorations are supported: padding, background +% color, width of separation rules. The code is compatible with +% multicols and pdfsync. +% +% The work is released to public (\LaTeX{} license) +% by \url{bitplant.de}~GmbH, a company which provides technical +% documentation services to industry. +% +% \section{Usage} +% +% An users' guide is a separate document, yet to be written. +% I'll do it for TUGboat 2011:1. At the moment, as a substitute, +% use the demo document provided with the package. The most +% important feature: the table (its rows) must start in a vertical +% mode, the cells content should switch to a horizontal mode. +% +% Please post questions and suggestions to the newsgroup +% |comp.text.tex| and the |texhax| mailing list (see +% \url{http://tug.org/mailman/listinfo/texhax}), +% not directly to me. +% +% Summary of the user interface: +% \begin{verbatim} +% \begin{calstable} +% \colwidths{{100pt}{200pt}} +% \brow \cell{a} \cell{b} \erow +% \end{calstable} +% \end{verbatim} +% +% Table elements: |\thead|, |\tfoot|, |\tbreak{\penalty-10000}|, |\lastrule|. +% +% Alignment: |\alignL|, |\alignC|, |\alignR|, |\vfill|. +% +% Padding: lengths |\cals@paddingL| (|...T,R,B|), set by |\cals@setpadding{Ag}|, +% baseline alignment |\cals@paddingD|, set by |\cals@setcellprevdepth{Al}|. +% +% Color: |\cals@bgcolor|. +% +% Rules: |\cals@cs@width|, |\cals@framecs@width|, |\cals@rs@width|, +% |\cals@framers@width|, |\cals@bodyrs@width|. Overrides: +% |\cals@borderL| (|...T,R,B|). +% +% Hooks: |\cals@AtBeginCell|, |\cals@AtEndCell|. +% +% Spanning: |\nullcell|, |\spancontent|. +% +% \StopEventually{} +% +% \section{Implementation} +% +% What happens. |\cell| creates a table cell, puts it to the +% current row and updates decorations. At the end of the row +% (|\erow|) we have the box |\cals@current@row|, the box +% |\cals@current@cs|---column separation and cells background---and +% the macros |\cals@current@rs@above| and |\cals@current@rs@below|---all +% the required data to typeset row separation. +% Before dispatching the row, all the cells are repacked +% to the common height. The row dispatcher (|\cals@row@dispatch|) +% usually just uses |\cals@issue@row|, which +% outputs |current@cs|, then joins the previous row |cs@below| with the +% current row |rs@above| and typesets the resulting row separation, and +% finally prints the row itself. If a table break is required, the +% dispatcher backups the current row and first typesets the table footer, +% a page break and the table header. In case of a row span, the set +% of the rows is converted to one big row. +% +% I tried to code as good and robust as I can. In particular, +% the package contains unit tests. However, being an unexperienced +% \TeX{} programmer, I could write bad code, especially in the section +% ``List list of tokens''. Do not hesitate to send me suggestions +% and corrections, also in the use of English. +% +% The description is split on two parts: main functionality and +% decorations. The first part is bottom-up: creating cells, +% collecting cells to a row, dispatching a row, top-level table +% elements. The second part starts with the common code, +% then explains in-row decorations (column separation and cells +% background) and between-row decorations (row separation). +% +% \input{cell.dtx} +% \input{span.dtx} +% \input{table.dtx} +% \input{lltokens.dtx} +% \input{decor.dtx} +% \input{colsep.dtx} +% \input{rowsep.dtx} + +% +% \Finale +\endinput |