diff options
author | Holden Rohrer <hr@hrhr.dev> | 2020-07-06 18:20:32 -0400 |
---|---|---|
committer | Holden Rohrer <hr@hrhr.dev> | 2020-07-06 18:41:47 -0400 |
commit | a1d245cfd1979ec78bbc01e5125af80071f8cc42 (patch) | |
tree | 9bf0ec38631e4f0879940dc4a0b133d78fc2f17c /fmt/doc.h | |
parent | 5a18c8a33b90003a2c930a207f766800883c3622 (diff) |
File reorganization
More makefile-friendly
Diffstat (limited to 'fmt/doc.h')
-rw-r--r-- | fmt/doc.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/fmt/doc.h b/fmt/doc.h new file mode 100644 index 0000000..85cb134 --- /dev/null +++ b/fmt/doc.h @@ -0,0 +1,37 @@ +% Generic format file pulled out from format.tex + +\input color %blue links! + +\input fmt/font.h + +%% Fonts +\font\fourteenbf=ptmb at 14pt +\font\fourteenrm=ptmb at 14pt +\font\twelverm=ptmr at 12pt + +\spacing=120 + +%% Sectioning +\def\titlesub#1#2{\centerline{\fourteenbf #1}\centerline{#2}\bigskip} +\def\section#1{\vskip .3\hsize\goodbreak\vskip -.3\hsize\bigskip\noindent{\fourteenrm #1:}\par} + +%% Table +\def\table#1{ + \medskip\vbox{\vbox{\halign{&\vrule\vphantom{\vrule height 12pt depth 2pt width 2pt}\hskip3pt\hfil ##\hfil\hskip3pt\vrule\cr\noalign{\hrule} + #1 + }}}\medskip +} +\def\vtable#1{ + \medskip\line{\hfil + \vbox{\line{\hfil{\hsize=1.5in\valign{&\hrule\vfil\vskip2pt\noindent \line{\hfil##\hfil}\par\vfil\vskip2pt\hrule\cr\noalign{\vrule} + #1 + }}\hfil}} + } +} + +%% Pictures +\newcount\pics +\def\pic#1#2{\pdfximage width #1{#2}\pdfrefximage\pdflastximage} +\def\caption#1{\def\a{#1}\ifx\a\empty\else\line{\vbox{\smallskip\leftskip=0pt plus 1fill\rightskip=0pt plus 1fill\parindent=0pt\relax Fig \number\pics: #1\bigskip}}\fi} +\def\picture#1#2{\def\a{#2}\ifx\a\empty\else\advance\pics by 1\fi\vbox{\centerline{\pic{5in}{#1}}\caption{#2}}} +\def\twopicture#1#2#3{\def\a{#3}\ifx\a\empty\else\advance\pics by 1\fi\vbox{\line{\pic{3in}{#1}\hfil\pic{3in}{#2}}\caption{#3}}} |