# Preserve non-fancy quotes in code chunks #75

Closed
opened this issue Jul 20, 2019 · 4 comments

### riccardoporreca commented Jul 20, 2019 • edited

 Using output: pinp::pinp, the quotes in the code chunks are converted to fancy quotes. I quickly constructed a minimal example as follows --- title: "Test pinp quotes" output: pinp::pinp --- Pinp's quotes in regular text: "dquoted", 'squoted', \bquoted\. Pinp's quotes in inline verbatim text: "dquoted", 'squoted'. r "dquoted" 'squoted' bquoted #' Xyz's "dquoted" 'squoted' bquoted (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 \RequirePackage{upquote} % For keeping actual quotes in verbatim 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.
Owner

### eddelbuettel commented Jul 20, 2019

 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?
Author

### riccardoporreca commented Jul 20, 2019

 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)

Owner

### eddelbuettel commented Jul 20, 2019

 Ok, I just tossed that in with a simple commit. Thanks again for the suggestion!
Author

### riccardoporreca commented Jul 20, 2019

 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).