[comp.text.tex] TeXMaG V5N2

NABTEXM@TAMVENUS.BITNET (TeXMaG --- The TeX Magazine) (03/07/91)

 
 
               =====//=====   \\   //                 ____
                   //          \\ //   |\    /|     //
                  //  //======  \V/    ||\  //|     \\
                 //  //        // \\   || \// |   /\ \\  ===\
                //  //====    //   \\  ||     |  // \ \\     |
               //  //        //     \\ ||     | //===\ \\___/
                  //=======                    //     \
 
 
   Volume 5                                                        Number 2
 
                     A Mostly Unofficial Publication for
                     Users of the TeX Typesetting System
 
 
 
 
 
 
 
 
Contents
 
Departments
  \footnote{}........................................................2
  Letter to the Editor...............................................3
  ToolBox............................................................4
Articles
  Accented Characters with DEC Character Set.........................5
  \news{TeX Primer}..................................................6
 
 
 
 
 
 
 
 
 
 
 
 
TeXMaG Volume 5 Number 2                                        page 2
_______________________________________________________________________________
|                                                                             |
|                    \footnote{Reader Support, Surprises}                     |
|_____________________________________________________________________________|
 
I must thank the readers for this issue! Indeed, article submissions
were flowing with regularity (at least compared with previous issues)!
Thanks to all of you for your help!
 
My fellow TeXMaG'ers are in the process of dreaming up a revolutionary
scheme for TeXMaG. From the beginning, there has been an ongoing
debate as to whether TeXMaG should be in TeX or left as a text file.
Many say they enjoy the online reading (and the paper costs money),
while others would rather have it TeXed all nice and neat on their
desks! Well we are commencing with a plan that should make both parties
happy, namely, a macro which will interpret TeXMaG almost exactly as
you see it each month, yet TeXable with the appropriate TEXMAG.TEX
macro for even more aesthetically pleasing results!!
 
Stay tuned for this next month...
 
-neil
 
 
 
 
 
 
 
 
 
TeXMaG Volume 5 Number 2                                        page 3
_______________________________________________________________________________
|                                                                             |
|                            Letter to the Editor                             |
|_____________________________________________________________________________|
 
 
We haven't had a cumulative index of TeXmag contents since V3N1.
Couldn't this be made an annual event?
 
Chris Thompson
JANET:    cet1@uk.ac.cam.phx
Internet: cet1%phx.cam.ac.uk@nsfnet-relay.ac.uk
 
[Hmmm...yes...I'd forgotten about that. Look for it soon, maybe as
an issue all to itself. The filenaming scheme should be TEXMAG.VvNn
for a normal issue and perhaps TEXMAG.VvIDX for an index of that
volume. -ed]
 
 
 
 
 
 
 
 
 
TeXMaG Volume 5 Number 2                                        page 4
_______________________________________________________________________________
|                                                                             |
|                               The ToolBox                                   |
|_____________________________________________________________________________|
 
by Raymond Chen
 
I was challenged to write a macro which, given a number, produces the
translation of the number into English, suitable for writing checks.
For example,
 
   \inwords{163} dollars and \inwords{84} cents
 
should print out the phrase you will see on a check from DEK if you find
a bug in TeX.
 
Of course, the underlying algorithm is closely tied to the English
language.  For most languages, the only necessary changes will be
to the macros which print numbers less than 100.  (And, of course,
changing the words `thousand', `million' and `billion' as appropriate.)
 
[I REALLY like this one! The only deficiency, as I see it, is if
\inwords is used at the beginning of a sentence. Could we have a
\capinwords to capitalize the first letter of the result?  -ed.]
 
