Re: An Experiment
- Posted by Irv <irv at ELLIJAY.COM> Aug 17, 1998
- 625 views
Robert Craig wrote: > > Irv wrote: > > I found that it is relatively easy to markup a Euphoria program > > in HTML, > > Your listings look good. Now all we need is for someone > to convert euphoria\bin\eprint.ex (or maybe just syncolor.e) > to output HTML codes for syntax coloring. > e.g. > <font face="Arial, Helvetica" color="#FF00A3" size=+2> ... </font> > Thanks Rob, If you tried printing the page from your browser, you'll see the real advantage to this: it creates *very* nice looking documentation, and it is easy to add pictures to illustrate a point. Try documenting a sort function with a couple of gif's - you'll like it! Two things: I think a converter would be easy to write, but also, I was trying to maintain a file format that would display in browsers and run as a Euphoria EX file without modification. While hopefully maintaining readability in a Euphoria editor - ed or ee. My scheme of putting straight HTML after the end of program (abort()) worked fine for an .EX file, but understandably gives errors if the file is an include .E file. So that's out. It's all gotta be in comments. Unless you could add a new directive: _ignore_ ( sort of the opposite of include ;) If I try to color the syntax, I get code like: --<font color=0000FF> for --</font> i = 1 to something --<font color=#0000FF> do< --/font> which sort of undermines the readability of the Euphorish, I think. So my options are: 1. Copy the code, prepend it to the program as comments, and mark that up - not ideal, as there would be twice as much code and a lot of garbage to wade thru getting to the real code. 2. Maintain two copies of each program. NG. 2. Invent an editor with an option to hide HTML. Not so good, unless everybody used the same editor. 3. Write markup- and markdown- programs to add and remove the html. I think that's my best bet. Anyone who wants can have a copy of the two programs, and run markdown.ex before .EX'ing the code. Perhaps there is a better way? Regards, Irv