Saving a procedure window as an .rtf document or Notebook?
Wed, 08/26/2020 - 06:27 am
I would like to get recommendations on how to save a procedure as a text document ( or exportable .rtf Notebook) that retains the default Igor syntax coloring. My reasons for this somewhat odd request are (1) sharing code ideas with non-Igor users, using syntax coloring to aid in interpretation, and (2) for my own editing purposes, in simplifying the transfer of code fragments from one pxp to another, without having to open simultaneous large pxp's, going back and forth between them, or incurring a barrage of compilation errors (particularly related to WAVE, NVAR, .. global declarations). Igor Pro 8 (Win 10) seems to have no mechanism to do this. The procedures themselves are usually not sufficiently general for saving as User Procedures.
I expect that some Exchange responses may mention using external editors. If so, are any suitable for the above purpose only, and not as the IP default editor? Saving as a Notebook-compatible rtf would be the desired goal (so as to work almost entirely within Igor).
A kludgy test I tried was to copy a test ipf into a Word rtf document. The syntax coloring was kept (so it might be useful for purpose 1), but inserting the rtf file into a Notebook did not work (because of the vagaries of .rtf file structures). Copy-and-pasting its colored text into a Notebook lost the coloring (like using an ipf source).