<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">% \title{Linear Logic symbols for Computer Modern}
% \author{Emmanuel Beffara}
% \date{April 20, 2010}
%
% \maketitle
%
% \section{Documentation}
%
% \subsection{Installation}
%
% The installation consists in copying the |.mf| files from the |mf|
% subdirectory somewhere in Metafont's search path and the |.sty| and |.fd|
% files from the |latex| subdirectory somewhere in \LaTeX's search path.
%
% Call |TEXMF| the base directory of your installation (on Unix this should be
% something like |/usr/share/texmf| or |~/texmf| for a single user
% installation). Then copy the directories as follows:
% \begin{itemize}
%   \item copy |mf| as |TEXMF/fonts/source/public/cmll|
%   \item copy |latex| as |TEXMF/tex/latex/cmll|
% \end{itemize}
% If you want to install the fonts in Type1 format:
% \begin{itemize}
%   \item copy |type1| as |TEXMF/fonts/type1/public/cmll|
%   \item copy |tfm| as |TEXMF/fonts/tfm/public/cmll|
%   \item copy |cmll.map| as |TEXMF/fonts/map/dvips/misc/cmll.map|
% \end{itemize}
% You may have to update \TeX's databases by running |texhash| or |mktexlsr|
% (this is for Kpathsea-based distributions like te\TeX) or a similar command.
% You may also have to register the map file for the Type1 fonts using
% |updmap|, depending on your installation.
% Linux users using Debian or Ubuntu can avoid all this by using the package
% at |http://iml.univ-mrs.fr/~beffara/soft/| (updated more often than TexLive).
%
% \subsection{Package loading}
%
% The package is loaded by simply saying |\usepackage{cmll}|. The variant of
% the font that should be used is chosen using the following package options:
% \begin{quote}
%   \begin{tabular}{&gt;{\ttfamily}ll}
%     cm &amp; Computer Modern serif \\
%     ss &amp; Computer Modern sans serif \\
%     euler &amp; AMS Euler \\
%     emu &amp; emulation mode (see section~\ref{selection}) \\
%     auto &amp; automatic selection among the above
%       (default, see section~\ref{selection})
%   \end{tabular}
% \end{quote}
%
% \subsection{Symbols}
%
% The \texttt{cmll} font defines a handful of symbols useful in linear logic
% that were not defined in other fonts and packages.
% \begin{symbols}{Unary operators:}
% \dosymbol\oc
% \dosymbol\wn
% \dosymbol\shpos
% \dosymbol\shneg
% \dosymbol\shift
% \end{symbols}
% \begin{symbols}{Binary operators:}
% \dosymbol\parr
% \dosymbol\invamp
% \dosymbol\with
% \end{symbols}
% \begin{symbols}{Large operators:}
% \dosymbol\bigparr
% \dosymbol\biginvamp
% \dosymbol\bigwith
% \end{symbols}
% \begin{symbols}{Binary relations:}
% \dosymbol\coh
% \dosymbol\scoh
% \dosymbol\incoh
% \dosymbol\sincoh
% \dosymbol\Perp
% \dosymbol\simperp
% \dosymbol\multimapinv
% \dosymbol\multimapboth
% \dosymbol\nmultimap
% \dosymbol\nmultimapinv
% \dosymbol\nmultimapboth
% \end{symbols}
% \begin{symbols}{Letter-like symbols:}
% \dosymbol\Bot
% \dosymbol\simbot
% \end{symbols}
% The symbols $\oc$, $\wn$ and $\with$ are actually characters from the
% standard Computer Modern fonts declared with a new math code to get proper
% spacing. See the following examples:
% \[\begin{tabular}{ll@{\hspace{4em}}ll}
%   \verb/A \&amp; B/ &amp; $A \&amp; B$ &amp; \verb/A \with B/ &amp; $A \with B$ \\
%   \verb/A = !B/ &amp; $A = !B$ &amp; \verb/A = \oc B/ &amp; $A = \oc B$ \\
%   \verb/A = ?B/ &amp; $A = ?B$ &amp; \verb/A = \wn B/ &amp; $A = \wn B$
% \end{tabular}\]
% The names |\parr| and |\invamp| are synonyms, the names |\bigparr| and
% |\biginvamp| too. The macros |\biginvampemu| and |\bigwithemu| provide
% emulations for the |\biginvamp| and |\bigwith| symbols, built using the
% normal symbols at different sizes (using the |relsize| package). In
% emulation mode (i.e. with the package option |emu|) the names |\biginvamp|
% and |\bigwith| are synonyms for them.
%
% \subsection{Emulation and automatic selection}
% \label{selection}
%
% If you use a math font family other than Computer Modern or Euler, you may
% have an ampersand symbol that does not match the reversed ampersand from any
% variant of CMLL. In this case, the |cmll| package provides a ``poor man''
% version of the reversed ampersand and large ampersands, built using the
% standard |\&amp;| symbol.
% Also provided are the ``big'' variants of |\with| and |\invamp| built using
% the normal version at a different size (using the |relsize| package).
% These versions can be used explicitly under the names |\invampemu|,
% |\bigwithemu| and |\biginvampemu|.
%
% In the emulation mode, that is when the package is loaded with the |emu|
% option, these variants are used instead of the symbols provided by the
% font.
% Moreover, in emulation mode, any symbol that already exists is preserved by
% |cmll|, otherwise all symbols are redefined.
% This is useful for instance with |txfonts|, which already provides |\invamp|
% and |\multimapboth|.
% Note that this feature works only if the package |cmll| is loaded
% \emph{after} loading any package that might define one of the symbols
% provided by CMLL.
%
% The automatic selection works as follows:
% \begin{itemize}
% \item if |euler| is loaded, use the Euler variant,
% \item if |txfonts| or |pxfonts| is loaded, use the emulation mode,
% \item if the default font is |cmss|, use the |ss| variant,
% \item otherwise use the |cm| variant.
% \end{itemize}
%
% \subsection{History}
%
% \begin{description}
% \item [2010-04-20]
%   New symbols: |\multimapinv|, |\nmultimap|, |\nmultimapinv|,
%   |\nmultimapboth|.
% \item [2009-01-23]
%   New symbols: |\multimapboth|, |\Perp|, |\Bot|, |\simperp|, |\simbot|.
%   Synonyms |\invamp| and |\biginvamp| added for compatibility.
%   New package option |emu|.
%   Various fixes and code improvements.
% \item [2006-02-22]
%   First public release.
% \end{description}
%
%
% \section{Files}
%
% \subsection{This document}
%
%    \begin{macrocode}
%&lt;*driver&gt;
\documentclass{ltxdoc}
\usepackage{array,cmll}
\newenvironment{symbols}[1]{%
  \par%
  \def\dosymbol##1{\leavevmode\hbox to .5\textwidth{%
    \kern.25\textwidth \hbox to 2em{\hss$##1$\hfil}%
    \texttt{\string##1}\hss}\penalty10}%
  \flushleft%
  #1\strut\\}{\endflushleft}
\begin{document}
\DocInput{cmll.dtx}
\end{document}
%&lt;/driver&gt;
%    \end{macrocode}
%
% \subsection{Font definitions}
%
% The font definition file is deduced from the ones for Computer Modern. We
% provide an NFSS entry named \texttt{cmllr} in medium and bold extended
% versions.
%
%    \begin{macrocode}
%&lt;*ucmllr&gt;
\DeclareFontShape{U}{cmllr}{m}{n}{%
      &lt;5&gt;&lt;6&gt;&lt;7&gt;&lt;8&gt;&lt;9&gt;gen*cmllr%
      &lt;10&gt;&lt;10.95&gt;cmllr10%
      &lt;12&gt;&lt;14.4&gt;cmllr12%
      &lt;17.28-&gt;cmllr17%
      }{}
\DeclareFontShape{U}{cmllr}{bx}{n}{%
      &lt;5&gt;&lt;6&gt;&lt;7&gt;&lt;8&gt;&lt;9&gt;gen*cmllbx%
      &lt;10&gt;&lt;10.95&gt;cmllbx10%
      &lt;12-&gt;cmllbx12%
      }{}
%&lt;/ucmllr&gt;
%    \end{macrocode}
%
% The following is a definition for the sans-serif version, named
% \texttt{cmllss}.
%
%    \begin{macrocode}
%&lt;*ucmllss&gt;
\DeclareFontShape{U}{cmllss}{m}{n}{%
      &lt;-8&gt;cmllss8%
      &lt;9&gt;cmllss9%
      &lt;10&gt;cmllss10
      &lt;12&gt;&lt;14.4&gt;cmllss12%
      &lt;17.28-&gt;cmllss17%
      }{}
\DeclareFontShape{U}{cmllss}{bx}{n}{%
      &lt;-&gt;cmllssbx10}{}
%&lt;/ucmllss&gt;
%    \end{macrocode}
%
% The following is a definition for the Euler-style version, named
% \texttt{eull}.
%
%    \begin{macrocode}
%&lt;*ueull&gt;
\DeclareFontShape{U}{eull}{m}{n}{%
      &lt;5&gt;&lt;6&gt;&lt;7&gt;&lt;8&gt;&lt;9&gt;gen*eullr%
      &lt;10-&gt;eullr10}{}
\DeclareFontShape{U}{eull}{bx}{n}{%
      &lt;5&gt;&lt;6&gt;&lt;7&gt;&lt;8&gt;&lt;9&gt;gen*eullbx%
      &lt;10-&gt;eullbx10}{}
%&lt;/ueull&gt;
%    \end{macrocode}
%
% \subsection{The package}
%
%    \begin{macrocode}
%&lt;*package&gt;
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{cmll}[2010/04/20 Linear Logic symbols for Computer Modern]
%    \end{macrocode}
%
% With the package option |emu|, symbols already defined are used and
% |\invamp| (if undefined) is made by rotation using an ampersand. This
% requires the |graphicx| package.
%
%    \begin{macrocode}
\let\cmll@ifemu=\iffalse
\DeclareOption{emu}{\let\cmll@ifemu=\iftrue}
%    \end{macrocode}
%
% The font is declared as a symbol font named \texttt{llsymbols}, in normal
% and bold versions. We provide package options to switch between the
% standard, sans-serif and Euler-style variants.
%
%    \begin{macrocode}
\def\cmll@style{auto}
\DeclareOption*{\edef\cmll@style{\CurrentOption}}
\ProcessOptions\relax
%    \end{macrocode}
%
% The following code is used to detect which family should be used. Euler is
% detected if its package is loaded, emulation is activated for txfonts and
% pxfonts, sans-serif is detected by looking at the default font family name.
%    \begin{macrocode}
\RequirePackage{ifthen}
\def\cmll@use@auto{%
  \@ifpackageloaded{euler}{%
    \def\cmll@style{euler}}{%
  \@ifpackageloaded{txfonts}{%
    \let\cmll@ifemu=\iftrue%
    \def\cmll@style{cm}}{%
  \@ifpackageloaded{pxfonts}{%
    \let\cmll@ifemu=\iftrue%
    \def\cmll@style{cm}}{%
  \ifthenelse{\equal{\rmdefault}{cmss}}{%
    \def\cmll@style{ss}}{%
    \def\cmll@style{cm}}%
  }}}%
  \csname cmll@use@\cmll@style\endcsname}
%    \end{macrocode}
%
% The following macros are used to set up the font families and symbols from
% other fonts.
%    \begin{macrocode}
\def\cmll@use@cm{%
  \DeclareSymbolFont{llsymbols}{U}{cmllr}{m}{n}%
  \SetSymbolFont{llsymbols}{bold}{U}{cmllr}{bx}{n}%
  \DeclareMathSymbol{\with}{\mathbin}{operators}{`\&amp;}%
  \DeclareMathSymbol{\oc}{\mathord}{operators}{`!}%
  \DeclareMathSymbol{\wn}{\mathord}{operators}{`?}}
%    \end{macrocode}
% Here is the sans-serif variant.
%    \begin{macrocode}
\def\cmll@use@ss{%
  \DeclareSymbolFont{llsymbols}{U}{cmllss}{m}{n}%
  \SetSymbolFont{llsymbols}{bold}{U}{cmllss}{bx}{n}%
  \DeclareMathSymbol{\with}{\mathbin}{operators}{`\&amp;}%
  \DeclareMathSymbol{\oc}{\mathord}{operators}{`!}%
  \DeclareMathSymbol{\wn}{\mathord}{operators}{`?}}
%    \end{macrocode}
% And here is the Euler variant.
%    \begin{macrocode}
\def\cmll@use@euler{%
  \DeclareSymbolFont{llsymbols}{U}{eull}{m}{n}%
  \SetSymbolFont{llsymbols}{bold}{U}{eull}{bx}{n}%
  \DeclareMathSymbol{\with}{\mathbin}{EulerFraktur}{"26}%
  \DeclareMathSymbol{\oc}{\mathord}{EulerFraktur}{"21}%
  \DeclareMathSymbol{\wn}{\mathord}{EulerFraktur}{"3F}}
%    \end{macrocode}
% Finally we activate the proper variant.
%    \begin{macrocode}
\csname cmll@use@\cmll@style\endcsname
%    \end{macrocode}
%
% In some cases it is preferable to emulate the |\invamp| by rotating the
% ampersand symbol. Here is a robust definition of this rotation:
%    \begin{macrocode}
\newcommand\invampemu{%
  \mathbin{\mathchoice%
    {\rotatebox[origin=c]{180}{$\&amp;$}}%
    {\rotatebox[origin=c]{180}{$\&amp;$}}%
    {\rotatebox[origin=c]{180}{$\scriptstyle\&amp;$}}%
    {\rotatebox[origin=c]{180}{$\scriptscriptstyle\&amp;$}}%
  }}
%    \end{macrocode}
% We may also want to emulate the big versions of the ampersand. In this case
% we change ther text size appropriately for each style, using the |relsize|
% package. This version is reasonable at normal size and becomes approximative
% when math is composed in small or large sizes.
%    \begin{macrocode}
\newcommand\bigwithemu{%
  \mathop{\mathchoice%
    {\vcenter{\hbox{\relsize{+4}$\&amp;$}}}%
    {\vcenter{\hbox{\relsize{+2}$\&amp;$}}}%
    {\vcenter{\hbox{\relsize{+0.5}$\&amp;$}}}%
    {\vcenter{\hbox{\relsize{-1}$\&amp;$}}}%
  }}
%    \end{macrocode}
% For the large inversed ampersand, we call the |\invamp| macro, which is
% supposed to be defined (either as a proper character or as an emulation as
% above). When it is emulated, this makes two nested |\mathchoice|s, which is
% not very efficient.
%    \begin{macrocode}
\newcommand\biginvampemu{%
  \mathop{\mathchoice%
    {\vcenter{\hbox{\relsize{+4}$\invamp$}}}%
    {\vcenter{\hbox{\relsize{+2}$\invamp$}}}%
    {\vcenter{\hbox{\relsize{+0.5}$\invamp$}}}%
    {\vcenter{\hbox{\relsize{-1}$\invamp$}}}}}
%    \end{macrocode}
%
% The actual commands |\invamp|, |\bigwith| and |\biginvamp| can be defined in
% various ways depending on the setup.
%
%    \begin{macrocode}
\cmll@ifemu
  \@ifundefined{invamp}{%
    \RequirePackage{graphicx}%
    \let\invamp=\invampemu
  }{}%
  \RequirePackage{relsize}%
  \let\bigwith=\bigwithemu
  \let\biginvamp=\biginvampemu
%    \end{macrocode}
% Already existing symbols are preserved in emulation mode.
%    \begin{macrocode}
  \def\cmll@declare@symbol#1#2#3#4{%
    \@ifundefined{#1}{%
      \expandafter\DeclareMathSymbol%
      \expandafter{\csname#1\endcsname}{#2}{#3}{#4}}{}}
\else
  \def\cmll@declare@symbol#1#2#3#4{%
    \expandafter\DeclareMathSymbol%
    \expandafter{\csname#1\endcsname}{#2}{#3}{#4}}
\fi
%    \end{macrocode}
%
% The new symbol definitions are the same for all variants.
%    \begin{macrocode}
\cmll@declare@symbol{invamp}{\mathbin}{llsymbols}{0}
\let\parr=\invamp
\cmll@declare@symbol{shpos}{\mathord}{llsymbols}{1}
\cmll@declare@symbol{shneg}{\mathord}{llsymbols}{2}
\cmll@declare@symbol{shift}{\mathord}{llsymbols}{3}
\cmll@declare@symbol{coh}{\mathrel}{llsymbols}{4}
\cmll@declare@symbol{scoh}{\mathrel}{llsymbols}{5}
\cmll@declare@symbol{incoh}{\mathrel}{llsymbols}{6}
\cmll@declare@symbol{sincoh}{\mathrel}{llsymbols}{7}
\cmll@declare@symbol{bigwith}{\mathop}{llsymbols}{8}
\cmll@declare@symbol{biginvamp}{\mathop}{llsymbols}{10}
\let\bigparr=\biginvamp
\cmll@declare@symbol{multimapboth}{\mathrel}{llsymbols}{12}
\cmll@declare@symbol{Bot}{\mathord}{llsymbols}{13}
\cmll@declare@symbol{Perp}{\mathrel}{llsymbols}{13}
\cmll@declare@symbol{simbot}{\mathord}{llsymbols}{14}
\cmll@declare@symbol{simperp}{\mathrel}{llsymbols}{14}
\cmll@declare@symbol{multimapinv}{\mathrel}{llsymbols}{15}
\cmll@declare@symbol{nmultimap}{\mathrel}{llsymbols}{16}
\cmll@declare@symbol{nmultimapinv}{\mathrel}{llsymbols}{17}
\cmll@declare@symbol{nmultimapboth}{\mathrel}{llsymbols}{18}
%&lt;/package&gt;
%    \end{macrocode}
%
% \Finale
</pre></body></html>