diff options
author | Karl Berry <karl@freefriends.org> | 2021-12-31 21:03:18 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-12-31 21:03:18 +0000 |
commit | 4444144be58d83f51ef1fb7bdffc6110f986cb66 (patch) | |
tree | 605d5064b995c8d425f58b148ea9ea04e6fd32ec /Master/texmf-dist/doc/luatex | |
parent | d0daef98bb5725f77d5d7d4fa62034e23691d136 (diff) |
luakeys (31dec21)
git-svn-id: svn://tug.org/texlive/trunk@61458 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/luatex')
-rw-r--r-- | Master/texmf-dist/doc/luatex/luakeys/README.md | 18 | ||||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luakeys/luakeys-debug.tex | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luakeys/luakeys-doc.pdf | bin | 157648 -> 159798 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luakeys/luakeys-doc.tex | 35 |
4 files changed, 31 insertions, 24 deletions
diff --git a/Master/texmf-dist/doc/luatex/luakeys/README.md b/Master/texmf-dist/doc/luatex/luakeys/README.md index 8c2e5cf8dba..10793d353e0 100644 --- a/Master/texmf-dist/doc/luatex/luakeys/README.md +++ b/Master/texmf-dist/doc/luatex/luakeys/README.md @@ -14,7 +14,7 @@ mechanism should be pretty robust. ## License -Copyright 2021 Josef Friedrich +Copyright 2021-2022 Josef Friedrich This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3c @@ -41,8 +41,8 @@ make install ### Testing ``` -luarocks install luaunit -lua test/tests.lua +luarocks install busted +busted --exclude-tags=skip test/lua/*.lua ``` or @@ -53,6 +53,12 @@ make test ### Release a new version +Update version in: + +* luakeys-doc.tex +* luakeys-debug.sty +* luakeys.sty + Update copyright in: * LICENSE @@ -63,12 +69,6 @@ Update copyright in: * luakeys.tex * README.md -Update version in: - -* luakeys-doc.tex -* luakeys-debug.sty -* luakeys.sty - Summarize the changes in the luakeys-doc.tex as changes. Create a new git tag `git tag -sa v0.3`. Prefix the version with “v”. diff --git a/Master/texmf-dist/doc/luatex/luakeys/luakeys-debug.tex b/Master/texmf-dist/doc/luatex/luakeys/luakeys-debug.tex index a6cd7c85c21..ffc449ac9b9 100644 --- a/Master/texmf-dist/doc/luatex/luakeys/luakeys-debug.tex +++ b/Master/texmf-dist/doc/luatex/luakeys/luakeys-debug.tex @@ -1,5 +1,5 @@ %% luakeys-debug.tex -%% Copyright 2021 Josef Friedrich +%% Copyright 2021-2022 Josef Friedrich % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3c diff --git a/Master/texmf-dist/doc/luatex/luakeys/luakeys-doc.pdf b/Master/texmf-dist/doc/luatex/luakeys/luakeys-doc.pdf Binary files differindex 3c28176a7d2..0f796cc12c4 100644 --- a/Master/texmf-dist/doc/luatex/luakeys/luakeys-doc.pdf +++ b/Master/texmf-dist/doc/luatex/luakeys/luakeys-doc.pdf diff --git a/Master/texmf-dist/doc/luatex/luakeys/luakeys-doc.tex b/Master/texmf-dist/doc/luatex/luakeys/luakeys-doc.tex index b7e525fc4ba..99dfa6805be 100644 --- a/Master/texmf-dist/doc/luatex/luakeys/luakeys-doc.tex +++ b/Master/texmf-dist/doc/luatex/luakeys/luakeys-doc.tex @@ -30,17 +30,17 @@ \url{josef@friedrich.rocks}\\% \href{https://github.com/Josef-Friedrich/luakeys}{github.com/Josef-Friedrich/luakeys}% } -\date{v0.3 from 2021/11/05} +\date{v0.4 from 2021/12/31} \maketitle \vfill -%\luakeysdebug{level1={level2={level3={dim=1cm,bool=true,num=-1e-03,str=lua}}}} +%level1={level2={level3={dim=1cm,bool=true,num=-0.001,str=lua}}} \begin{minted}{lua} local luakeys = require('luakeys') -local kv = luakeys.parse('level1={level2={level3={dim=1cm,bool=true,num=-1e-03,str=lua}}}') +local kv = luakeys.parse('level1={level2={level3={dim=1cm,bool=true,num=-0.001,str=lua}}}') luakeys.print(kv) \end{minted} @@ -217,11 +217,13 @@ lists (\texttt{level1=\{level2=\{key=value,value\}\}}). \subsection{An (incomplete) attempt to put the syntax into the Extended Backus-Naur Form} \begin{grammar} -<list> ::= <list-item> | <list-item> <list> +<list> ::= \{ <list-item> \} -<list-item> ::= ( <key-value-pair> | <value-without-key> ) [ `,' ] +<list-container> ::= `{' <list> `}' -<list-container> ::== `{' <list> `}' +<list-item> ::= ( <list-container> | <key-value-pair> | <value> ) [ `,' ] + +<key-value-pair> ::= <value> `=' ( <list-container> | <value> ) <value> ::= <boolean> \alt <dimension> @@ -247,6 +249,11 @@ lists (\texttt{level1=\{level2=\{key=value,value\}\}}). \alt `pt' | `PT' \alt `sp' | `SP' +<boolean> ::= <boolean-true> | <boolean-false> + +<boolean-true> ::= `true' | `TRUE' | `True' + +<boolean-false> ::= `false' | `FALSE' | `False' \end{grammar} ... to be continued @@ -299,20 +306,14 @@ into Lua’s boolean type \lua{true}, the strings \texttt{false}, \luakeysdebug{ num1 = 4, num2 = -4, - num3 = 0.4, - num4 = 4.57e-3, - num5 = 0.3e12, - num6 = 5e+20 + num3 = 0.4 } \end{minted} \begin{minted}{lua} { ['num1'] = 4, ['num2'] = -4, - ['num3'] = 0.4, - ['num4'] = 0.00457, - ['num5'] = 300000000000.0, - ['num6'] = 5e+20 + ['num3'] = 0.4 } \end{minted} \end{multicols} @@ -719,6 +720,12 @@ An example of how to use the command in \LaTeX: * Add a plain LuaTeX wrapper “luakeys.tex” * Rename the previous documentation file “luakeys.tex” to luakeys-doc.tex” } +\changes{v0.4}{2021/12/31}{ +* Parser: Add support for nested tables (for example {{'a', 'b'}}) +* Parser: Allow only strings and numbers as keys +* Parser: Remove support from Lua numbers with exponents (for example '5e+20') +* Switch the Lua testing framework to busted +} \pagebreak \PrintChanges \pagebreak |