diff options
author | Norbert Preining <norbert@preining.info> | 2022-03-04 03:01:04 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-03-04 03:01:04 +0000 |
commit | 575ab7d0e7534edd510bbc89a2ef4b04582af591 (patch) | |
tree | 9fc4cf55b7ca8b168bdfd747be21de4c9ef2b30e /macros/luatex/latex/yamlvars/yamlvars.sty | |
parent | 6b9ed20cb01cb52c7aaf2a48202f5d8aa588ff79 (diff) |
CTAN sync 202203040301
Diffstat (limited to 'macros/luatex/latex/yamlvars/yamlvars.sty')
-rw-r--r-- | macros/luatex/latex/yamlvars/yamlvars.sty | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/macros/luatex/latex/yamlvars/yamlvars.sty b/macros/luatex/latex/yamlvars/yamlvars.sty index 8e295988fb..1c4b8fcf32 100644 --- a/macros/luatex/latex/yamlvars/yamlvars.sty +++ b/macros/luatex/latex/yamlvars/yamlvars.sty @@ -1,5 +1,5 @@ % Kale Ewasiuk (kalekje@gmail.com) -% 2022-02-25 +% 2022-03-03 % Copyright (C) 2021-2022 Kale Ewasiuk % % Permission is hereby granted, free of charge, to any person obtaining a copy @@ -25,14 +25,14 @@ \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{YAMLvars}[2022-02-25] +\ProvidesPackage{YAMLvars}[2022-03-03] \IfFileExists{markdown-tinyyaml.lua}{}{\PackageError{YAMLvars}{This package requires installation of the 'markdown' package, please install it and try again}{}} \RequirePackage{luacode} \RequirePackage{xspace} \RequirePackage{etoolbox} -\RequirePackage[pl,extras]{penlight} +\RequirePackage{penlight} % no option passed here, but extras must be used, error will be thrown if not \luadirect{YAMLvars = require('YAMLvars')} @@ -53,6 +53,9 @@ \luadirect{YAMLvars.debug = true} } +\newcommand{\AllowUndeclaredYV}{\luadirect{YAMLvars.allowUndeclared = true}} +\newcommand{\ForbidUndeclaredYV}{\luadirect{YAMLvars.allowUndeclared = false}} + \DeclareOption*{\PackageWarning{YAMLvars}{Unknown option: '\CurrentOption'}{}} \ProcessOptions\relax @@ -61,15 +64,13 @@ \newcommand{\parseYAMLvarsFile}[1]{\luadirect{YAMLvars.parseYAMLvarsFile(\luastring{#1})}} -\newenvironment{declareYAMLvars}{\luadirect{startrecording()}}{\luadirect{stoprecording()} -\luadirect{YAMLvars.declareYAMLvarsStr(recordedbuf)} +\newenvironment{declareYAMLvars}{\luadirect{pl.tex.startrecording()}}{\luadirect{pl.tex.stoprecording()} + \luadirect{YAMLvars.declareYAMLvarsStr(pl.tex.recordedbuf)} } -\newenvironment{parseYAMLvars}{\luadirect{startrecording()}}{\luadirect{stoprecording()} -\luadirect{YAMLvars.parseYAMLvarsStr(recordedbuf)} +\newenvironment{parseYAMLvars}{\luadirect{pl.tex.startrecording()}}{\luadirect{pl.tex.stoprecording()} + \luadirect{YAMLvars.parseYAMLvarsStr(pl.tex.recordedbuf)} } \newcommand{\resetYAMLvarsspec}{\luadirect{YAMLvars.varspec = {}}} -\newcommand{\AllowUndeclaredYV}{\luadirect{YAMLvars.allowUndeclared = true}} -\newcommand{\ForbidUndeclaredYV}{\luadirect{YAMLvars.allowUndeclared = false}} |