aboutsummaryrefslogtreecommitdiff
path: root/fmt/com.h
blob: e8388aea24a3bdb6013bdd5dc3e62e9a0606a232 (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
%% links

\def\link#1{%
  \pdfstartlink
    user{/Subtype /Link
    /Border [ 0 0 0 ]
    /A <<
      /Type /Action
      /S /URI
      /URI (#1)
    >>}%
    {\tt \color{blue} #1}%
  \pdfendlink
}

%% the godly `pre`

\def\pre#1{\par\leavevmode\llap{\hbox to \parindent{\hfil #1 \hfil}}}

%% gives image files surrounding stretch
\newskip\imgskipamount
\def\imgskip{\vskip\imgskipamount}
\imgskipamount=0pt plus 48pt
\def\image #1 {\imgskip\input #1\imgskip}

\newcount\pics
\def\caption#1{\def\a{#1}\ifx\a\empty\else\global\advance\pics by
1\smallskip\line{\vbox{\leftskip=0pt plus 1fill\rightskip=0pt plus
1fill\parindent=0pt\relax Fig \number\pics: #1}}\smallskip\fi}