From 6b05df3643318b978bcfd927040697a87fb3bf31 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Tue, 25 Mar 1997 10:53:11 +0000 Subject: detex takes as input a TeX source file and strips the TeX commands. The result is output to stdout. This is useful if you need a pure ASCII version of a TeX/LaTeX file. --- print/detex/files/patch-01 | 122 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 print/detex/files/patch-01 (limited to 'print/detex/files/patch-01') diff --git a/print/detex/files/patch-01 b/print/detex/files/patch-01 new file mode 100644 index 000000000000..74180e14f29e --- /dev/null +++ b/print/detex/files/patch-01 @@ -0,0 +1,122 @@ +--- detex.l.orig Thu Aug 12 08:54:46 1993 ++++ detex.l Mon Feb 17 23:01:15 1997 +@@ -76,7 +76,7 @@ + + "\\begin"{S}"{"{S}"document"{S}"}" {fLatex = !fForcetex; IGNORE;} + +-"\\begin" /* environment start */ {LaBEGIN LaBegin; IGNORE;} ++"\\begin" {/* environment start */ LaBEGIN LaBegin; IGNORE;} + + {S}"{"{S}"verbatim"{S}"}" { if (BeginEnv("verbatim")) + BEGIN LaEnv; +@@ -85,8 +85,8 @@ + IGNORE; + } + +-"\\end"{S}"{"{S}"verbatim"{S}"}" /* verbatim mode */ +- {BEGIN Normal; IGNORE;} ++"\\end"{S}"{"{S}"verbatim"{S}"}" {/* verbatim mode */ ++ BEGIN Normal; IGNORE;} + . ECHO; + + {W} { if (BeginEnv(yytext)) +@@ -98,11 +98,11 @@ + "\n" NEWLINE; + . ; + +-"\\end" /* absorb some environments */ {LaBEGIN LaEnd; IGNORE;} ++"\\end" {/* absorb some environments */ LaBEGIN LaEnd; IGNORE;} + "\n" NEWLINE; + . ; + +-{W} /* end environment */ { if (EndEnv(yytext)) ++{W} {/* end environment */ if (EndEnv(yytext)) + BEGIN Normal; + IGNORE; + } +@@ -110,8 +110,8 @@ + "\n" NEWLINE; + . ; + +-"\\bibitem" /* ignore args */ {LaBEGIN LaMacro2; IGNORE;} +-"\\bibliography" /* of these \cs */ {LaBEGIN LaMacro; IGNORE;} ++"\\bibitem" {/* ignore args */ LaBEGIN LaMacro2; IGNORE;} ++"\\bibliography" {/* of these \cs */ LaBEGIN LaMacro; IGNORE;} + "\\bibstyle" {LaBEGIN LaMacro; IGNORE;} + "\\cite" {CITEBEGIN LaMacro2; IGNORE;} + "\\documentstyle" {LaBEGIN LaMacro; IGNORE;} +@@ -122,8 +122,8 @@ + "\\pagestyle" {LaBEGIN LaMacro; IGNORE;} + "\\ref" {CITEBEGIN LaMacro; IGNORE;} + "\\setcounter" {LaBEGIN LaMacro; IGNORE;} +-"\\verb" /* ignore \verb... */ +- { if (fLatex) { ++"\\verb" {/* ignore \verb... */ ++ if (fLatex) { + char verbchar, c; + verbchar = input(); + while ((c = input()) != verbchar) +@@ -143,33 +143,33 @@ + "\n" NEWLINE; + . ; + +-"\\def" /* ignore def begin */ {BEGIN Define; IGNORE;} ++"\\def" {/* ignore def begin */ BEGIN Define; IGNORE;} + "{" BEGIN Normal; + "\n" NEWLINE; + . ; + +-"\\(" /* formula mode */ {LaBEGIN LaFormula; IGNORE;} ++"\\(" {/* formula mode */ LaBEGIN LaFormula; IGNORE;} + "\\)" BEGIN Normal; + "\n" NEWLINE; + . ; + +-"\\[" /* display mode */ {LaBEGIN LaDisplay; IGNORE;} ++"\\[" {/* display mode */ LaBEGIN LaDisplay; IGNORE;} + "\\]" BEGIN Normal; + "\n" NEWLINE; + . ; + +-"$$" /* display mode */ {BEGIN Display; IGNORE;} ++"$$" {/* display mode */ BEGIN Display; IGNORE;} + "$$" BEGIN Normal; + "\n" NEWLINE; + . ; + +-"$" /* math mode */ {BEGIN Math; IGNORE;} ++"$" {/* math mode */ BEGIN Math; IGNORE;} + "$" BEGIN Normal; + "\n" NEWLINE; + "\\$" ; + . ; + +-"\\include" /* process files */ {LaBEGIN LaInclude; IGNORE;} ++"\\include" {/* process files */ LaBEGIN LaInclude; IGNORE;} + [^{ \t\n}]+ { IncludeFile(yytext); + BEGIN Normal; + } +@@ -192,11 +192,11 @@ +