Re: alternating tags in a list?

Subject: Re: alternating tags in a list?
From: Sebastian Rahtz <s.rahtz@xxxxxxxxxxxxxx>
Date: Wed, 16 Dec 1998 11:13:27 +0000 (GMT)
Paul Prescod writes:
 > There will never be a program that can take an arbitrary TeX document and
 > extract the words from it reliably. Never, ever, ever. Not just unlikely
 > -- impossible.
and he cites Dan Connolly as saying:

 For example, I conjecture that it is impossible to write a program
 that will extract the third word from a TeX document.

These are both non-starters as claims, because there is no formal
definition of what "words" are! However.

David Carlisle's `challenge text'

Fjfi71PAVVFjbigskipRPWGAUU71727374 75,76Fjpar71727375Djifx
RrhC?yLRurtKFeLPFovPgaTLtReRomL;PABB71 72,73:Fjif.73.jelse
B73:jfiXF71PU71 72,73:PWs;AMM71F71diPAJJFRdriPAQQFRsreLPAI
I71Fo71dPA!!FRgiePBt'el@ lTLqdrYmu.Q.,Ke;vz vzLqpip.Q.,tz;
;Lql.IrsZ.eap,qn.i. i.eLlMaesLdRcna,;!;h htLqm.MRasZ.ilk,%
s$;z zLqs'.ansZ.Ymi,/sx ;LYegseZRyal,@i;@ TLRlogdLrDsW,@;G
LcYlaDLbJsW,SWXJW ree @rzchLhzsW,;WERcesInW qt.'oL.Rtrul;e
doTsW,Wk;Rri@stW aHAHHFndZPpqar.tridgeLinZpe.LtYer.W,:jbye

is valid TeX, and most TeX->XX converts fall over on it badly, but a
proper TeX->XX converter has no real problems.

It is, of course, possible to have a program that 100% reliably parses
TeX code and emits text in other formats. You simply take the TeX code
and extend it! Omega is an example of this - it has a mode in
which it writes out math expressions as MathML, and it can naturally
parse any TeX, because it *is* TeX.[1]

Sorry to be off topic for most people, but we TeXxies have an
instinctive defence instinct

Sebastian Rahtz

[1] ok so its unfinished, and this isnt true, but the principle holds.

 XSL-List info and archive:

Current Thread