Closed riccardoporreca closed 5 years ago
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?
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 upquote
, see the generated LaTeX code:
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 https://github.com/RcppCore/Rcpp/issues/976#issuecomment-512543279.
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![image](https://user-images.githubusercontent.com/13663564/61582843-263fb500-ab30-11e9-9bd9-89190cf3e27e.png)
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:![image](https://user-images.githubusercontent.com/13663564/61582823-fc868e00-ab2f-11e9-8ed5-ed45f084d97a.png)
My LaTeX skills are a bit rusty, so maybe there are more convenient / appropriate ways to achieve the same.