faktor: change order of optional arguments to not bother with '[' charactor after faktor

Build branch master (5a7525f) from kesslermaximilian/LatexPackages
This commit is contained in:
Maximilian Keßler 2021-10-24 19:12:54 +00:00
parent 68968d6ef3
commit 767cbb70f9
2 changed files with 18 additions and 18 deletions

View file

@ -1,8 +1,8 @@
{ {
"build_time": "", "build_time": "",
"source files": { "source files": {
"version": "v2.2.2-7", "version": "v2.2.2-8",
"commit": "dd60e7cba7a0693313d9248ddf87c5244912822a", "commit": "5a7525ffa42840583a06447de29322f8cc77318f",
"dirty": false "dirty": false
}, },
"pytex": { "pytex": {
@ -174,9 +174,9 @@
{ {
"name": "mkessler-faktor.sty", "name": "mkessler-faktor.sty",
"source file": "faktor.pysty", "source file": "faktor.pysty",
"build time": "2021/10/24 08:36", "build time": "2021/10/24 19:12",
"source version": "v2.2.2-2", "source version": "v2.2.2-8",
"source commit hash": "0e520739a3ac07d81f5d9dba14a955a4b05d1851", "source commit hash": "5a7525ffa42840583a06447de29322f8cc77318f",
"pytex version": "v1.0.0-18", "pytex version": "v1.0.0-18",
"pytex commit hash": "126d420b7a6ed2d4b2a42d534ab2e12344869643", "pytex commit hash": "126d420b7a6ed2d4b2a42d534ab2e12344869643",
"dirty": false "dirty": false

View file

@ -27,7 +27,7 @@
% %
% Build details: % Build details:
% PyTeX version: v1.0.0-18 (commit 126d420) % PyTeX version: v1.0.0-18 (commit 126d420)
% Source code version: v2.2.2-2 (commit 0e52073) % Source code version: v2.2.2-8 (commit 5a7525f)
% %
% This LaTeX package is free software and distributed under the MIT License. You % This LaTeX package is free software and distributed under the MIT License. You
% may use it freely for your purposes. The latest version of the package can be % may use it freely for your purposes. The latest version of the package can be
@ -61,26 +61,26 @@
\RequirePackage{mathtools} \RequirePackage{mathtools}
\DeclareDocumentCommand{\faktor}{s m O{0.5} m O{-0.5}}{% \newfaktor[*]{#2}[#3]{#4}[#5] -> #2/#4 \DeclareDocumentCommand{\faktor}{s O{0.5} m O{-0.5} m}{% \newfaktor[*][#2]{#3}[#4]{#5} -> #3/#5
\setbox0=\hbox{\ensuremath{#2}}% Store numerator \setbox0=\hbox{\ensuremath{#3}}% Store numerator
\setbox1=\hbox{\ensuremath{\diagup}}% Store slash / \setbox1=\hbox{\ensuremath{\diagup}}% Store slash /
\setbox2=\hbox{\ensuremath{#4}}% Store denominator \setbox2=\hbox{\ensuremath{#5}}% Store denominator
\raisebox{#3\ht1}{\usebox0}% Numerator \raisebox{#2\ht1}{\usebox0}% Numerator
\mkern-5mu\ifthenelse{\equal{#1}{\BooleanTrue}}% Slash / \mkern-5mu\ifthenelse{\equal{#1}{\BooleanTrue}}% Slash /
{\diagup}% regular \faktor slash {\diagup}% regular \faktor slash
{\rotatebox{-44}{\rule[#5\ht2]{0.4pt}{-#5\ht2+#3\ht0+\ht0}}}% tilted rule as a slash {\rotatebox{-44}{\rule[#4\ht2]{0.4pt}{-#4\ht2+#2\ht0+\ht0}}}% tilted rule as a slash
\mkern-4mu% \mkern-4mu%
\raisebox{#5\ht2}{\usebox2}% Denominator \raisebox{#4\ht2}{\usebox2}% Denominator
} }
\DeclareDocumentCommand{\cofaktor}{s m O{-0.5} m O{0.5}}{% \newfaktor[*]{#2}[#3]{#4}[#5] -> #2/#4 \DeclareDocumentCommand{\cofaktor}{s m O{-0.5} m O{0.5}}{% \newfaktor[*][#2]{#3}[#4]{#5} -> #2\#4
\setbox0=\hbox{\ensuremath{#2}}% Store numerator \setbox0=\hbox{\ensuremath{#3}}% Store numerator
\setbox1=\hbox{\ensuremath{\diagdown}}% Store slash / \setbox1=\hbox{\ensuremath{\diagdown}}% Store slash /
\setbox2=\hbox{\ensuremath{#4}}% Store denominator \setbox2=\hbox{\ensuremath{#5}}% Store denominator
\raisebox{#3\ht1}{\usebox0}% Numerator \raisebox{#2\ht1}{\usebox0}% Numerator
\mkern-5mu\ifthenelse{\equal{#1}{\BooleanTrue}}% Slash / \mkern-5mu\ifthenelse{\equal{#1}{\BooleanTrue}}% Slash /
{\diagdown}% regular \faktor slash {\diagdown}% regular \faktor slash
{\rotatebox{44}{\rule[-#5\ht2]{0.4pt}{#5\ht2-#3\ht0+\ht0}}}% tilted rule as a slash {\rotatebox{44}{\rule[-#4\ht2]{0.4pt}{#4\ht2-#2\ht0+\ht0}}}% tilted rule as a slash
\mkern-4mu% \mkern-4mu%
\raisebox{#5\ht2}{\usebox2}% Denominator \raisebox{#4\ht2}{\usebox2}% Denominator
} }