File: refcard.sty

package info (click to toggle)
refcard 13.1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,284 kB
  • sloc: python: 189; makefile: 108; sh: 6
file content (74 lines) | stat: -rw-r--r-- 1,768 bytes parent folder | download | duplicates (10)
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{refcard}[2008/07/28 DBLaTeX Refcard Style]
\RequirePackageWithOptions{db2latex}
\RequirePackage{ifthen}

\def\title#1{
  \def\DBKtitle{#1}
  \stdtitle{\bfseries #1}} % no subtitle, we need real estate

\sloppy
\makeatletter
\parindent=0mm
\def\maketitle{
  \thispagestyle{empty}
  \begin{center}
    \href{\REFcorpauthorurl}{%
      \includegraphics[height=1cm]{\REFcorpauthorimage}} \\
         {\large{\@title}} \\
         \REFversion~\REFrevnumber~\REFdate \\
         \url{\REFcorpauthorurl}
\end{center}
}

\pagestyle{empty}
\def\frontmatter{}
\def\tableofcontents{}
\def\mainmatter{}
\def\backmatter{}

\newcommand{\REFstdformat}{%
  \paperheight=210mm            % ISO A4 short side
  \paperwidth=99mm              % ISO A4 long side / 3
  \special{papersize=99mm,210mm}
  \textheight=200mm             % 210mm - 2 * 5mm
  \textwidth=89mm               %  99mm - 2 * 5mm
  \topmargin=-33mm
  \oddsidemargin=-20mm
}
\REFstdformat

\newcommand{\REFletterformat}{%
  \paperheight=216mm            % letter short side
  \paperwidth=93mm              % letter long side / 3
  \special{papersize=93mm,216mm}
  \textheight=206mm             % 216mm - 2 * 5mm
  \textwidth=83mm               %  93mm - 2 * 5mm
  \topmargin=-33mm
  \oddsidemargin=-20mm
}

% unfortunately this gotopage does conflict with minipage etc.
\newcounter{cnt}
\def\newPage{%
  \ifnum\value{page}<\value{cnt}\relax
    \null\newpage
    \null\vfill
    \newPage\vfill
  \fi
}
\newcommand{\gotopage}[1]{%
  \setcounter{cnt}{#1}
  \newPage\vfill
}

% so we use an ugly workaround
\newcommand{\newpages}[1]{%
  \setcounter{cnt}{0}
  \whiledo{\value{cnt}<#1}{%
    \stepcounter{cnt}
    \newpage
  }
}

\renewenvironment{quote}{\parskip=0pt}{\vspace{1em}}