\documentstyle[fancyhdg,twoside]{article}

\topmargin    -15mm
\textheight   240mm    \textwidth      152mm
\footheight     4mm    \footskip        10mm
\headheight     6mm
\parskip        2mm
\marginparsep   0mm    \marginparwidth   0mm
\oddsidemargin  6mm    \evensidemargin  -4mm
\def\strutcb{\rule[-1.5ex]{0mm}{4ex}}

\pagestyle{fancy}
\lhead[\bf fineprnt]{\sl A fine printing program for an hp+ laser printer.}
\chead{}
\rhead[\sl A fine printing program for an hp+ laser printer.]{\bf fineprnt}
\lfoot[\rm\thepage]{\sl Version 1.3}
\cfoot{}
\rfoot[\sl Version 1.3]{\rm\thepage}
\headrulewidth  0.2pt

\begin{document}

\begin{list}{}{\setlength{\rightmargin}{0mm}
               \setlength{\leftmargin}{10mm}
               \setlength{\labelwidth}{0mm}
               \setlength{\labelsep}{10mm}
               \setlength{\itemsep}{\baselineskip}
               }

\item[NAME] \ \\
      {\bf fineprnt} --- fine printing on an hp+ or compatible laser printer

\item[SYNOPSIS] \ \\
      {\bf fineprnt \em options filenames}

\item[DESCRIPTION] \ \\
      Fineprnt prints ascii or binary files in a column oriented manner on an
      hp+ or compatible laser printer. It uses a small 6pt fixed or
      proportionally spaced font downloaded before printing. The printout can be
      tuned to any paper size, portrait or landscape mode. Double sided
      printing is supported with page layout adjusted to odd (right hand side)
      and even (left hand side) pages. It is typically used to print program
      listings, readme files and the like in a very compressed form.


      Fineprnt is a stand-alone program but supports an environment variable
      and an optional configuration file.

