-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support reference to environment variables within YAML defaults files #5977
Comments
I don't think we can do this across the board, since for example one might want to include some verbatim code that uses |
How about enabling it only for variables that contain paths? |
And how would you identify these? |
I think "variables" is not the right term. What I mean is to enable it for those entries in a defaults file (not
That would effectively simulate what the shell does on *nix systems, but for all platforms. |
Ah, right. This concerns certain entries in the defaults file, not variables. |
See discussion in #5982 |
This allows the syntax `${HOME}` to be used, in fields that expect file paths only. Any environment variable may be interpolated in this way. A warning will be raised for undefined variables. The special variable `USERDATA` is automatically set to the user data directory in force when the defaults file is parsed. (Note: it may be different from the eventual user data directory, if the defaults file or further command line options change that.) Closes #5982. Closes #5977. Closes #6108 (path not taken).
Currently I'm using
in a YAML defaults file. Note that it includes
\string~
, which makes LaTeX expand~
to the home directory. I use this to access a set of (personal) mathematical macros.It would be nicer to simply write
but that doesn't work because Pandoc does not expand the tilde.
As @jgm noticed in #5970, having Pandoc do so would be strange since this shortcut is a quirk of Unix-like operating systems, while Pandoc is cross-platform.
Instead I propose to support reference to environment variables within YAML defaults files, for example like this:
The text was updated successfully, but these errors were encountered: