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 >
Text File  |  1992-11-07  |  23KB  |  400 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.                         UTHORING TECHNIQUES
  7.  
  8.                              The main idea behind this program is to make
  9.                          it easy to prepare illustrated documents so you
  10.                          can concentrate on content instead of technical
  11.                          matters.  The Illustrated Reader uses a standard
  12.                          PC ROM font that could display 25 lines of text,
  13.     but the Control Panel takes up about four lines, so the IR presents
  14.     text files in screen "pages" of exactly 21 lines each.
  15.     
  16.         If you don't want any pictures in your IR document, all you
  17.     really need is a text editor or a word processor that creates pure
  18.     ASCII files.  (ASCII stands for American Standard Code for Information
  19.     Interchange in case you're curious.)  ASCII files are no big deal.
  20.     They're just pure text files with no special codes for bolding, under-
  21.     lining, italics and so on.  You can always tell if a file is in ASCII
  22.     by displaying it with the DOS "type" command.  For example, from the
  23.     DOS prompt (A:>, C:>, D:>, or whatever) if you type:
  24.     
  25.                               type readme.doc
  26.  
  27.     then press ENTER, you will see the contents of this file whiz by.
  28.     You will notice that it is pure text--no strange symbols.  This is
  29.     all the IR requires of text files.
  30.     
  31.         The ideal tool for creating text files is a TEXT EDITOR, more or
  32.     less a scaled-down word processor that programmers often use when
  33.     they're writing program code.  If you have Version 5.0 of DOS, then
  34.     you have a fairly good text editor, called EDIT.  There are several
  35.     excellent shareware text editors on the market as well.  But you can
  36.     also use a word processor such as Microsoft Word, Word Perfect, or
  37.     PC-Write.  The only requirement here is that you must save your file
  38.     in ASCII format, and most word processors allow this.
  39.     
  40.         There are two other requirements that are cosmetic--they make
  41.     your text files display better in the IR.  First, don't use TABS
  42.     or other special characters.  If you need to pad space before text
  43.     (such as indents) use spaces.  Spaces and "carriage returns" are
  44.     O.K.  (Spaces don't show, and the program strips off the carriage
  45.     returns before displaying the text.)  On the other hand, you CAN
  46.     use extended characters, like the line drawing characters so you can
  47.     have boxes and international characters (ê, á, ü £).  The IR fully
  48.     supports these "extended ASCII" characters.
  49.  
  50.         Second, although the IR will accept files as large as 4200 lines
  51.     (that's 200 screen pages!) the total lines of each file should be
  52.     a multiple of 21.  Strictly speaking, this is not necessary.  But
  53.     by being a multiple of 21, this ensures that the file will not "jump"
  54.     when the reader reaches the end of the file.  This is not as hard as
  55.     it sounds.  Just write your text as you would normally do and don't
  56.     worry about length.  When you're finished, your word processor or text
  57.     editor should display how many lines you have.  Let's say your file is
  58.     249 lines long.  The next highest multiple of 21 is 252, so all you
  59.     have to do is hit the ENTER key three times.  This puts in three
  60.     carriage returns, and makes the file 252 lines long--exactly 12 screen
  61.     pages.  So fine, Mr. Arithmetic.  How am I supposed to know when I
  62.     have a multiple of 21?  Glad you asked.  That's why I've included this
  63.     handy chart:
  64.     SCREEN-PAGE-TO-LINE-NUMBER CONVERSION CHART:
  65.     Screen page:   1  2  3  4   5   6   7   8   9  10  11  12  13  14  15
  66.     First line:    1 22 43 64  85 106 127 148 169 190 211 232 253 274 295
  67.     Last line:    21 42 63 84 105 126 147 168 189 210 231 252 273 294 315
  68.  
  69.     Screen  page:  16  17  18  19  20  21  22  23  24  25  26  27  28  29
  70.     First line:   316 337 358 379 400 421 442 463 484 505 526 547 568 589
  71.     Last Line:    336 357 378 399 420 441 462 483 504 525 546 567 588 609
  72.  
  73.     Screen page:   30  31  32  33  34  35  36  37  38  39  40  41  42  43
  74.     First line:   610 631 652 673 694 715 736 757 778 799 820 841 862 883
  75.     Last line:    630 651 672 693 714 735 756 777 798 819 840 861 882 903
  76.  
  77.     Screen  page:  44  45  46  47   48   49   50   51   52   53   54   55
  78.     First line:   904 925 946 967  988 1009 1030 1051 1072 1093 1114 1135
  79.     Last Line:    924 945 966 987 1008 1029 1050 1071 1092 1113 1134 1155
  80.  
  81.     Screen  page:   56   57   58   59   60   61   62   63   64   65   66
  82.     First line:   1156 1177 1198 1219 1240 1261 1282 1303 1324 1345 1366
  83.     Last Line:    1176 1197 1218 1239 1260 1281 1302 1323 1344 1365 1386
  84.     (To print this chart, Press F2, select Option 2, then Option 3.)
  85.  
  86.     This chart goes up to 66 (screen) pages, which should be a good start.
  87.     (Users who register at the Author level get a much larger version of
  88.     this chart in hardcopy.  See the MONEY.DOC file.)
  89.  
  90.         Also, end all your files with a .DOC extension if you want them
  91.     to appear on the LOAD A NEW FILE screen.  Finally, the maximum line
  92.     length should be 75 characters.  Look at some of the DOC files for 
  93.     the IR for some examples.  From the DOS prompt, just give the command
  94.     "type author.doc | more" (without the quotes) and press ENTER.
  95.  
  96.     Preparing Documents with Illustrations
  97.  
  98.         The hardest thing about making illustrated documents for the
  99.     IR is creating the pictures, a task that has nothing to do with
  100.     the IR at all.  Putting these pictures into your document is very
  101.     simple, so let's start with the easy part first.
  102.     
  103.         To display a graphic in the IR, all you have to do is create
  104.     a small text file to tell the IR where you want the picture to be
  105.     displayed.  That's it.  This file is called the Figure Information
  106.     File (FIF for short), and should have the same name as the text file
  107.     where the pictures are to go, only with a .FIF extension instead of
  108.     a .DOC extension.
  109.     
  110.         This file should be a pure ASCII file, just like the .DOC file,
  111.     so you can use your text editor or word processor to write it.  The
  112.     FIF file consists of four lines per picture, like this:
  113.     
  114.         penbook  <-- name of the .PCX file        This is the README.FIF
  115.         40  <---horizontal location (column)      file for the README.DOC
  116.         10  <---vertical location (row)           document for the IR.
  117.         1   <---page (screen page)                Each picture has four
  118.         files  ──┐                                items of information:
  119.         90       ├── info. for next               (1) the name of the
  120.         138      │   illustration                 file, without extension,
  121.         2      ──┘                                (2) the horizontal and
  122.         joek   ──┐                                (3) vertical coordinates,
  123.         470      ├── info. for next               and (4) the screen page
  124.         150      │   illustration                 on which the picture
  125.         3      ──┘                                will appear.
  126.  
  127.         When the IR loads a document for reading, it looks for an accom-
  128.     panying .FIF file.  If it finds none, it simply assumes there will be
  129.     no pictures with this document.  If it does find an .FIF file, it
  130.     reads the information and stores it for later use.  When it displays
  131.     a page, it uses that stored information to position the picture where
  132.     the author intended.  That's pretty much all there is to it.
  133.  
  134.         Of course, if you intend to have a picture on Page 3 in the lower
  135.     right hand section of the page, then you have to leave space for it
  136.     when you write your document.  When I first designed documents for
  137.     the IR for testing while I was writing the program, I had to engage
  138.     in a considerable amount of guesswork before I began to get a feel
  139.     for which coordinates mapped to which areas on the screen.  Now you
  140.     can reap the benefit of my work by consulting yet another handy chart!
  141.     (It's on the next page).  
  142.  
  143.         The picture on your PC screen consists of tiny colored dots known
  144.     as PIXELS (picture elements).  The IR uses an EGA mode which is 640
  145.     pixels across and 350 pixels high.  Exactly 49 of the bottom rows of
  146.     are used for the Control Panel.  The following chart shows this:
  147.     
  148.  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
  149.  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
  150.  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
  151. -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 056
  152.                                                                        | 070
  153.         Of course, the positions on this chart are not exact, but      | 084
  154.     they're a much better than guessing (believe me!).  The numbers    | 098
  155.     across the top represent the horizontal coordinates, and should    | 112
  156.     be read vertically.  The beginning of this sentence, for example,  | 126
  157.     is approximately 216 pixels from the left edge of the screen.      | 140
  158.                                                                        | 154
  159.         The numbers in the FIF file refer to the UPPER LEFT CORNER     | 168
  160.     of the picture.  This is where the upper left hand corner of the   | 182
  161.     picture will be when the page is displayed.  For example, the      | 196
  162.                       tools shown to the left are 40 pixels from the   | 210
  163.                       left edge of the screen, and 210 pixels from     | 224
  164.                       the top.  (Check the AUTHOR.FIF file if you      | 238
  165.                       don't believe me.)  Try this--press F2, select   | 252
  166.                       Option 3 and change the screen colors.  Now you  | 266
  167.     can see the actual outline of the picture!  You'll probably want   | 280
  168.     to print the text of this page as well, to keep for reference.     | 294
  169.  
  170.         Even with the help of the chart, it will probably take a couple
  171.     of tries to get the picture exactly where you want it.  Fortunately,
  172.     it's a pretty easy process.  Write the .FIF file, then run the IREAD
  173.     program, and select the file (the text and FIF files should have the
  174.     same name left of the period).  If the picture is not where you want
  175.     it, just leave the IR, then edit the FIF file and make the correct-
  176.     ions.  Run the IR again, and see the results.  It won't be long until
  177.     you're able to make an accurate placement with only one or two
  178.     revisions.
  179.  
  180.  
  181.     Preparing Pictures
  182.  
  183.         All pictures used in the IR must conform to two requirements.
  184.     First, they must be in EGA 16-color mode, and second, they must be
  185.     in the popular PCX format.  If you're confused, don't worry.  I'll
  186.     explain each in the next paragraphs.
  187.  
  188.         EGA stands for Enhanced Graphics Adapter, and was the first real
  189.     "high resolution" mode that supported color for the IBM and compatible
  190.     PCs.  In this age of VGA and Super VGA, you might wonder why I chose
  191.     this mode for the IR.  One reason was memory--EGA takes a whole lot
  192.     less than VGA, even in 16-color mode.  Both EGA and VGA have the same
  193.     resolution horizontally, 640 pixels.  EGA has 350 pixels vertically,
  194.     while VGA has 480.  In the 16-color mode, VGA is not really that much
  195.     better than EGA.  To get those spectacular photo-realistic images that
  196.     you see on some VGA screens, you need a 256-color mode.  Standard VGA
  197.     supports this only in the 320x200 mode--that's 350 pixels across by
  198.     200 vertically.  Nice for games, but not really adequate for the
  199.     kinds of illustrations we've come to expect in books.
  200.     
  201.         Of course, 256 colors at 640x480 resolution is even better, but
  202.     now we're beyond standard VGA, and are in the strange (and very
  203.     memory-hungry) world of Super VGA, which also requires special moni-
  204.     tors and cards to support these modes.  No doubt in the near future
  205.     Super VGA with thousands of colors at 800x600 resolutions and beyond
  206.     will be common, and later versions of the IR will support these modes,
  207.     but for now the 16-color EGA format produces some very impressive
  208.     results while requiring lots less memory and putting much less strain
  209.     on your microprocessor.
  210.  
  211.         Check the manual for your paint program before you start creating
  212.     pictures for the IR.  There should be a way to start your paint pro-
  213.     gram so that it comes up in EGA mode, or a way to switch to EGA mode
  214.     from a menu.  I use DeluxePaint II Enhanced.  When you start this
  215.     program, it comes up with a list of screen modes and lets you select
  216.     the one you want.  Some paint programs may "autodetect" the highest
  217.     mode your monitor and card will support and start in this mode, but
  218.     these programs should allow switching to another screen mode via a
  219.     menu, use of a function key, etc.  Again, check your program's manual
  220.     if you're not sure.
  221.  
  222.         The PCX graphics format is a very popular format for storing
  223.     graphics screens on disk.  There are several other popular formats
  224.     such as GIF, CUT, IMG, GEM, TIFF, PIC and several others.  PC Paint-
  225.     brush, a very popular paint program, saves files in PCX format.  The
  226.     program I use, DeluxePaint II Enhanced, generally supports ILM files,
  227.     (an Amiga format) but will save in PCX mode as well.  Dr. Halo saves
  228.     files in CUT format, but recent versions have a PCX option.  All pic-
  229.     ture files for the IR must be in PCX format.  All PCX graphics files
  230.     have a .PCX extension.
  231.     
  232.     
  233.     Drawing Pictures
  234.     
  235.         Paint programs like PC Paintbrush or
  236.     DeluxePaint IIe let you can create impressive
  237.     graphics screens thanks to a variety of paint
  238.     tools.  It took me less than ten minutes to
  239.     produce the picture to the right, which provides
  240.     a good visual representation of the concept of
  241.     a diameter.  Note that the wording inside and
  242.     under the illustration is part of the picture,
  243.     and not part of the text file like these words.
  244.     Paint programs also provide a limited selection
  245.     of fonts in varying sizes for this purpose.
  246.  
  247.         When you save a drawing made with a paint program, it generally
  248.     saves the ENTIRE screen, regardless of the size of the picture on
  249.     that screen.  As you have probably noticed by now, the pictures I've
  250.     used are generally very small, occupying only a fraction of the screen
  251.     area.  This follows the principles of good page layout and design,
  252.     which recommends frequent use of smaller pictures placed in varying
  253.     positions with generous amounts of "white space" between the text and
  254.     the illustration.  (It also save heaps of hard disk space!)
  255.     
  256.         Most paint programs have some sort of "cut and paste" tool which
  257.     lets you "cut" a portion of the drawing area, move it to another lo-
  258.     cation, then "paste" it there.  These programs generally give you the
  259.     option of saving these "cut-outs" as small graphic disk files.  Both
  260.     PC Paintbrush and DeluxePaint IIe let you save "cut-outs" as PCC
  261.     files.  It turns out that .PCC files are really just small .PCX files,
  262.     so all you have to do is rename them with the DOS "rename" command.
  263.     For example, to change PICTURE.PCC to PICTURE.PCX, type
  264.     
  265.                         ren picture.pcc picture.pcx
  266.  
  267.     and press ENTER.  Now your picture is ready to be displayed in the IR
  268.     by specifying name, coordinates and page number in the document's FIF
  269.     file.
  270.  
  271.         However, there is one more point to be made when you're
  272.     creating pictures for the IR with a paint program.  It has to do
  273.     with palettes.
  274.  
  275.     Palettes
  276.  
  277.         The EGA mode that the IR uses will display a maximum of 16
  278.     colors on the screen at one time, from a maximum of 64.  The
  279.     "default" or startup palette for this mode consists of the 16
  280.     colors shown at the bottom right.  Most paint programs give you the
  281.     option of altering the palette so you can select another set of 16
  282.     colors.  Do not do this.  Stick with the default palette below if
  283.     you intend to use the picture in the IR.  The IR is set up to use
  284.     the default palette.  While it will display a picture with a custom
  285.     palette, the colors will revert back to the default colors, which
  286.     could make your pictures look
  287.     strange indeed.  This may seem         DEFAULT PALETTE FOR EGA MODE
  288.     limiting at first, but this 
  289.     palette includes the primary 
  290.     colors and is sufficient for 
  291.     most purposes.  Note that the
  292.     default background color for
  293.     the IR is light cyan, not,
  294.     white, so you may want to make
  295.     your picture background this color if you want the picture to "blend
  296.     in" with the text background and look as if it were "printed on the
  297.     page" along with the text.
  298.  
  299.     Pictures from Other Sources
  300.  
  301.         It is not always necessary to create your illustrations from
  302.     scratch.  If, like me, you lack natural art talent, then you will
  303.     come to rely on a variety of sources of ready-made art that you
  304.     can either use intact or load into your paint program and alter to
  305.     your needs.  Three common sources of artwork are BBS pictures, clip
  306.     art and scanned art.
  307.  
  308.     BBS Pictures
  309.  
  310.         If you're a modem jockey and frequent the electronic bulletin
  311.     boards (BBSs), the you're probably aware that there are thousands
  312.     of public domain pictures, some of them quite beautiful, available
  313.     for downloading.  I don't use a lot of these for several reasons.
  314.     First, many of them are not in PCX format.  The majority are in GIF
  315.     format, especially those on CompuServe.  You need a graphics conver-
  316.     sion program to convert formats like GIF and IMG to PCX.  I use a
  317.     program called HIJAAK from Inset Systems.  It's about $100 through
  318.     mail order.  But even if you find PCX images to download, many will
  319.     be in VGA 256-color or some other mode.  Of those that do come in EGA
  320.     16-color mode, many have custom palettes.  Finally, if you live in a
  321.     rural area like I do, you can burn up a real pile of bucks quickly
  322.     downloading lots of pictures, most of which you can't use.  So I
  323.     personally avoid this source of artwork.  But that doesn't mean you
  324.     should.  If you have a free BBS that can be reached with a local
  325.     call, by all means take advantage of it.  There's gold in them 
  326.     thar phone lines!
  327.  
  328.  
  329.     PC Clip Art
  330.  
  331.         Clip art is generally a collection of black-and-white line
  332.     drawings used for publications such as newspapers, magazines and
  333.     newsletters.  These tend to be smaller drawings that represent
  334.     categories such as business topics, people, buildings, industrial
  335.     and office equipment, common signs and banners, and a variety of
  336.     cartoon characters.  Almost every desktop publishing program comes
  337.     with a collection of clip art.  Some clip art collections for the
  338.     PC are sold commercially, others are available through shareware,
  339.     and can be found in vendor catalogs such as PC-SIG, The Software
  340.     Labs, Public Brand Software, etc.
  341.     
  342.         If you purchase clip art for use with the IR, be aware of two
  343.     things.  First, the files must be in PCX mode (unless you have a
  344.     conversion program).  Second, check the copyright for the program
  345.     or art collection.  Some clip art collections have copyrights which
  346.     limit their use to personal, home or business presentation projects.
  347.     If you intend to distribute your IR masterpiece for profit, be care-
  348.     ful not to violate copyrights.
  349.  
  350.  
  351.     Scanned Art
  352.  
  353.         A scanner is a piece of hardware that can transfer images on
  354.     paper to graphic images for the PC.  There are two kinds, flatbed
  355.     and hand scanners.  Flatbed scanners transfer entire 8 1/2" x 11"
  356.     paper images at a time and generally cost around $800-$1000 dollars.
  357.     Hand scanners, like the name implies, are handheld scanners that can
  358.     scan in an area about 4 1/2" wide by 10" to 20", depending on a num-
  359.     ber of factors.  The advantage of hand-held scanners is their low
  360.     cost.  You can get one for just under $100, and
  361.     they are well worth the investment.  A black-
  362.     and-white scanner is all you really need (the
  363.     color ones are much more expensive), since you
  364.     can load the scanned picture into your paint
  365.     program, "clean it up" and color it until it
  366.     is exactly what you want.  With a scanner you
  367.     can not only scan in pictures you have drawn
  368.     in marker or pen, but you can also copy images
  369.     from books, magazines and newspapers.
  370.  
  371.         Of course, you will have to be careful about using copyrighted
  372.     material, so this is where clip art books are invaluable.  Many of
  373.     the pictures I used for the manuals you are reading came from one
  374.     book of copyright-free designs.  Dover Publications puts out a whole
  375.     series of these clip art books, all of them copyright-free, that just
  376.     might serve 90% or more of your artwork needs.  Of course, you will
  377.     need a scanner, but $99 for a scanner is far less expensive than
  378.     hiring an artist.
  379.     
  380.         There are color hand scanners for about $300-$400, but I haven't
  381.     used any of these.  These more expensive scanners are generally de-
  382.     signed to take advantage of the 256-color VGA mode, or feature 32 or
  383.     64 "gray scales" to make scanned black-and-white photos retain their
  384.     realistic attributes.  Keep in mind that the IR does not support
  385.     these higher video modes as yet, so if you're considering a scanner
  386.     mainly for use with the IR, the cheapest hand scanners are probably
  387.     your best bet.  I have a DFI scanner.  Other good brands are Mustek,
  388.     Logitech, The Complete series, and Mars scanners.  A magazine like PC
  389.     SOURCES has dozens of ads for mail order houses where you can get
  390.     good prices and service.
  391.     
  392.                         Because it is so easy to produce electronic books
  393.                     for the IR, I'm willing to bet that within a year or
  394.                     two a significant body of works will emerge.  Maybe
  395.                     yours will be the next IR best seller!  Be sure to
  396.                     read the MONEY.DOC file for details on user, author
  397.                     and proprietary levels of registration.
  398.  
  399.                                                      <<END OF ARTICLE>>>
  400.