diff options
author | Karl Berry <karl@freefriends.org> | 2015-10-12 22:17:16 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-10-12 22:17:16 +0000 |
commit | fed5afdcdbbb42457a5a2515e008be46a54575a6 (patch) | |
tree | c908f75c60a41081fa3f38a3f9a7544e547b1eb9 /Master/texmf-dist/tex/latex/old-arrows | |
parent | 62e4ebfc23e63182647c7a7bd9c8994e2ea18e0b (diff) |
old-arrows (12oct15)
git-svn-id: svn://tug.org/texlive/trunk@38619 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/old-arrows')
-rw-r--r-- | Master/texmf-dist/tex/latex/old-arrows/old-arrows.sty | 89 |
1 files changed, 84 insertions, 5 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 eedce346cdf..fcec4b658da 100644 --- a/Master/texmf-dist/tex/latex/old-arrows/old-arrows.sty +++ b/Master/texmf-dist/tex/latex/old-arrows/old-arrows.sty @@ -1,5 +1,5 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% old-arrows.sty. Version: 1.1 - September 10, 2015. +% old-arrows.sty. Version: 1.2 - October 11, 2015. % Author: Riccardo DOSSENA <riccardo.dossena@gmail.com> % % This package provides old-style cm arrows with smaller arrowheads, @@ -24,7 +24,7 @@ % % \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{old-arrows}[2015/09/10 v1.1 Old Arrows] +\ProvidesPackage{old-arrows}[2015/10/11 v1.2 Old Arrows] \@ifpackageloaded{lmodern}{% \DeclareFontFamily{OMS}{oasy}{\skewchar\font48 } @@ -71,16 +71,18 @@ \DeclareMathDelimiter{\downarrow} {\mathrel}{oasy}{"23}{largesymbols}{"79} \DeclareMathDelimiter{\updownarrow} {\mathrel}{oasy}{"6C}{largesymbols}{"3F} -%definitions of \meno and \relbarra +%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\longrightarrow - {\relbarra\joinrel\rightarrow} + {\relbarra\joinrelaz\rightarrow} \DeclareRobustCommand\longleftarrow - {\leftarrow\joinrel\relbarra} + {\leftarrow\joinrelaz\relbarra} \def\rightarrowfill{$\m@th\smash\meno\mkern-7mu% \cleaders\hbox{$\mkern-2mu\smash\meno\mkern-2mu$}\hfill @@ -89,6 +91,7 @@ \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\leftarrowfill@{\arrowfill@\leftarrow\relbarra\relbarra} @@ -96,6 +99,50 @@ \def\leftrightarrowfill@{\arrowfill@\leftarrow\relbarra\rightarrow} \relax}{} +%mathtools redefinitions, if loaded +\@ifpackageloaded{mathtools}{% +\renewcommand{\xleftrightarrow}[2][]{% + \ext@arrow 3095\MTleftrightarrowfill@{#1}{#2}} +\def\MTleftrightarrowfill@{% + \arrowfill@\leftarrow\relbarra\rightarrow} +\renewcommand{\xhookleftarrow}[2][]{% + \ext@arrow 3095\MThookleftfill@{#1}{#2}} +\def\MThookleftfill@{% + \arrowfill@\leftarrow\relbarra{\relbarra\joinrelaz\rhook}} +\renewcommand{\xhookrightarrow}[2][]{% + \ext@arrow 3095\MThookrightfill@{#1}{#2}} +\def\MThookrightfill@{% + \arrowfill@{\lhook\joinrelaz\relbarra}\relbarra\rightarrow} +\renewcommand{\xmapsto}[2][]{% + \ext@arrow 0395\MTmapstofill@{#1}{#2}} +\def\MTmapstofill@{% + \arrowfill@{\mapstochar\relbarra}\relbarra\rightarrow} +\relax}{} + +%stmaryrd xmapsfrom (mathtools or amsmath needed) +\@ifpackageloaded{stmaryrd}{% +\newcommand{\xmapsfrom}[2][]{% + \ext@arrow 3095\SMRmapsfromfill@{#1}{#2}} +\def\SMRmapsfromfill@{% + \arrowfill@\leftarrow\relbarra{\relbarra\mapsfromchar}} +\relax}{} + + +%arrow commands provided by old-arrows +\DeclareRobustCommand\longhookrightarrow + {\lhook\joinrelaz\longrightarrow} +\DeclareRobustCommand\longhookleftarrow + {\longleftarrow\joinrelaz\rhook} +\DeclareRobustCommand\longrightharpoonup + {\relbar\joinrel\rightharpoonup} +\DeclareRobustCommand\longrightharpoondown + {\relbar\joinrel\rightharpoondown} +\DeclareRobustCommand\longleftharpoonup + {\leftharpoonup\joinrel\relbar} +\DeclareRobustCommand\longleftharpoondown + {\leftharpoondown\joinrel\relbar} + + %new style arrows: \var before every command \DeclareOption{new}{ @@ -169,6 +216,13 @@ \DeclareRobustCommand \varlongleftrightarrow{\varleftarrow\joinrel\varrightarrow} +%new commands provided by old-arrows with option new +\DeclareRobustCommand\varlonghookrightarrow + {\lhook\joinrel\varlongrightarrow} +\DeclareRobustCommand\varlonghookleftarrow + {\varlongleftarrow\joinrel\rhook} + + %new-style arrows provided by amsmath, if loaded \@ifpackageloaded{amsmath}{% \def\varleftarrowfill@{\arrowfill@\varleftarrow\relbar\relbar} @@ -196,10 +250,35 @@ } \relax}{} +%new-style support for mathtools +\@ifpackageloaded{mathtools}{% +\newcommand{\varxleftrightarrow}[2][]{% + \ext@arrow 3095\varMTleftrightarrowfill@{#1}{#2}} +\def\varMTleftrightarrowfill@{% + \arrowfill@\varleftarrow\relbar\varrightarrow} +\newcommand{\varxhookleftarrow}[2][]{% + \ext@arrow 3095\varMThookleftfill@{#1}{#2}} +\def\varMThookleftfill@{% + \arrowfill@\varleftarrow\relbar{\relbar\joinrel\rhook}} +\newcommand{\varxhookrightarrow}[2][]{% + \ext@arrow 3095\varMThookrightfill@{#1}{#2}} +\def\varMThookrightfill@{% + \arrowfill@{\lhook\joinrel\relbar}\relbar\varrightarrow} +\newcommand{\varxmapsto}[2][]{% + \ext@arrow 0395\varMTmapstofill@{#1}{#2}} +\def\varMTmapstofill@{% + \arrowfill@{\mapstochar\relbar}\relbar\varrightarrow} +\relax}{} + %new-style support for St Mary's Road fonts \@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}{} } |