summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/longdivision
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-07-18 20:24:49 +0000
committerKarl Berry <karl@freefriends.org>2021-07-18 20:24:49 +0000
commit0ab1a48fc36a3cae860b6320503fd78bf46a9d6b (patch)
treeacc0d8188c58c05005266405e14b7f37804c92a7 /Master/texmf-dist/tex/latex/longdivision
parente2a1ced604654af8731f24f7fbbc6ad8ea6b339e (diff)
longdivision (18jul21)
git-svn-id: svn://tug.org/texlive/trunk@59979 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/longdivision')
-rw-r--r--Master/texmf-dist/tex/latex/longdivision/longdivision.sty15
1 files changed, 4 insertions, 11 deletions
diff --git a/Master/texmf-dist/tex/latex/longdivision/longdivision.sty b/Master/texmf-dist/tex/latex/longdivision/longdivision.sty
index d749bab70e1..114417fd625 100644
--- a/Master/texmf-dist/tex/latex/longdivision/longdivision.sty
+++ b/Master/texmf-dist/tex/latex/longdivision/longdivision.sty
@@ -1,7 +1,7 @@
-%% Package: longdivision.sty version 1.2.0
+%% Package: longdivision.sty version 1.2.1
%% Author: Hood Chatham
%% Email: hood@mit.edu
-%% Date: 2020-05-09
+%% Date: 2021-07-17
%% License: Latex Project Public License
@@ -17,7 +17,6 @@
\bool_new:N \l__longdiv_added_point_bool
\bool_new:N \l__longdiv_seen_point_bool
\bool_new:N \l__longdiv_seen_digit_bool
-\bool_new:N \l__longdiv_stopped_early_stage_bool
\int_new:N \l__longdiv_quotient_int
\int_new:N \l__longdiv_position_int
\int_new:N \l__longdiv_point_digit_dividend_int
@@ -437,11 +436,8 @@
% the length of the bar, but we need it to always be at least as long as the dividend.
% Also, we need to delete the extra digit that has been carried down
\cs_new:Nn \longdiv_divide_end_early:nnn {
- % For some reason we need to shift the typeset work over by half a digit if we quit early due to "stage" option
- % so we need to set a flag so that the work typesetter can know to do this.
- \bool_set_true:N \l__longdiv_stopped_early_stage_bool
\tl_put_right:Nn \l__longdiv_quotient_tl { {\longdiv_hphantom:n { #3 0 }} }
- \tl_set:Nf \l__longdiv_remainer { \tl_range:nnn { #1 } { 1 } { -2 } }
+ \tl_set:Nf \l__longdiv_remainder_tl { \tl_range:nnn { #1 } { 1 } { -2 } }
\longdiv_typeset:
}
@@ -863,8 +859,6 @@
\cs_new:Nn \longdiv_typeset_setwidth:n {
\settowidth \l__longdiv_tempwidth_dim {\tl_range:Nnn \l__longdiv_dividend_tl { 1 } { #1 } \relax }
\dim_gset:Nn \g__longdiv_temp_dim { \l__longdiv_tempwidth_dim }
- % For some reason we need to shift everything over by half a digit if we quit early due to "stage" option
- \bool_if:NT \l__longdiv_stopped_early_stage_bool {\dim_gadd:Nn \g__longdiv_temp_dim { -0.5\c__longdiv_digitwidth_dim } }
}
% #2 is the distance to the right endpoint of the token list #1.
@@ -947,8 +941,7 @@
}
-% Certainly the pretiest of my three styles. I think I got it from a tex stack exchange post,
-% but I apparently didn't credit it when I copied it and I cannot find teh post now.
+% Stolen from the following tex stack exchange answer: https://tex.stackexchange.com/a/131137
\longdiv_define_style:nn { tikz }{
\bool_if:NTF \l__longdiv_is_tikz_loaded_bool {
\longdiv@typeset@main@tikz