1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
|
=====//===== \\ // ____
// \\ // |\ /| //
// //====== \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 Aut%noma 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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|