% inwords.tex -- convert a number into words (in English)
%
% Usage:  \inwords{...}
%
%   where ... is the number to be converted.
%
% Example:
%
%  The number \inwords{314159265} is very large.
%
% produces
%
%  The number three hundred fourteen million one hundred fifty-nine
%  thousand two hundred sixty-five is very large.
%
%
% Bugs:  Some versions of TeX (produced by web2c) erroneously claim that
%            \count0=2
%            \multiply\count0 by 1000000000
%        generates an overflow error.  It shouldn't; the result is still
%        within the range of a count variable.  Hence, the \inwords
%        macro may generate overflow errors if you try to print out
%        numbers greater than or equal to 2 billion.
%
\catcode`\@=11
 
\def\undertwenty#1{\ifcase#1\or one\or two\or three\or four\or five\or
    six\or seven\or eight\or nine\or ten\or eleven\or twelve\or thirteen\or
    fourteen\or fifteen\or sixteen\or seventeen\or eighteen\or nineteen\fi}
 
% The careful sidestepping involved in \count@=#1 \allocationnumber=\count@
% is to make sure the right thing happens, even if #1=\count@ or
% #1=\allocationnumber.
%
% We use \allocationnumber as a scratch count variable.  It and \count@
% are always used inside a group, so their original values will be
% restored when the macros finish their job.
 
\def\underhundred#1{\ifnum#1<20 \undertwenty{#1}\else
  {\count@#1\relax \allocationnumber\count@ \divide\count@ 10
   \ifcase\count@ \or\or twenty\or thirty\or forty\or fifty\or sixty\or
           seventy\or eighty\or ninety\fi
   \multiply\count@ 10
   \advance\allocationnumber by-\count@
   \ifnum\allocationnumber>\z@ -\undertwenty\allocationnumber\fi
  }\fi}
 
\def\numbersplit#1#2#3#4#5{%
  \ifnum#5<#1 #2{#5}\else
  {\count@#5\relax \allocationnumber\count@ \divide\count@ #1\relax
   #3\count@#4\multiply\count@ #1\relax
   \advance\allocationnumber-\count@ #2\allocationnumber
  }\fi}
 
\def\underthousand{\numbersplit{100}\underhundred\undertwenty{ hundred }}
\def\undermillion{\numbersplit\@m\underthousand\underthousand{ thousand }}
\def\underbillion{\numbersplit{1000000}\undermillion\underthousand{ million }}
\def\inwords{\numbersplit{1000000000}\underbillion\underthousand{ billion }}
 
\catcode`\@=12
 
% End of inwords.tex
 
 
 
 
 
 
 
 
 
TeXMaG Volume 5 Number 2                                        page 5
_______________________________________________________________________________
|                                                                             |
|                    Accented Character Support with TeX 3.0                  |
|_____________________________________________________________________________|
 
by  Andreu Pacheco
 
Profitting from the new features of TeX 3.0, we describe here how to
use machine-dependent character sets (DEC, IBM,...) in TeX or LaTeX
documents. Donald Knuth originally designed TeX to use only 7-bit
character text, which, among other things, prevents many non-english
users from being able, while editing, to see the document in a more
familiar way.
 
    There is not a standard 8-bit character set used in the computer
industry yet, and documents using those characters are, in principle,
difficult to interchange between different computers. TeX provides an
alternative possibility by combining different characters, i.e. \'a,
\"e, \^o, ... using only the standard ASCII set. This suffices, but
documents with many accented characters are annoying to type
and work with. A first solution is to write a simple program to
convert accented characters to the appropriate equivalent in TeX
(which can be useful if we want to send the document to some other
computer system using e-mail), but now with TeX 3.0 we can write
directly accented letters in our documents with no intermediate
conversion.
 
 
  At our site we have defined the full DEC Multinational Character set
in this way. We append to this note the TeX macro to support this
character set, perhaps the 8-bit codes are lost, but it would be easy
to rewrite them once in the local computer editor. This procedure
could be applied to any other vendor's character set.
 
 
[Editor's note: I have withheld the listing of the macro as I was
afraid of what it might do over the networks to all the different
sorts I'm sending this publication. Therefore, I would request that
if you are interested in seeing this code (and I strongly recommend
that those of you using DEC's Multinational Character set check
into this) send inquries directly to the author at:
 
                   Andreu Pacheco / User Support
                   Computer Center
                   Universitat Autsnoma de Barcelona
                   08193 Bellaterra (Barcelona) SPAIN
                   CCAPP@EBCCUAB1     (EARN/Bitnet)
                   CCAPP@CCUAB.UAB.ES (Internet style)
 
thanks! -ed.]
 
 
 
 
 
 
 
 
 
