| 1 |
% \iffalse meta-comment |
| 2 |
% |
| 3 |
% Copyright (C) 2015 |
| 4 |
% by Byron Cook, Tauba Auerbach, and David Reinfurt |
| 5 |
% |
| 6 |
% This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3c of this license or (at your option) any later version. The latest version of this license is [here](http://www.latex-project.org/lppl.txt) and version 1.3c or later is part of all distributions of LaTeX version 2005/12/01 or later. |
| 7 |
% |
| 8 |
% \fi |
| 9 |
% |
| 10 |
% \iffalse |
| 11 |
%<style>\NeedsTeXFormat{LaTeX2e} |
| 12 |
%<style>\ProvidesPackage{esrelation} |
| 13 |
%<fd>\ProvidesFile{uesrelation.fd} |
| 14 |
%<*driver> |
| 15 |
\documentclass[a4paper]{ltxdoc} |
| 16 |
\usepackage{esrelation} |
| 17 |
\parindent 0 pt |
| 18 |
\EnableCrossrefs |
| 19 |
\CodelineIndex |
| 20 |
\RecordChanges |
| 21 |
\OnlyDescription |
| 22 |
\begin{document} |
| 23 |
\DocInput{esrelation.dtx} |
| 24 |
\end{document} |
| 25 |
%</driver> |
| 26 |
% \fi |
| 27 |
%\title{The \textsf{\textbf{esrelation}} Package} |
| 28 |
%\author{Byron Cook, Tauba Auerbach, David Reinfurt} |
| 29 |
%\date{v 0.$\overline{9}$ 30/04/2015} |
| 30 |
%\maketitle |
| 31 |
%\MakeShortVerb{\|} |
| 32 |
%\section{Installation} |
| 33 |
%The program termination problem, also known at the uniform halting problem, can be defined as: \emph{Using a finite amount of time: determine whether a given program will always finish running or could possibly execute forever.}\\ |
| 34 |
% |
| 35 |
%The Metafont programming and \LaTeXe{} package writing and \TeX macro programming (\emph{especially the \TeX macro programming}) required to produce these symbols looked like it might, itself, never end. It took more than a year of work in fits and starts to understand how the jalopy of bits and pieces go together to make a font work with \LaTeX{}. The Comprehensive \LaTeXe{} Symbol List (http://www.ctan.org/tex-archive/info/symbols/comprehensive/) does not currently include this set, but on completion all of these files will be ready to upload in the correct formats for inclusion. These are implemented as a standard \TeX{} math symbol font, implemented with custom Metafont sources, rendered on-the-fly as needed by \LaTeXe{}. Also provided in this package is a PostScript Type~1 version of the font. Symbols are accessed through macros defined in this package.\\ |
| 36 |
% |
| 37 |
%Installation involves copying the supplied files to their designated places within \LaTeX{}'s search path and updating \TeX{}'s databases. |
| 38 |
% |
| 39 |
%\begin{enumerate} |
| 40 |
%\item |
| 41 |
%First, you need to find the folder \texttt{texmf-local} (on Unix the default is \texttt{/usr/local/texlive/texmf-local}). To do that, run: |
| 42 |
% |
| 43 |
%\texttt{kpsewhich --var-value TEXMFLOCAL} |
| 44 |
% |
| 45 |
%Subsequently, this directory will be referred to as \texttt{TEXMFLOCAL}. |
| 46 |
% |
| 47 |
%\item |
| 48 |
%Run \LaTeX{} on \texttt{esrelation.ins}. |
| 49 |
%Copy the files into the following directories, creating subdirectories as necessary: |
| 50 |
% |
| 51 |
%\begin{itemize} |
| 52 |
%\item copy \texttt{esrelation.sty} and \texttt{uesrelation.fd} to:\\ |
| 53 |
%\texttt{TEXMFLOCAL/tex/latex/esrelation} |
| 54 |
% |
| 55 |
%\item copy \texttt{esrelation.mf} and \texttt{esrelation10.mf} to:\\ |
| 56 |
%\texttt{TEXMFLOCAL/fonts/source/public/esrelation} |
| 57 |
%\end{itemize} |
| 58 |
% |
| 59 |
%If you also want to install the fonts in Type1 format: |
| 60 |
%\begin{itemize} |
| 61 |
%\item copy \texttt{esrelation10.pfb} to:\\ |
| 62 |
%\texttt{TEXMFLOCAL/fonts/type1/public/esrelation} |
| 63 |
% |
| 64 |
%\item copy \texttt{esrelation.map} to:\\ |
| 65 |
%\texttt{TEXMFLOCAL/fonts/map/dvips/esrelation} |
| 66 |
% |
| 67 |
%\end{itemize} |
| 68 |
% |
| 69 |
%Note that all created directories should be set to mode \texttt{755} and all files should be set to mode \texttt{644}. |
| 70 |
% |
| 71 |
% |
| 72 |
%\item |
| 73 |
%Update your \LaTeX{} font database. This is called the ls-r and lives in a few places. Fortunately, you can just run this, likely as sudo or root (\texttt{-H} sets \texttt{HOME} for the sudo environment): |
| 74 |
% |
| 75 |
%\texttt{sudo -H mktexlsr} |
| 76 |
% |
| 77 |
%\item |
| 78 |
%Update your \TeX{} font map by running the command: |
| 79 |
% |
| 80 |
%\texttt{sudo -H updmap-sys --enable Map=esrelation.map} |
| 81 |
% |
| 82 |
%\item |
| 83 |
%Update the font database again: |
| 84 |
% |
| 85 |
%\texttt{sudo -H mktexlsr} |
| 86 |
% |
| 87 |
%\item |
| 88 |
%Open \LaTeX{}, and start relating. |
| 89 |
%\end{enumerate} |
| 90 |
% |
| 91 |
% \section{Using esrelation} |
| 92 |
%Load the package with \verb|\usepackage{esrelation}|. Available symbols to be used from math mode:\\ |
| 93 |
% |
| 94 |
%\begin{tabular}{l l} |
| 95 |
%& \\ |
| 96 |
%\verb+\relationrightproject+ & $\relationrightproject{A, Z}$\\ |
| 97 |
%&\\ |
| 98 |
%\verb+\relationleftproject+ & $\relationleftproject{A, Z}$\\ |
| 99 |
%&\\ |
| 100 |
%\verb+\relationlifting+ & $\relationlifting{A, Z}$\\ |
| 101 |
%&\\ |
| 102 |
%\verb+\restrictwand+ & $i_\restrictwand$\\ |
| 103 |
%&\\ |
| 104 |
%\verb+\restrictwandup+ & $i_\restrictwandup$\\ |
| 105 |
%&\\ |
| 106 |
%\verb+\restrictbarb+ & $R_\restrictbarb$\\ |
| 107 |
%&\\ |
| 108 |
%\verb+\restrictbarbup+ & $R_\restrictbarbup$\\ |
| 109 |
%&\\ |
| 110 |
%\verb+\restrictmallet+ & $Z_\restrictmallet$\\ |
| 111 |
%&\\ |
| 112 |
%\verb+\restrictmalletup+ & $Z_\restrictmalletup$\\ |
| 113 |
%&\\ |
| 114 |
%\end{tabular} |
| 115 |
% |
| 116 |
%\newpage |
| 117 |
%\Large |
| 118 |
%\parindent 0pt |
| 119 |
% |
| 120 |
%$\relationrightproject{R_A}$ |
| 121 |
% |
| 122 |
%\vskip 2em |
| 123 |
%$\relationrightproject{0, 1}$ |
| 124 |
% |
| 125 |
%\vskip 2em |
| 126 |
%$\relationleftproject{0, 1}$ |
| 127 |
% |
| 128 |
%\vskip 2em |
| 129 |
%$\relationlifting{0, 1}$ |
| 130 |
% |
| 131 |
%\vskip 2em |
| 132 |
%$\relationleftproject{\relationrightproject{\relationleftproject{\relationrightproject{1, 1}}}}$ |
| 133 |
% |
| 134 |
%\vskip 2em |
| 135 |
%$\relationlifting{x|x>1, x|x=0}$ |
| 136 |
% |
| 137 |
%\vskip 2em |
| 138 |
%$\relationlifting{\relationlifting{\relationlifting{\relationlifting{\relationlifting{x,X_\restrictwand}}}}}$ |
| 139 |
% |
| 140 |
%\vskip 2em |
| 141 |
%$\relationleftproject{\relationlifting{\relationlifting{\relationleftproject{\relationrightproject{\relationleftproject{\relationrightproject{i,R}}}}}}}$ |
| 142 |
% |
| 143 |
%\vskip 2em |
| 144 |
%$X_\restrictwand$ |
| 145 |
%$X_\restrictwand^2$ |
| 146 |
%$X_\restrictwand^\infty$ |
| 147 |
% |
| 148 |
%\vskip 2em |
| 149 |
%$X_\restrictbarb$ |
| 150 |
% |
| 151 |
%\vskip 2em |
| 152 |
%$X_\restrictmallet$ |
| 153 |
% |
| 154 |
% \newpage |
| 155 |
% \normalsize |
| 156 |
% End. Try some more combinations now that it's running. |
| 157 |
% |
| 158 |
%\StopEventually{} |
| 159 |
% \begin{macrocode} |
| 160 |
%<*fd> |
| 161 |
\DeclareFontFamily{U}{esrelation}{} |
| 162 |
\DeclareFontShape{U}{esrelation}{m}{n}{<->esrelation10}{} |
| 163 |
%</fd> |
| 164 |
% \end{macrocode} |
| 165 |
% \begin{macrocode} |
| 166 |
%<*style> |
| 167 |
\DeclareSymbolFont{esrelation}{U}{esrelation}{m}{n} |
| 168 |
\DeclareMathSymbol{\arrwr}{\mathord}{esrelation}{'022} % arrow_project_right |
| 169 |
\DeclareMathSymbol{\arrwl}{\mathord}{esrelation}{'023} % arrow_project_left |
| 170 |
\DeclareMathSymbol{\brktr}{\mathrel}{esrelation}{'025} % bracket_project_right |
| 171 |
\DeclareMathSymbol{\brktl}{\mathrel}{esrelation}{'024} % bracket_project_left |
| 172 |
\DeclareMathSymbol{\brktlift}{\mathrel}{esrelation}{'026} % bracket_lifting |
| 173 |
\DeclareMathSymbol{\barshort}{\mathrel}{esrelation}{'040} |
| 174 |
\DeclareMathSymbol{\barlong}{\mathrel}{esrelation}{'043} |
| 175 |
\DeclareMathSymbol{\verticalbarshort}{\mathord}{esrelation}{'045} |
| 176 |
\DeclareMathSymbol{\verticalbarlongleft}{\mathord}{esrelation}{'044} |
| 177 |
\DeclareMathSymbol{\verticalbarlongright}{\mathord}{esrelation}{'046} |
| 178 |
\DeclareMathSymbol{\restrictwand}{\mathord}{esrelation}{'027} |
| 179 |
\DeclareMathSymbol{\restrictbarb}{\mathord}{esrelation}{'030} |
| 180 |
\DeclareMathSymbol{\restrictmallet}{\mathord}{esrelation}{'021} |
| 181 |
\DeclareMathSymbol{\restrictwandup}{\mathord}{esrelation}{'050} |
| 182 |
\DeclareMathSymbol{\restrictbarbup}{\mathord}{esrelation}{'051} |
| 183 |
\DeclareMathSymbol{\restrictmalletup}{\mathord}{esrelation}{'052} |
| 184 |
%%---------------------------------------- |
| 185 |
%% 0. main |
| 186 |
%%---------------------------------------- |
| 187 |
|
| 188 |
\ProcessOptions\relax |
| 189 |
|
| 190 |
\def\relationrightproject{\parindent 0pt\mathpalette{\relationbuildprojectright\relationbarfill}} |
| 191 |
\def\relationleftproject{\parindent 0pt\mathpalette{\relationbuildprojectleft\relationbarfill}} |
| 192 |
\def\relationlifting{\parindent 0pt\mathpalette{\relationbuildlifting\relationbarfill}} |
| 193 |
%%---------------------------------------- |
| 194 |
%% 1. fills |
| 195 |
%%---------------------------------------- |
| 196 |
|
| 197 |
\def\relationbarfill#1{ |
| 198 |
\m@th\leaders\hbox{$\mkern-2mu\barlong\mkern-2mu$}\hfill |
| 199 |
} |
| 200 |
|
| 201 |
\def\relationverticalbarfillleft#1{ |
| 202 |
\hbox to .5em{\vbox to #1{ |
| 203 |
\leaders\hbox{\hbox{$\verticalbarlongleft$}} |
| 204 |
\vfill\kern-.5em$\verticalbarlongleft$}} |
| 205 |
} |
| 206 |
|
| 207 |
\def\relationverticalbarfillright#1{ |
| 208 |
\hbox to .5em{\vbox to #1{ |
| 209 |
\leaders\hbox{\hbox{$\verticalbarlongright$}} |
| 210 |
\vfill\kern-.5em$\verticalbarlongright$}} |
| 211 |
} |
| 212 |
%%---------------------------------------- |
| 213 |
%% 2. build |
| 214 |
%%---------------------------------------- |
| 215 |
|
| 216 |
\def\relationbuildprojectright #1#2#3{ |
| 217 |
%% #1 = \relationbarfill |
| 218 |
%% #2 = \mathchoice |
| 219 |
%% #3 = \relationleftproject{...} |
| 220 |
\setbox0=\hbox{$#3$} %% main expression |
| 221 |
\dimen0=\ht0 %% main box height |
| 222 |
\dimen1=\wd0 %% main box width |
| 223 |
\vbox{ |
| 224 |
\ialign{##\crcr |
| 225 |
\noalign{\kern-.3em\nointerlineskip} %% overline |
| 226 |
\hbox to \dimen1{$\kern.1em\brktr$#1#2}$\mkern-3mu |
| 227 |
\arrwr$\crcr |
| 228 |
\noalign{\kern-.1em\nointerlineskip}$\m@th %% main |
| 229 |
\kern.1em\relationverticalbarfillleft{\dimen0}\kern-.3em\box0 $\crcr |
| 230 |
} |
| 231 |
} |
| 232 |
} |
| 233 |
|
| 234 |
\def\relationbuildprojectleft #1#2#3{ |
| 235 |
%% #1 = \relationbarfill |
| 236 |
%% #2 = \mathchoice |
| 237 |
%% #3 = \relationleftproject{...} |
| 238 |
\setbox0=\hbox{$#3$} %% main expression |
| 239 |
\dimen0=\ht0 %% main box height |
| 240 |
\dimen1=\wd0 %% main box width |
| 241 |
\vbox{ |
| 242 |
\ialign{##\crcr |
| 243 |
\noalign{\kern-.3em\nointerlineskip} %% overline |
| 244 |
\hbox to \dimen1{$\mkern2mu\arrwl$#1#2}$\kern.1em\brktl$\crcr |
| 245 |
\noalign{\kern-.1em\nointerlineskip}$\m@th %% main |
| 246 |
\mkern3mu\box0\mkern-3mu\kern.1em\relationverticalbarfillright{ |
| 247 |
\dimen0}$\crcr |
| 248 |
} |
| 249 |
} |
| 250 |
} |
| 251 |
|
| 252 |
\def\relationbuildlifting #1#2#3{ |
| 253 |
%% #1 = \relationbarfill |
| 254 |
%% #2 = \mathchoice |
| 255 |
%% #3 = \relationbuildlifting{...} |
| 256 |
\setbox0=\hbox{$#3$} %% main expression |
| 257 |
\dimen0=\ht0 %% main box height |
| 258 |
\dimen1=\wd0 %% main box width |
| 259 |
\advance\dimen1 by -.25em %% close horizontal gap |
| 260 |
\lower.75ex\hbox{\vbox{ |
| 261 |
\ialign{##\crcr |
| 262 |
\noalign{\kern0em\nointerlineskip}$\m@th %% main |
| 263 |
\kern.1em\relationverticalbarfillleft{\dimen0}\mkern-5mu |
| 264 |
\box0 $\crcr |
| 265 |
\noalign{\kern-.2em\nointerlineskip} %% underline |
| 266 |
\hbox to \dimen1{$\kern.1em\brktlift$#1#2}$\mkern-3mu\barlong |
| 267 |
\barlong$\crcr |
| 268 |
} |
| 269 |
} |
| 270 |
}\kern-.25em |
| 271 |
} |
| 272 |
|
| 273 |
%</style> |
| 274 |
% \end{macrocode} |
| 275 |
% \begin{macrocode} |
| 276 |
%<*mf> |
| 277 |
|
| 278 |
%% mf setup |
| 279 |
|
| 280 |
font_coding_scheme:="TeX math symbols"; |
| 281 |
mode_setup; font_setup; |
| 282 |
|
| 283 |
autorounding:=0; |
| 284 |
font_slant slant; font_x_height x_height#; |
| 285 |
font_quad 18u# if not monospace:+4letter_fit# fi; |
| 286 |
slant:=mono_charic#:=0; % the remaining characters will not be slanted |
| 287 |
currenttransform:=identity yscaled aspect_ratio scaled granularity; |
| 288 |
|
| 289 |
|
| 290 |
%% identify symbols |
| 291 |
|
| 292 |
%% brackets |
| 293 |
|
| 294 |
bracket_project_right=oct"025"; |
| 295 |
bracket_project_left=oct"024"; |
| 296 |
bracket_lifting=oct"026"; |
| 297 |
|
| 298 |
%% symbols |
| 299 |
|
| 300 |
restrict_wand=oct"027"; |
| 301 |
restrict_barb=oct"030"; |
| 302 |
restrict_mallet=oct"021"; |
| 303 |
restrict_wand_up=oct"050"; |
| 304 |
restrict_barb_up=oct"051"; |
| 305 |
restrict_mallet_up=oct"052"; |
| 306 |
|
| 307 |
|
| 308 |
%% arrows |
| 309 |
|
| 310 |
r_arrow22=oct"021"; |
| 311 |
|
| 312 |
arrow_project_right=oct"022"; |
| 313 |
arrow_project_left=oct"023"; |
| 314 |
|
| 315 |
%% bars |
| 316 |
|
| 317 |
barshort=oct"040"; |
| 318 |
barlong=oct"043"; |
| 319 |
verticalbarlongleft=oct"044"; |
| 320 |
verticalbarlongright=oct"046"; |
| 321 |
verticalbarshort=oct"045"; |
| 322 |
|
| 323 |
%% declare extensible |
| 324 |
|
| 325 |
extensible oct"025": oct"025",0,0,oct"044"; |
| 326 |
extensible oct"024": oct"024",0,0,oct"044"; |
| 327 |
|
| 328 |
|
| 329 |
|
| 330 |
%% define pixels |
| 331 |
|
| 332 |
define_pixels(em, cap, sb, penscaler); % Convert to device-specific units. |
| 333 |
define_corrected_pixels(o); % Same, but add a device-specific fudge factor. |
| 334 |
|
| 335 |
|
| 336 |
%% relation utility dims |
| 337 |
|
| 338 |
%% u = (w-(2*sb))/8; % utility measurement |
| 339 |
uu = (h-(2*sb))/8; % utility measurement (using h, not w) |
| 340 |
super = 3.9; % offset utility for curve roundness [2.8] |
| 341 |
|
| 342 |
|
| 343 |
%% Arrow project Right |
| 344 |
|
| 345 |
iff known arrow_project_right: cmchar "arrow_project_right"; |
| 346 |
compute_spread(.45x_height#,.55x_height#); |
| 347 |
beginchar(arrow_project_right,10u#,cap#, 1pt#); |
| 348 |
|
| 349 |
adjust_fit(0,0); |
| 350 |
pickup pencircle scaled (penscaler); % small, circular tip |
| 351 |
|
| 352 |
%% Points |
| 353 |
|
| 354 |
z1 = (-5u, math_axis); |
| 355 |
z2 = (10u, y1); |
| 356 |
z3 = (x2-5u, y2+5u); |
| 357 |
|
| 358 |
%% Draw |
| 359 |
|
| 360 |
draw z1 -- z2 -- z3; % right arrow |
| 361 |
penlabels(1,2,3,4,5,6); |
| 362 |
|
| 363 |
endchar; |
| 364 |
|
| 365 |
|
| 366 |
%% Arrow project Left |
| 367 |
|
| 368 |
iff known arrow_project_left: cmchar "arrow_project_left"; |
| 369 |
compute_spread(.45x_height#,.55x_height#); |
| 370 |
beginchar(arrow_project_left,10u#,cap#, 1pt#); |
| 371 |
|
| 372 |
adjust_fit(0,0); |
| 373 |
pickup pencircle scaled (penscaler); % small, circular tip |
| 374 |
|
| 375 |
%% Points |
| 376 |
|
| 377 |
z1 = (15u, math_axis); |
| 378 |
z2 = (0, y1); |
| 379 |
z3 = (x2+5u, y2+5u); |
| 380 |
|
| 381 |
%% Draw |
| 382 |
|
| 383 |
draw z1 -- z2 -- z3; % right arrow |
| 384 |
penlabels(1,2,3,4,5,6); |
| 385 |
|
| 386 |
endchar; |
| 387 |
|
| 388 |
|
| 389 |
%% Bracket project Right |
| 390 |
|
| 391 |
iff known bracket_project_right: cmchar "bracket_project_right"; |
| 392 |
compute_spread(.45x_height#,.55x_height#); |
| 393 |
beginchar(bracket_project_right,5u#,cap#, 1pt#); |
| 394 |
|
| 395 |
adjust_fit(0,0); |
| 396 |
pickup pencircle scaled (penscaler); % small, circular tip |
| 397 |
|
| 398 |
%% Points |
| 399 |
|
| 400 |
z1 = (0, -3*desc_depth); |
| 401 |
z2 = (x1, math_axis-4u); |
| 402 |
z3 = (x1+5u/super, y4-5u/super); |
| 403 |
z4 = (x1+4u, math_axis); |
| 404 |
z5 = (15u, y4); |
| 405 |
|
| 406 |
%% Draw |
| 407 |
|
| 408 |
draw z1 -- z2 .. z3 .. z4 -- z5; % right bracket |
| 409 |
penlabels(1,2,3,4,5,6); |
| 410 |
|
| 411 |
endchar; |
| 412 |
|
| 413 |
|
| 414 |
%% Bracket project Left |
| 415 |
|
| 416 |
iff known bracket_project_left: cmchar "bracket_project_left"; |
| 417 |
compute_spread(.45x_height#,.55x_height#); |
| 418 |
beginchar(bracket_project_left,5u#,cap#, 1pt#); |
| 419 |
|
| 420 |
adjust_fit(0,0); |
| 421 |
pickup pencircle scaled (penscaler); % small, circular tip |
| 422 |
|
| 423 |
%% Points |
| 424 |
|
| 425 |
z1 = (w, -3*desc_depth); |
| 426 |
z2 = (x1, math_axis-4u); |
| 427 |
z3 = (x1-5u/super, y4-5u/super); |
| 428 |
z4 = (x1-4u, math_axis); |
| 429 |
z5 = (-10u, y4); |
| 430 |
|
| 431 |
%% Draw |
| 432 |
|
| 433 |
draw z1 -- z2 .. z3 .. z4 -- z5; % right bracket |
| 434 |
penlabels(1,2,3,4,5,6); |
| 435 |
|
| 436 |
endchar; |
| 437 |
|
| 438 |
|
| 439 |
%% Bracket Lifting |
| 440 |
|
| 441 |
iff known bracket_lifting: cmchar "bracket_lifting"; |
| 442 |
compute_spread(.45x_height#,.55x_height#); |
| 443 |
beginchar(bracket_lifting,5u#,cap#, 1pt#); |
| 444 |
|
| 445 |
adjust_fit(0,0); |
| 446 |
pickup pencircle scaled (penscaler); % small, circular tip |
| 447 |
|
| 448 |
%% Points |
| 449 |
|
| 450 |
z1 = (0, h+10u); |
| 451 |
z2 = (x1, math_axis+4u); |
| 452 |
z3 = (x1+5u/super, y4+5u/super); |
| 453 |
z4 = (4u, math_axis); |
| 454 |
z5 = (w+10u, y4); |
| 455 |
|
| 456 |
%% Draw |
| 457 |
|
| 458 |
draw z1 -- z2 .. z3 .. z4 -- z5; % bracket |
| 459 |
penlabels(1,2,3,4,5,6); |
| 460 |
|
| 461 |
endchar; |
| 462 |
|
| 463 |
|
| 464 |
% Bar Short |
| 465 |
|
| 466 |
iff known barshort: cmchar "barshort"; |
| 467 |
compute_spread(.45x_height#,.55x_height#); |
| 468 |
beginchar(barshort,3u#,v_center(spread#+rule_thickness#)); |
| 469 |
|
| 470 |
adjust_fit(0,0); |
| 471 |
% pickup rule.nib; |
| 472 |
pickup pencircle scaled (penscaler); % small, circular tip |
| 473 |
x1=eps; |
| 474 |
x2=w-eps+1u; |
| 475 |
y1=y2=math_axis; |
| 476 |
draw z1--z2; |
| 477 |
penlabels(1,2); |
| 478 |
|
| 479 |
endchar; |
| 480 |
|
| 481 |
|
| 482 |
%% Bar Long |
| 483 |
|
| 484 |
iff known barlong: cmchar "barlong"; |
| 485 |
compute_spread(.45x_height#,.55x_height#); |
| 486 |
beginchar(barlong,6u#,v_center(spread#+rule_thickness#)); |
| 487 |
|
| 488 |
adjust_fit(0,0); |
| 489 |
% pickup rule.nib; |
| 490 |
pickup pencircle scaled (penscaler); % small, circular tip |
| 491 |
x1=eps; |
| 492 |
x2=w-eps+1u; |
| 493 |
y1=y2=math_axis; |
| 494 |
draw z1--z2; |
| 495 |
penlabels(1,2); |
| 496 |
|
| 497 |
endchar; |
| 498 |
|
| 499 |
|
| 500 |
%% Vertical Bar Long Left |
| 501 |
|
| 502 |
iff known verticalbarlongleft: cmchar "verticalbarlongleft"; |
| 503 |
compute_spread(.45x_height#,.55x_height#); |
| 504 |
beginchar(verticalbarlongleft,5u#,v_center(spread#+rule_thickness#)); |
| 505 |
|
| 506 |
adjust_fit(0,0); |
| 507 |
pickup pencircle scaled (penscaler); % small, circular tip |
| 508 |
x1=x2=0; |
| 509 |
y1=asc_height-5u; |
| 510 |
y2=0; |
| 511 |
draw z1--z2; |
| 512 |
penlabels(1,2); |
| 513 |
|
| 514 |
endchar; |
| 515 |
|
| 516 |
|
| 517 |
%% Vertical Bar Long Right |
| 518 |
|
| 519 |
iff known verticalbarlongright: cmchar "verticalbarlongright"; |
| 520 |
compute_spread(.45x_height#,.55x_height#); |
| 521 |
beginchar(verticalbarlongright,5u#,v_center(spread#+rule_thickness#)); |
| 522 |
|
| 523 |
adjust_fit(0,0); |
| 524 |
pickup pencircle scaled (penscaler); % small, circular tip |
| 525 |
x1=x2=w; |
| 526 |
y1=asc_height-5u; |
| 527 |
y2=0; |
| 528 |
draw z1--z2; |
| 529 |
penlabels(1,2); |
| 530 |
|
| 531 |
endchar; |
| 532 |
|
| 533 |
|
| 534 |
%% Vertical Bar Short |
| 535 |
|
| 536 |
iff known verticalbarshort: cmchar "verticalbarshort"; |
| 537 |
compute_spread(.45x_height#,.55x_height#); |
| 538 |
beginchar(verticalbarshort,5u#,v_center(spread#+rule_thickness#)); |
| 539 |
|
| 540 |
adjust_fit(0,0); |
| 541 |
pickup pencircle scaled (penscaler); % small, circular tip |
| 542 |
x1=x2=0; |
| 543 |
y1=1u; |
| 544 |
y2=0; |
| 545 |
draw z1--z2; |
| 546 |
penlabels(1,2); |
| 547 |
|
| 548 |
endchar; |
| 549 |
|
| 550 |
|
| 551 |
%% restrict Wand |
| 552 |
|
| 553 |
iff known restrict_wand: cmchar "restrict_wand"; |
| 554 |
compute_spread(.45x_height#,.55x_height#); |
| 555 |
beginchar(restrict_wand,5u#,v_center(spread#+rule_thickness#)); |
| 556 |
|
| 557 |
pickup pencircle scaled (penscaler); |
| 558 |
|
| 559 |
%% Points |
| 560 |
|
| 561 |
z1 = (3u, asc_height); % bar |
| 562 |
z2 = (x1, -2*u); |
| 563 |
|
| 564 |
z3 = (x1-2*u, 0); % asterisk |
| 565 |
z4 = (x1+2*u, y3); |
| 566 |
z5 = (x1-1.4*u, y3+1.4*u); |
| 567 |
z6 = (x1+1.4*u, y3-1.4*u); |
| 568 |
z7 = (x6, y5); |
| 569 |
z8 = (x5, y6); |
| 570 |
|
| 571 |
%% Draw |
| 572 |
|
| 573 |
draw z1 -- z2; % | |
| 574 |
draw z3 -- z4; % * |
| 575 |
draw z5 -- z6; |
| 576 |
draw z7 -- z8; |
| 577 |
|
| 578 |
penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15); |
| 579 |
|
| 580 |
endchar; |
| 581 |
|
| 582 |
|
| 583 |
%% restrict Wand Up |
| 584 |
|
| 585 |
iff known restrict_wand_up: cmchar "restrict_wand_up"; |
| 586 |
compute_spread(.45x_height#,.55x_height#); |
| 587 |
beginchar(restrict_wand_up,5u#,v_center(spread#+rule_thickness#)); |
| 588 |
|
| 589 |
pickup pencircle scaled (penscaler); |
| 590 |
|
| 591 |
%% Points |
| 592 |
|
| 593 |
z1 = (3u, -2u); % bar |
| 594 |
z2 = (x1, asc_height); |
| 595 |
|
| 596 |
z3 = (x1-2*u, y2-2u); % asterisk |
| 597 |
z4 = (x1+2*u, y3); |
| 598 |
z5 = (x1-1.4*u, y3+1.4*u); |
| 599 |
z6 = (x1+1.4*u, y3-1.4*u); |
| 600 |
z7 = (x6, y5); |
| 601 |
z8 = (x5, y6); |
| 602 |
|
| 603 |
%% Draw |
| 604 |
|
| 605 |
draw z1 -- z2; % | |
| 606 |
draw z3 -- z4; % * |
| 607 |
draw z5 -- z6; |
| 608 |
draw z7 -- z8; |
| 609 |
|
| 610 |
penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15); |
| 611 |
|
| 612 |
endchar; |
| 613 |
|
| 614 |
|
| 615 |
%% restrict Barb |
| 616 |
|
| 617 |
iff known restrict_barb: cmchar "restrict_barb"; |
| 618 |
compute_spread(.45x_height#,.55x_height#); |
| 619 |
beginchar(restrict_barb,5u#,v_center(spread#+rule_thickness#)); |
| 620 |
|
| 621 |
pickup pencircle scaled (penscaler); % Use a pen with a small, circular tip. |
| 622 |
|
| 623 |
%% Points |
| 624 |
|
| 625 |
z1 = (3u, asc_height); % bar |
| 626 |
z2 = (x1, -2*u); |
| 627 |
|
| 628 |
z3 = (x1-2*u, 0); % diamond |
| 629 |
z4 = (x1+2*u, y3); |
| 630 |
z5 = (x1, 2*u); |
| 631 |
|
| 632 |
%% Draw |
| 633 |
|
| 634 |
draw z1 -- z2; % | |
| 635 |
draw z3 -- z4 -- z5; % _\ |
| 636 |
draw z2 -- z3; % \ |
| 637 |
|
| 638 |
penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15); |
| 639 |
|
| 640 |
endchar; |
| 641 |
|
| 642 |
|
| 643 |
%% restrict Barb Up |
| 644 |
|
| 645 |
iff known restrict_barb_up: cmchar "restrict_barb_up"; |
| 646 |
compute_spread(.45x_height#,.55x_height#); |
| 647 |
beginchar(restrict_barb_up,5u#,v_center(spread#+rule_thickness#)); |
| 648 |
|
| 649 |
pickup pencircle scaled (penscaler); % Use a pen with a small, circular tip. |
| 650 |
|
| 651 |
%% Points |
| 652 |
|
| 653 |
z1 = (3u, -2u); % bar |
| 654 |
z2 = (x1, asc_height); |
| 655 |
|
| 656 |
z3 = (x1-2*u, y2-2u); % diamond |
| 657 |
z4 = (x1+2*u, y3); |
| 658 |
z5 = (x1, y3-2u); |
| 659 |
|
| 660 |
%% Draw |
| 661 |
|
| 662 |
draw z1 -- z2; % | |
| 663 |
draw z3 -- z4 -- z5; % _\ |
| 664 |
draw z2 -- z3; % \ |
| 665 |
|
| 666 |
penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15); |
| 667 |
|
| 668 |
endchar; |
| 669 |
|
| 670 |
|
| 671 |
%% restrict Mallet |
| 672 |
|
| 673 |
iff known restrict_mallet: cmchar "restrict_mallet"; |
| 674 |
compute_spread(.45x_height#,.55x_height#); |
| 675 |
beginchar(restrict_mallet,5u#,v_center(spread#+rule_thickness#)); |
| 676 |
|
| 677 |
pickup pencircle scaled (penscaler); % Use a pen with a small, circular tip. |
| 678 |
|
| 679 |
%% Points |
| 680 |
|
| 681 |
z1 = (3u, asc_height); % bar |
| 682 |
z2 = (x1, -2*u); |
| 683 |
|
| 684 |
z3 = (x1-(4/3)*u, (-2/3)*u); % diamond |
| 685 |
z4 = (x1+(4/3)*u, y3); |
| 686 |
z5 = (x1, (2/3)*u); |
| 687 |
|
| 688 |
%% Draw |
| 689 |
|
| 690 |
draw z1 -- z2; % | |
| 691 |
draw z3 .. z5 .. z4 .. z2 .. z3; % o |
| 692 |
|
| 693 |
penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15); |
| 694 |
|
| 695 |
endchar; |
| 696 |
|
| 697 |
|
| 698 |
|
| 699 |
%% restrict Mallet up |
| 700 |
|
| 701 |
iff known restrict_mallet_up: cmchar "restrict_mallet_up"; |
| 702 |
compute_spread(.45x_height#,.55x_height#); |
| 703 |
beginchar(restrict_mallet_up,5u#,v_center(spread#+rule_thickness#)); |
| 704 |
|
| 705 |
pickup pencircle scaled (penscaler); % Use a pen with a small, circular tip. |
| 706 |
|
| 707 |
%% Points |
| 708 |
|
| 709 |
z1 = (3u, -2u); % bar |
| 710 |
z2 = (x1, asc_height); |
| 711 |
|
| 712 |
z3 = (x1-(4/3)*u, y2-4/3u); % diamond |
| 713 |
z4 = (x1+(4/3)*u, y3); |
| 714 |
z5 = (x1, y3-4/3u); |
| 715 |
|
| 716 |
%% Draw |
| 717 |
|
| 718 |
draw z1 -- z2; % | |
| 719 |
draw z3 .. z5 .. z4 .. z2 .. z3; % o |
| 720 |
|
| 721 |
penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15); |
| 722 |
|
| 723 |
endchar; |
| 724 |
|
| 725 |
|
| 726 |
|
| 727 |
bye. |
| 728 |
|
| 729 |
%</mf> |
| 730 |
% \end{macrocode} |
| 731 |
% \begin{macrocode} |
| 732 |
%<*mf10> |
| 733 |
if unknown cmbase: input cmbase fi |
| 734 |
|
| 735 |
font_identifier:="VECT"; |
| 736 |
font_size 10pt#; |
| 737 |
|
| 738 |
%% relation specific measures |
| 739 |
|
| 740 |
em# := 10pt#; % ``M'' width |
| 741 |
cap# := 7pt#; % cap height |
| 742 |
sb# := 1/4pt#; % sidebearing |
| 743 |
o# := 1/16pt#; % amt curves overshoot borders |
| 744 |
penscaler# := 0.3pt#; % pen stroke scaler ** fix ** |
| 745 |
|
| 746 |
%% relation non-sharped values * fix * |
| 747 |
|
| 748 |
%% u = (w-(2*sb))/8; % utility measurement |
| 749 |
%% super = 3.9; % offset utility for curve roundness [2.8] |
| 750 |
|
| 751 |
%% cm values from esvect |
| 752 |
|
| 753 |
u#:=20/36pt#; % unit width |
| 754 |
width_adj#:=0pt#; % width adjustment for certain characters |
| 755 |
serif_fit#:=0pt#; % extra sidebar near lowercase serifs |
| 756 |
cap_serif_fit#:=5/36pt#; % extra sidebar near uppercase serifs |
| 757 |
letter_fit#:=0pt#; % extra space added to all sidebars |
| 758 |
|
| 759 |
body_height#:=270/36pt#; % height of tallest characters |
| 760 |
asc_height#:=250/36pt#; % height of lowercase ascenders |
| 761 |
cap_height#:=246/36pt#; % height of caps |
| 762 |
fig_height#:=232/36pt#; % height of numerals |
| 763 |
x_height#:=155/36pt#; % height of lowercase without ascenders |
| 764 |
math_axis#:=90/36pt#; % axis of symmetry for math symbols |
| 765 |
bar_height#:=87/36pt#; % height of crossbar in lowercase e |
| 766 |
comma_depth#:=70/36pt#; % depth of comma below baseline |
| 767 |
desc_depth#:=70/36pt#; % depth of lowercase descenders |
| 768 |
|
| 769 |
crisp#:=8/36pt#; % diameter of serif corners |
| 770 |
tiny#:=8/36pt#; % diameter of rounded corners |
| 771 |
fine#:=7/36pt#; % diameter of sharply rounded corners |
| 772 |
thin_join#:=7/36pt#; % width of extrafine details |
| 773 |
hair#:=9/36pt#; % lowercase hairline breadth |
| 774 |
stem#:=24/36pt#; % lowercase stem breadth |
| 775 |
curve#:=29/36pt#; % lowercase curve breadth |
| 776 |
ess#:=27/36pt#; % breadth in middle of lowercase s |
| 777 |
flare#:=32/36pt#; % diameter of bulbs or breadth of terminals |
| 778 |
dot_size#:=38/36pt#; % diameter of dots |
| 779 |
cap_hair#:=11/36pt#; % uppercase hairline breadth |
| 780 |
cap_stem#:=30/36pt#; % uppercase stem breadth |
| 781 |
cap_curve#:=35/36pt#; % uppercase curve breadth |
| 782 |
cap_ess#:=33/36pt#; % breadth in middle of uppercase s |
| 783 |
rule_thickness#:=.4pt#; % thickness of lines in math symbols |
| 784 |
|
| 785 |
dish#:=1/36pt#; % amount erased at top or bottom of serifs |
| 786 |
bracket#:=20/36pt#; % vertical distance from serif base to tangent |
| 787 |
jut#:=30/36pt#; % protrusion of lowercase serifs |
| 788 |
cap_jut#:=37/36pt#; % protrusion of uppercase serifs |
| 789 |
beak_jut#:=10/36pt#; % horizontal protrusion of beak serifs |
| 790 |
beak#:=70/36pt#; % vertical protrusion of beak serifs |
| 791 |
vair#:=8/36pt#; % vertical diameter of hairlines |
| 792 |
notch_cut#:=10pt#; % maximum breadth above or below notches |
| 793 |
bar#:=11/36pt#; % lowercase bar thickness |
| 794 |
slab#:=11/36pt#; % serif and arm thickness |
| 795 |
cap_bar#:=11/36pt#; % uppercase bar thickness |
| 796 |
cap_band#:=11/36pt#; % uppercase thickness above/below lobes |
| 797 |
cap_notch_cut#:=10pt#; % max breadth above/below uppercase notches |
| 798 |
serif_drop#:=4/36pt#; % vertical drop of sloped serifs |
| 799 |
stem_corr#:=1/36pt#; % for small refinements of stem breadth |
| 800 |
vair_corr#:=1/36pt#; % for small refinements of hairline height |
| 801 |
apex_corr#:=0pt#; % extra width at diagonal junctions |
| 802 |
|
| 803 |
%% o#:=8/36pt#; % amount of overshoot for curves |
| 804 |
apex_o#:=8/36pt#; % amount of overshoot for diagonal junctions |
| 805 |
|
| 806 |
slant:=.25; % tilt ratio $(\Delta x/\Delta y)$ |
| 807 |
fudge:=1; % factor applied to weights of heavy characters |
| 808 |
math_spread:=0; % extra openness of math symbols |
| 809 |
superness:=1/sqrt2; % parameter for superellipses |
| 810 |
superpull:=1/6; % extra openness inside bowls |
| 811 |
beak_darkness:=11/30; % fraction of triangle inside beak serifs |
| 812 |
ligs:=2; % level of ligatures to be included |
| 813 |
|
| 814 |
square_dots:=false; % should dots be square? |
| 815 |
hefty:=false; % should we try hard not to be overweight? |
| 816 |
serifs:=true; % should serifs and bulbs be attached? |
| 817 |
monospace:=false; % should all characters have the same width? |
| 818 |
variant_g:=true; % should an italic-style g be used? |
| 819 |
low_asterisk:=false; % should the asterisk be centered at the axis? |
| 820 |
math_fitting:=true; % should math-mode spacing be used? |
| 821 |
|
| 822 |
subs:=7/10; % subscripts to 10pt will normally be in 7pt type |
| 823 |
rth#:=.4pt#; % assume that rules will come from cmex10 |
| 824 |
fontdimen 8: % parameters $\sigma_8$ through $\sigma_{22}$ will now be listed |
| 825 |
math_axis#+3.51rth#+54/36pt#+subs*desc_depth#, % num1 |
| 826 |
math_axis#+1.51rth#+30/36pt#, % num2 |
| 827 |
math_axis#+1.51rth#+48/36pt#, % num3 |
| 828 |
-(math_axis#-3.51rth#-subs*fig_height#-124/36pt#), % denom1 |
| 829 |
-(math_axis#-1.51rth#-subs*fig_height#-30/36pt#), % denom2 |
| 830 |
8.99pt#-subs*asc_height#, % sup1 |
| 831 |
8.49pt#-subs*asc_height#, % sup2 |
| 832 |
104/36pt#, % sup3 |
| 833 |
54/36pt#, % sub1 |
| 834 |
-(8.49pt#-2subs*asc_height#-3.1rth#), % sub2 |
| 835 |
subs*asc_height#-36/36pt#, % sup\_drop |
| 836 |
18/36pt#, % sub\_drop |
| 837 |
23.9pt#, % delim1 |
| 838 |
10.1pt#, % delim2 |
| 839 |
math_axis#; % axis\_height |
| 840 |
|
| 841 |
generate esrelation % switch to the driver file |
| 842 |
|
| 843 |
%</mf10> |
| 844 |
% \end{macrocode} |
| 845 |
% \Finale |