On Sun, Aug 28, 2022 at 01:56:26PM +0200, Kornel Benko wrote: > Am Fri, 26 Aug 2022 22:24:46 -0400 > schrieb Scott Kostyshak <skost...@lyx.org>: > > > Suppose I want to do something like store the LaTeX produced by TeXOnePar() > > into a > > variable. How can I do that? From what I understand, TeXOnePar() write to > > the 'os' > > argument, which I imagine is connected to a file (?), so there is no way to > > retrieve > > the TeX from 'os'. > > > > Is that right? If so, is there a way to create an otexstream that writes to > > a variable. > > i.e., can I do something like the following? > > > > TexString sktex; > > otexstream os2(sktex); > > TeXOnePar(..., os2, ...); > > > > And then the variable 'sktex' would contain the LaTeX that TeXOnePar() > > produced? > > > > Thanks, > > Scott > > You may like to look how lyxfind.cpp calls TeXOnePar() in > static docstring buffer_to_latex(Buffer & buffer) > > Of course, the settings for 'find' are not what you need.
That is exactly what I was looking for! Thank you, Scott
signature.asc
Description: PGP signature
-- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel