8000 Code chunk generation · Issue #14 · ElianHugh/quartools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Code chunk generation #14

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

Open
ElianHugh opened this issue Apr 4, 2025 · 0 comments
Open

Code chunk generation #14

ElianHugh opened this issue Apr 4, 2025 · 0 comments
Labels
feature a feature request or enhancement

Comments

@ElianHugh
Copy link
Owner

Ran into an issue with generating programmatic typst blocks, because they need their own code chunks so as to be evaluated properly. Ended up having to handroll a solution, so I think it makes sense that quartools supports this. Might have to examine quartools again because it's been a while since I've looked at the code :)

E.g., qto_codechunk with the following interface

qto_codechunk(
  ..., 
  lang = NULL,
  id = NULL,
  class = NULL,
  css = NULL,
  .attributes = NULL,
  .content = NULL,
  collapse = "",
  drop_empty = TRUE,
  drop_na = TRUE,
  call = caller_env()
)

So qto_codechunk("#colbreak()", lang = "=typst") would generate:

```{=typst}
#colbreak()
```

Perhaps has implications for creating plain fenced blocks too, but the interface might need some more thought

@ElianHugh ElianHugh added the feature a feature request or enhancement label Apr 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

1 participant
0