From 8004153b6581cc6105aeab6347085472461de83a Mon Sep 17 00:00:00 2001 From: Tom Kazimiers Date: Wed, 28 Aug 2019 22:13:06 -0400 Subject: [PATCH] Fix display of negative values It seems like the code for writing out numbers couldn't handle negative numbers well. For instance, rendering -99,99 would result in -99,-9-9. This is fixed now by explicitly handling negative numbers slightly differently. There is possibly a more elegant version, but this is simple seems to fix it. Fixes tomka/rechnung#8 --- rechnung.dtx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rechnung.dtx b/rechnung.dtx index 009f550..4fcfb79 100644 --- a/rechnung.dtx +++ b/rechnung.dtx @@ -623,6 +623,9 @@ \@tempcntb\@tempcnta \divide\@tempcnta100 \the\@tempcnta,% \multiply\@tempcnta100\advance\@tempcntb-\@tempcnta + \ifnum#1<0 + \multiply\@tempcntb-1 + \fi \@tempcnta\@tempcntb\divide\@tempcnta10 \the\@tempcnta \multiply\@tempcnta10\advance\@tempcntb-\@tempcnta \the\@tempcntb