Module knitr/Rnw/Sweave: Preview of \Sexpr{}

Stephan Boltzmann via lyx-users <[email protected]> Mon, 6 Jul 2026 09:48:23 +0200
Newsgroups gmane.editors.lyx.general
Message-ID <CAN6NU2wCjVZOW8h=Oru==BWdvQssiFA7hL96WJitNEv-9Z3TNg@mail.gmail.com>
--===============8413311825932363515==
Content-Type: multipart/alternative; boundary="0000000000005faf8c0655ec80f5"

--0000000000005faf8c0655ec80f5
Content-Type: text/plain; charset="UTF-8"

Hello everybody out there using LyX,

Wrapping a preview around ERTs helps me a lot to quickly orient visually in
my LyX documents.
This would be also very helpful in in dynamic report generation with the
module(s) knitr/Rnw/Sweave, but simply wrapping a preview around the
\Sexpr{1} command doesn't display a preview in my LyX document upon
compilation to PDF (where all my \Sexpr{ } are correctly resolved).

Did anyone manage to get a preview of it?

Technically, it requires evaluation of the code chunks in a document by the
interpreter of the R programming language. An instant preview would
probably be too resource and time consuming, but insertion of results upon
compilation (like for example for TikZ chunks) would be nice.

Best
Stephan

--0000000000005faf8c0655ec80f5
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Hello everybody out there using LyX,</div><div><br></=
div><div>Wrapping a preview around ERTs helps me a lot to quickly orient vi=
sually in my LyX documents.</div><div>This would be also very helpful in in=
 dynamic report generation with the module(s) knitr/Rnw/Sweave, but simply =
wrapping a preview around the \Sexpr{1} command doesn&#39;t display a previ=
ew in my LyX document upon compilation to PDF (where all my \Sexpr{ } are c=
orrectly resolved).<br></div><div><br></div><div>Did anyone manage to get a=
 preview of it?</div><div><br></div><div>Technically, it requires evaluatio=
n of the code chunks in a document by the interpreter of the R programming =
language. An instant preview would probably be too resource and time consum=
ing, but insertion of results upon compilation (like for example for TikZ c=
hunks) would be nice.</div><div><br></div><div>Best</div><div>Stephan</div>=
</div>

--0000000000005faf8c0655ec80f5--

--===============8413311825932363515==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-- 
lyx-users mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-users

--===============8413311825932363515==--