From 070ddc09ee29119848c748b6975b3a8f18f526cc Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Tue, 29 Sep 2020 21:07:16 +0000
Subject: algolrevived (29sep20)

git-svn-id: svn://tug.org/texlive/trunk@56472 c570f23f-e606-0410-a88d-b1316a301751
---
 .../tex/latex/algolrevived/algolrevived.sty        | 135 +++++++++++++++++++--
 1 file changed, 122 insertions(+), 13 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/algolrevived/algolrevived.sty')

diff --git a/Master/texmf-dist/tex/latex/algolrevived/algolrevived.sty b/Master/texmf-dist/tex/latex/algolrevived/algolrevived.sty
index 680165849ce..aa5043cec2f 100644
--- a/Master/texmf-dist/tex/latex/algolrevived/algolrevived.sty
+++ b/Master/texmf-dist/tex/latex/algolrevived/algolrevived.sty
@@ -1,12 +1,15 @@
 \NeedsTeXFormat{LaTeX2e}
-\def\fileversion{1.04}
-\def\filedate{2019/11/09}
+\def\fileversion{1.05}
+\def\filedate{2020/09/28}
 \ProvidesPackage{algolrevived}
     [\filedate\space v\fileversion]
 \message{'algolrevived' v\fileversion, \filedate\space  Style file for AlgolRevived fonts (msharpe).}
 
 \RequirePackage[LY1,T1]{fontenc}
 \RequirePackage{textcomp}
+\RequirePackage{xstring,ifthen,scalefnt}
+\RequirePackage{ifthen}
+\DeclareEncodingSubset{TS1}{AlgolRevived-*}{0}
 \IfFileExists{mweights.sty}{\RequirePackage{mweights}}{}
 \IfFileExists{fontaxes.sty}{
     \RequirePackage{fontaxes}
@@ -21,11 +24,12 @@
     \fa@naming@exception{figures}{{inferior}{tabular}}{Inf}
     \def\infigures{\@nomath\infigures
         \fontfigurestyle{inferior}\selectfont}
-    \DeclareTextFontCommand{\textin}{\infigures}
-    \let\textinferior\textin
-
+    \DeclareTextFontCommand{\textinf}{\infigures}
+    \let\textinferior\textinf
 }{}
-
+\def\zal@foresolidus{0em}
+\def\zal@aftsolidus{0em}
+%\def\zal@zslash{1} % slashed zero is default in tt mode
 \IfFileExists{xkeyval.sty}{
     \newcommand*{\AlgolRevived@scale}{1}
     \RequirePackage{xkeyval}
@@ -36,13 +40,119 @@
     \let\ExecuteOptionsX\ExecuteOptions
     \let\ProcessOptionsX\ProcessOptions
 }
+\edef\mdseries@rm{sb}
+\edef\mdseries@rm{m}
+
+\edef\zal@figurestyle{TLF}
+\def\useosf{\edef\zal@figurestyle{OsF}}
+\@onlypreamble\useosf
+
 \newif\ifzal@tt
+\newif\ifzal@hyphens
+\newif\ifzal@xhyphens
+\newif\ifzal@xnohyphens
+\newif\ifzal@zslash
 \DeclareOptionX{tt}{\zal@tttrue}
