diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /support/tr2latex/testfile |
Initial commit
Diffstat (limited to 'support/tr2latex/testfile')
-rw-r--r-- | support/tr2latex/testfile | 230 |
1 files changed, 230 insertions, 0 deletions
diff --git a/support/tr2latex/testfile b/support/tr2latex/testfile new file mode 100644 index 0000000000..909b6c83eb --- /dev/null +++ b/support/tr2latex/testfile @@ -0,0 +1,230 @@ +.ds AA Test Troff String +.nr VS 12p +.DA +.ND +.EQ +delim $$ +gsize 11 +define dC "delta C" +define xx 'x sup x' +define B 'bold B' +define (( 'left (' +define )) 'right )' +define ov 'over' +.EN +.ds CF % +.ds LH Al-Yahya +.ds RH troff to LaTeX translator +.TL +Testing the troff-to-LaTeX translator +.AU +Kamal Al-Yahya +.AI +Stanford University +.AB +This file demonstrates the use of \fBtr2latex\fR which translates +documents written in troff to a LaTeX style. +Examples are given to show what the translator can do. +.AE +.TS +allbox; +cfI s s +c cw(1i) cw(1i) +lp9 lp9 lp9. +New York \ +Area Rocks +Era Formation Age (years) +Precambrian Reading Prong >1 billion +Paleozoic Manhattan Prong 400 million +Mesozoic T{ +.na +Newark Basin, incl. +Stockton, Lockatong, and Brunswick formations; also Watchungsand Palisades. +T} 200 million +Cenozoic Coastal Plain T{ +On Long Island 30,000 years;Cretaceous sediments redepositedby recent glaciation. +.ad +T} +.TE +.NH 1 +Section +may be several lines +.LP +Li Eur\*Cop\*`an \*:A\*~z \*(AA lingu\*^es es mem\(embres del sam famili\*'e. +Lor separat existentie es un myth. +Por scientie, musica, sport etc, litot Europa usa li sam vocabular. +Li lingues differe solmen in li grammati\*,Ca, li pronunciation e li plu commun vocabules. +Omnicos directe al desirabilite de un nov lingua franca: On refusa continuar payar custosi traductores. +At solmen va esser necessi far uniform grammatica, pronunciation e plu sommun paroles. +Ma quande lingues coalesce, li grammatica del resultant lingue es plu simplic e regulari quam ti del coalescent lingues. +Li nov lingua franca va esser plu simplic e regulari quam li existent Europan lingues. +.PP +.NH 2 +SubSection +.LD +.TS +tab(&); +l l. +T{ +It va esser tam simplic quam Occidental in fact, it va esser Occidental. +A un Angleso it va semblar un simplificat Angles, quam un skeptic Cambridge amico dit me que Occidental es. +Li Europan lingues es membres del sam familie. +Lor separat existentie es un myth. +T} & T{ +Por scientie, musica, sport etc, litot Europa usa li sam vocabular. +Li lingues differe solmen in li grammatica, li pronunciation e li plu commun vocabules. +Omnicos directe al desirabilite de un nov lingua franca: On refusa continuar payar custosi traductores. +At solmen va esser necessi far uniform grammatica, pronunciation e plu sommun paroles. +T} +.TE +Por scientie, musica, sport etc, litot Europa usa li sam vocabular. +Li lingues differe solmen in li grammatica, li pronunciation e li plu commun vocabules. +.DE +Adjust right +.LP +.\"ad r +Omnicos directe al desirabilite de un nov lingua franca: +On refusa continuar payar custosi traductores. +At solmen va esser necessi far uniform grammatica, +pronunciation e plu sommun paroles. +.\"ad +.LP +.NH 2 +Special Characters +.TS +tab(,),center box linesize(2); +l l l l l l l l l l l. +\(em, \e(em, , \(sc, \e(sc, , \(ib, \e(ib, , \(hy, \e(hy +\(ul, \e(ul, , \(ip, \e(ip, , \(bu, \e(bu, , \(sl, \e(sl +\(if, \e(if, , \e(sq, \e(sq, , \(ts, \e(ts, , \(pd, \e(pd +\(ru, \e(ru, , \(sr, \e(sr, , \(gr, \e(gr, , \(14, \e(14 +\(rn, \e(rn, , \(no, \e(no, , \(12, \e(12, , \(>=, \e(>= +\(is, \e(is, , \(34, \e(34, , \(<=, \e(<=, , \(pt, \e(pt +\(fi, \e(fi, , \(==, \e(==, , \(es, \e(es, , \(fl, \e(fl +\(|=, \e(|=, , \(mo, \e(mo, , \(ff, \e(ff, , \(ap, \e(ap +\(br, \e(br, , \(Fi, \e(Fi, , \(!=, \e(!=, , \(dd, \e(dd +\(Fl, \e(Fl, , \(->, \e(->, , \(rh, \e(rh, , \(de, \e(de +\(<-, \e(<-, , \(lh, \e(lh, , \(dg, \e(dg, , \(ua, \e(ua +\(bs, \e(bs, , \(fm, \e(fm, , \(da, \e(da, , \(or, \e(or +\(ct, \e(ct, , \(mu, \e(mu, , \(ci, \e(ci, , \(rg, \e(rg +\(di, \e(di, , \(bv, \e(bv, , \(co, \e(co, , \(+-, \e(+- +\(lf, \e(lf, , \(pl, \e(pl, , \(cu, \e(cu, , \(rf, \e(rf +\(mi, \e(mi, , \(ca, \e(ca, , \(lc, \e(lc, , \(eq, \e(eq +\(sb, \e(sb, , \(rc, \e(rc, , \(**, \e(**, , \(sp, \e(sp +.TE +.sp +The Macros \e(*a - \e(*w for small greek letters and \e(*A - \e(*W for upper greek letters. +.TS +tab(,); +l l l l l l l l l l l l l l l l l l l l l l l l. + a, b, g, d, e, z, y, h, i, k, l, m, n, c, o, p, r, s, t, u, f, x, q, w +\(*a,\(*b,\(*g,\(*d,\(*e,\(*z,\(*y,\(*h,\(*i,\(*k,\(*l,\(*m,\(*n,\(*c,\(*o,\(*p,\(*r,\(*s,\(*t,\(*u,\(*f,\(*x,\(*q,\(*w +.sp + A, B, G, D, E, Z, Y, H, I, K, L, M, N, C, O, P, R, S, T, U, F, X, Q, W + \(*A,\(*B,\(*G,\(*D,\(*E,\(*Z,\(*Y,\(*H,\(*I,\(*K,\(*L,\(*M,\(*N,\(*C,\(*O,\(*P,\(*R,\(*S,\(*T,\(*U,\(*F,\(*X,\(*Q,\(*W +.TE +.PP +First let's test some equation written for the +.B eqn +preprocessor: +.EQ (1) +2 left ( 1 ~+~ sqrt{omega sub i+1 + zeta -{x+1} over {THETA +1} y + 1} right ) +~~~=~~~ half +.EN +.EQ +X + a >= a SIGMA +.EN +.EQ +left [ +matrix { + ccol { e sub 1 above . above . above e sub i above . above . above e sub N } +} +right ] sub n+1 ~~=~~ y + 1 +.EN +.EQ +bold X + roman a ~>=~ +a under hat fwd 20 sum from i to N lim from {x -> k} dC +.EN +.EQ +(( "speed" times "time" = "distance travelled" )) +.EN +.EQ +beta tilde i >= zeta dC +.EN +.EQ +GAMMA == PI -> upsilon fat xi +.EN +.EQ +G(z) ~=~ e sup { ln ~ G(z) } + ~=~ exp left ( sum from k>=1 { S sub k z sup k } over k right ) + ~=~ prod from k>=1 e sup { S sub k z sup k /k } +.EN +.IP "" 10 +In-line math like $beta +1$ which is surrounded by math delimiters, as +defined by +.I delim +is also translated. +.R +.PP +Only simple tables are translated. Translation of more complicated tables +is painful and I won't do it now. Here is an example: +.TS +tab(&),allbox; +l rc n. +name & type & color & value +_ +$alpha$ & real & red & 2.3 +$x$ & imaginary & green & -1.2 +$a + 2$ & real & white & 0.0 +.TE +\" this is a commented text +.PP +Now we start a figure. +.Is +.sp 3i +.Ic 1 +This is the caption of the figure. +.Ie +.PP +Try some floating objects. +.br +.KS +This text should be kept in one page. i.e. a page break is discouraged here. +.KE +.br +Now a floating text. +.KF +This text should be kept in one page even if we had to move it around, +since it is a +.I floating +object. This is a boxed +.BX word. +.KE +.br +These characters are special in TeX, so they need to be escaped +in the translation % & # _, while these characters have to be +printed in math mode < > |. +.FS +This is a footnote +.FE +.PP +.Ac +Thanks to all of those who contributed by reporting bugs and suggesting +some improvements. Special thanks go to Nelson Beebe for all of his valuable +contributions and suggestions. He is responsible for making the translator +portable to other computers. He also made significant improvements to +the translation of manuals. +.Re +Knuth, D.E., 1984, The TeXBook, Addison-Wesley Publishing Company. +.Re +Lamprt, L., 1986, LaTeX: user's guide & reference manual, Addison-Wesley +Publishing Company. +.Re +Lesk, M.E., 1978, Typing documents on the UNIX +system: using the -ms macros +with troff and nroff, UNIX programmer's manual, v. 2B, sec. 3. +.Re +McGilton, H. and Morgan, R., 1983, Introducing the UNIX system, McGraw-Hill +Book Company. +.bp +.PX
\ No newline at end of file |