summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/synthslant/synthslant.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/synthslant/synthslant.sty')
-rw-r--r--Master/texmf-dist/tex/latex/synthslant/synthslant.sty41
1 files changed, 26 insertions, 15 deletions
diff --git a/Master/texmf-dist/tex/latex/synthslant/synthslant.sty b/Master/texmf-dist/tex/latex/synthslant/synthslant.sty
index 0cd75e5e330..42c27c2a428 100644
--- a/Master/texmf-dist/tex/latex/synthslant/synthslant.sty
+++ b/Master/texmf-dist/tex/latex/synthslant/synthslant.sty
@@ -11,11 +11,11 @@
%% Copyright (C) 2024 by Ch. L. Spiel
%%
%% This work may be distributed and/or modified under the conditions
-%% of the LaTeX Project Public License, either version 1.3 of this
+%% 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
-%% http://www.latex-project.org/lppl.txt
-%% and version 1.3 or later is part of all distributions of LaTeX
+%% https://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2003/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
@@ -29,8 +29,9 @@
%%
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesPackage{synthslant}
- [2024/05/07 v0.1 Synthetically Slant glyphs]
+ [2024/07/08 v0.1a Synthetically Slant glyphs]
+\RequirePackage{etoolbox}
\RequirePackage{iftex}
\RequirePackage{xkeyval}
@@ -60,12 +61,16 @@
\ExplSyntaxOn
\fp_compare:nNnTF {\synthslant} < {.0}
- {\PackageError{synthslant}{\string\synthslant\space <\space 0}
- {Pass\space a\space value\space that\space is\space non-negative.}}
+ {\PackageError{synthslant}
+ {\string\synthslant\space <\space 0}
+ {Pass\space a\space value\space that\space
+ is\space nonnegative.}}
{}
\fp_compare:nNnTF {\synthnegslant} > {.0}
- {\PackageError{synthslant}{\string\synthnegslant\space >\space 0}
- {Pass\space a\space value\space that\space is\space non-positive.}}
+ {\PackageError{synthslant}
+ {\string\synthnegslant\space >\space 0}
+ {Pass\space a\space value\space that\space
+ is\space nonpositive.}}
{}
\ExplSyntaxOff
@@ -136,13 +141,15 @@
\box_set_dp:Nn \l_tmpa_box {\z@}
\fp_compare:nNnTF {#1} >= {.0}
{
- \box_set_wd:Nn \l_tmpa_box {\l_tmpa_dim - #1\l_tmpb_dim}
+ \box_set_wd:Nn \l_tmpa_box
+ {\l_tmpa_dim - #1\l_tmpb_dim}
}
{
\draw_suspend_begin:
\kern#1\l_tmpb_dim
\draw_suspend_end:
- \box_set_wd:Nn \l_tmpa_box {\l_tmpa_dim + #1\l_tmpb_dim}
+ \box_set_wd:Nn \l_tmpa_box
+ {\l_tmpa_dim + #1\l_tmpb_dim}
}
\draw_box_use:N \l_tmpa_box
\draw_end:
@@ -181,7 +188,8 @@
\ExplSyntaxOn
\newcommand*{\synthslantbox@fontspect@shear@box}[2]{
\begingroup
- \expandafter\fontspec[FakeSlant = #1]{\l_fontspec_family_tl}
+ \expandafter
+ \fontspec[FakeSlant=#1]{\l_fontspec_family_tl}
#2
\endgroup
}
@@ -242,8 +250,9 @@
\ifnum\synthslant@engine=4% fontspec
\newrobustcmd*{\synthslantbox}[2]{%
- \edef\synthslant@slant@value{#1}% definition for compatibility of both branches
- \synthslantbox@fontspect@shear@box{\synthslant@slant@value}{#2}%
+ \edef\synthslant@slant@value{#1}
+ \synthslantbox@fontspect@shear@box{\synthslant@slant@value}
+ {#2}%
}
\else
\newrobustcmd*{\synthslantbox}[2]{%
@@ -262,7 +271,8 @@
\NewDocumentEnvironment{slantenvironment}{}
{\upshape
\ifcsdef{microtypecontext}
- {\expandafter\microtypecontext\expandafter{\slantcontext}}
+ {\expandafter\microtypecontext
+ \expandafter{\slantcontext}}
{}}
{\ifcsdef{endmicrotypecontext}
{\endmicrotypecontext}
@@ -285,7 +295,8 @@
\NewDocumentEnvironment{negslantenvironment}{}
{\itshape
\ifcsdef{microtypecontext}
- {\expandafter\microtypecontext\expandafter{\negslantcontext}}
+ {\expandafter\microtypecontext
+ \expandafter{\negslantcontext}}
{}}
{\ifcsdef{endmicrotypecontext}
{\endmicrotypecontext}