summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/longdivision
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-07-18 03:00:52 +0000
committerNorbert Preining <norbert@preining.info>2021-07-18 03:00:52 +0000
commitba3d555da29f2da7ca04bf225218e22c8d12d7f8 (patch)
tree9445559f439b402707e57e21eca6516269741cf6 /macros/latex/contrib/longdivision
parent59d62d23cea172fbad8d928adf81755656d4e7e3 (diff)
CTAN sync 202107180300
Diffstat (limited to 'macros/latex/contrib/longdivision')
-rw-r--r--macros/latex/contrib/longdivision/README.md3
-rw-r--r--macros/latex/contrib/longdivision/longdivision.sty15
-rw-r--r--macros/latex/contrib/longdivision/longdivision_manual.pdfbin155728 -> 152721 bytes
-rw-r--r--macros/latex/contrib/longdivision/longdivision_manual.tex2
4 files changed, 8 insertions, 12 deletions
diff --git a/macros/latex/contrib/longdivision/README.md b/macros/latex/contrib/longdivision/README.md
index db6a6469aa..b25cec2d36 100644
--- a/macros/latex/contrib/longdivision/README.md
+++ b/macros/latex/contrib/longdivision/README.md
@@ -41,6 +41,9 @@ The current development copy is hosted at https://github.com/hoodmane/longdivisi
Changelog:
==========
+## [1.2.1](2021-07-17)
+### Fixed:
+- The stage option works again.
## [1.2.0] (2020-05-09)
### Added:
diff --git a/macros/latex/contrib/longdivision/longdivision.sty b/macros/latex/contrib/longdivision/longdivision.sty
index d749bab70e..114417fd62 100644
--- a/macros/latex/contrib/longdivision/longdivision.sty
+++ b/macros/latex/contrib/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
diff --git a/macros/latex/contrib/longdivision/longdivision_manual.pdf b/macros/latex/contrib/longdivision/longdivision_manual.pdf
index f64df8e2f9..21e6b7a06c 100644
--- a/macros/latex/contrib/longdivision/longdivision_manual.pdf
+++ b/macros/latex/contrib/longdivision/longdivision_manual.pdf
Binary files differ
diff --git a/macros/latex/contrib/longdivision/longdivision_manual.tex b/macros/latex/contrib/longdivision/longdivision_manual.tex
index 24e3928248..325e2b993a 100644
--- a/macros/latex/contrib/longdivision/longdivision_manual.tex
+++ b/macros/latex/contrib/longdivision/longdivision_manual.tex
@@ -1,5 +1,5 @@
\documentclass{ltxdoc}
-\def\version{Version 1.2.0}
+\def\version{Version 1.2.1}
\let\ifluatex\relax
\usepackage{ifluatex}