Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upPreserve non-fancy quotes in code chunks #75
Comments
|
Nice catch. I may be a little dense but the desired effect is just for the verbatim chunk, correct? Inline does not seem to change. Or am I missing something? |
From what I see it doesn't seem to affect anything inline (even verbatim inline which was already OK), since inline stuff do not use any of the verbatim-related LaTeX affected by Pinp's quotes in regular text: ``dquoted'', `squoted', `bquoted`.
Pinp's quotes in inline verbatim text: \texttt{"dquoted"},
\texttt{\textquotesingle{}squoted\textquotesingle{}}.
\begin{Shaded}
\begin{Highlighting}[]
\StringTok{"dquoted"}
\StringTok{'squoted'}
\StringTok{`}\DataTypeTok{bquoted}\StringTok{`}
\CommentTok{#' Xyz's "dquoted" 'squoted' `bquoted`}
\end{Highlighting}
\end{Shaded}(I have updated the example with something a little more accurate / sensible) |
|
Ok, I just tossed that in with a simple commit. Thanks again for the suggestion! |
|
Cool, I will be trying it out very soon while drafting a review of the Rcpp-modules vignette as discussed in RcppCore/Rcpp#976 (comment). |
Using
output: pinp::pinp, the quotes in the code chunks are converted to fancy quotes.I quickly constructed a minimal example as follows
(I did not find a nice way to render the closing ``` of the code chunk)
This results in

Not sure if this is a desired behavior (I noticed it for the Rcpp vignettes), but in case I tried a quick fix by using LaTeX package upquote. In particular, adding
to the class definition pinp.cls seemed to indeed help:

My LaTeX skills are a bit rusty, so maybe there are more convenient / appropriate ways to achieve the same.