%% $Id: xycmtip.doc,v 2.12 1994/10/25 11:34:25 kris Exp $ %% %% XY-pic ``Computer Modern tips'' option. %% Copyright (c) 1992-1994 Kristoffer H. Rose %% %% This file is part of the XY-pic package for graphs and diagrams in TeX. %% Copyright (c) 1991-1994 Kristoffer H. Rose %% %% The XY-pic package is free software; you can redistribute it and/or modify %% it under the terms of the GNU General Public License as published by the %% Free Software Foundation; either version 2 of the License, or (at your %% option) any later version. %% %% The XY-pic package is distributed in the hope that it will be useful, but %% WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY %% or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License %% for more details. %% %% You should have received a copy of the GNU General Public License along %% with this package; if not, write to the Free Software Foundation, Inc., %% 675 Mass Ave, Cambridge, MA 02139, USA. %% \ifx\xyloaded\undefined \input xy \fi \xyprovide{cmtip}{Computer Modern tip extension}{\stripRCS$Revision: 2.12 $}% {Kristoffer H.~Rose}{kris@diku.dk}% {Computer Science, University of Copenhagen, Universitetsparken~1, DK--2100 K{\o}benhavn~{\O}} \DOCMODE3%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% This option provides arrow heads in the style of the Computer Modern fonts by Knuth~(see \cite{K86:ComputerMT} and \cite[appendix~F]{K84:TeXbook}). These are often more pleasing in connection with curved arrows. \DOCMODE2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \paragraph*{Header:}\leavevmode \DOCHEADER \subsection{Fonts} First we load the fonts. \DOCMODE( \xyfont@\xycmatfont=xycmat10 \xyfont@\xycmbtfont=xycmbt10 \DOCMODE) Next we save the \XY-commands that may need restoring. \DOCMODE( \xylet@\xytip@=\tip@ \xylet@\xyatip@=\atip@ \xylet@\xybtip@=\btip@ \xylet@\xytipjot@=\tipjot@ \DOCMODE) \subsection{Switching} Finally commands to switch the |cm| fonts on; they also set the |\jot| dimension temporarily to fit the smaller tips: \DOCMODE( \xydef@\xycm@{\let\xyatipfont=\xycmatfont \let\xybtipfont=\xycmbtfont} \xydef@\cmtip@{\xycm@ \tip@x\tip@@} \xydef@\cmatip@{\xycm@ \tip@x\atip@@} \xydef@\cmbtip@{\xycm@ \tip@x\btip@@} \DOCMODE) \DOCMODE3%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{figure*}[t] % \UseComputerModernTips % \def\Dx#1#2{\hbox{\def\1{#1{#2}}\enspace\tt\string\dir\codeof\1}} % \def\DT#1#{\DTx{#1}} \def\DTx#1#2{\Dx{#1}{#2} & \vcenter{\xy -(4,2.5)*{} ; (4,0)*{} **{} ?>*\dir#1{#2} **\dir#1{.} \endxy}} % \def\Darray#1#2{{\let\\=\cr \tabskip=0pt plus 1fil % \halign to\hsize{&\hfil$##$&$##$\hfil\\ \noalign{\hbox to\hsize{\hss#1\hss}\smallskip}#2\crcr}\bigskip}} % \Darray{Plain Computer Modern tips}{% \DT{>} &\DT^{>} &\DT_{>} \\ \DT{<} &\DT^{<} &\DT_{<} \\ } \bigskip \Darray{Constructed Computer Modern tips}{% \DT{>>} &\DT^{>>} &\DT_{>>} \\ \DT{<<} &\DT^{<<} &\DT_{<<} \\ \DT{>|} &\DT{>>|} &\DT{|<} \\ } \caption{Computer Modern \protectectionals} ??=[f.cmdir] \end{figure*} The user can switch the ``computer modern'' versions of the directionals shown in figure~??[f.cmdir] on and off with these declarations: % \begin{defs1} |\UseComputerModernTips| \cr |\NoComputerModernTips| \cr \end{defs1} \noindent\unskip % They are local and thus can be switched on and/or off for individual pictures using the \TeX\ grouping mechanism, \eg, % \begin{code} \xy*{} \ar @{*{\UseComputerModernTips\dir{<}}% -*{\NoComputerModernTips\dir{>}}} (20,5)*{} \endxy \end{code} \displaycode \noindent % will typeset $$ \docode $$ regardless of the tip choice in the surrounding text. \DOCMODE( \xydef@\UseComputerModernTips{\def\tipjot@{.66\jot}% \let\tip@=\cmtip@ \let\atip@=\cmatip@ \let\btip@=\cmbtip@} \xydef@\NoComputerModernTips{\let\tipjot@=\xytipjot@ \let\tip@=\xytip@ \let\atip@=\xyatip@ \let\btip@=\xybtip@} \DOCMODE) \DOCMODE2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{End \& log} \DOCMODE( \xyendinput % $Log: xycmtip.doc,v $ % Revision 2.12 1994/10/25 11:34:25 kris % Interim release just before v3 [works with AMS-LaTeX 1.2]... % % Revision 2.6 1993/10/21 20:36:09 kris % NEW file to go in version 2.7! % % Extracted from xypic.doc 2.6.1.1. \DOCMODE) \DOCMODE3%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Tell Emacs how we are formatted: % Local Variables: % mode:latex % fill-prefix:"\t" % fill-column:77 % paragraph-separate:"^[ \t\f]*$\\|^[^\t]\\|\\\\\\\\\\|\\$\\$\\|[^\n\\\\][%&]" % paragraph-start:"^[ \t\f]*$\\|^[^\t]\\|\\\\\\\\\\|\\$\\$\\|[^\n\\\\][%&]" % End: