diff options
author | Karl Berry <karl@freefriends.org> | 2013-04-08 00:43:40 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-04-08 00:43:40 +0000 |
commit | 824f7b0903de8ad7f6ee3d7656005e4c59155e06 (patch) | |
tree | abfc8673ef9916f3ab7074e811207384c301492b /Master/texmf-dist/tex/context/base/syst-con.lua | |
parent | 689aefb0727676ed3cddf331337b4be226495e72 (diff) |
context import for TL13, from www.pragma-ade.com/context/beta/cont-tmf.zip
git-svn-id: svn://tug.org/texlive/trunk@29731 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/syst-con.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/syst-con.lua | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/context/base/syst-con.lua b/Master/texmf-dist/tex/context/base/syst-con.lua index 2eaf98fd730..48f02da3a5d 100644 --- a/Master/texmf-dist/tex/context/base/syst-con.lua +++ b/Master/texmf-dist/tex/context/base/syst-con.lua @@ -14,7 +14,7 @@ the top of <l n='luatex'/>'s char range but outside the unicode range.</p> --ldx]]-- local tonumber = tonumber -local utfchar = unicode.utf8.char +local utfchar = utf.char local gsub, format = string.gsub, string.format function converters.hexstringtonumber(n) tonumber(n,16) end @@ -39,3 +39,24 @@ function commands.format(fmt,...) -- used ? fmt = gsub(fmt,"@","%%") context(fmt,...) end + +local cosd, sind, tand = math.cosd, math.sind, math.tand +local cos, sin, tan = math.cos, math.sin, math.tan + +-- unfortunately %s spits out: 6.1230317691119e-017 +-- +-- function commands.sind(n) context(sind(n)) end +-- function commands.cosd(n) context(cosd(n)) end +-- function commands.tand(n) context(tand(n)) end +-- +-- function commands.sin (n) context(sin (n)) end +-- function commands.cos (n) context(cos (n)) end +-- function commands.tan (n) context(tan (n)) end + +function commands.sind(n) context("%0.6f",sind(n)) end +function commands.cosd(n) context("%0.6f",cosd(n)) end +function commands.tand(n) context("%0.6f",tand(n)) end + +function commands.sin (n) context("%0.6f",sin (n)) end +function commands.cos (n) context("%0.6f",cos (n)) end +function commands.tan (n) context("%0.6f",tan (n)) end |