diff options
Diffstat (limited to 'Master/texmf-dist/tex/lualatex/yamlvars/yamlvars.sty')
-rw-r--r-- | Master/texmf-dist/tex/lualatex/yamlvars/yamlvars.sty | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/lualatex/yamlvars/yamlvars.sty b/Master/texmf-dist/tex/lualatex/yamlvars/yamlvars.sty index 8e295988fbf..1c4b8fcf322 100644 --- a/Master/texmf-dist/tex/lualatex/yamlvars/yamlvars.sty +++ b/Master/texmf-dist/tex/lualatex/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}} |