diff options
author | Norbert Preining <norbert@preining.info> | 2023-07-24 03:04:00 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2023-07-24 03:04:00 +0000 |
commit | 19444d4440a66200b03e05b567996375d0404a46 (patch) | |
tree | 450f6790376fe84313c8b2840fe51307bcac2f9e /macros/luatex/latex | |
parent | 8e64fc98a1773bc22a0f010f106d56a028e48597 (diff) |
CTAN sync 202307240303
Diffstat (limited to 'macros/luatex/latex')
-rw-r--r-- | macros/luatex/latex/yamlvars/README.md | 4 | ||||
-rw-r--r-- | macros/luatex/latex/yamlvars/yamlvars.lua | 13 | ||||
-rw-r--r-- | macros/luatex/latex/yamlvars/yamlvars.pdf | bin | 82561 -> 82984 bytes | |||
-rw-r--r-- | macros/luatex/latex/yamlvars/yamlvars.sty | 27 | ||||
-rw-r--r-- | macros/luatex/latex/yamlvars/yamlvars.tex | 12 |
5 files changed, 25 insertions, 31 deletions
diff --git a/macros/luatex/latex/yamlvars/README.md b/macros/luatex/latex/yamlvars/README.md index 031de6c53a..509e5366c9 100644 --- a/macros/luatex/latex/yamlvars/README.md +++ b/macros/luatex/latex/yamlvars/README.md @@ -1,13 +1,13 @@ # YAMLvars -- parse a YAML document and create definitions in LaTeX This LuaLaTeX package provides a YAML parser and some functions to declare and define LaTeX definitions using YAML files. -It uses the [`markdown-tinyyaml`](https://github.com/api7/lua-tinyyaml) parser that is shipped with the [`markdown`](https://ctan.org/pkg/markdown) package. +It uses the [`tinyyaml`](https://ctan.org/pkg/lua-tinyyaml) parser. # License -Copyright (C) 2021-2022 Kale Ewasiuk +Copyright (C) 2021-2023 Kale Ewasiuk Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/macros/luatex/latex/yamlvars/yamlvars.lua b/macros/luatex/latex/yamlvars/yamlvars.lua index 1d0da9a312..479880a3e8 100644 --- a/macros/luatex/latex/yamlvars/yamlvars.lua +++ b/macros/luatex/latex/yamlvars/yamlvars.lua @@ -1,6 +1,6 @@ --% Kale Ewasiuk (kalekje@gmail.com) ---% 2023-07-18 ---% Copyright (C) 2021-2022 Kale Ewasiuk +--% 2023-07-22 +--% Copyright (C) 2021-2023 Kale Ewasiuk --% --% Permission is hereby granted, free of charge, to any person obtaining a copy --% of this software and associated documentation files (the "Software"), to deal @@ -28,12 +28,9 @@ YAMLvars = {} -- self table YAMLvars.yaml = require'tinyyaml' -- note: YAMLvars.sty will have checked existence of this already -local luakeys = require'luakeys'() -- note: YAMLvars.sty will have checked existence of this already +YAMLvars.luakeys = require'luakeys'() -- note: YAMLvars.sty will have checked existence of this already -local pl = _G['penlight'] or _G['pl'] -- penlight for this namespace is pl -if (__PL_EXTRAS__ == nil) or (__PENLIGHT__ == nil) then - tex.sprint('\\PackageError{yamlvars}{penlight package with extras (or extrasnoglobals) option must be loaded before this package}{}') -end +local pl = penlight -- UI tables to extend functionality YAMLvars.xfm = {} @@ -75,7 +72,7 @@ function YAMLvars.updatesettskv(kv, res, def) YAMLvars.setts2default() end - local kv = luakeys.parse(kv) + local kv = YAMLvars.luakeys.parse(kv) if type(kv.xfm) == 'string' then kv.xfm = pl.stringx.split(kv.xfm) end diff --git a/macros/luatex/latex/yamlvars/yamlvars.pdf b/macros/luatex/latex/yamlvars/yamlvars.pdf Binary files differindex a91095c832..4719837d3c 100644 --- a/macros/luatex/latex/yamlvars/yamlvars.pdf +++ b/macros/luatex/latex/yamlvars/yamlvars.pdf diff --git a/macros/luatex/latex/yamlvars/yamlvars.sty b/macros/luatex/latex/yamlvars/yamlvars.sty index 20ea6d33d1..733ee80b69 100644 --- a/macros/luatex/latex/yamlvars/yamlvars.sty +++ b/macros/luatex/latex/yamlvars/yamlvars.sty @@ -1,6 +1,6 @@ % Kale Ewasiuk (kalekje@gmail.com) -% 2023-07-18 -% Copyright (C) 2021-2022 Kale Ewasiuk +% 2023-07-22 +% Copyright (C) 2021-2023 Kale Ewasiuk % % Permission is hereby granted, free of charge, to any person obtaining a copy % of this software and associated documentation files (the "Software"), to deal @@ -25,13 +25,12 @@ \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{yamlvars}[2023-07-18] +\ProvidesPackage{yamlvars}[2023-07-22] \RequirePackage{luacode} -\RequirePackage{xspace} \RequirePackage{etoolbox} \RequirePackage{luakeys} -\RequirePackage{penlight} % no option passed here, but extras must be used, error will be thrown if not +\RequirePackage{penlightplus} % no option passed here, but extras must be used, error will be thrown if not %\IfFileExists{tinyyaml.lua}{}{\PackageError{yamlvars}{This package requires installation of the 'tinyyaml' package, please install it and try again}{}} @@ -94,19 +93,19 @@ YAMLvars.xfmDefault = {'lb2nl','addxspace'} }} -\newenvironment{declareYAMLvars}{\luadirect{_G[__PENLIGHT__].tex.startrecording()}}{\luadirect{_G[__PENLIGHT__].tex.stoprecording()} - \luadirect{YAMLvars.declareYAMLvarsStr(_G[__PENLIGHT__].tex.recordedbuf)} +\newenvironment{declareYAMLvars}{\luadirect{penlight.tex.startrecording()}}{\luadirect{penlight.tex.stoprecording()} + \luadirect{YAMLvars.declareYAMLvarsStr(penlight.tex.recordedbuf)} } \NewDocumentEnvironment{parseYAMLvars}{}% {\luadirect{ - _G[__PENLIGHT__].tex.startrecording() + penlight.tex.startrecording() }}% {\luadirect{ - _G[__PENLIGHT__].tex.stoprecording() + penlight.tex.stoprecording() }} -\AfterEndEnvironment{parseYAMLvars}{\luadirect{YAMLvars.parseYAMLvarsStr(_G[__PENLIGHT__].tex.recordedbuf)}} +\AfterEndEnvironment{parseYAMLvars}{\luadirect{YAMLvars.parseYAMLvarsStr(penlight.tex.recordedbuf)}} % necessary hack to get rohead and lohead to work.. % .. https://tex.stackexchange.com/questions/637018/setting-koma-heading-within-lua/637021?noredirect=1#comment1587387_637021 @@ -116,10 +115,10 @@ YAMLvars.xfmDefault = {'lb2nl','addxspace'} -\newenvironment{parseYAMLpdfdata}{\luadirect{_G[__PENLIGHT__].tex.startrecording()}}{ - \luadirect{_G[__PENLIGHT__].tex.stoprecording() - YAMLvars.yaml2PDFmetadata(_G[__PENLIGHT__].tex.recordedbuf) - _G[__PENLIGHT__].tex.writePDFmetadata() +\newenvironment{parseYAMLpdfdata}{\luadirect{penlight.tex.startrecording()}}{ + \luadirect{penlight.tex.stoprecording() + YAMLvars.yaml2PDFmetadata(penlight.tex.recordedbuf) + penlight.tex.writePDFmetadata() } } diff --git a/macros/luatex/latex/yamlvars/yamlvars.tex b/macros/luatex/latex/yamlvars/yamlvars.tex index cd6888cea8..552fc21988 100644 --- a/macros/luatex/latex/yamlvars/yamlvars.tex +++ b/macros/luatex/latex/yamlvars/yamlvars.tex @@ -1,6 +1,6 @@ % Kale Ewasiuk (kalekje@gmail.com) -% 2023-07-18 -% Copyright (C) 2021-2022 Kale Ewasiuk +% 2023-07-22 +% Copyright (C) 2021-2023 Kale Ewasiuk % % Permission is hereby granted, free of charge, to any person obtaining a copy % of this software and associated documentation files (the "Software"), to deal @@ -53,7 +53,6 @@ \date{\today} -\usepackage[pl,extrasglobals]{penlight} \usepackage[overwritedefs]{yamlvars} \title{YAMLvars} \subtitle{a YAML variable parser for LuaLaTeX} @@ -115,10 +114,9 @@ The YAML specification: \url{https://yaml.org/spec/}\\ Many of the ``transform'' and ``processing'' functions built-in to this package rely on other packages, like -\texttt{hyperref}, for example, but it is not loaded, and this package will only load -\cmd{penlight}, -\cmd{luacode}, -\cmd{xspace}, and +\texttt{hyperref}, or \texttt{xspace} for example, but they are not loaded, and this package will only load +\cmd{penlightplus}, +\cmd{luacode}, \cmd{luakeys}, and \cmd{etoolbox}. \section{Declaring variables} |