-
Notifications
You must be signed in to change notification settings - Fork 524
Add highlighting macros for Pandoc in JSS template #422
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
Conversation
|
Can you just share a reproducible example with the issue ? I want to understand what we missed for not having an error in our test about that. With the default template, I don't have an issue and it contains a R chunk. So I want to be sure we got it correctly covered. I assumes this is for other language chunk ? The fix is the correct one, don't get me wrong. Thanks for the PR ! |
|
I just tried to produce a MWE, but for some reason I can no longer replicate the problem. Sorry! There are so many parts interacting here. It's a fairly complicated article with Would love to help more, but can't at the moment. Feel free to ignore the PR if you need a test or example. |
|
In your article,
This is the two case I need to reproduce. |
|
sorry, should have answered that. No, it's only R, and no verbatim environment with class language. There are some |
|
Ok thanks. I'll see what I'll do. If you got the error again, please come back and share! Thanks again. |
|
I might be able to contribute an example that triggers the issue @vincentarelbundock is trying to address. Creating the JSS draft .Rmd using for me (macOS 11.5, R 4.1.1, rticles 0.20), gives The proposed PR does resolve the issue such that both ways of specifying a code chunk compile just fine. Visually, however, they are distinct: |
|
Thanks. That confirms what I thought. As context, let me give some details. This syntax is a Pandoc direct syntax. It will apply class However, using will evaluate the code and we specifically output with So we can add the missing definition for Pandoc's Syntax Highlighting. However, I don't how correct it is for JSS submission if a document contains these environments. |
|
Thanks @cderv!
It's probably not. However JSS papers are not the only use-case for In my post, I was not trying to say, this should or should not be merged. That's up to you @cderv. I simply commented b/c this issue caused me a bit of a headache to track down. For some reason, the rhub machines and CRANs r-devel-windows-ix86+x86_64 machine did not trip over this, only r-devel-linux-x86_64-debian-gcc. Just out of curiosity, @cderv, does that make sense to you that this works in some cases and does not in others? I guess, with my troubles in mind, I'd be slightly in favor of merging this. Just to make people's life easier. But that's just my opinion. |
|
Thanks @vincentarelbundock ! |
|
Thank you for all your work on this great package! |
Compiling a JSS article results in an error about "Shaded Environment undefined". The same error was previously reported for different article types here:
#182
#99
The solution is to add this to the template: