Re: code examples in a document

Subject: Re: code examples in a document
From: guy <guy -at- hiskeyboard -dot- com>
To: "TECHWR-L" <techwr-l -at- lists -dot- raycomm -dot- com>
Date: Tue, 05 Nov 2002 14:20:53 -0800


John Posada wrote:

For those who place code in their document, how do you handle code lines
that are so long that they wrap in the document. I have script codes that I
need to include in one of my sections...all in all, about 75 lines of code.

First, what I've done to minimize the damage.

1) Place code on landscape pages.
2) Use 9pt Courier New to eliminate proportional spacing and to get maximum
line length.

However, some of the lines of code I'm getting are just too long and they
wrap to the next line, which also throws out the indent alignment.

How do you handle it?


You should use monotype font for code in any case, and 9 pt Courier is not too tiny.

There are a few characters, depending on what fonts you have, that
can represent a line break. In Wingdings 3, there is a set of arrows,
one of which goes across (like a minus) then down. Other fonts offer
other possibilities.

You can put that character at the end of the first line or the beginning
of the second line of a broken pair. I tend to put it at the end of
the first line AND indent the second.

Naturally, I put a note in the "Conventions Used In This Document"
section in the front matter to explain that glyph.

--Guy K. Haas guy -at- hiskeyboard -dot- com or gkhaas -at- usa -dot- net
Software Exegete in Silicon Valley


^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check out SnagIt - The Screen Capture Standard!
Download a free 30-day trial from http://www.techsmith.com/rdr/txt/twr
Find out what all the other tech writers, including Dan, already know!

All-new RoboHelp X3 is now shipping! Get single sourcing, print-quality
documentation, conditional text and much more, in the most monumental
release ever. Save $100! Order online at http://www.ehelp.com/techwr-l

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



References:
code examples in a document: From: John Posada

Previous by Author: Re: STC Letter to the Editor
Next by Author: Re: Results from the first ever TECHWR-L Googlefight - shocking results
Previous by Thread: code examples in a document
Next by Thread: Re: code examples in a document


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


Sponsored Ads