home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-387-Vol-3of3.iso
/
i
/
irdrv10.zip
/
IRDRV10.EXE
/
pak
/
AUTHOR.DOC
next >
Wrap
Text File
|
1992-11-07
|
23KB
|
400 lines
UTHORING TECHNIQUES
The main idea behind this program is to make
it easy to prepare illustrated documents so you
can concentrate on content instead of technical
matters. The Illustrated Reader uses a standard
PC ROM font that could display 25 lines of text,
but the Control Panel takes up about four lines, so the IR presents
text files in screen "pages" of exactly 21 lines each.
If you don't want any pictures in your IR document, all you
really need is a text editor or a word processor that creates pure
ASCII files. (ASCII stands for American Standard Code for Information
Interchange in case you're curious.) ASCII files are no big deal.
They're just pure text files with no special codes for bolding, under-
lining, italics and so on. You can always tell if a file is in ASCII
by displaying it with the DOS "type" command. For example, from the
DOS prompt (A:>, C:>, D:>, or whatever) if you type:
type readme.doc
then press ENTER, you will see the contents of this file whiz by.
You will notice that it is pure text--no strange symbols. This is
all the IR requires of text files.
The ideal tool for creating text files is a TEXT EDITOR, more or
less a scaled-down word processor that programmers often use when
they're writing program code. If you have Version 5.0 of DOS, then
you have a fairly good text editor, called EDIT. There are several
excellent shareware text editors on the market as well. But you can
also use a word processor such as Microsoft Word, Word Perfect, or
PC-Write. The only requirement here is that you must save your file
in ASCII format, and most word processors allow this.
There are two other requirements that are cosmetic--they make
your text files display better in the IR. First, don't use TABS
or other special characters. If you need to pad space before text
(such as indents) use spaces. Spaces and "carriage returns" are
O.K. (Spaces don't show, and the program strips off the carriage
returns before displaying the text.) On the other hand, you CAN
use extended characters, like the line drawing characters so you can
have boxes and international characters (ê, á, ü £). The IR fully
supports these "extended ASCII" characters.
Second, although the IR will accept files as large as 4200 lines
(that's 200 screen pages!) the total lines of each file should be
a multiple of 21. Strictly speaking, this is not necessary. But
by being a multiple of 21, this ensures that the file will not "jump"
when the reader reaches the end of the file. This is not as hard as
it sounds. Just write your text as you would normally do and don't
worry about length. When you're finished, your word processor or text
editor should display how many lines you have. Let's say your file is
249 lines long. The next highest multiple of 21 is 252, so all you
have to do is hit the ENTER key three times. This puts in three
carriage returns, and makes the file 252 lines long--exactly 12 screen
pages. So fine, Mr. Arithmetic. How am I supposed to know when I
have a multiple of 21? Glad you asked. That's why I've included this
handy chart:
SCREEN-PAGE-TO-LINE-NUMBER CONVERSION CHART:
Screen page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
First line: 1 22 43 64 85 106 127 148 169 190 211 232 253 274 295
Last line: 21 42 63 84 105 126 147 168 189 210 231 252 273 294 315
Screen page: 16 17 18 19 20 21 22 23 24 25 26 27 28 29
First line: 316 337 358 379 400 421 442 463 484 505 526 547 568 589
Last Line: 336 357 378 399 420 441 462 483 504 525 546 567 588 609
Screen page: 30 31 32 33 34 35 36 37 38 39 40 41 42 43
First line: 610 631 652 673 694 715 736 757 778 799 820 841 862 883
Last line: 630 651 672 693 714 735 756 777 798 819 840 861 882 903
Screen page: 44 45 46 47 48 49 50 51 52 53 54 55
First line: 904 925 946 967 988 1009 1030 1051 1072 1093 1114 1135
Last Line: 924 945 966 987 1008 1029 1050 1071 1092 1113 1134 1155
Screen page: 56 57 58 59 60 61 62 63 64 65 66
First line: 1156 1177 1198 1219 1240 1261 1282 1303 1324 1345 1366
Last Line: 1176 1197 1218 1239 1260 1281 1302 1323 1344 1365 1386
(To print this chart, Press F2, select Option 2, then Option 3.)
This chart goes up to 66 (screen) pages, which should be a good start.
(Users who register at the Author level get a much larger version of
this chart in hardcopy. See the MONEY.DOC file.)
Also, end all your files with a .DOC extension if you want them
to appear on the LOAD A NEW FILE screen. Finally, the maximum line
length should be 75 characters. Look at some of the DOC files for
the IR for some examples. From the DOS prompt, just give the command
"type author.doc | more" (without the quotes) and press ENTER.
Preparing Documents with Illustrations
The hardest thing about making illustrated documents for the
IR is creating the pictures, a task that has nothing to do with
the IR at all. Putting these pictures into your document is very
simple, so let's start with the easy part first.
To display a graphic in the IR, all you have to do is create
a small text file to tell the IR where you want the picture to be
displayed. That's it. This file is called the Figure Information
File (FIF for short), and should have the same name as the text file
where the pictures are to go, only with a .FIF extension instead of
a .DOC extension.
This file should be a pure ASCII file, just like the .DOC file,
so you can use your text editor or word processor to write it. The
FIF file consists of four lines per picture, like this:
penbook <-- name of the .PCX file This is the README.FIF
40 <---horizontal location (column) file for the README.DOC
10 <---vertical location (row) document for the IR.
1 <---page (screen page) Each picture has four
files ──┐ items of information:
90 ├── info. for next (1) the name of the
138 │ illustration file, without extension,
2 ──┘ (2) the horizontal and
joek ──┐ (3) vertical coordinates,
470 ├── info. for next and (4) the screen page
150 │ illustration on which the picture
3 ──┘ will appear.
When the IR loads a document for reading, it looks for an accom-
panying .FIF file. If it finds none, it simply assumes there will be
no pictures with this document. If it does find an .FIF file, it
reads the information and stores it for later use. When it displays
a page, it uses that stored information to position the picture where
the author intended. That's pretty much all there is to it.
Of course, if you intend to have a picture on Page 3 in the lower
right hand section of the page, then you have to leave space for it
when you write your document. When I first designed documents for
the IR for testing while I was writing the program, I had to engage
in a considerable amount of guesswork before I began to get a feel
for which coordinates mapped to which areas on the screen. Now you
can reap the benefit of my work by consulting yet another handy chart!
(It's on the next page).
The picture on your PC screen consists of tiny colored dots known
as PIXELS (picture elements). The IR uses an EGA mode which is 640
pixels across and 350 pixels high. Exactly 49 of the bottom rows of
are used for the Control Panel. The following chart shows this:
0 0 0 0 0 1 1 1 1 1 1 2 2 2 2 2 2 2 3 3 3 3 3 3 4 4 4 4 4 4 5 5 5 5 5 5 6 6
2 4 5 7 8 0 2 3 5 6 8 0 1 3 4 6 8 9 1 2 4 6 7 9 0 2 4 5 7 8 0 2 3 5 6 8 0 1
4 0 6 2 8 4 0 6 2 8 4 0 6 2 8 4 0 6 2 8 4 0 6 2 8 4 0 6 2 8 4 0 6 2 8 4 0 6
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 056
| 070
Of course, the positions on this chart are not exact, but | 084
they're a much better than guessing (believe me!). The numbers | 098
across the top represent the horizontal coordinates, and should | 112
be read vertically. The beginning of this sentence, for example, | 126
is approximately 216 pixels from the left edge of the screen. | 140
| 154
The numbers in the FIF file refer to the UPPER LEFT CORNER | 168
of the picture. This is where the upper left hand corner of the | 182
picture will be when the page is displayed. For example, the | 196
tools shown to the left are 40 pixels from the | 210
left edge of the screen, and 210 pixels from | 224
the top. (Check the AUTHOR.FIF file if you | 238
don't believe me.) Try this--press F2, select | 252
Option 3 and change the screen colors. Now you | 266
can see the actual outline of the picture! You'll probably want | 280
to print the text of this page as well, to keep for reference. | 294
Even with the help of the chart, it will probably take a couple
of tries to get the picture exactly where you want it. Fortunately,
it's a pretty easy process. Write the .FIF file, then run the IREAD
program, and select the file (the text and FIF files should have the
same name left of the period). If the picture is not where you want
it, just leave the IR, then edit the FIF file and make the correct-
ions. Run the IR again, and see the results. It won't be long until
you're able to make an accurate placement with only one or two
revisions.
Preparing Pictures
All pictures used in the IR must conform to two requirements.
First, they must be in EGA 16-color mode, and second, they must be
in the popular PCX format. If you're confused, don't worry. I'll
explain each in the next paragraphs.
EGA stands for Enhanced Graphics Adapter, and was the first real
"high resolution" mode that supported color for the IBM and compatible
PCs. In this age of VGA and Super VGA, you might wonder why I chose
this mode for the IR. One reason was memory--EGA takes a whole lot
less than VGA, even in 16-color mode. Both EGA and VGA have the same
resolution horizontally, 640 pixels. EGA has 350 pixels vertically,
while VGA has 480. In the 16-color mode, VGA is not really that much
better than EGA. To get those spectacular photo-realistic images that
you see on some VGA screens, you need a 256-color mode. Standard VGA
supports this only in the 320x200 mode--that's 350 pixels across by
200 vertically. Nice for games, but not really adequate for the
kinds of illustrations we've come to expect in books.
Of course, 256 colors at 640x480 resolution is even better, but
now we're beyond standard VGA, and are in the strange (and very
memory-hungry) world of Super VGA, which also requires special moni-
tors and cards to support these modes. No doubt in the near future
Super VGA with thousands of colors at 800x600 resolutions and beyond
will be common, and later versions of the IR will support these modes,
but for now the 16-color EGA format produces some very impressive
results while requiring lots less memory and putting much less strain
on your microprocessor.
Check the manual for your paint program before you start creating
pictures for the IR. There should be a way to start your paint pro-
gram so that it comes up in EGA mode, or a way to switch to EGA mode
from a menu. I use DeluxePaint II Enhanced. When you start this
program, it comes up with a list of screen modes and lets you select
the one you want. Some paint programs may "autodetect" the highest
mode your monitor and card will support and start in this mode, but
these programs should allow switching to another screen mode via a
menu, use of a function key, etc. Again, check your program's manual
if you're not sure.
The PCX graphics format is a very popular format for storing
graphics screens on disk. There are several other popular formats
such as GIF, CUT, IMG, GEM, TIFF, PIC and several others. PC Paint-
brush, a very popular paint program, saves files in PCX format. The
program I use, DeluxePaint II Enhanced, generally supports ILM files,
(an Amiga format) but will save in PCX mode as well. Dr. Halo saves
files in CUT format, but recent versions have a PCX option. All pic-
ture files for the IR must be in PCX format. All PCX graphics files
have a .PCX extension.
Drawing Pictures
Paint programs like PC Paintbrush or
DeluxePaint IIe let you can create impressive
graphics screens thanks to a variety of paint
tools. It took me less than ten minutes to
produce the picture to the right, which provides
a good visual representation of the concept of
a diameter. Note that the wording inside and
under the illustration is part of the picture,
and not part of the text file like these words.
Paint programs also provide a limited selection
of fonts in varying sizes for this purpose.
When you save a drawing made with a paint program, it generally
saves the ENTIRE screen, regardless of the size of the picture on
that screen. As you have probably noticed by now, the pictures I've
used are generally very small, occupying only a fraction of the screen
area. This follows the principles of good page layout and design,
which recommends frequent use of smaller pictures placed in varying
positions with generous amounts of "white space" between the text and
the illustration. (It also save heaps of hard disk space!)
Most paint programs have some sort of "cut and paste" tool which
lets you "cut" a portion of the drawing area, move it to another lo-
cation, then "paste" it there. These programs generally give you the
option of saving these "cut-outs" as small graphic disk files. Both
PC Paintbrush and DeluxePaint IIe let you save "cut-outs" as PCC
files. It turns out that .PCC files are really just small .PCX files,
so all you have to do is rename them with the DOS "rename" command.
For example, to change PICTURE.PCC to PICTURE.PCX, type
ren picture.pcc picture.pcx
and press ENTER. Now your picture is ready to be displayed in the IR
by specifying name, coordinates and page number in the document's FIF
file.
However, there is one more point to be made when you're
creating pictures for the IR with a paint program. It has to do
with palettes.
Palettes
The EGA mode that the IR uses will display a maximum of 16
colors on the screen at one time, from a maximum of 64. The
"default" or startup palette for this mode consists of the 16
colors shown at the bottom right. Most paint programs give you the
option of altering the palette so you can select another set of 16
colors. Do not do this. Stick with the default palette below if
you intend to use the picture in the IR. The IR is set up to use
the default palette. While it will display a picture with a custom
palette, the colors will revert back to the default colors, which
could make your pictures look
strange indeed. This may seem DEFAULT PALETTE FOR EGA MODE
limiting at first, but this
palette includes the primary
colors and is sufficient for
most purposes. Note that the
default background color for
the IR is light cyan, not,
white, so you may want to make
your picture background this color if you want the picture to "blend
in" with the text background and look as if it were "printed on the
page" along with the text.
Pictures from Other Sources
It is not always necessary to create your illustrations from
scratch. If, like me, you lack natural art talent, then you will
come to rely on a variety of sources of ready-made art that you
can either use intact or load into your paint program and alter to
your needs. Three common sources of artwork are BBS pictures, clip
art and scanned art.
BBS Pictures
If you're a modem jockey and frequent the electronic bulletin
boards (BBSs), the you're probably aware that there are thousands
of public domain pictures, some of them quite beautiful, available
for downloading. I don't use a lot of these for several reasons.
First, many of them are not in PCX format. The majority are in GIF
format, especially those on CompuServe. You need a graphics conver-
sion program to convert formats like GIF and IMG to PCX. I use a
program called HIJAAK from Inset Systems. It's about $100 through
mail order. But even if you find PCX images to download, many will
be in VGA 256-color or some other mode. Of those that do come in EGA
16-color mode, many have custom palettes. Finally, if you live in a
rural area like I do, you can burn up a real pile of bucks quickly
downloading lots of pictures, most of which you can't use. So I
personally avoid this source of artwork. But that doesn't mean you
should. If you have a free BBS that can be reached with a local
call, by all means take advantage of it. There's gold in them
thar phone lines!
PC Clip Art
Clip art is generally a collection of black-and-white line
drawings used for publications such as newspapers, magazines and
newsletters. These tend to be smaller drawings that represent
categories such as business topics, people, buildings, industrial
and office equipment, common signs and banners, and a variety of
cartoon characters. Almost every desktop publishing program comes
with a collection of clip art. Some clip art collections for the
PC are sold commercially, others are available through shareware,
and can be found in vendor catalogs such as PC-SIG, The Software
Labs, Public Brand Software, etc.
If you purchase clip art for use with the IR, be aware of two
things. First, the files must be in PCX mode (unless you have a
conversion program). Second, check the copyright for the program
or art collection. Some clip art collections have copyrights which
limit their use to personal, home or business presentation projects.
If you intend to distribute your IR masterpiece for profit, be care-
ful not to violate copyrights.
Scanned Art
A scanner is a piece of hardware that can transfer images on
paper to graphic images for the PC. There are two kinds, flatbed
and hand scanners. Flatbed scanners transfer entire 8 1/2" x 11"
paper images at a time and generally cost around $800-$1000 dollars.
Hand scanners, like the name implies, are handheld scanners that can
scan in an area about 4 1/2" wide by 10" to 20", depending on a num-
ber of factors. The advantage of hand-held scanners is their low
cost. You can get one for just under $100, and
they are well worth the investment. A black-
and-white scanner is all you really need (the
color ones are much more expensive), since you
can load the scanned picture into your paint
program, "clean it up" and color it until it
is exactly what you want. With a scanner you
can not only scan in pictures you have drawn
in marker or pen, but you can also copy images
from books, magazines and newspapers.
Of course, you will have to be careful about using copyrighted
material, so this is where clip art books are invaluable. Many of
the pictures I used for the manuals you are reading came from one
book of copyright-free designs. Dover Publications puts out a whole
series of these clip art books, all of them copyright-free, that just
might serve 90% or more of your artwork needs. Of course, you will
need a scanner, but $99 for a scanner is far less expensive than
hiring an artist.
There are color hand scanners for about $300-$400, but I haven't
used any of these. These more expensive scanners are generally de-
signed to take advantage of the 256-color VGA mode, or feature 32 or
64 "gray scales" to make scanned black-and-white photos retain their
realistic attributes. Keep in mind that the IR does not support
these higher video modes as yet, so if you're considering a scanner
mainly for use with the IR, the cheapest hand scanners are probably
your best bet. I have a DFI scanner. Other good brands are Mustek,
Logitech, The Complete series, and Mars scanners. A magazine like PC
SOURCES has dozens of ads for mail order houses where you can get
good prices and service.
Because it is so easy to produce electronic books
for the IR, I'm willing to bet that within a year or
two a significant body of works will emerge. Maybe
yours will be the next IR best seller! Be sure to
read the MONEY.DOC file for details on user, author
and proprietary levels of registration.
<<END OF ARTICLE>>>