\item[OPTIONS] \ \\
      Options and filenames
      (which can contain wildcards)
      can be given in any order, however, all options are
      processed before printing starts, and all files are printed with the same
      setting. Options must be separated by spaces.
      In the following list, \# stands for an integer
      number, ? for a single character and $\ast$ for a string of characters.
      Defaults, given in parentheses, are adjusted for standard A4 paper in
      portrait mode.
      The values for some length parameters
      are in dots, one dot being $\frac{1}{300}$inch, the resolution of
      the hp+ printer.

      Note that the area of print does not usually coincide with the physical
      size of the paper. The margin parameters, therefore, do not necessarily
      count from the borders of the sheet.

      Before printing all files are scanned to determine the number of columns 
      and lines for each file and to search for lines that may have to be 
      truncated.


      \begin{list}{}{\setlength{\rightmargin}{0mm}
                     \setlength{\leftmargin}{17mm}
                     \setlength{\labelsep}{3mm}
                     \setlength{\labelwidth}{14mm}
                     \setlength{\topsep}{0mm}
                     \setlength{\listparindent}{0mm}}

      \item[{\bf -c}\#] Number of characters per line (80). This parameter
                  controls the width of each column. When the proportional font
                  is selected the actual number of characters printed can be
                  more or less, depending on the total width being less or more
                  of that what the fixed spacing font would produce.

      \item[{\bf -l}\#] Number of lines per column (132). This parameter
                  controls the page length.

      \item[{\bf -s}\#] Number of columns per page (2).

      \item[{\bf -o}\#] Left margin in dots (175) on all pages in single sided
                  mode, or on odd sides in 2-sided mode.

      \item[{\bf -e}\#] Left margin in dots (0) on even sides in 2-sided mode.
                  If landscape mode and 2-sided printing is specified, this
                  parameter applies to the upper margin on even sides.

      \item[{\bf -u}\#] Upper margin in dots (0). If landscape mode and 2-sided
                  printing is specified, this parameter applies to the upper
                  margin on odd sides only.

      \item[{\bf -b}\#] Baselineskip in dots (24). A value less than 24 is not
                  recommended. A larger value might yield a slightly better
                  readability, but at the cost of less lines fiting on the page.

      \item[{\bf -a}\#] First page to print (1).

      \item[{\bf -z}\#] Last page to print (last page of this print job).

      \item[{\bf -t}\#] Set tab stops every \# characters (8).

      \item[{\bf -w}\#] Wrap option for lines longer than the column width:
                  \begin{list}{}{\setlength{\rightmargin}{0mm}
                                 \setlength{\leftmargin}{8mm}
                                 \setlength{\labelsep}{3mm}
                                 \setlength{\labelwidth}{5mm}
                                 \setlength{\itemsep}{0mm}
                                 \setlength{\parskip}{0mm}
                                 \setlength{\topsep}{0mm} }
                     \item[1]  Wrap lines.
                     \item[0]  Truncate lines (the default).
                     \item[-1] Continue printing beyond the column width.
                  \end{list}
\newpage
      \item[{\bf -f}\#] Frame around each column:
                  \begin{list}{}{\setlength{\rightmargin}{0mm}
                                 \setlength{\leftmargin}{8mm}
                                 \setlength{\labelsep}{3mm}
                                 \setlength{\labelwidth}{5mm}
                                 \setlength{\itemsep}{0mm}
                                 \setlength{\parskip}{0mm}
                                 \setlength{\topsep}{0mm} }
                     \item[0]  No frame.
                     \item[1]  Vertical lines as separator between columns only.
                     \item[2]  Horizontal lines above and below each column.
                     \item[3]  A box around each column (the default).
                  \end{list}

      \item[{\bf -h}\#] Header and footer for each column:
                  \begin{list}{}{\setlength{\rightmargin}{0mm}
                                 \setlength{\leftmargin}{8mm}
                                 \setlength{\labelsep}{3mm}
                                 \setlength{\labelwidth}{5mm}
                                 \setlength{\itemsep}{0mm}
                                 \setlength{\parskip}{0mm}
                                 \setlength{\topsep}{0mm} }
                     \item[0]  No header or footer.
                     \item[1]  Print filename as header only.
                     \item[2]  Print column number as footer only.
                     \item[3]  Filename as header, column number as footer.
                     \item[4]  As above, plus information on file modification
                               and the total number of columns for this file
                               (the default).
                  \end{list}

      \item[{\bf -n}\#] Option for line numbering. If a positive number is
                  specified lines are numbered consecutively, starting from 0
                  for each file, incremented by the given number. Note that
                  column 2 and higher are shifted a further 4 character spaces
                  each to the right to accommodate room for the line numbers. If
                  a negative number is given, only the innermost column of each
                  page is numbered, starting from 0 on each page and incremented
                  by the absolute value of the given number. Column alignment is
                  not changed in this case.

                  The default is 0, no line numbering.


      \item[{\bf -\#[e/o]}]  Specify one/two-sided or no printing:
                  \begin{list}{}{\setlength{\rightmargin}{0mm}
                                 \setlength{\leftmargin}{8mm}
                                 \setlength{\labelsep}{3mm}
                                 \setlength{\labelwidth}{5mm}
                                 \setlength{\itemsep}{0mm}
                                 \setlength{\parskip}{0mm}
                                 \setlength{\topsep}{0mm} }
                     \item[-2\hfill]  2-sided printing, odd sides first,
                                 prompt to print even sides
                     \item[-2e\hfill]  2-sided, even sides only (off)
                     \item[-2o\hfill]  2-sided, odd  sides only (off)
                     \item[-1e\hfill]  1-sided, but margins as for even sides
                     \item[-1o\hfill]  1-sided, margins as for odd sides,
                                 same as -1 (default)
                     \item[-0\hfill]  don't actually print, find number of
                                 columns for each file only.                   \end{list}


      \item[\bf -B?[.{]}] Dump bytes instead of ascii interpretation. The
                  character following the -B indicates:
                  X=HEX, x=hex, o=octal or b=binary representation.
                  Any other or no character defaults to ascii interpretation.
                  An optional period (.) changes any zeros in the print into
                  periods, which may improve readability in some circumstances.

      \item[\bf -P$\ast$] direct output: \\
            If a single digit is given after the -P it specifies the printer
            port, the default is 1. \\
            For any other string following -P the output is redirected (append
            mode) into a file named by the given string.


      \item[\bf -F?]  Select font,  f = fixed, p = proportional, default is f.

      \item[\bf -O?]  Page orientation, p = portrait, l = landscape (p).

      \item[\bf -N?]  To start a new file, advance
                  \begin{list}{}{\setlength{\rightmargin}{0mm}
                                 \setlength{\leftmargin}{8mm}
                                 \setlength{\labelsep}{3mm}
                                 \setlength{\labelwidth}{5mm}
                                 \setlength{\itemsep}{0mm}
                                 \setlength{\parskip}{0mm}
                                 \setlength{\topsep}{0mm} }
                     \item[l]  5 lines
                     \item[h]  to next half column
                     \item[c]  to next column
                     \item[p]  to a new page
                     \item[s]  to a new sheet
                     \item[x]  variable: if the next file fits in the same
                               column (including 5 empty separation lines), it
                               is printed there. Otherwise, the current column
                               is ended, and if the new file entirely fits in
                               one column, it is printed in the next one. If it
                               exeeds one column, printing starts on a fresh
                               page. If it exeeds on page printing starts on a
                               new sheet (which is only different from a new
                               page if 2-sided printing is active and the last
                               file ended on an odd page).
                  \end{list}

      \item[\bf -D$\ast$]  Directory containing fineprnt.cfg (.).

      \item[\bf -E$\ast$]  Disregard any characters between a form-feed and the
                  next newline character: \mbox{-Eon} switches this feature on. 
                  Any other string following -E means off (default is off).

      \item[\bf -Z$\ast$]  Recognise ctrl-Z as file terminator. -Zon
                  activates this feature, any other string after -Z means off
                  (default is off).

      \end{list}


\item[USER-DEFINED OPTIONS] \ \\
      When an option is not found under those listed above, a file fineprnt.cfg
      is searched (see under {\small FILES}) and scanned for a line whose
      first word (a string followed by one or more blank spaces) matches that
      option (stripped of the introducing character - or /). If a match is
      found, the rest of that line is parsed for options, just like command
      line options or the value of the environmental variable, with the only
      difference that nesting is not possible. Note that the name of a
      user-defined option cannot start with one of the 8 upper case letters
      B, D, E, F, N, O, P or Z. It can start with any lower case letter, but if
      it is one of a, b, c, e, f, h, l, n, o, s, t, u, w, or z, the second 
      character must not be a digit, - or +.

      This feature is thought to provide a convenient way to abbreviate a set
      of options to customise the program to individual taste or printer
      set-ups. An example: If fineprnt.cfg exists and contains the following
      line
      \begin{quote} \tt
         quer  -Ol  -l88  -u27  -s3  -2  -o85
      \end{quote}
      typing
      \begin{quote} \tt
         fineprnt  -quer  myfile
      \end{quote}
      will print myfile in landscape mode, with 88 lines per column, 3 columns 
      per page, etc. 


\item[ENVIRONMENT] \ \\
      {\tt FINEPRNT} --- a list of options processed before (and overridden by)
      command line options. The environment variable is optional.

\item[FILES] \ \\
      {\tt finepnrt.cfg} --- an optional ascii file containing sets of
      user-defined options. If the -D option is not specified, the file is
      first searched in the current directory and than in the directory
      containing fineprnt.exe. The file need not exist.

\item[FYI] \ \\
      In ascii mode formfeed characters act as a vertical tab of half a column
      distance: If the current column is less than half filled, printing 
      continues at line $\frac{l}{2}+1$, where $l$ is the number of lines per 
      column. If the current column is more than half filled, printing continues
      in the next column.

      Backspace characters are sometimes used to simulate bold printing on
      dot-matrix printers. This has no effect, however, on a laser printer. To
      follow the dot-matrix printer convention char-\b-char sequences are
      rendered by shifting the second printed character one dot to the right
      and upwards which gives the appearance of a bolder stroke width.  

      The characters of the fixed spacing font have a width of 13 dots.
      The total print width (in inch) is (for fixed as well as proportional
      mode)
      \[
        \begin{array}{ll}
          \frac{13}{300}(s(c+3)-1) & \mbox{ for } n \leq 0 \strutcb \\
          \frac{13}{300}(s(c+7)-1) & \mbox{ for } n  >   0 \strutcb
        \end{array}
      \]
      where $c$ is the number of characters per column, $s$ is the number
      of columns per page and $n$ the value of the -n parameter. If -w-1 is
      specified this width may be exeeded by long lines.

      The maximum length of one column is
      (counted from the upper end of the area of print)
      \[
         \frac{u + b (l+1)+12}{300} \mbox{ inch},
      \]
      where $u$ is the topmargin, $l$ the number of lines per column, and $b$
      the baselineskip.


\item[RESTRICTIONS] \ \\
      Only standard printable ascii characters can be handled. Unfortunately
      {\small IBM} and {\small HP} implemented different sets of extended
      characters, requiring a remapping. Extended characters are on the list of
      things to do. I might tackle this after my return to Europe.

\item[LIMITATIONS] \ \\
      The maximum number of charaters per line is 511. The maximum length of a 
      command line is 128 characters. The number of files to be printed is only 
      limited by the amount of memory available to store their names.

      The total number of characters on a normal A4 page can be {\small 20,000}
      or more. A page with little white space (as it may occur when using the
      -B option) can exhaust the printer's memory, which results in a {\tt page
      too complex} error on the printer. Apart from adding memory to the
      printer, the only remedy is to reduce the number of total characters per
      page using the -c, -l, or -s options.

\item[CAVEATS] \ \\
      The program has only been tested on {\small 8086}, {\small 80286} and
      {\small 80386} processors, under {\small DOS~3.2} and {\small 3.3} and
      with the following printers: hp3, Epson {\small GQ-3500} and Dataproducts
      {\small LZR-1230}, the latter two emulating an hp+. It should run under 
      any {\small DOS~2.0} or higher. 


\item[SHAREWARE] \ \\
      If you use fineprnt beyond an evaluation period, send \$20 to the
      Trees-For-Life people, Greenpeace or any other environment protection
      organisation of your choice. If you don't use this program to print your
      ascii files, send 1 cent for each page you print to Trees-For-Life anyway.
      Fineprnt is free if used to print on recycled paper. If you don't comply
      with this rules, you must plant one tree for each 50 pages you print.

\item[AUTHOR] \ \\
      J\"org Hartmann

      \begin{tabular}{l}
         FIAMS, Flinders University of South Australia, Bedford Park SA 5042. \\
         e-mail: mojh@research.cc.flinders.edu.au
      \end{tabular}
      \medskip
      
      \noindent
      I will be leaving Australia in early March 1991, and from April 1991 I 
      will be at 

      \begin{tabular}{l}
         Alfred Wegener Institut f\"ur Polar- und Meeresforschung \\
         Columbusstra{\ss}e, 2850 Bremerhaven, Germany.  \\
         e-mail: postmaster@vax.awi-bremerhaven.dbp.de
      \end{tabular}

\end{list}

\vfill

\noindent Copyright \copyright\ 1990, 1991 J\"org Hartmann.
\end{document}
