diff options
author | Karl Berry <karl@freefriends.org> | 2023-07-08 19:48:18 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-07-08 19:48:18 +0000 |
commit | d5aab2e46bc7c240ca7b23b0e2d79597c134c1e9 (patch) | |
tree | 06e495eea69c23928472ded06508865cc9f6cce5 /Master/texmf-dist/tex/lualatex/piton/piton.sty | |
parent | edef208e629f021498d28b47c6c0d6ef9504e28e (diff) |
piton (8jul23)
git-svn-id: svn://tug.org/texlive/trunk@67584 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/lualatex/piton/piton.sty')
-rw-r--r-- | Master/texmf-dist/tex/lualatex/piton/piton.sty | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/Master/texmf-dist/tex/lualatex/piton/piton.sty b/Master/texmf-dist/tex/lualatex/piton/piton.sty index 564fa5d2267..0cd846911f6 100644 --- a/Master/texmf-dist/tex/lualatex/piton/piton.sty +++ b/Master/texmf-dist/tex/lualatex/piton/piton.sty @@ -18,8 +18,8 @@ %% and version 1.3 or later is part of all distributions of %% LaTeX version 2005/12/01 or later. %% -\def\myfileversion{1.6} -\def\myfiledate{2023/05/03} +\def\myfileversion{1.6a} +\def\myfiledate{2023/07/08} \NeedsTeXFormat{LaTeX2e} @@ -661,6 +661,7 @@ \__piton_compute_left_margin:nn { CountNonEmptyLines } { ##1 } \__piton_compute_width: \ttfamily + \dim_zero:N \parskip % added 2023/07/06 \bool_if:NT \c__piton_footnote_bool { \begin { savenotes } } \vtop \bgroup \lua_now:e @@ -937,6 +938,13 @@ \token_to_str:N \piton\ but~there~is~no~environment~ {piton}.~This~error~is~fatal. } +\msg_new:nnn { piton } { syntax~error } + { + Your~code~is~not~syntactically~correct.\\ + It~won't~be~printed~in~the~PDF~file. + } +\NewDocumentCommand \PitonSyntaxError { } + { \msg_error:nn { piton } { syntax~error } } \msg_new:nnn { piton } { unknown~file } { Unknown~file. \\ @@ -1836,6 +1844,11 @@ ocaml = languages['ocaml'] = ocaml function piton.Parse(language,code) local t = languages[language] : match ( code ) + if t == nil + then + tex.sprint("\\PitonSyntaxError") + return -- to exit in force the function + end local left_stack = {} local right_stack = {} for _ , one_item in ipairs(t) |