TeXMaG Volume 5 Number 2                                        page 6
_______________________________________________________________________________
|                                                                             |
|                   \news{Announcing: TeX Primer Available}                   |
|_____________________________________________________________________________|
 
by Joe St Sauver
 
I have prepared a little introduction to using (plain) TeX and DVIPS
that has been well received by our users here at the University of
Oregon. It basically endeavors to provide a more approachable
introduction to TeX than is available from some of the other more
rigorous books (such as TeX for the Impatient and Knuth's own
TeXbook)... While it is couched in the context of using TeX on the VAX
under VMS, the majority of the document should still be of some value
to beginning non-VMS users of TeX.
 
You all are welcome to a copy of it, if you want one, at no charge.
Feel free to modify it to suit your local circumstances and to
reproduce it at will, just please don't sell it for profit. (I would
also appreciate some acknowledgment of authorship in any verbatim or
substantially derivative copies.)
 
To help you decide whether or not you want to get a copy of it, the
writeup's table of contents is reproduced below:
 
 
PREFACE
 
CONTENTS
 
I. INTRODUCTION
  What is TeX?
  Why Should I Bother to Learn to Use TeX?
  What Can I Expect of the Rest of This Write-Up?
 
II. ENTERING TEXT (OTHER THAN TABLES AND EQUATIONS) IN TeX
  Text Which is Entered Normally in TeX
  Special Characters in TeX
  Structuring The Text You Enter; Making Paragraphs
  Comments
  Font Size
  Font Style
  Underlining
  Line Spacing (Double-Spacing, Skipping a Single Line, etc.)
  Block Quotations
  Centering Text (For Headings, etc.)
  Footnotes
  Headers and Page Numbers
  Page Size; Margins
  Leaving Space for Insertions; Forcing Page Breaks
  Ending Your TeX Document
 
III. TYPESETTING TABULAR MATERIAL
  Using Tabs
  Typesetting Formal Ruled Tables
  Beginning to Decode the Table-Building Commands
  Table Template
  Table Headings
  Table Body
 
IV. TYPESETTING EQUATIONS
  Typesetting Equations is Different From Typesetting Text
  Embedded vs. Displayed Equations
  Numbering Equations
  Aligning and Numbering Multiple Equations
  Some Basic Information about Entering Equations
  Greek Letters
  Script Letters
  Common Mathematical Operators
  Symbols for Logic and the Algebra of Sets
  Subscripts, Superscripts, and Combinations Thereof
  Math Accents
  Roman Font Mathematical ``Words''
  Limits
  Radicals: Square Roots, Cube Roots, etc.
  Making Large Fractions
  Making Large Grouping Operators
  Combination Notation
  Matrices
  Case Structure
  Summations
  Integrals
  Definitions
 
V. TeX ON THE OREGON VAX 8800
  The TeX Execution Cycle
  Building Your TeX Document Using An Editor
  Defining TeX
  Running TeX
  Decoding TeX Errors
  The Most Common TeX Errors
  Converting Your .DVI File Into PostScript
  DVIPS Features
  Printing PostScript Output on the VAX's Xerox 4045/160
 
VI. CONCLUSION
  Where From Here?
  What If I Get Stuck?
 
INDEX
 
APPENDICIES:
  A: Complete Sample Text-Oriented TeX Document
  B: Complete Sample Technical TeX Document
  C: Sample University of Oregon Thesis Pages from the ``Grey Book''
  D: Some Sample Pages From a Survey Typeset in TeX
  E: Sample Resume Typeset in Plain TeX
  F: Sample TeX Landscape-Mode Overhead Made Using PostScript Fonts
  G: Demonstration of the Incorporation of PostScript Graphics
 
 
Note that it doesn't cover previewing, use of LaTeX or any of the
various third-party TeX packages; it is strictly plain vanilla TeX and
DVIPS all the way.
 