-\DeclareOptionX{medium}{\edef\mdseries@rm{sb}}
-\DeclareOptionX{regular}{\edef\mdseries@rm{m}}
-\ExecuteOptionsX{regular}
+\DeclareOptionX{hyphens}{\zal@xhyphenstrue}
+\DeclareOptionX{nohyphens}{\zal@xnohyphenstrue}
+\DeclareOptionX{zeroslash}{\zal@zslashtrue}%\edef\zal@zslash{1}
+\DeclareOptionX{nozeroslash}{\zal@zslashfalse}%\edef\zal@zslash{0}
+\DeclareOptionX{lining}{\edef\zal@figurestyle{TLF}}
+\DeclareOptionX{lf}{\edef\zal@figurestyle{TLF}}
+\DeclareOptionX{oldstyle}{\useosf}
+\DeclareOptionX{osf}{\useosf}
+\DeclareOptionX{foresolidus}{\gdef\zal@foresolidus{#1}}
+\DeclareOptionX{aftsolidus}{\gdef\zal@aftsolidus{#1}}
+\ExecuteOptionsX{zeroslash}
 \ProcessOptionsX\relax
 
+\ifzal@tt%
+  \ifzal@xhyphens\zal@hyphenstrue\fi
+  \edef\zal@zslash{1}
+  \ifzal@zslash\else\edef\zal@zslash{0}\fi
+  \edef\zal@figurestyle{TLF} % no osf in tt mode
+\else % text mode
+% \edef\zal@zslash{0}
+%\ifzal@zslash\else\edef\zal@zslash{1}\fi
+ \zal@hyphenstrue % default is hyphens in text mode
+ \ifzal@xnohyphens\zal@hyphensfalse\fi % unless turned off in options
+ \newcommand{\textfrac}[3][]{% like \textfrac[1]{7}{8}
+  \mbox{%
+    \ifthenelse{\not\equal{#1}{}}%Test for integer portion [optional #1]
+      {\textlf{#1}\kern.05em}{}%         
+    \raise -.1em\hbox{\textsu{#2}}% numerator
+    \StrRight{#2}{1}[\@digit@]%
+    % look for  1, 2, 6, 7
+    \ifcase\@digit@\kern-.02em% 0
+    \or\kern.03em% 1
+    \or\kern.03em% 2
+    \or%\kern-.01em% 3
+    \or\kern.05em% 4
+    \or\kern-.01em% 5
+    \or\kern-.02em% 6
+    \or\kern-.14em% 7
+    \or%\kern-.01em% 8
+    \or\kern-.02em% 9
+   \fi%
+    \kern\zal@foresolidus{\fontencoding{TS1}\selectfont\char"2F}%
+    \kern\zal@aftsolidus%
+    \StrLeft{#3}{1}[\@digit@]%
+    % look for 1, 4, 7
+    \ifcase\@digit@% 0
+    \or\kern -.03em% 1
+    \or\kern-.02em% 2
+    \or\kern-.03em% 3
+    \or\kern -.06em% 4
+    \or% 5
+    \or% 6
+    \or\kern .02em% 7
+    \fi%
+    \raise .15em\hbox{\textinf{#3}}%       denominator [#3]
+  }%
+}
+\fi 
+
+\DeclareRobustCommand{\lfstyle}{%
+  \not@math@alphabet\lfstyle\relax
+  \fontfamily{AlgolRevived-TLF}\selectfont %
+}
+\DeclareRobustCommand{\tlfstyle}{%
+  \not@math@alphabet\tlfstyle\relax
+  \fontfamily{AlgolRevived-TLF}\selectfont %
+}% to get tlf
+\DeclareRobustCommand{\osfstyle}{%
+  \not@math@alphabet\osfstyle\relax
+  \fontfamily{AlgolRevived-OsF}\selectfont %
+}% to get osf
+\DeclareRobustCommand{\tosfstyle}{%
+  \not@math@alphabet\tosfstyle\relax
+  \fontfamily{AlgolRevived-OsF}\selectfont %
+}% to get tosf
+\DeclareRobustCommand{\textlf}[1]{%
+  {\lfstyle #1}%
+}% to get lf
+\DeclareRobustCommand{\texttlf}[1]{%
+  {\tlfstyle #1}%
+}% to get tlf
+\DeclareRobustCommand{\textosf}[1]{%
+  {\osfstyle #1}%
+}% to get osf
+\DeclareRobustCommand{\texttosf}[1]{%
+  {\tosfstyle #1}%
+}% to get tosf
+\DeclareTextCommand{\textcircled}{TS1}[1]{\hmode@bgroup
+   \ooalign{%
+      \hfil \raise .307ex\hbox {\fontencoding{T1}\fontfamily{AlgolRevived-TLF}\fontseries{m}\fontshape{n}\selectfont\scalefont{.6}%
+\uppercase{#1}}\hfil \crcr
+     \char 79 %\textbigcircle 
+   }%
+ \egroup}
+
+\def\zal@typewriter{} % do not prevent hyphenation
+\ifzal@hyphens\else\def\zal@typewriter{\hyphenchar\font=-1}\fi
+%\show\zal@typewriter
+
+
 %Added textcomp symbols
 \DeclareTextSymbolDefault{\textprime}{TS1}          
 \DeclareTextSymbolDefault{\textdprime}{TS1}
@@ -149,11 +259,10 @@
 \DeclareTextSymbol{\textsqcup}{TS1}{247}
 
 \ifzal@tt
-  \renewcommand*{\ttdefault}{AlgolRevived-TLF}
-  \def\zal@typewriter{\hyphenchar\font=-1}
+  \renewcommand*{\ttdefault}{AlgolRevived-\zal@figurestyle-TT}
 \else
-  \renewcommand*{\rmdefault}{AlgolRevived-TLF}
+  \renewcommand*{\rmdefault}{AlgolRevived-\zal@figurestyle}
   \renewcommand*{\familydefault}{\rmdefault}
-  \def\zal@typewriter{}
 \fi
+\normalfont
 \endinput
-- 
cgit v1.2.3

