On Friday 15 October 2010 12:51, Thangalin wrote:
> Hi!
>
> I would like to do the following:
>
>    - Link to an external source code file (for example a SQL script in
> ASCII format)
>    - Apply syntax highlighting to the imported text

>    - Edit the external source file and have OpenOffice refresh the linked
>    content and re-apply syntax highlighting
>
> Is this possible? If so, how? I could not find any examples.

Yes - but you use a programmers text editor for this.

On windows try PSPad or Notepad+ 
On Linux i use Bluefish made by OpenOffice

If you are happy to learn keyboard shortcuts to speed up your work try Emacs 
or Vim.

>    - Place the highlighted text inside a frame
>    - Add a caption to the frame

These are more difficult. IIUC the above text editing programs use a 
collection of RegEx'es to achieve the highlighting. The only way i know how 
to do this would be to print screen in a text editor and trim the image then 
add a caption to the subsequent image. This would render the text useless 
however.

In OpenOffice.org to achieve suitable coloured syntax output would require you 
to write the appropriate macro, adding all relevant RegEx'es as you go. I 
doubt this would already exist in an extension.

HTH

-- 
Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to