diff options
author | Holden Rohrer <hr@hrhr.dev> | 2020-01-26 01:34:24 -0500 |
---|---|---|
committer | Holden Rohrer <hr@hrhr.dev> | 2020-01-26 01:34:24 -0500 |
commit | 5435f9d1d1299bb8f1ca38971066a7601c308c42 (patch) | |
tree | a2c09b1194958c402c489e1d6fef79c84e47d43a /generic.tex | |
parent | 962daab351d488698e816ebf946f6bb4a2aeb193 (diff) |
genericicized format.tex macros
Diffstat (limited to 'generic.tex')
-rw-r--r-- | generic.tex | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/generic.tex b/generic.tex new file mode 100644 index 0000000..58cbb90 --- /dev/null +++ b/generic.tex @@ -0,0 +1,51 @@ +% Generic format file pulled out from format.tex + +%% Links +\def\link#1{% + \pdfstartlink + user{/Subtype /Link + /Border [ 0 0 0 ] + /A << + /Type /Action + /S /URI + /URI (#1) + >>}% + {\it #1}% + \pdfendlink +} + +%% Fonts +\font\fourteenbf=ptmb7t at 14pt +\font\fourteenrm=ptmb7t at 14pt +\font\twelverm=ptmr7t at 12pt + +\twelverm\baselineskip=24pt +\parindent=.5in + +%% Sectioning +\def\titlesub#1#2{\centerline{\fourteenbf #1}\centerline{#2}\bigskip} +\def\section#1\par{\thesection{#1:}} +\def\thesection#1{\vskip .3\hsize\goodbreak\vskip -.3\hsize\bigskip\noindent{\fourteenrm#1}} + +%% Modular Sections +\def\include#1;#2\par{\section #1\par\par\input #2\relax} +\def\sinclude#1;#2\par{\subsection #1\par\par\input #2\relax} + +%% Bullet Points and Numbering +\def\pre#1{\par\leavevmode\llap{\hbox to \parindent{\hfil #1 \hfil}}} + +%% Pictures +\newcount\pics \pics=0 +\def\pic#1#2{\pdfximage width #1{#2}\pdfrefximage\pdflastximage} +\def\caption#1{\def\a{#1}\ifx\a\empty\else\line{\vbox{\baselineskip=18pt\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}}} + +%% Table +\def\table#1#2{ + \medskip + \halign{&\vrule\vbox to \baselineskip{\vfil\parindent=0in\hsize=#2\relax \hbox to \hsize{\hfil ##\hfil}\vfil}\vrule\cr\noalign{\hrule} + #1 + } + \medskip +} |