summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/multibox/multibox.tex
blob: 5747cdbc967b0facd790a081e65837b77363d655 (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
\documentclass[pagesize=auto, parskip=half, fontsize=12pt, DIV=11]{scrartcl}

\usepackage{fixltx2e}
\usepackage{etex}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{booktabs}
\usepackage{microtype}

\newcommand*{\pkg}[1]{\textsf{#1}}
\newcommand*{\cs}[1]{\texttt{\textbackslash#1}}
\makeatletter
\newcommand*{\cmd}[1]{\cs{\expandafter\@gobble\string#1}}
\makeatother
\newcommand*{\env}[1]{\texttt{#1}}
\newcommand*{\meta}[1]{\textlangle\textsl{#1}\textrangle}
\newcommand*{\marg}[1]{\texttt{\{}\meta{#1}\texttt{\}}}
\newcommand*{\narg}[1]{\texttt{\{$#1$\}}}
\newcommand*{\oarg}[1]{\texttt{[}\meta{#1}\texttt{]}}
\newcommand*{\pargs}[2]{\texttt{($#1$,\,$#2$)}}
\newcommand*{\coord}[2]{$(#1,\:#2)$}
\newcommand*{\txt}[1]{Text\textsubscript{$#1$}}

\addtokomafont{title}{\rmfamily}

\title{\pkg{MULTIBOX.STY}}
\subtitle{A style option to provide multiple boxes in pictures}
\author{Brian HAMILTON KELLY\thanks{Royal Military College of Science, Shrivenham, SWINDON, SN6 8LA, United Kingdom}}
\date{13 October 1988}


\begin{document}

\maketitle

This style file option provides two new commands for use in the \env{picture}
environment:
%
\begin{itemize}
\item \cmd{\multimake}\pargs{x}{y}\pargs{dx}{dy}\narg{n}\pargs{w}{h}\oarg{pos}\marg{\txt{1}}\marg{\txt{2}}\ldots\marg{\txt{n}}
\item \cmd{\multiframe}\pargs{x}{y}\pargs{dx}{dy}\narg{n}\pargs{w}{h}\oarg{pos}\marg{\txt{1}}\marg{\txt{2}}\ldots\marg{\txt{n}}
\end{itemize}
%
These commands set the $n$ texts \meta{\txt{1}}\ldots\meta{\txt{n}} inside a \cmd{\makebox} or
\cmd{\framebox} respectively.  The first box has its lower-left corner at \coord{x}{y},
and successive boxes are located at \coord{x+dx}{y+dy}, \ldots, \coord{x+(n-1)\,dx}{y+(n-1)\,dy}.
Each box has width and height determined by \coord{w}{h}, and the optional
box placement parameter \meta{pos} is applied to all the generated texts.

\end{document}