%%
%% This is file `adfarrows.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% adfarrows.dtx  (with options: `sty')
%% 
%% Copyright (C) 2019-2025 Clea F. Rees.
%% 
%% 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 in
%%   https://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2008-05-04 or later.
%% 
%% This work has the LPPL maintenance status `maintained'.
%% 
%% The Current Maintainer of this work is Clea F. Rees.
%% 
%% This file may only be distributed together with a copy of the package
%% fontscripts. You may however distribute the package fontscripts without
%% such generated files.
%% 
%% This work consists of all files listed in manifest.txt.
%% 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{svn-prov}
\ProvidesPackageSVN[\filebase.sty]{$Id: adfarrows.dtx 11700 2026-02-25 07:11:48Z cfrees $}[v1.5 \revinfo  ArrowsADF]
\DefineFileInfoSVN[adfarrows]
\newif\if@adfarrows@digonnew
\@ifundefined{ExplLoaderFileDate}{%
  \IfFileExists{expl3.sty}{%
    \RequirePackage{expl3}%
  }{%
    \@adfarrows@digonnewfalse
  }%
}{\@adfarrows@digonnewtrue}
\if@adfarrows@digonnew
\ExplSyntaxOn
\keys_define:nn { adfarrows }
{
  scale .tl_set:N = \adfarrows@scale,
  scale .initial:V = \@empty,
}
\else
  \let\adfarrows@scale\@empty
\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\providecommand \IfFormatAtLeastTF { \@ifl@t@r \fmtversion }
\IfFormatAtLeastTF { 2022-06-01 }
{
  \ProcessKeyOptions [ adfarrows ]
}{
  \RequirePackage { l3keys2e }
  \ProcessKeysOptions { adfarrows }
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ExplSyntaxOff
\DeclareRobustCommand{\adfarrows@style}{%% do NOT break line below!
  \not@math@alphabet\adfarrows@style\relax
  \fontencoding{U}\fontfamily{ArrowsADF}\fontseries{m}\fontshape{n}\selectfont
}
\RequirePackage{fixtounicode}
\ExplSyntaxOn
\int_new:N \l__adfarrows_base_ot_int
\int_set:Nn \l__adfarrows_base_ot_int {1}
\int_new:N \l__adfarrows_base_p_int
\int_set:Nn \l__adfarrows_base_p_int {2}
\int_new:N \l__adfarrows_base_c_int
\int_set:Nn \l__adfarrows_base_c_int {3}
\int_new:N \l__adfarrows_base_st_int
\int_set:Nn \l__adfarrows_base_st_int {4}
\int_new:N \l__adfarrows_base_th_int
\int_set:Nn \l__adfarrows_base_th_int {5}
\int_new:N \l__adfarrows_base_t_int
\int_set:Nn \l__adfarrows_base_t_int {6}
\int_new:N \l__adfarrows_dir_e_int
\int_set:Nn \l__adfarrows_dir_e_int {0}
\int_new:N \l__adfarrows_dir_east_int
\int_set:Nn \l__adfarrows_dir_east_int {0}
\int_new:N \l__adfarrows_dir_se_int
\int_set:Nn \l__adfarrows_dir_se_int {1}
\int_new:N \l__adfarrows_dir_southeast_int
\int_set:Nn \l__adfarrows_dir_southeast_int {1}
\int_new:N \l__adfarrows_dir_s_int
\int_set:Nn \l__adfarrows_dir_s_int {2}
\int_new:N \l__adfarrows_dir_south_int
\int_set:Nn \l__adfarrows_dir_south_int {2}
\int_new:N \l__adfarrows_dir_sw_int
\int_set:Nn \l__adfarrows_dir_sw_int {3}
\int_new:N \l__adfarrows_dir_southwest_int
\int_set:Nn \l__adfarrows_dir_southwest_int {3}
\int_new:N \l__adfarrows_dir_w_int
\int_set:Nn \l__adfarrows_dir_w_int {4}
\def\adfarrows@west{west}%
\int_new:N \l__adfarrows_dir_west_int
\int_set:Nn \l__adfarrows_dir_west_int {4}
\int_new:N \l__adfarrows_dir_nw_int
\int_set:Nn \l__adfarrows_dir_nw_int {5}
\int_new:N \l__adfarrows_dir_northwest_int
\int_set:Nn \l__adfarrows_dir_northwest_int {5}
\int_new:N \l__adfarrows_dir_n_int
\int_set:Nn \l__adfarrows_dir_n_int {6}
\int_new:N \l__adfarrows_dir_north_int
\int_set:Nn \l__adfarrows_dir_north_int {6}
\int_new:N \l__adfarrows_dir_ne_int
\int_set:Nn \l__adfarrows_dir_ne_int {7}
\int_new:N \l__adfarrows_dir_northeast_int
\int_set:Nn \l__adfarrows_dir_northeast_int {7}
\int_new:N \g__adfarrows_base_int
\int_new:N \g__adfarrows_add_int
\int_new:N \l__adfarrows_base_opentail_int
\int_set:Nn \l__adfarrows_base_opentail_int {3}
\int_new:N \l__adfarrows_base_plain_int
\int_set:Nn \l__adfarrows_base_plain_int {11}
\int_new:N \l__adfarrows_base_comic_int
\int_set:Nn \l__adfarrows_base_comic_int {19}
\int_new:N \l__adfarrows_base_solidtail_int
\int_set:Nn \l__adfarrows_base_solidtail_int {29}
\int_new:N \l__adfarrows_base_thick_int
\int_set:Nn \l__adfarrows_base_thick_int {37}
\int_new:N \l__adfarrows_base_tail_int
\int_set:Nn \l__adfarrows_base_tail_int {45}
\int_new:N \l__adfarrows_arrow_int
\bool_if:nT { \sys_if_engine_luatex_p: || \sys_if_engine_pdftex_p: }
{
  \seq_new:N \l__adfarrows_glyphtounicode_seq
  \seq_set_from_clist:Nn \l__adfarrows_glyphtounicode_seq
  {
    A, %% A  ⇀ 21C0
    B, %% B  ↼ 21BC
    C, %% C  → 2192
    D, %% D  ↘ 2198
    E, %% E  ↓ 2193
    F, %% F  ↙ 2199
    G, %% G  ← 2190
    H, %% H  ↖ 2196
    I, %% I  ↑ 2191
    J, %% J  ↗ 2197
    K, %% K  → 2192
    L, %% L  ↘ 2198
    M, %% M  ↓ 2193
    N, %% N  ↙ 2199
    O, %% O  ← 2190
    P, %% P  ↖ 2196
    Q, %% Q  ↑ 2191
    R, %% R  ↗ 2197
    S, %% S  → 2192
    T, %% T  ↘ 2198
    U, %% U  ↓ 2193
    V, %% V  ↙ 2199
    W, %% W  ← 2190
    X, %% X  ↖ 2196
    Y, %% Y  ↑ 2191
    Z, %% Z  ↗ 2197
    a, %% a  ⇀ 21C0
    b, %% b  ↼ 21BC
    c, %% c  → 2192
    d, %% d  ↘ 2198
    e, %% e  ↓ 2193
    f, %% f  ↙ 2199
    g, %% g  ← 2190
    h, %% h  ↖ 2196
    i, %% i  ↑ 2191
    j, %% j  ↗ 2197
    k, %% k  → 2192
    l, %% l  ↘ 2198
    m, %% m  ↓ 2193
    n, %% n  ↙ 2199
    o, %% o  ← 2190
    p, %% p  ↖ 2196
    q, %% q  ↑ 2191
    r, %% r  ↗ 2197
    s, %% s  → 2192
    t, %% t  ↘ 2198
    u, %% u  ↓ 2193
    v, %% v  ↙ 2199
    w, %% w  ← 2190
    x, %% x  ↖ 2196
    y, %% y  ↑ 2191
    z, %% z  ↗ 2197
  }
  \seq_new:N \l__adfarrows_tounicode_seq
  \seq_set_from_clist:Nn \l__adfarrows_tounicode_seq
  {
    21C0, %% A  ⇀ 21C0
    21BC, %% B  ↼ 21BC
    2192, %% C  → 2192
    2198, %% D  ↘ 2198
    2193, %% E  ↓ 2193
    2199, %% F  ↙ 2199
    2190, %% G  ← 2190
    2196, %% H  ↖ 2196
    2191, %% I  ↑ 2191
    2197, %% J  ↗ 2197
    2192, %% K  → 2192
    2198, %% L  ↘ 2198
    2193, %% M  ↓ 2193
    2199, %% N  ↙ 2199
    2190, %% O  ← 2190
    2196, %% P  ↖ 2196
    2191, %% Q  ↑ 2191
    2197, %% R  ↗ 2197
    2192, %% S  → 2192
    2198, %% T  ↘ 2198
    2193, %% U  ↓ 2193
    2199, %% V  ↙ 2199
    2190, %% W  ← 2190
    2196, %% X  ↖ 2196
    2191, %% Y  ↑ 2191
    2197, %% Z  ↗ 2197
    21C0, %% a  ⇀ 21C0
    21BC, %% b  ↼ 21BC
    2192, %% c  → 2192
    2198, %% d  ↘ 2198
    2193, %% e  ↓ 2193
    2199, %% f  ↙ 2199
    2190, %% g  ← 2190
    2196, %% h  ↖ 2196
    2191, %% i  ↑ 2191
    2197, %% j  ↗ 2197
    2192, %% k  → 2192
    2198, %% l  ↘ 2198
    2193, %% m  ↓ 2193
    2199, %% n  ↙ 2199
    2190, %% o  ← 2190
    2196, %% p  ↖ 2196
    2191, %% q  ↑ 2191
    2197, %% r  ↗ 2197
    2192, %% s  → 2192
    2198, %% t  ↘ 2198
    2193, %% u  ↓ 2193
    2199, %% v  ↙ 2199
    2190, %% w  ← 2190
    2196, %% x  ↖ 2196
    2191, %% y  ↑ 2191
    2197, %% z  ↗ 2197
  }
  \fixtounicode_tounicode:nnNN { ArrowsADF } { ArrowsADF }
    \l__adfarrows_glyphtounicode_seq \l__adfarrows_tounicode_seq
}
\cs_new_nopar:Nn \__adfarrows_arrow:nn
{
  \int_if_exist:cTF { l__adfarrows_base_#1_int }
  {
    \int_gset_eq:Nc \g__adfarrows_base_int { l__adfarrows_base_#1_int }
  }{ % some kind of error check needed here
    \int_gset:Nn \g__adfarrows_base_int { #1 }
  }
  \int_if_exist:cTF { l__adfarrows_dir_#2_int }
  {
    \int_gset_eq:Nc \g__adfarrows_add_int { l__adfarrows_dir_#2_int }
  }{
    \PackageError{adfarrows}{#2 ~not~a~valid~direction.~Setting~east~}
    \int_gzero:N \g__adfarrows_add_int
  }
  \int_set:Nn \l__adfarrows_arrow_int { \g__adfarrows_base_int + \g__adfarrows_add_int }
  \int_compare:nNnTF { \l__adfarrows_arrow_int } < { 53 }
  { %^^A ~ \ifnum ... \the \numexpr ... N \the \numexpr ... \else ... \fi
    \int_compare:nNnTF { \l__adfarrows_arrow_int } > { 0 }
    {
      \expandafter\adfarrows@style\expandafter\char \int_to_arabic:n {
        \l__adfarrows_arrow_int
      }
    }{
      \PackageError{adfarrows}{\textbackslash l__adfarrows_arrow_int~must~be~greater~than~0~but~is~\int_to_arabic:n {\l__adfarrows_arrow_int}}%
    }
  }{
    \PackageError{adfarrows}{\textbackslash l__adfarrows_arrow_int ~ must~be~less~than~than~53~but~is~\int_to_arabic:n {\l__adfarrows_arrow_int}}%
  }
}
\cs_new_nopar:Nn \__adfarrows_arrow:n
{
  \adfarrows@style\char#1
}
\NewDocumentCommand \adfarrow { o m }
{
  \group_begin:
  \IfValueTF { #1 }
  {
    \__adfarrows_arrow:nn { #1 } { #2 }
  }{
    \__adfarrows_arrow:n { #2 }
  }
  \group_end:
}
\ExplSyntaxOff
\newcommand*{\adfhalfarrowright}{\adfarrow{1}}
\newcommand*{\adfhalfarrowleft}{\adfarrow{2}}
\newcommand*{\adfhalfarrowrightsolid}{\adfarrow{27}}
\newcommand*{\adfhalfarrowleftsolid}{\adfarrow{28}}
\gdef\adfarrowe#1{%
\ifcase #1 \relax
\or \adfarrow{3}%
\or \adfarrow{11}%
\or \adfarrow{19}%
\or \adfarrow{29}%
\or \adfarrow{37}%
\or \adfarrow{45}%
\fi}
\gdef\adfarrowse#1{%
\ifcase #1 \relax
\or \adfarrow{4}%
\or \adfarrow{12}%
\or \adfarrow{20}%
\or \adfarrow{30}%
\or \adfarrow{38}%
\or \adfarrow{46}%
\fi}
\gdef\adfarrows#1{%
\ifcase #1 \relax
\or \adfarrow{5}%
\or \adfarrow{13}%
\or \adfarrow{21}%
\or \adfarrow{31}%
\or \adfarrow{39}%
\or \adfarrow{47}%
\fi}
\gdef\adfarrowsw#1{%
\ifcase #1 \relax
\or \adfarrow{6}%
\or \adfarrow{14}%
\or \adfarrow{22}%
\or \adfarrow{32}%
\or \adfarrow{40}%
\or \adfarrow{48}%
\fi}
\gdef\adfarroww#1{%
\ifcase #1 \relax
\or \adfarrow{7}%
\or \adfarrow{15}%
\or \adfarrow{23}%
\or \adfarrow{33}%
\or \adfarrow{41}%
\or \adfarrow{49}%
\fi}
\gdef\adfarrownw#1{%
\ifcase #1 \relax
\or \adfarrow{8}%
\or \adfarrow{16}%
\or \adfarrow{24}%
\or \adfarrow{34}%
\or \adfarrow{42}%
\or \adfarrow{50}%
\fi}
\gdef\adfarrown#1{%
\ifcase #1 \relax
\or \adfarrow{9}%
\or \adfarrow{17}%
\or \adfarrow{25}%
\or \adfarrow{35}%
\or \adfarrow{43}%
\or \adfarrow{51}%
\fi}
\gdef\adfarrowne#1{%
\ifcase #1 \relax
\or \adfarrow{10}%
\or \adfarrow{18}%
\or \adfarrow{26}%
\or \adfarrow{36}%
\or \adfarrow{44}%
\or \adfarrow{52}%
\fi}
%% end adfarrows.sty
\endinput
%%
%% End of file `adfarrows.sty'.