The source files for "Using TeX on the VAX to Typeset Documents: A
Primer" live on DECOY.CC.UOREGON.EDU (128.223.32.19). Connect to it
via FTP, login as username anonymous, with your e-mail address for the
password.
 
If you are going to build this primer on a VAX running VMS, just mget
all the files, edit MAKE_PRIMER.COM as required to suit your local
circumstances, and say @MAKE_PRIMER to generate a copy of it.
 
If you are running TeX on a UNIX system, or on a PC or a Mac (or
whatever), take a look at MAKE_PRIMER.COM to see the steps involved in
making the document. There isn't anything happening that you couldn't
do "the hard way," i.e., manually, if that's your only option.
 
Note that you will need to have TeX and DVIPS to be able to produce a
copy of my writeup. If you use some other DVI-to-whatever converter,
some of the appendicies that exploit \specials unique to DVIPS
probably won't work, but everything else should be okay.
 
You'll need about 1800 VAX/VMS (512 byte) disk blocks for the raw
files; if space is tight you can omit Appendix G and the accompanying
PostScript files included as a demonstration of using \special's to
include PostScript graphics files. (DISSPLA2.PS, for example, accounts
for 637 blocks all by itself.)
 
After processing, you'll probably find that you've used up about 5500
blocks.
 
Anyhow, that's about it. If you enjoy my little primer and find it
useful, let me know. If you catch any errors, please also let me know
about that...
 
Joe St Sauver
Statistical Programmer and Consultant
University of Oregon Computing Center
joe@oregon.uoregon.edu or joe@oregon
 
 
 
 
 
 
 
 
 
 
 
______________________________________________________________________
TeXMaG is an electronic magazine available free of charge to all
interested parties reachable by electronic mail. It is published
monthly. Letters to the editor may be sent to NABTEXM@TAMVENUS
(BITNet) or NABTEXM@VENUS.TAMU.EDU (Internet) and may be published in
a future issue.
 
    Publisher:             Academic Computing Services of
                                 Texas A&M University
 
    Managing Editor:             Neil Burleson
    TeX Consultant:              Robert Nilsson
    Copy Editor:                 Neil Burleson (this issue)
 
    Chief Consultant:            John McClain, Ph.D
 
  SUBSCRIPTIONS:
   CDNnet: Send a note to <list-request@relay.cdnnet.ca> asking to receive
         TeXMaG.
   JANET: Send a note to Peter Abbott, <Abbottp@Uk.Ac.Aston> asking to
         receive TeXMaG.
   All others: Send the following command as an interactive message
         (Bitnet) or as a single-line mail message to LISTSERV@UICVM
         or LISTSERV@UICVM.UIC.EDU:
               SUBS TEXMAG-L Your_Full_Name.
         If you have difficulty doing this, send a note to Neil Burleson
         <NABTEXM@VENUS.TAMU.EDU>.
 
  SUBMISSIONS:
   Please send submissions to <TEXMAG-L@UICVM.UIC.EDU> or
   <TEXMAG-L@UICVM>; they will automatically be forwarded to the
   editor.
 
  BACK ISSUES:
   Back issues may be FTP'd from YMIR.CLAREMONT.EDU from the directory
   [ANONYMOUS.TEX.PERIODICALS.TEXMAG]
 
   Back issues may also be FTP'd from SUN.SOE.CLARKSON.EDU from the
   directory pub/texmag. Users without FTP access may request back
   issues from the Clarkson repository by sending a mail message
   to <archive-server@sun.soe.clarkson.edu> with the form
         path A_MAIL_PATH_FROM_CLARKSON_TO_YOU
         get texmag texmag.V.NN
   where V is the volume number and NN is the issue number. Including
   a line "index texmag" in the message will return a list of back
   issues available.
 
   Janet users may obtain back issues from the Aston archive.
   Those who are on SPAN can get in touch with Max Calvani at
   39003::CALVANI for infos about SPAN archive.
 
\bye bye!
%                            End of TeXMaG
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%