Replies: 9 comments 8 replies
-
Filter paths should be relative to the file that is referencing them (e.g. if you put it in document front matter, it will be relative to that file). So in the case of |
Beta Was this translation helpful? Give feedback.
-
Thank you, but that sounds a bit inconvenient, in particular for filters that are used on a regular basis, e.g., pandoc-zotxt.lua, as discussed a very short while ago here. Wouldn’t it be possible to have quarto search pandoc’s “User data directory” as well? |
Beta Was this translation helpful? Give feedback.
-
All valid points, but my typical use cases are standalone files in different directories, practically all of which require a bibliography, hence the repeated need for certain filters such as pandoc-zotxt.lua. Using Rmarkdown, the filter’s file name was all that was ever required. As to quarto, rather than introducing the overhead of having to create additional files such as |
Beta Was this translation helpful? Give feedback.
-
I would also like the search fallback to check the pandoc user data folder. I keep my bibliography and CSL files there and would like to keep a consistent location between pandoc and quarto... @njbart — what happens if you explicitly add |
Beta Was this translation helpful? Give feedback.
-
@iandol – No, neither In addition – while I still might be misunderstanding how quarto is supposed to be handling these issues in general – it seems that I am not sure where quarto does search for I suspect that when looking at templates and other stuff that usually lives in pandoc’s user data directory (which I haven’t tried so far at all), similar issues will crop up, too. |
Beta Was this translation helpful? Give feedback.
-
Ok, so just to understand a little better how quarto is supposed to work: Is there a quarto default directory for "csl" files, and if so, where? |
Beta Was this translation helpful? Give feedback.
-
Actually, my last question was meant quite seriously. If there is a default directory for csl files, I haven’t been able to identify it so far, and if there isn’t, what are the alternatives, and what would the quarto developers recommend using instead?
Honestly, I don't find any of these alternatives convincing. So if there really is no default directory for csl files at the moment, you should by all means consider adding this feature. |
Beta Was this translation helpful? Give feedback.
-
Our biggest concern about the use of the data-dir is that it undermines reproducibility (all of the source code required to successfully render the project or document is not available in the directory). This is why we don't use Pandoc's data-dir (as not only are there reproducibility problems but there are also mysterious "bugs" which show up when various options and templates are injected from there. I think the best way to manage this if you absolutely want a shared asset is to create a symlink from your document or project directory. Note also that |
Beta Was this translation helpful? Give feedback.
-
To answer in a bit more detail, you can think of Quarto projects as something like a scoped, explicit version of the data-dir. With Quarto, you put all of that shared configuration/content in a reports/
_quarto.yml
my.csl
phase1
report1.qmd
report2.qmd Where csl: my.csl Or if you like a reference to a CSL file at an absolute path for sharing system-wide. While this does create a bit more maintenance at least now you can transplant that filesystem to another machine and everything will work correctly (rather than depending on something in a data-dir that might be absent). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I’m not sure I have been looking in the right places, but I wasn’t able to find any documentation on default paths, in particular for (pandoc) filters.
Based on the behaviour of Rmarkdown, I was expecting to be able to put a filter in a
filters
subdirectory of pandoc’s “User data directory”, typically (at least on macOS)/Users/<username>/.local/share/pandoc
, which would be found upon rendering without giving the full path.quarto pandoc -v
output does indeed includeUser data directory: /Users/nb/.local/share/pandoc
Now, my filters live in
/Users/nb/.local/share/pandoc/filters
, but when using a file containingrendering fails with
whereas providing the full path
/Users/nb/.local/share/pandoc/filters/helloworld.lua
works as expected.Is this a bug? And if not, what is the default path where quarto is looking for filters, templates etc.?
Beta Was this translation helpful? Give feedback.
All reactions