On Sun, Apr 15, 2018 at 10:35:32AM +0000, Jürgen Spitzmüller wrote:
> Am Samstag, den 14.04.2018, 13:15 -0400 schrieb Scott Kostyshak:
> > Did we need to add \cprotect also for the other box modes? For the
> > example file, all of the options besides simple frame compiled
> > without
> > error. Was that just by luck?
> 
> No, because I added the calls. Since the Box latex routine is really
> ugly, chances are high, though, that I missed cases. So thanks for
> checking.

I think I was unclear. I mean that before your commit, if you put a box
around a verbatim, it worked unless the box was a "simple frame". To see
this, open the file simpleFrame_verbatim.lyx that I sent before with
e.g. LyX 2.3.0 and change from "simple frame" to "double frame". It
compiled without error.

> The reason was that knitr chunk has the LaTeXType "none" which was
> treated equivalently to "command" (which only needs cprotect for
> specific content), rather than "environment" (which needs cprotect
> always). Thus cprotect would have chimed in if you entered one of the
> crucial chars in the chunk (e.g., #).

Ah that makes sense.

> Please test with the attached patch after my recent commits. I did not
> commit the patch since I cannot test whether it works (no R installed
> here).

Tested and works well. Thank you!

Scott

Attachment: signature.asc
Description: PGP signature

Reply via email to