summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/cals/examples
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/cals/examples
Initial commit
Diffstat (limited to 'macros/latex/contrib/cals/examples')
-rw-r--r--macros/latex/contrib/cals/examples/bididemo.pdfbin0 -> 19630 bytes
-rw-r--r--macros/latex/contrib/cals/examples/bididemo.tex59
-rw-r--r--macros/latex/contrib/cals/examples/biditable1.tex18
-rw-r--r--macros/latex/contrib/cals/examples/biditable2.tex33
-rw-r--r--macros/latex/contrib/cals/examples/biditable3.tex33
-rw-r--r--macros/latex/contrib/cals/examples/biditable4.tex32
-rw-r--r--macros/latex/contrib/cals/examples/demo.pdfbin0 -> 19358 bytes
-rw-r--r--macros/latex/contrib/cals/examples/demo.tex58
-rw-r--r--macros/latex/contrib/cals/examples/table1.tex18
-rw-r--r--macros/latex/contrib/cals/examples/table2.tex33
-rw-r--r--macros/latex/contrib/cals/examples/table3.tex33
-rw-r--r--macros/latex/contrib/cals/examples/table4.tex32
12 files changed, 349 insertions, 0 deletions
diff --git a/macros/latex/contrib/cals/examples/bididemo.pdf b/macros/latex/contrib/cals/examples/bididemo.pdf
new file mode 100644
index 0000000000..8daa020b37
--- /dev/null
+++ b/macros/latex/contrib/cals/examples/bididemo.pdf
Binary files differ
diff --git a/macros/latex/contrib/cals/examples/bididemo.tex b/macros/latex/contrib/cals/examples/bididemo.tex
new file mode 100644
index 0000000000..907f2f6c86
--- /dev/null
+++ b/macros/latex/contrib/cals/examples/bididemo.tex
@@ -0,0 +1,59 @@
+\documentclass[twocolumn]{minimal}
+\usepackage[paper=a5paper,landscape=true,margin=1cm,
+ twocolumn=true,columnsep=1cm]{geometry}
+\usepackage{helvet}
+\usepackage{times}
+\usepackage{color}
+\usepackage{fancyvrb}
+\usepackage{multicol}
+
+\usepackage[RTLdocument]{bidi}
+\usepackage{cals}
+
+\newcommand\newcolumn{\vfil\penalty-10000 }
+\newcommand\small{\fontsize{9pt}{11pt}\selectfont}
+\newcommand\Small{\fontsize{8pt}{9pt}\selectfont}
+\newcommand\Large{\fontsize{12pt}{14pt}\selectfont}
+
+\newcommand\header[1]{\noindent{\Large\bfseries#1\strut}\par\bigskip}
+
+\showboxdepth=100
+\showboxbreadth=100
+
+\begin{document}
+\makeatletter
+
+\header{CALS tables demo}
+\newcolumn
+\parindent=0pt
+by Oleg Parashchenko\par
+\textless{}olpa uucode com\textgreater\par
+\par
+24 May 2013\par
+\clearpage
+
+\header{Simple table}
+\input biditable1
+\newcolumn
+\VerbatimInput{biditable1.tex}
+\clearpage
+
+\header{Decorations}
+\input biditable2
+\newcolumn
+\VerbatimInput[fontsize=\small]{biditable2.tex}
+\clearpage
+
+\header{Cell spanning}
+\input biditable3
+\newcolumn
+\VerbatimInput[fontsize=\small]{biditable3.tex}
+\clearpage
+
+\header{Multipage table (in a multicols in a table)}
+\input biditable4
+\newcolumn
+\VerbatimInput[fontsize=\small]{biditable4.tex}
+\clearpage
+
+\end{document}
diff --git a/macros/latex/contrib/cals/examples/biditable1.tex b/macros/latex/contrib/cals/examples/biditable1.tex
new file mode 100644
index 0000000000..28d367c2b1
--- /dev/null
+++ b/macros/latex/contrib/cals/examples/biditable1.tex
@@ -0,0 +1,18 @@
+\begin{calstable}
+\colwidths{{3cm}{4cm}}
+\thead{
+ I'm a caption in the header\par
+ \bfseries
+ \brow \cell{head 1.1}\cell{head 1.2} \erow
+ \brow \cell{head 2.1}\cell{head 2.2} \erow
+ \mdseries}
+
+\tfoot{
+ \brow \cell{foot 1.1} \cell{foot 1.2} \erow
+ \lastrule
+ I'm a caption in the footer\par}
+
+\brow \cell{body 1.1}\cell{body 1.2} \erow
+\brow \cell{body 2.1}\cell{body 2.2} \erow
+\brow \cell{body 3.1}\cell{body 3.2} \erow
+\end{calstable}
diff --git a/macros/latex/contrib/cals/examples/biditable2.tex b/macros/latex/contrib/cals/examples/biditable2.tex
new file mode 100644
index 0000000000..b17f790591
--- /dev/null
+++ b/macros/latex/contrib/cals/examples/biditable2.tex
@@ -0,0 +1,33 @@
+\makeatletter
+\newcommand\bbrow{\brow\setbox\cals@current@row=
+ \hbox{\vbox to 2.9cm{}}}
+
+\newenvironment{decotable}{\begin{calstable}
+\fontsize{15pt}{17pt}\selectfont
+\cals@setpadding{Ag}\cals@setcellprevdepth{Al}
+\cals@paddingL=0pt \relax
+\cals@paddingR=0pt \relax
+\def\cals@framecs@width{2pt}
+\def\cals@rs@width{8pt}
+\def\cals@cs@width{4pt}
+}{\end{calstable}}
+
+\begin{decotable}
+\colwidths{{2.9cm}{2.9cm}{2.9cm}}
+\bbrow
+ \cell{left,\\top}
+ \alignC \cell{center,\\top}
+ \def\cals@borderL{0pt}\def\cals@borderB{0pt}
+ \alignR \cell{right,\\top} \erow
+ \let\cals@borderL=\relax \let\cals@borderB=\relax
+\bbrow
+ \alignL \cell{\vfil left,\\middle}
+ \alignC \cell{\vfil center,\\middle}
+ \alignR \cell{\vfil right,\\middle} \erow
+\bbrow
+ \def\cals@bgcolor{green}
+ \alignL \cell{\vfill left,\\bottom}
+ \def\cals@bgcolor{}
+ \alignC \cell{\vfill center,\\bottom}
+ \alignR \cell{\vfill right,\\bottom} \erow
+\end{decotable}
diff --git a/macros/latex/contrib/cals/examples/biditable3.tex b/macros/latex/contrib/cals/examples/biditable3.tex
new file mode 100644
index 0000000000..2a740fafd9
--- /dev/null
+++ b/macros/latex/contrib/cals/examples/biditable3.tex
@@ -0,0 +1,33 @@
+\makeatletter \let\olderow=\erow
+\def\erow{\ht\cals@current@row=1.3cm \olderow}
+
+\begin{calstable}
+\def\cals@framecs@width{.4pt}
+\def\cals@framers@width{.4pt}
+\colwidths{{1.3cm}}
+\brow
+ \cell{a6} \cell{b6} \cell{c6}
+ \cell{d6} \cell{e6} \cell{f6} \erow
+\brow
+ \cell{a5} \nullcell{ltb} \nullcell{tb}
+ \nullcell{rtb}\spancontent{b5, c5, d5}
+ \nullcell{ltr} \cell{f5} \erow
+\brow
+ \cell{a4} \nullcell{ltr} \nullcell{tl}
+ \nullcell{tr} \nullcell{lr} \cell{f4} \erow
+\brow
+ \cell{a3} \nullcell{lr} \nullcell{lb}
+ \nullcell{rb}\spancontent{c3, c4, d3, d4}
+ \nullcell{lrb}\spancontent{e3, e4, e5}
+ \cell{f3} \erow
+\brow
+ \cell{a2}
+ \nullcell{lrb}\spancontent{b2, b3, b4}
+ \nullcell{ltb} \nullcell{tb}
+ \nullcell{tbr}\spancontent{c2, d2, e2}
+ \cell{f2} \erow
+\brow
+ \cell{a1} \cell{b1} \cell{c1}
+ \cell{d1} \cell{e1} \cell{f1} \erow
+\end{calstable}
+\let\erow=\olderow
diff --git a/macros/latex/contrib/cals/examples/biditable4.tex b/macros/latex/contrib/cals/examples/biditable4.tex
new file mode 100644
index 0000000000..5f19645ddb
--- /dev/null
+++ b/macros/latex/contrib/cals/examples/biditable4.tex
@@ -0,0 +1,32 @@
+\begin{calstable}
+\colwidths{{1cm}{7cm}{1cm}}
+\brow \cell{x} \cell{x} \cell{x} \erow
+\brow \cell{x} \cell{
+\columnsep=0cm\relax
+% Force multicols to regard our \leftskip
+% by pretending that we are a list.
+\@totalleftmargin=\cals@paddingL\relax
+\begin{multicols}{2}
+
+\begin{calstable}
+\alignR
+\colwidths{{1.5cm}{1.5cm}}
+\thead{\brow \cell{$n$}\cell{$n^2$} \erow}
+\tfoot{\brow \cell{$n$}\cell{$n^2$} \erow}
+\brow \cell{2} \cell{4} \erow
+\brow \cell{3} \cell{9} \erow
+\brow \cell{4} \cell{16} \erow
+\brow \cell{5} \cell{25} \erow
+\brow \cell{6} \cell{36} \erow
+\tbreak{\break }
+\brow \cell{7} \cell{49} \erow
+\brow \cell{8} \cell{64} \erow
+\brow \cell{9} \cell{81} \erow
+\brow \cell{10} \cell{100} \erow
+\brow \cell{11} \cell{121} \erow
+\end{calstable}
+
+\end{multicols}
+} \cell{x} \erow
+\brow \cell{x} \cell{x} \cell{x} \erow
+\end{calstable}
diff --git a/macros/latex/contrib/cals/examples/demo.pdf b/macros/latex/contrib/cals/examples/demo.pdf
new file mode 100644
index 0000000000..85b57ae349
--- /dev/null
+++ b/macros/latex/contrib/cals/examples/demo.pdf
Binary files differ
diff --git a/macros/latex/contrib/cals/examples/demo.tex b/macros/latex/contrib/cals/examples/demo.tex
new file mode 100644
index 0000000000..97834159c1
--- /dev/null
+++ b/macros/latex/contrib/cals/examples/demo.tex
@@ -0,0 +1,58 @@
+\documentclass[twocolumn]{minimal}
+\usepackage[paper=a5paper,landscape=true,margin=1cm,
+ twocolumn=true,columnsep=1cm]{geometry}
+\usepackage[T1]{fontenc}
+\usepackage{helvet}
+\usepackage{times}
+\usepackage{color}
+\usepackage{fancyvrb}
+\usepackage{multicol}
+\usepackage{cals}
+
+\newcommand\newcolumn{\vfil\penalty-10000 }
+\newcommand\small{\fontsize{9pt}{11pt}\selectfont}
+\newcommand\Small{\fontsize{8pt}{9pt}\selectfont}
+\newcommand\Large{\fontsize{12pt}{14pt}\selectfont}
+
+\newcommand\header[1]{\noindent{\Large\bfseries#1\strut}\par\bigskip}
+
+\showboxdepth=100
+\showboxbreadth=100
+
+\begin{document}
+\makeatletter
+
+\header{CALS tables demo}
+\newcolumn
+\parindent=0pt
+by Oleg Parashchenko\par
+\textless{}olpa uucode com\textgreater\par
+\par
+24 May 2013\par
+\clearpage
+
+\header{Simple table}
+\input table1
+\newcolumn
+\VerbatimInput{table1.tex}
+\clearpage
+
+\header{Decorations}
+\input table2
+\newcolumn
+\VerbatimInput[fontsize=\small]{table2.tex}
+\clearpage
+
+\header{Cell spanning}
+\input table3
+\newcolumn
+\VerbatimInput[fontsize=\small]{table3.tex}
+\clearpage
+
+\header{Multipage table (in a multicols in a table)}
+\input table4
+\newcolumn
+\VerbatimInput[fontsize=\small]{table4.tex}
+\clearpage
+
+\end{document}
diff --git a/macros/latex/contrib/cals/examples/table1.tex b/macros/latex/contrib/cals/examples/table1.tex
new file mode 100644
index 0000000000..28d367c2b1
--- /dev/null
+++ b/macros/latex/contrib/cals/examples/table1.tex
@@ -0,0 +1,18 @@
+\begin{calstable}
+\colwidths{{3cm}{4cm}}
+\thead{
+ I'm a caption in the header\par
+ \bfseries
+ \brow \cell{head 1.1}\cell{head 1.2} \erow
+ \brow \cell{head 2.1}\cell{head 2.2} \erow
+ \mdseries}
+
+\tfoot{
+ \brow \cell{foot 1.1} \cell{foot 1.2} \erow
+ \lastrule
+ I'm a caption in the footer\par}
+
+\brow \cell{body 1.1}\cell{body 1.2} \erow
+\brow \cell{body 2.1}\cell{body 2.2} \erow
+\brow \cell{body 3.1}\cell{body 3.2} \erow
+\end{calstable}
diff --git a/macros/latex/contrib/cals/examples/table2.tex b/macros/latex/contrib/cals/examples/table2.tex
new file mode 100644
index 0000000000..b4515f622e
--- /dev/null
+++ b/macros/latex/contrib/cals/examples/table2.tex
@@ -0,0 +1,33 @@
+\makeatletter
+\newcommand\bbrow{\brow\setbox\cals@current@row=
+ \hbox{\vbox to 3cm{}}}
+
+\newenvironment{decotable}{\begin{calstable}
+\fontsize{15pt}{17pt}\selectfont
+\cals@setpadding{Ag}\cals@setcellprevdepth{Al}
+\cals@paddingL=0pt \relax
+\cals@paddingR=0pt \relax
+\def\cals@framecs@width{2pt}
+\def\cals@rs@width{8pt}
+\def\cals@cs@width{4pt}
+}{\end{calstable}}
+
+\begin{decotable}
+\colwidths{{3cm}{3cm}{3cm}}
+\bbrow
+ \cell{left,\\top}
+ \alignC \cell{center,\\top}
+ \def\cals@borderL{0pt}\def\cals@borderB{0pt}
+ \alignR \cell{right,\\top} \erow
+ \let\cals@borderL=\relax \let\cals@borderB=\relax
+\bbrow
+ \alignL \cell{\vfil left,\\middle}
+ \alignC \cell{\vfil center,\\middle}
+ \alignR \cell{\vfil right,\\middle} \erow
+\bbrow
+ \def\cals@bgcolor{green}
+ \alignL \cell{\vfill left,\\bottom}
+ \def\cals@bgcolor{}
+ \alignC \cell{\vfill center,\\bottom}
+ \alignR \cell{\vfill right,\\bottom} \erow
+\end{decotable}
diff --git a/macros/latex/contrib/cals/examples/table3.tex b/macros/latex/contrib/cals/examples/table3.tex
new file mode 100644
index 0000000000..2a740fafd9
--- /dev/null
+++ b/macros/latex/contrib/cals/examples/table3.tex
@@ -0,0 +1,33 @@
+\makeatletter \let\olderow=\erow
+\def\erow{\ht\cals@current@row=1.3cm \olderow}
+
+\begin{calstable}
+\def\cals@framecs@width{.4pt}
+\def\cals@framers@width{.4pt}
+\colwidths{{1.3cm}}
+\brow
+ \cell{a6} \cell{b6} \cell{c6}
+ \cell{d6} \cell{e6} \cell{f6} \erow
+\brow
+ \cell{a5} \nullcell{ltb} \nullcell{tb}
+ \nullcell{rtb}\spancontent{b5, c5, d5}
+ \nullcell{ltr} \cell{f5} \erow
+\brow
+ \cell{a4} \nullcell{ltr} \nullcell{tl}
+ \nullcell{tr} \nullcell{lr} \cell{f4} \erow
+\brow
+ \cell{a3} \nullcell{lr} \nullcell{lb}
+ \nullcell{rb}\spancontent{c3, c4, d3, d4}
+ \nullcell{lrb}\spancontent{e3, e4, e5}
+ \cell{f3} \erow
+\brow
+ \cell{a2}
+ \nullcell{lrb}\spancontent{b2, b3, b4}
+ \nullcell{ltb} \nullcell{tb}
+ \nullcell{tbr}\spancontent{c2, d2, e2}
+ \cell{f2} \erow
+\brow
+ \cell{a1} \cell{b1} \cell{c1}
+ \cell{d1} \cell{e1} \cell{f1} \erow
+\end{calstable}
+\let\erow=\olderow
diff --git a/macros/latex/contrib/cals/examples/table4.tex b/macros/latex/contrib/cals/examples/table4.tex
new file mode 100644
index 0000000000..5f19645ddb
--- /dev/null
+++ b/macros/latex/contrib/cals/examples/table4.tex
@@ -0,0 +1,32 @@
+\begin{calstable}
+\colwidths{{1cm}{7cm}{1cm}}
+\brow \cell{x} \cell{x} \cell{x} \erow
+\brow \cell{x} \cell{
+\columnsep=0cm\relax
+% Force multicols to regard our \leftskip
+% by pretending that we are a list.
+\@totalleftmargin=\cals@paddingL\relax
+\begin{multicols}{2}
+
+\begin{calstable}
+\alignR
+\colwidths{{1.5cm}{1.5cm}}
+\thead{\brow \cell{$n$}\cell{$n^2$} \erow}
+\tfoot{\brow \cell{$n$}\cell{$n^2$} \erow}
+\brow \cell{2} \cell{4} \erow
+\brow \cell{3} \cell{9} \erow
+\brow \cell{4} \cell{16} \erow
+\brow \cell{5} \cell{25} \erow
+\brow \cell{6} \cell{36} \erow
+\tbreak{\break }
+\brow \cell{7} \cell{49} \erow
+\brow \cell{8} \cell{64} \erow
+\brow \cell{9} \cell{81} \erow
+\brow \cell{10} \cell{100} \erow
+\brow \cell{11} \cell{121} \erow
+\end{calstable}
+
+\end{multicols}
+} \cell{x} \erow
+\brow \cell{x} \cell{x} \cell{x} \erow
+\end{calstable}