You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FR] Add a new type of dependency that bundles lua filter and other type of dependencies #2347
We are more more adding feature based on Lua filters, and they often require to have other dependencies added like CSS or JS, but it could even be LaTeX dependencies.
Currently, we need to do that by creating dependencies in several object and then adding them at the right place in the output format.
I have a secret wish to a way to have a feature extensions bundle where we have a htmlDependency() with a Lua filter requirements. Something that we could write in a wrapped way, and that rmarkdown could unwrapped and use the correct way. We don't have a lua_dependency component, and maybe that would make sense to have at some point adding more feature like this
It could also be more generic like an rmd_dependency() (suggestion of @atusy) and could indeed probably be interesting if we considered it would bundle everything
This way a feature could be grouped with all its component. This could also be extended to knitr to support having a lua filter as part of dependencies to add, working the same as with HTML deps or LaTeX deps with knitr::knit_meta()
It would not help make things works better, but I feel it would makes this cleaner, the same way JS and CSS are grouped for an HTML deps.
To make things simple yet powerful, I would add pandoc_dependency rather than lua_dependency.
Then, we can also control metadata and variables.
I also guess there are some usecases where to add metadata or variables but no lua filters.
In such cases, the name lua_dependency is not adequate.
pandoc_dependency(
lua_filters,
metadata,
variables,
...# can be more?
)
Of course, we can still add rmd_dependency which allows declare variety of dependencies at once.
I think we do not need _deps suffix as it is obvious from the function name.
Activity
yihui commentedon Apr 11, 2022
That sounds like a great idea to me!
atusy commentedon Feb 8, 2023
I'm currently working on this.
Some thoughts:
To make things simple yet powerful, I would add
pandoc_dependencyrather thanlua_dependency.Then, we can also control metadata and variables.
I also guess there are some usecases where to add metadata or variables but no lua filters.
In such cases, the name
lua_dependencyis not adequate.Of course, we can still add
rmd_dependencywhich allows declare variety of dependencies at once.I think we do not need
_depssuffix as it is obvious from the function name.cderv commentedon Feb 8, 2023
Cool ! Thank you !
Really interesting ! Yes I like that idea. Let's try with that !
github-actions commentedon Jan 10, 2024
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.