summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-01-05 22:59:23 +0000
committerKarl Berry <karl@freefriends.org>2017-01-05 22:59:23 +0000
commit3bf704559f5456ed4e7523b64e02546c2a783413 (patch)
tree0894db5ccd396d5289366d56dcb47bd0aa656980 /Master/texmf-dist/tex
parent0853613fc13c11eef39f3f2f8a0068f268b89a8e (diff)
old-arrows (5jan17)
git-svn-id: svn://tug.org/texlive/trunk@42872 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/old-arrows/old-arrows.sty243
1 files changed, 226 insertions, 17 deletions
diff --git a/Master/texmf-dist/tex/latex/old-arrows/old-arrows.sty b/Master/texmf-dist/tex/latex/old-arrows/old-arrows.sty
index fcec4b658da..3fe09c5a6c0 100644
--- a/Master/texmf-dist/tex/latex/old-arrows/old-arrows.sty
+++ b/Master/texmf-dist/tex/latex/old-arrows/old-arrows.sty
@@ -1,14 +1,19 @@
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% old-arrows.sty. Version: 1.2 - October 11, 2015.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% old-arrows.sty. Version: 2.0 - January 5, 2017.
% Author: Riccardo DOSSENA <riccardo.dossena@gmail.com>
%
-% This package provides old-style cm arrows with smaller arrowheads,
-% associated with ordinary commands.
-% Use the option `new' if you want to use the new-style
-% cm arrows simultaneously: simply put \var before every command.
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% This package provides cm old-style arrows with smaller arrowheads,
+% associated with ordinary LaTeX commands. It can be used in a document
+% that contains other amssymb arrow characters, like \twoheadrightarrow,
+% which also have small arrowheads. The options `new' and `old' allow the
+% user to use the usual new-style cm arrows together with the old-style
+% ones. The option `new' allows you to maintain the old-style by default
+% and get the old-style by putting \var before every command; conversely,
+% the option `old' allows you to maintain the new-style by default and get
+% the old-style by putting \var before every command.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% Copyright 2015 R. Dossena
+% Copyright 2015-2017 R. Dossena
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -22,9 +27,39 @@
%
% The Current Maintainer of this work is R. Dossena.
%
-%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{old-arrows}[2015/10/11 v1.2 Old Arrows]
+\ProvidesPackage{old-arrows}[2017/01/05 v2.0 Old Arrows]
+
+\newif\ifoldarrows@default
+\newif\ifoldarrows@new
+\newif\ifoldarrows@old
+
+\def\oldarrows@opterr{%
+ \PackageError{old-arrows}{`new' and `old' options are incompatible}{%
+ I'm sorry, you cannot use the `new' and `old' options simultaneously! %
+ Ciao ;) \MessageBreak}%
+}%
+
+\DeclareOption{default}{\oldarrows@defaulttrue}
+\DeclareOption{new}{%
+ \ifoldarrows@old\oldarrows@opterr\fi
+ \oldarrows@newtrue}
+\DeclareOption{old}{%
+ \ifoldarrows@new\oldarrows@opterr\fi
+ \oldarrows@defaultfalse\oldarrows@oldtrue}
+
+\ExecuteOptions{default}
+
+\ProcessOptions\relax
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% default option
+%
+
+\ifoldarrows@default
\@ifpackageloaded{lmodern}{%
\DeclareFontFamily{OMS}{oasy}{\skewchar\font48 }
@@ -142,9 +177,14 @@
\DeclareRobustCommand\longleftharpoondown
{\leftharpoondown\joinrel\relbar}
+\fi
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% `new' option
+%
-%new style arrows: \var before every command
-\DeclareOption{new}{
+\ifoldarrows@new
\@ifpackageloaded{lmodern}{%
\DeclareSymbolFont{lmsy}{OMS}{lmsy}{m}{n}
@@ -270,17 +310,186 @@
\arrowfill@{\mapstochar\relbar}\relbar\varrightarrow}
\relax}{}
-%new-style support for St Mary's Road fonts
+%%stmaryrd new-style xmapsfrom (mathtools or amsmath needed)
\@ifpackageloaded{stmaryrd}{%
-\stmry@if\def\varmapsfrom{\varleftarrow\mapsfromchar}\fi
-\stmry@if\def\varlongmapsfrom{\varlongleftarrow\mapsfromchar}\fi
-%stmaryrd new-style xmapsfrom (mathtools or amsmath needed)
\newcommand{\varxmapsfrom}[2][]{%
\ext@arrow 3095\varSMRmapsfromfill@{#1}{#2}}
\def\varSMRmapsfromfill@{%
\arrowfill@\varleftarrow\relbar{\relbar\mapsfromchar}}
\relax}{}
+\fi
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% `old' option
+%
+
+\ifoldarrows@old
+
+\@ifpackageloaded{lmodern}{%
+\DeclareFontFamily{OMS}{oasy}{\skewchar\font48 }
+\DeclareFontShape{OMS}{oasy}{m}{n}{%
+ <-5.5> oasy5 <5.5-6.5> oasy6
+ <6.5-7.5> oasy7 <7.5-8.5> oasy8
+ <8.5-9.5> oasy9 <9.5-> oasy10
+ }{}
+\DeclareFontShape{OMS}{oasy}{b}{n}{%
+ <-6> oabsy5
+ <6-8> oabsy7
+ <8-> oabsy10
+ }{}
+\relax}{%
+\DeclareFontFamily{OMS}{oasy}{\skewchar\font48 }
+\DeclareFontShape{OMS}{oasy}{m}{n}{%
+ <5><6><7><8><9><10>gen*oasy%
+ <10.95><12><14.4><17.28><20.74><24.88>oasy10%
+ }{}
+\DeclareFontShape{OMS}{oasy}{b}{n}{%
+ <5><6><7><8><9>gen*oabsy%
+ <10><10.95><12><14.4><17.28><20.74><24.88>oabsy10%
+ }{}
+\relax}
+
+\DeclareSymbolFont{oasy}{OMS}{oasy}{m}{n}
+
+\SetSymbolFont{oasy}{normal}{OMS}{oasy}{m}{n}
+\SetSymbolFont{oasy}{bold}{OMS}{oasy}{b}{n}
+
+\DeclareMathSymbol{\varleftarrow} {\mathrel}{oasy}{"20}
+ \let\vargets=\varleftarrow
+\DeclareMathSymbol{\varrightarrow} {\mathrel}{oasy}{"21}
+ \let\varto=\varrightarrow
+\DeclareMathSymbol{\varleftrightarrow} {\mathrel}{oasy}{"24}
+\DeclareMathSymbol{\varnearrow} {\mathrel}{oasy}{"25}
+\DeclareMathSymbol{\varsearrow} {\mathrel}{oasy}{"26}
+\DeclareMathSymbol{\varnwarrow} {\mathrel}{oasy}{"2D}
+\DeclareMathSymbol{\varswarrow} {\mathrel}{oasy}{"2E}
+\DeclareMathSymbol{\varmapstochar} {\mathrel}{oasy}{"37}
+ \def\varmapsto{\varmapstochar\varrightarrow}
+ \def\varhookrightarrow{\lhook\joinrel\varrightarrow}
+ \def\varhookleftarrow{\varleftarrow\joinrel\rhook}
+
+\DeclareMathDelimiter{\varuparrow} {\mathrel}{oasy}{"22}{largesymbols}{"78}
+\DeclareMathDelimiter{\vardownarrow} {\mathrel}{oasy}{"23}{largesymbols}{"79}
+\DeclareMathDelimiter{\varupdownarrow} {\mathrel}{oasy}{"6C}{largesymbols}{"3F}
+
+%definitions of \meno, \joinrelaz and \relbarra
+\DeclareMathSymbol{\meno} {\mathbin}{oasy}{"00}
+\DeclareRobustCommand
+ \joinrelaz{\mathrel{\mkern-3mu}}
+\DeclareRobustCommand
+ \relbarra{\mathrel{\smash\meno}} % \smash, because -
+ % has the same height as +
+
+\DeclareRobustCommand\varlongrightarrow
+ {\relbarra\joinrelaz\varrightarrow}
+\DeclareRobustCommand\varlongleftarrow
+ {\varleftarrow\joinrelaz\relbarra}
+\DeclareRobustCommand
+ \varlongmapsto{\varmapstochar\varlongrightarrow}
+\DeclareRobustCommand
+ \varlongleftrightarrow{\varleftarrow\joinrelaz\varrightarrow}
+
+\def\varoverrightarrow#1{\vbox{\m@th\ialign{##\crcr
+ \varrightarrowfill\crcr\noalign{\kern-\p@\nointerlineskip}
+ $\hfil\displaystyle{#1}\hfil$\crcr}}}
+\def\varoverleftarrow#1{\vbox{\m@th\ialign{##\crcr
+ \varleftarrowfill\crcr\noalign{\kern-\p@\nointerlineskip}%
+ $\hfil\displaystyle{#1}\hfil$\crcr}}}
+\def\varrightarrowfill{$\m@th\smash\meno\mkern-7mu%
+ \cleaders\hbox{$\mkern-2mu\smash\meno\mkern-2mu$}\hfill
+ \mkern-7mu\mathord\varrightarrow$}
+\def\varleftarrowfill{$\m@th\mathord\varleftarrow\mkern-7mu%
+ \cleaders\hbox{$\mkern-2mu\smash\meno\mkern-2mu$}\hfill
+ \mkern-7mu\smash\meno$}
+
+%amsmath redefinitions, if loaded
+\@ifpackageloaded{amsmath}{%
+\ams@def\relbarra{\mathrel{\mathpalette\mathsm@sh\meno}}
+\def\varleftarrowfill@{\arrowfill@\varleftarrow\relbarra\relbarra}
+\def\varrightarrowfill@{\arrowfill@\relbarra\relbarra\varrightarrow}
+\def\varleftrightarrowfill@{\arrowfill@\varleftarrow\relbarra\varrightarrow}
+\ams@renewcommand{\varoverrightarrow}{%
+ \mathpalette{\overarrow@\varrightarrowfill@}}
+\ams@renewcommand{\varoverleftarrow}{%
+ \mathpalette{\overarrow@\varleftarrowfill@}}
+\ams@newcommand{\varoverleftrightarrow}{%
+ \mathpalette{\overarrow@\varleftrightarrowfill@}}
+\ams@newcommand{\varunderrightarrow}{%
+ \mathpalette{\underarrow@\varrightarrowfill@}}
+\ams@newcommand{\varunderleftarrow}{%
+ \mathpalette{\underarrow@\varleftarrowfill@}}
+\ams@newcommand{\varunderleftrightarrow}{%
+ \mathpalette{\underarrow@\varleftrightarrowfill@}}
+\newcommand{\varxrightarrow}[2][]{\ext@arrow 0359\varrightarrowfill@{#1}{#2}}
+\newcommand{\varxleftarrow}[2][]{\ext@arrow 3095\varleftarrowfill@{#1}{#2}}
+\def\varvarinjlim{%
+ \mathop{\mathpalette\varlim@{\varrightarrowfill@\textstyle}}\nmlimits@
}
-\ProcessOptions\relax
+\def\varvarprojlim{%
+ \mathop{\mathpalette\varlim@{\varleftarrowfill@\textstyle}}\nmlimits@
+}
+\relax}{}
+
+%mathtools redefinitions, if loaded
+\@ifpackageloaded{mathtools}{%
+\newcommand{\varxleftrightarrow}[2][]{%
+ \ext@arrow 3095\varMTleftrightarrowfill@{#1}{#2}}
+\def\varMTleftrightarrowfill@{%
+ \arrowfill@\varleftarrow\relbarra\varrightarrow}
+\newcommand{\varxhookleftarrow}[2][]{%
+ \ext@arrow 3095\varMThookleftfill@{#1}{#2}}
+\def\varMThookleftfill@{%
+ \arrowfill@\varleftarrow\relbarra{\relbarra\joinrelaz\rhook}}
+\newcommand{\varxhookrightarrow}[2][]{%
+ \ext@arrow 3095\varMThookrightfill@{#1}{#2}}
+\def\varMThookrightfill@{%
+ \arrowfill@{\lhook\joinrelaz\relbarra}\relbarra\varrightarrow}
+\newcommand{\varxmapsto}[2][]{%
+ \ext@arrow 0395\varMTmapstofill@{#1}{#2}}
+\def\varMTmapstofill@{%
+ \arrowfill@{\mapstochar\relbarra}\relbarra\varrightarrow}
+\relax}{}
+
+%%stmaryrd old-style xmapsfrom (mathtools or amsmath needed)
+\@ifpackageloaded{stmaryrd}{%
+\newcommand{\varxmapsfrom}[2][]{%
+ \ext@arrow 3095\varSMRmapsfromfill@{#1}{#2}}
+\def\varSMRmapsfromfill@{%
+ \arrowfill@\varleftarrow\relbarra{\relbarra\mapsfromchar}}
+\newcommand{\xmapsfrom}[2][]{%
+ \ext@arrow 3095\SMRmapsfromfill@{#1}{#2}}
+\def\SMRmapsfromfill@{%
+ \arrowfill@\leftarrow\relbar{\relbar\mapsfromchar}}
+\relax}{}
+
+%arrow commands provided by old-arrows with option old
+\DeclareRobustCommand\varlonghookrightarrow
+ {\lhook\joinrelaz\varlongrightarrow}
+\DeclareRobustCommand\varlonghookleftarrow
+ {\varlongleftarrow\joinrelaz\rhook}
+
+%arrow commands provided by old-arrows (default)
+\DeclareRobustCommand\longhookrightarrow
+ {\lhook\joinrel\longrightarrow}
+\DeclareRobustCommand\longhookleftarrow
+ {\longleftarrow\joinrel\rhook}
+\DeclareRobustCommand\longrightharpoonup
+ {\relbar\joinrel\rightharpoonup}
+\DeclareRobustCommand\longrightharpoondown
+ {\relbar\joinrel\rightharpoondown}
+\DeclareRobustCommand\longleftharpoonup
+ {\leftharpoonup\joinrel\relbar}
+\DeclareRobustCommand\longleftharpoondown
+ {\leftharpoondown\joinrel\relbar}
+
+\fi
+
+%stmaryrd support for `new' and `old'
+\@ifpackageloaded{stmaryrd}{%
+ \stmry@if\def\varmapsfrom{\varleftarrow\mapsfromchar}\fi
+ \stmry@if\def\varlongmapsfrom{\varlongleftarrow\mapsfromchar}\fi
+}{}
+
\endinput