local.tex (3883B)
1 \newif\iftextversion \textversionfalse 2 \newif\iffull \fullfalse 3 \newif\ifdraft \drafttrue 4 5 \ifhevea\else 6 \IfFileExists{{\jobname}-directives.tex} 7 {\input{{\jobname}-directives}} 8 {\typeout{== ERROR == The dynamically generated file `texdirectives.tex' couldn't be found. You should use `make` to build the manual for Unison (`unison-manual.pdf'). Don't call latex directly.}\stop} 9 \fi 10 \input{{\jobname}-directives} 11 \input{unisonversion} 12 13 \newcommand{\finish}[1]{\ifdraft{\ifhevea\red\else \large\bf\fi [#1]\ifhevea\fi}\fi} 14 \newcommand{\finishlater}[1]{} 15 \newcommand{\fortrevor}[1]{} 16 17 \newcommand{\CLIENT}{\iftextversion CLIENT \else {\em client}\fi} 18 \newcommand{\SERVER}{\iftextversion SERVER \else {\em server}\fi} 19 20 \newcommand{\showtt}[1]{% 21 \ifhevea 22 \iftextversion 23 "#1"% 24 \else 25 {\large\tt #1}% 26 \fi 27 \else 28 {\tt #1}% 29 \fi 30 } 31 32 \makeatletter 33 \def\@opentoc#1{\begingroup 34 \makeatletter 35 \if@filesw \expandafter\newwrite\csname tf@#1\endcsname 36 \immediate\openout \csname tf@#1\endcsname \jobname.#1\relax 37 \fi \global\@nobreakfalse \endgroup} 38 \newcommand{\TABLEOFCONTENTS}{% 39 \ifhevea 40 \iftextversion\else 41 \section*{Contents} 42 \begin{quote} 43 \input{\jobname.htoc} 44 \end{quote} 45 \fi 46 \else 47 \@opentoc{htoc} 48 \tableofcontents 49 \fi 50 } 51 \makeatother 52 53 \newcommand{\SNIP}[2]{% 54 \ifhevea\iftextversion 55 \begin{rawhtml}<pre>----SNIP----\end{rawhtml} 56 #1 57 #2 % 58 \begin{rawhtml}</pre>\end{rawhtml}% 59 \fi\fi 60 } 61 62 \newcommand{\sectionref}[2]{% 63 \ifhevea 64 \iftextversion 65 the section ``#2'' 66 \else 67 the \url{##1}{#2} section% 68 \fi 69 \else 70 Section~\ref{#1} {[#2]}% 71 \fi 72 } 73 74 \newcommand{\bcpurl}[1]{\url{#1}} 75 76 \newcommand{\urlref}[2]{\bcpurl{##1}{#2}} 77 \newcommand{\ONEURL}[1]{% 78 \iftextversion#1\else{\def~{\symbol{"7E}}\oneurl{#1}}\fi} 79 \newcommand{\URL}[2]{% 80 \iftextversion#2 (#1)\else\bcpurl{#1}{#2}\fi} 81 \newcommand{\SHOWURL}[2]{% 82 \ifhevea\URL{#1}{#2}\else#2\footnote{{\def~{\symbol{"7E}}\tt #1}}\fi} 83 84 % Usage: \SECTION{Title and menu item name}{tex label}{man section id} 85 \newcommand{\SECTION}[3]{% 86 \ifhevea 87 \SNIP{#1}{#3}% 88 \iftextversion\else \@print{<hr>}\fi% 89 \section*{\aname{#2}#1}% 90 \else 91 \newpage 92 \section{\label{#2}#1}% 93 \addtocontents{htoc}{{\string\large\string\bf\string\urlref{#2}{#1}}\\}% 94 \fi 95 } 96 97 \newcommand{\SUBSECTION}[2]{% 98 \ifhevea 99 \subsection*{\aname{#2}#1}% 100 \else 101 \subsection{\label{#2}#1}% 102 \addtocontents{htoc}{\hspace{10em}\bullet\string\urlref{#2}{#1}\\} 103 \fi 104 } 105 106 \newcommand{\SUBSUBSECTION}[2]{% 107 \ifhevea 108 \subsubsection*{\aname{#2}#1}% 109 \else 110 \subsubsection{\label{#2}#1}% 111 \addtocontents{htoc}{\hspace{18em}\string\urlref{#2}{#1}\\} 112 \fi 113 } 114 115 \newcommand{\TOPSUBSECTION}[2]{% 116 \ifhevea\SNIP{#1}{#2}\fi 117 \SUBSECTION{#1}{#2}% 118 } 119 120 % The quote-based macros looks a imperfect, perhaps due to the lack of 121 % alignment 122 % \newenvironment{textui}{{\em Textual Interface:}\begin{quote}}{\end{quote}} 123 % \newenvironment{tkui}{{\em Graphical Interface:}\begin{quote}}{\end{quote}} 124 \newenvironment{textui}{\medskip{\em Textual Interface:}\begin{itemize}\item[] 125 }{\end{itemize}} 126 \newenvironment{tkui}{\medskip{\em Graphical Interface:}\begin{itemize}\item[] 127 }{\end{itemize}} 128 \newenvironment{changesfromversion}[1]{% 129 \noindent Changes since #1: 130 \begin{itemize} 131 }{ 132 \end{itemize} 133 } 134 135 \newcommand{\incompatible}{% 136 \iftextversion 137 INCOMPATIBLE CHANGE: 138 \else 139 {\bf Incompatible change:} 140 \fi} 141 142 \ifhevea 143 \makeatletter 144 \let\oldmeta=\@meta 145 \renewcommand{\@meta}{% 146 \oldmeta 147 \ifdraft 148 \begin{rawhtml} 149 <META name="Author" content="Benjamin C. Pierce"> 150 <link rel="stylesheet" href="/home/bcpierce/pub/unison/unison.css"> 151 \end{rawhtml} 152 \else 153 \begin{rawhtml} 154 <META name="Author" content="Benjamin C. Pierce"> 155 <link rel="stylesheet" href="http://www.cis.upenn.edu/~bcpierce/unison/unison.css"> 156 \end{rawhtml} 157 \fi 158 } 159 \makeatother 160 \fi