How to channel an otexstream into a variable?

Scott Kostyshak skostysh at lyx.org
Sat Aug 27 02:24:46 UTC 2022


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20220826/3b8e41f7/attachment.asc>


More information about the lyx-devel mailing list