Debian Codegraph @

texmf-dist/tex/lualatex/innerscript/innerscript.sty

raw
1 %%
2 %% This is file `innerscript.sty',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% innerscript-code.dtx (with options: `package')
8 %%
9 %% This file is from version 1.4a of the free and open-source
10 %% LaTeX package "innerscript," released May 2025, to be
11 %% used with the LuaTeX engine.
12 %%
13 %% Copyright 2021, 2023-2025 Conrad Kosowsky
14 %%
15 %% This file may be distributed and modified under the terms
16 %% of the LaTeX Public Project License, version 1.3c or any
17 %% later version. The most recent version of this license is
18 %% available online at
19 %%
20 %% https://www.latex-project.org/lppl/
21 %%
22 %% This work has the LPPL status "maintained," and the current
23 %% maintainer is the package author, Conrad Kosowsky. He can
24 %% be reached at [email protected].
25 %%
26 %% PLEASE KNOW THAT THIS FREE SOFTWARE IS PROVIDED WITHOUT
27 %% ANY WARRANTY. SPECIFICALLY, THE "NO WARRANTY" SECTION OF
28 %% THE LATEX PROJECT PUBLIC LICENSE STATES THE FOLLOWING:
29 %%
30 %% THERE IS NO WARRANTY FOR THE WORK. EXCEPT WHEN OTHERWISE
31 %% STATED IN WRITING, THE COPYRIGHT HOLDER PROVIDES THE WORK
32 %% `AS IS’, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
33 %% OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
34 %% WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
35 %% PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE
36 %% OF THE WORK IS WITH YOU. SHOULD THE WORK PROVE DEFECTIVE,
37 %% YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR
38 %% CORRECTION.
39 %%
40 %% IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED
41 %% TO IN WRITING WILL THE COPYRIGHT HOLDER, OR ANY AUTHOR
42 %% NAMED IN THE COMPONENTS OF THE WORK, OR ANY OTHER PARTY
43 %% WHO MAY DISTRIBUTE AND/OR MODIFY THE WORK AS PERMITTED
44 %% ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL,
45 %% SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT
46 %% OF ANY USE OF THE WORK OR OUT OF INABILITY TO USE THE WORK
47 %% (INCLUDING, BUT NOT LIMITED TO, LOSS OF DATA, DATA BEING
48 %% RENDERED INACCURATE, OR LOSSES SUSTAINED BY ANYONE AS A
49 %% RESULT OF ANY FAILURE OF THE WORK TO OPERATE WITH ANY
50 %% OTHER PROGRAMS), EVEN IF THE COPYRIGHT HOLDER OR SAID
51 %% AUTHOR OR SAID OTHER PARTY HAS BEEN ADVISED OF THE
52 %% POSSIBILITY OF SUCH DAMAGES.
53 %%
54 %% For more information, see the LaTeX Project Public License.
55 %% Derivative works based on this software may come with their
56 %% own license or terms of use, and the package author is not
57 %% responsible for any third-party software.
58 %%
59 %% Happy TeXing!
60 %%
61 \NeedsTeXFormat{LaTeX2e}
62 \ProvidesPackage{innerscript}[2025/05/08 v. 1.4a]
63 \def\IS@info#1{\wlog{Package innerscript Info: #1}}
64 \ifx\Umathordordspacing\@undefined
65 \bgroup
66 \catcode`\ =12\relax
67 \def\NoLuaTeXError{\GenericError{}%
68 {\MessageBreak\MessageBreak
69 Package innerscript error:%
70 \MessageBreak\MessageBreak
71 *******************\MessageBreak
72 * *\MessageBreak
73 * CANNOT LOAD *\MessageBreak
74 * INNERSCRIPT *\MessageBreak
75 * LuaTeX Needed *\MessageBreak
76 * *\MessageBreak
77 *******************\MessageBreak\@gobbletwo}%
78 {See the innerscript package documentation for explanation.}%
79 {I need LuaTeX to make the innerscript package work. It\MessageBreak
80 looks like the current engine is something else, so I\MessageBreak
81 can't load the package file. To use innerscript, please\MessageBreak
82 typeset with LuaLaTeX. To continue without innerscript,\MessageBreak
83 press return.}}%
84 \expandafter\egroup
85 \NoLuaTeXError
86 \AtEndOfPackage{\IS@info{Failed to load \on@line!}}
87 \expandafter\endinput % we \endinput with a balanced conditional
88 \fi
89 \newif\ifIS@script
90 \newif\ifIS@scriptscript
91 \newif\ifIS@legacyscript
92 \newif\ifIS@legacyscriptscript
93 \newif\ifIS@inner
94 \newif\ifIS@close
95 \newif\ifIS@cover
96 \IS@scripttrue
97 \IS@scriptscripttrue
98 \IS@legacyscriptfalse
99 \IS@legacyscriptscriptfalse
100 \IS@innertrue
101 \IS@closetrue
102 \IS@covertrue
103 \DeclareOption{script} {\IS@scripttrue
104 \IS@legacyscriptfalse}
105 \DeclareOption{scriptscript} {\IS@scriptscripttrue
106 \IS@legacyscriptscriptfalse}
107 \DeclareOption{legacy-script} {\IS@scripttrue
108 \IS@legacyscripttrue}
109 \DeclareOption{legacy-scriptscript}{\IS@scriptscripttrue
110 \IS@legacyscriptscripttrue}
111 \DeclareOption{inner} {\IS@innertrue}
112 \DeclareOption{close} {\IS@closetrue}
113 \DeclareOption{cover} {\IS@covertrue}
114 \DeclareOption{no-script} {\IS@scriptfalse
115 \IS@legacyscriptfalse}
116 \DeclareOption{no-scriptscript} {\IS@scriptscriptfalse
117 \IS@legacyscriptscriptfalse}
118 \DeclareOption{no-inner} {\IS@innerfalse}
119 \DeclareOption{no-close} {\IS@closefalse}
120 \DeclareOption{no-cover} {\IS@coverfalse}
121 \ProcessOptions*
122 \def\@tempa{%
123 \AtEndOfPackage{\PackageWarning{innerscript}
124 {I'm ignoring your request for\MessageBreak
125 legacy spacing\on@line\MessageBreak
126 and using the default space\MessageBreak
127 adjustments instead. (The\MessageBreak
128 package options for legacy\MessageBreak
129 spacing are deprecated.)\@gobbletwo}}}
130 \ifIS@legacyscript
131 \else
132 \ifIS@legacyscriptscript
133 \else
134 \let\@tempa\relax
135 \fi
136 \fi
137 \@tempa
138 \ifIS@script % change \scriptstyle
139 \IS@info{Adjusting space for \string\scriptstyle.}
140 \IS@info{Adjusting space for \string\crampedscriptstyle.}
141 \ifIS@scriptscript % change \scriptscriptstyle
142 \IS@info{Adjusting space for \string\scriptscriptstyle.}
143 \IS@info{Adjusting space for \string\crampedscriptscriptstyle.}
144 \def\@tempa#1#2{%
145 #1\scriptstyle \muexpr #2 * 6 / 10\relax
146 #1\crampedscriptstyle \muexpr #2 * 6 / 10\relax
147 #1\scriptscriptstyle \muexpr #2 * 4 / 10\relax
148 #1\crampedscriptscriptstyle\muexpr #2 * 4 / 10\relax}
149 \else % do not change \scriptscriptstyle
150 \IS@info{No space changes for \string\scriptscriptstyle.}
151 \IS@info{No space changes for \string\crampedscriptscriptstyle.}
152 \def\@tempa#1#2{%
153 #1\scriptstyle \muexpr #2 * 6 / 10\relax
154 #1\crampedscriptstyle \muexpr #2 * 6 / 10\relax}
155 \fi
156 \else % do not change \scriptstyle
157 \IS@info{No space changes for \string\scriptstyle.}
158 \IS@info{No space changes for \string\crampedscriptstyle.}
159 \ifIS@scriptscript % change \scriptscriptstyle
160 \IS@info{Adjusting space for \string\scriptscriptstyle.}
161 \IS@info{Adjusting space for \string\crampedscriptscriptstyle.}
162 \def\@tempa#1#2{%
163 #1\scriptscriptstyle \muexpr #2 * 4 / 10\relax
164 #1\crampedscriptscriptstyle\muexpr #2 * 4 / 10\relax}
165 \else % do not change \scriptscriptstyle
166 \IS@info{No space changes for \string\scriptscriptstyle.}
167 \IS@info{No space changes for \string\crampedscriptscriptstyle.}
168 \let\@tempa\@gobbletwo
169 \fi
170 \fi
171 \@tempa{\Umathordopspacing} {\thinmuskip}
172 \@tempa{\Umathordbinspacing} {\medmuskip}
173 \@tempa{\Umathordrelspacing} {\thickmuskip}
174 \@tempa{\Umathordinnerspacing} {\thinmuskip}
175 \@tempa{\Umathopordspacing} {\thinmuskip}
176 \@tempa{\Umathopopspacing} {\thinmuskip}
177 \@tempa{\Umathoprelspacing} {\thickmuskip}
178 \@tempa{\Umathopinnerspacing} {\thickmuskip}
179 \@tempa{\Umathbinordspacing} {\medmuskip}
180 \@tempa{\Umathbinopspacing} {\medmuskip}
181 \@tempa{\Umathbinopenspacing} {\medmuskip}
182 \@tempa{\Umathbininnerspacing} {\medmuskip}
183 \@tempa{\Umathrelordspacing} {\thickmuskip}
184 \@tempa{\Umathrelopspacing} {\thickmuskip}
185 \@tempa{\Umathrelopenspacing} {\thickmuskip}
186 \@tempa{\Umathrelinnerspacing} {\thickmuskip}
187 \@tempa{\Umathcloseopspacing} {\thinmuskip}
188 \@tempa{\Umathclosebinspacing} {\medmuskip}
189 \@tempa{\Umathcloserelspacing} {\thickmuskip}
190 \@tempa{\Umathcloseinnerspacing}{\thinmuskip}
191 \@tempa{\Umathpunctordspacing} {\thinmuskip}
192 \@tempa{\Umathpunctopspacing} {\thinmuskip}
193 \@tempa{\Umathpunctrelspacing} {\thinmuskip}
194 \@tempa{\Umathpunctopenspacing} {\thinmuskip}
195 \@tempa{\Umathpunctclosespacing}{\thinmuskip}
196 \@tempa{\Umathpunctpunctspacing}{\thinmuskip}
197 \@tempa{\Umathpunctinnerspacing}{\thinmuskip}
198 \@tempa{\Umathinnerordspacing} {\thinmuskip}
199 \@tempa{\Umathinneropspacing} {\thinmuskip}
200 \@tempa{\Umathinnerbinspacing} {\medmuskip}
201 \@tempa{\Umathinnerrelspacing} {\thickmuskip}
202 \@tempa{\Umathinneropenspacing} {\thinmuskip}
203 \@tempa{\Umathinnerpunctspacing}{\thinmuskip}
204 \@tempa{\Umathinnerinnerspacing}{\thinmuskip}
205 \ifIS@close
206 \IS@info{Adding space after closing grouping symbols.}
207 \Umathcloseordspacing\displaystyle \muexpr\thinmuskip / 2\relax
208 \Umathcloseordspacing\textstyle \muexpr\thinmuskip / 2\relax
209 \Umathcloseordspacing\crampeddisplaystyle \muexpr\thinmuskip / 2\relax
210 \Umathcloseordspacing\crampedtextstyle \muexpr\thinmuskip / 2\relax
211 \ifIS@script
212 \Umathcloseordspacing\scriptstyle \muexpr\thinmuskip * 3 / 10\relax
213 \Umathcloseordspacing\crampedscriptstyle\muexpr\thinmuskip * 3 / 10\relax
214 \fi
215 \ifIS@scriptscript
216 \Umathcloseordspacing\scriptscriptstyle \muexpr\thinmuskip / 5\relax
217 \Umathcloseordspacing\crampedscriptscriptstyle
218 \muexpr\thinmuskip / 5\relax
219 \fi
220 \else
221 \IS@info{No changes to space after delimiters.}
222 \fi
223 \ifIS@inner
224 \IS@info{Adjusting space around \string\mathinner\space subformulas.}
225 \@tfor\@i:=\displaystyle\crampeddisplaystyle
226 \textstyle\crampedtextstyle
227 \scriptstyle\crampedscriptstyle
228 \scriptscriptstyle\crampedscriptscriptstyle
229 \do{%
230 \expanded{\Umathinnerinnerspacing\@i=\the\expandafter
231 \Umathcloseopenspacing\@i\relax}
232 \@for\@j:=ord,op,bin,rel,open,close,punct\do{%
233 \expanded{%
234 \csname Umath\@j innerspacing\endcsname\@i=\the
235 \csname Umath\@j openspacing\expandafter\endcsname\@i\relax
236 \csname Umathinner\@j spacing\endcsname\@i=\the
237 \csname Umathclose\@j spacing\expandafter\endcsname\@i\relax}}}
238 \else
239 \IS@info{No changes to space for \string\mathinner\space subformulas.}
240 \fi
241 \ifIS@cover
242 \IS@info{Setting delimiters to full height.}
243 \delimiterfactor\@m
244 \else
245 \IS@info{No changes to delimiter heights.}
246 \fi
247 \wlog{}
248 \endinput
249 %%
250 %% End of file `innerscript.sty'.