summaryrefslogtreecommitdiff
path: root/tex/context/base/supp-num.mkiv
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2011-06-14 00:20:14 +0300
committerMarius <mariausol@gmail.com>2011-06-14 00:20:14 +0300
commitfaaa984b45c82f7345e0a8daf457685feae54dcc (patch)
tree3a4863cf12bc797c0489b6295e5f76725a710203 /tex/context/base/supp-num.mkiv
parent510cb140d2e8baed13b8b27daa02f3ad2f5df3e1 (diff)
downloadcontext-faaa984b45c82f7345e0a8daf457685feae54dcc.tar.gz
beta 2011.06.13 23:08
Diffstat (limited to 'tex/context/base/supp-num.mkiv')
-rw-r--r--tex/context/base/supp-num.mkiv85
1 files changed, 0 insertions, 85 deletions
diff --git a/tex/context/base/supp-num.mkiv b/tex/context/base/supp-num.mkiv
index 271e2588a..43b7fce9b 100644
--- a/tex/context/base/supp-num.mkiv
+++ b/tex/context/base/supp-num.mkiv
@@ -417,88 +417,3 @@
\fi\fi}
\protect \endinput
-
-
-\endinput
-
-\def\digitszeropadding {\zeroamount}
-\def\digitsnegative {\mathematics\negative}
-\def\digitspositive {\mathematics\positive}
-\def\digitsspace {\hphantom{0}}
-\def\digitsseparatorspace{\hphantom{.}}
-\def\digitssignspace {\hphantom{+}}
-\def\digitshighspace {\hphantom{\mathematics\positive}}
-\def\digitspower {\high}
-
-\starttext
-
-% print(table.serialize(table.keys(jobs)))
-
-local P, S, R, Cs = lpeg.P, lpeg.S, lpeg.R, lpeg.Cs
-
-local done = false
-local swap = false
-local digit = R("09")
-local sign = S("+-")
-local power = S("^e")
-local space = S(" ~@_")
-local comma = P(",")
-local period = P(".")
-local signspace = P("/")
-local positive = P("p")
-local negative = P("n")
-local highspace = P("s")
-local padding = P("=")
-
-local space = space / "\\digitsspace"
-local digit = digit / function(s) done = true return s end
-local separator = comma / function(s) if not done then return "\\digitsseparatorspace" elseif swap then return "." else return "," end end
- + period / function(s) if not done then return "\\digitsseparatorspace" elseif swap then return "," else return "." end end
-local signspace = signspace / "\\digitssignspace"
-local positive = positive / "\\digitspositive"
-local negative = negative / "\\digitsnegative"
-local highspace = highspace / "\\digitshighspace"
-local power = power/"" * (Cs((sign + signspace)^0 * digit^1) / function(s) return "\\digitspower{" .. s .. "}" end)
-local padding = padding / "\\digitszeropadding"
-
-local replace = lpeg.Cs (
- (sign + signspace + positive + negative + highspace)^0
- * (separator^0 * (space + digit)^1)^1
- * power^0
-)
-
-local function digits(str)
- done = false
---~ swap = true
- local str = lpeg.match(replace,str)
--- print(str)
- tex.sprint(tex.ctxcatcodes,"\\dontleavehmode",str,"\\par")
-end
--- namespaces.register("digits")
-
-digits("12")
-digits("~~~.~~~.~~~.68.712,34")
-digits("~~~.~~~.~~~.68.712,34")
-digits("___.___.111.68.712,34")
-digits("111.111.111.68.712,34")
-digits("12.345,90")
-digits("12.345.000")
-digits("12,34")
-digits("392.857.230.68.712,34")
-digits("1234")
-digits("123.222,00")
-digits("123.222,==")
-digits("123.222,00^10")
-digits("123.222,00e10")
-digits("/123.222,00e-12")
-digits("-123.222,00e-12")
--- digits("+123.222,00e-12")
-digits("n123.222,00e-12")
-digits("s123.222,00e-12")
-digits("p123.222,00e/12")
-
-\stopluacode
-[[\digitsseparatorspace]]
-\stoptext
-
-