RE: Colored Code

Subject: RE: Colored Code
From: "Laurel Hickey" <lhickey -at- 2morrow -dot- bc -dot- ca>
To: "TECHWR-L" <techwr-l -at- lists -dot- techwr-l -dot- com>
Date: Fri, 19 Nov 2004 11:14:33 -0800


It would help if the code had already been given it's own style in Word
because then you can do the search and replace within that single style.
Most of the manuals I've seen that have code also use a different font than
the body text so changing to a distinct style -- if not already present --
might be quite easy (depending on what you've already done).

At any rate, most of it should be able to be done by search and replace in
Word and, if necessary, in HTML. Dreamweaver's s&r is quite good and so is
Homesite's although I haven't used the latest version of that program.
Dreamweaver will let you do s&r in selections, whole pages, and all pages in
directories... and gives you a list of the changed areas.

And for new stuff, copying over to Dreamweaver (copy formatted), brings over
the colours but collapsed the spaces
Blue red green in Word (assume coloured here!)
Gives
<p class="MsoNormal"><span style="color:blue;">Blue</span><span
style="color:red;">red</span> <span style="color:#339966;">green</span></p>
You could replace the spaces with non-breaking spaces.

Saving the Word doc as filtered html, however, maintained the spaces in the
resultant html.

-------------------------------------
Laurel Hickey
2morrow writing & document design
lhickey -at- 2morrow -dot- bc -dot- ca
http://www.2morrow.bc.ca

-
Well, to clarify. I write in Microsoft Word (not my choice) or raw HTML. I
combine it all in RoboHelp and then publish HTMLHelp and PDF files.

The coloring is specific to lines (comments) or single words (function
and method names, parameters and variables). This can result in 3 or 4
colors appearing in the same line. Trying to do this via a style sheet
would be even more labor intensive than manually changing the code as
I would have to add the markup manually (DIV or SPAN tags; on the
grounds of maintainability and portability, I will not ever use FONT tags).

I cannot see a way to automate this so, all in all, this would mean me
having to manually 'massage' several hundred lines of code, spread
over several hundred individual HTML topics.



^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

ROBOHELP X5 - SEE THE ALL NEW ROBOHELP X5 IN ACTION!

RoboHelp X5 is a giant leap forward in Help authoring technology, featuring all new Word 2003 support, Content Management, Multi-Author support, PDF and XML support and much more! View an online demo: http://www.macromedia.com/go/techwrldemo

---
You are currently subscribed to techwr-l as:
archiver -at- techwr-l -dot- com
To unsubscribe send a blank email to leave-techwr-l-obscured -at- lists -dot- techwr-l -dot- com
Send administrative questions to lisa -at- techwr-l -dot- com -dot- Visit
http://www.techwr-l.com/techwhirl/ for more resources and info.



References:
RE: Colored Code: From: Simon North

Previous by Author: RE: Web design software
Next by Author: RE: Document Distribution
Previous by Thread: RE: Colored Code
Next by Thread: RE: Colored Code


What this post helpful? Share it with friends and colleagues:


Sponsored Ads