diff options
author | Karl Berry <karl@freefriends.org> | 2022-03-15 19:59:30 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-03-15 19:59:30 +0000 |
commit | bd1be3fc4dd3c9add0933864e8aa65390cb71fc6 (patch) | |
tree | 69fb1bded87d37cab89f2ab4a5244516806ae310 /Master/texmf-dist/doc | |
parent | c4d6fba0adf94ccf7b81ce9845a10b8d0f935989 (diff) |
yamlvars (15mar22)
git-svn-id: svn://tug.org/texlive/trunk@62721 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r-- | Master/texmf-dist/doc/lualatex/yamlvars/yamlvars.pdf | bin | 69460 -> 71526 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/lualatex/yamlvars/yamlvars.tex | 23 |
2 files changed, 22 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/lualatex/yamlvars/yamlvars.pdf b/Master/texmf-dist/doc/lualatex/yamlvars/yamlvars.pdf Binary files differindex 864a0842d4c..6fc0c5ce7ea 100644 --- a/Master/texmf-dist/doc/lualatex/yamlvars/yamlvars.pdf +++ b/Master/texmf-dist/doc/lualatex/yamlvars/yamlvars.pdf diff --git a/Master/texmf-dist/doc/lualatex/yamlvars/yamlvars.tex b/Master/texmf-dist/doc/lualatex/yamlvars/yamlvars.tex index 1c412c2f6d1..344185dd5f0 100644 --- a/Master/texmf-dist/doc/lualatex/yamlvars/yamlvars.tex +++ b/Master/texmf-dist/doc/lualatex/yamlvars/yamlvars.tex @@ -1,5 +1,5 @@ % Kale Ewasiuk (kalekje@gmail.com) -% 2022-03-03 +% 2022-03-15 % Copyright (C) 2021-2022 Kale Ewasiuk % % Permission is hereby granted, free of charge, to any person obtaining a copy @@ -147,6 +147,16 @@ If the token is available, it is set to a package error, so that if the variable tell the user they forgot to set it. This will be overwritten when you parse the variables and assign a value to it. +\paragraph{If you want a case-insensitive variable} In the declaration YAML document, +add a \cmd{lowcasevar: true} under the variable name. +This will make the variable name lowercase before any transforms or processing is done. +For example, if you have \cmd{title} as a YAML variable to set +the \cmd{prc} function \cmd{setdocvar}, a user could write +\cmd{Title} in the parsing file and still have it work. +You can toggle this behaviour globally with +the commands \cmd{\lowercasevarYVon} and \cmd{\lowercasevarYVoff} +See the last example below. + You can change the default \texttt{xfm}, \texttt{prc}, or \texttt{dft} by changing the value (in Lua): \texttt{YAMLvars.xfmDefault = ''} etc. @@ -164,6 +174,17 @@ Revisions: xfm: [sortZA, list2tab] Rhead: prc: setRightHead + + +author: + xfm: list2and # (joins a list with \and (or lets a single string be passed) + prc: setdocvar # calls \author{val} + lowcasevar: true # allows user to use Title: or TITLE: + +title: + xfm: lb2nl # (make line-breaks \\) + prc: setdocvar # calls \title{val} + lowcasevar: true # allows user to use Title: or TITLE: \end{declareYAMLvars} \end{verbatim} |