Skip to content
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

Implement integration with knitr (draw.*) #77

Open
4 tasks
fabrice-rossi opened this issue Mar 29, 2024 · 1 comment
Open
4 tasks

Implement integration with knitr (draw.*) #77

fabrice-rossi opened this issue Mar 29, 2024 · 1 comment
Milestone

Comments

@fabrice-rossi
Copy link
Owner

The current version of draw.* function (improved in issue #66) can produce latex export, but in a rmarkdown document or a quarto document, we need to include the adapted latex style via the header and to specify that the chunk result as to be 'asis'.
This is a bit cumbersome while a custom print for knitr should remove both problems. We need

  • to modify draw.* functions so that they output a mixvlmc_draw object
  • to implement print.mixvlmc_draw() to trigger standard printing when needed
  • to implement knit_print.mixvlmc_draw for automatic knitr printing
  • to register the latex dependency with rmarkdown::latex_dependency() and register them with knitr::knit_meta_add()
@fabrice-rossi fabrice-rossi added this to the 0.3.0 milestone Mar 29, 2024
@fabrice-rossi
Copy link
Owner Author

After further thoughts, it seems better to remove draw functions and replace them by extraction functions that produces an object with adapted printing methods. This separates the drawing action from the printing part, as in the xtable package for instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant