Michael <[EMAIL PROTECTED]> writes:
> As a broader question, is there a way to utilize the Latex Instant Preview
> feature from outside of the LyX?

Hi, Michael. Would it be fair to summarize your requirements as:
* Type an equation in LaTeX syntax
* Hit return to send it over the wire to your colleague
* Have the just received LaTeX snippet converted into a .png file on your 
colleague's machine for display as an image if conversion was successful, 
otherwise as your LaTeX text snippet.
?

> I am wondering if I can copy the images from the instant equation preview
> buffer to OneNote in realtime automatically and programatically.

I dunno anything about OneNote, but if you can flag some text received by your 
colleague with "please try and pass this through the latex.exe compiler and 
dvipng.exe to generate .png files", then the whole process sounds achievable.

Your colleague's machine would need to:
1. Wrap your LaTeX snippet inside more text to make a complete LaTeX document 
that can be processed by latex.exe. See src/graphics/PreviewLoader.C:

491       of << "\\batchmode\n"; 
492         dumpPreamble(of); 
493         of << "\n\\begin{document}\n"; 
494         dumpData(of, inprogress.snippets); 
495         of << "\n\\end{document}\n"; 
496         of.close(); 

2. Send this complete LaTeX document to a script, something like 
lib/scripts/lyxpreview2bitmap.py
3. Wait for this script to complete and load the image file into OneNote.

Regards,
Angus


Reply via email to