| 1 |
April 26, 1986 |
| 2 |
|
| 3 |
Modified -- June 4, 1986 |
| 4 |
Changed so that it automatically recognizes LaTeX source and ignores several |
| 5 |
environment modes such as array. |
| 6 |
|
| 7 |
|
| 8 |
Modified (Version 2.0) -- June 30, 1984 |
| 9 |
Now handles white space in sequences like "\begin { document }". Detex is not |
| 10 |
as easily confused by such things as display mode ends and begins that don't |
| 11 |
match up. |
| 12 |
|
| 13 |
|
| 14 |
Modified -- September 19, 1986 |
| 15 |
Added the "-e <environment-list>" option to ignore specified LaTeX |
| 16 |
environments. |
| 17 |
|
| 18 |
|
| 19 |
Modified -- June 30, 1987 |
| 20 |
Added the "-n" no-follow option, to allow detex to ignore \input and \include |
| 21 |
commands. Also changed the algorithm for locating the input files. It now |
| 22 |
interprets the "." more reasonably (i.e. it is not always the beginning of an |
| 23 |
extension). |
| 24 |
|
| 25 |
|
| 26 |
Modified -- December 15, 1988 |
| 27 |
Added handling of verbatim environment in LaTeX mode and added it to the list |
| 28 |
of modes ignored by default. Because of limitations with lex, it was |
| 29 |
necessary to shorten the names of some of the existing start states before |
| 30 |
adding a new one (ugh). |
| 31 |
|
| 32 |
|
| 33 |
Modified -- January 3, 1988 |
| 34 |
Added ignore of \$ inside $$ (math) pair. |
| 35 |
|
| 36 |
|
| 37 |
Modified (Version 2.2) -- June 25, 1990 |
| 38 |
Control sequences are no longer replaced by space, but just removed. This |
| 39 |
means accents no longer cause output words to be broken. The "-c" option was |
| 40 |
added to show the arguments of \cite, \ref, and \pageref macros. This is |
| 41 |
useful when using something like style on the output. |
| 42 |
|
| 43 |
|
| 44 |
Modified (Version 2.3) -- September 7, 1990 |
| 45 |
Fixed the handling of Ctl mode a little better and added an exception |
| 46 |
for \index on suggestions from [email protected] (KC Border). Also |
| 47 |
changed the value for DEFAULTINPUTS to coincide with a local change. |
| 48 |
|
| 49 |
|
| 50 |
Modified -- February 10, 1991 |
| 51 |
Added -t option to force TeX mode even when seeing the "\begin{document}" |
| 52 |
string in the input. |
| 53 |
|
| 54 |
|
| 55 |
Modified -- February 23, 1991 |
| 56 |
Based on suggestions from [email protected] (Francois Pinard), I |
| 57 |
added support for the SysV string routines (-DUSG), added defines for |
| 58 |
the flex lexical scanner (-DFLEX_SCANNER), changed NULL to '\0' when |
| 59 |
using it as a character (his sys defined NULL as (void *)0), changed |
| 60 |
the Makefile to use ${CC} instead of cc, and added comments about the |
| 61 |
new compile time options. |
| 62 |
|
| 63 |
|
| 64 |
Modified (Version 2.4) -- September 2, 1992 |
| 65 |
Corrected the way CITEBEGIN worked. Due to serious braindeath I had |
| 66 |
the condition wrong in the if test. It should be (fLatex && !fCite). |
| 67 |
This solves the problem a couple people reported with amstex style |
| 68 |
\ref entries. |
| 69 |
|
| 70 |
Added a preprocessing sed(1) command to replace all the long, easy to |
| 71 |
read state names with short two letter state names (SA-S?) so that lex |
| 72 |
won't overflow and I don't have to keep shortening the state names |
| 73 |
every time I add one. If a state is added, it must also be added to |
| 74 |
states.sed (order is important) along with its unique S? replacement. |
| 75 |
|
| 76 |
Added \pagestyle, \setcounter, and \verb handling from |
| 77 |
[email protected] (Khalid Sattar). Also allows invocation as |
| 78 |
"delatex" to force LaTeX mode. |
| 79 |
|
| 80 |
Applied patches from [email protected] (Philippe Queinnec) |
| 81 |
to handle nested {}s in state <LaMacro2> (\bibitem, \cite, \index). |
| 82 |
|
| 83 |
Added special ligature handling (\aa, \ae, \oe, \l, \o, \i, \j, \ss) |
| 84 |
at the suggestion of [email protected] (G. W. Pigman II). |
| 85 |
|
| 86 |
Cleaned up the comments on detex.h, added mathmatica to DEFAULTENV. |
| 87 |
|
| 88 |
|
| 89 |
Modified (Version 2.5) -- January 28, 1993 |
| 90 |
Leading spaces in macros are no longer stripped. This means |
| 91 |
"foo\footnote{ bar}" comes out as "foo bar" instead of "foobar". |
| 92 |
|
| 93 |
Fixed special ligature handling so it works in cases line {\ss} instead of |
| 94 |
just when followed by a space. |
| 95 |
|
| 96 |
|
| 97 |
Modified (Version 2.6) -- July 30, 1993 |
| 98 |
Added OS/2 port from [email protected] (Darrel R Hankerson). |
| 99 |
|
| 100 |
Added handling of leading and trailing ':' in TEXINPUTS per the latest |
| 101 |
TeX as suggested by [email protected] (J|rgen N|rgaard). |
| 102 |
|
| 103 |
Changed the way the input path is constructed in SetInputPaths() so we |
| 104 |
never try to modify a constant string. |
| 105 |
|
| 106 |
Changed the way the the ignore environment list is contructed in |
| 107 |
SetEnvIgnore() so we never try to modify a constant string. |
| 108 |
|
| 109 |
Changed the USG define to HAVE_STRING_H. |
| 110 |
|
| 111 |
Fixed the states.sed script so it only replaces "Input" in the correct |
| 112 |
places. I would like to use the \< \> word separator patterns but |
| 113 |
they are not supported by all versions of sed. This as least works. |
| 114 |
|
| 115 |
Changed the detex.c target in the Makefile to use a temporary file |
| 116 |
because I experienced problems (segmentation fault) with lex on |
| 117 |
Solaris 2.1 when input was from stdin. |
| 118 |
|
| 119 |
|
| 120 |
Modified (Version 2.7) -- September 10, 1997 |
| 121 |
Removed line breaks in detex.l between a few patterns and actions. It |
| 122 |
appears that flex is no longer able to handle this. Thanks to Anthony |
| 123 |
Harris <[email protected]> and Marty Leisner |
| 124 |
<[email protected]> for reporting this. |
| 125 |
|
| 126 |
|
| 127 |
Porting notes -- March 30, 1992 |
| 128 |
When using gcc, or compiling on a NeXT, you should compile with |
| 129 |
-fwritable-strings. With the change to SetInputPaths() in 2.6 this |
| 130 |
should no longer be necessary. |
| 131 |
|
| 132 |
On a NeXT, it has been reported that lex replaces the '\0' with NULL, |
| 133 |
and then the compiler complains about it. I think this is an old bug |
| 134 |
that is no longer applicable. |
| 135 |
|
| 136 |
July 30, 1993 |
| 137 |
The flex scanner generator does not work because it does not handle |
| 138 |
input buffering the same way as lex. I don't know of any reasonable |
| 139 |
way to rewrite detex to get around this problem. |
| 140 |
|
| 141 |
May 25, 1995 |
| 142 |
According to [email protected] (Alain Ketterlin), using flex |
| 143 |
allows 8-bit characters to be handled correctly. |
| 144 |
|
| 145 |
Modified (Version 2.8) -- January 1, 2008 |
| 146 |
Added NCSA/University of Illinois Open Source License to facilitate |
| 147 |
free redistribution. |
| 148 |
|
| 149 |
(Version 2.8.1) -- October 2, 2008 |
| 150 |
First version of OpenDetex. |
| 151 |
Making program compile on modern UNIX systems; many fixes in LaTeX |
| 152 |
code handling (quotes, figure and table environments, headings and |
| 153 |
many more). |
| 154 |
|
| 155 |
(Version 2.8.2) -- February, 2016 |
| 156 |
Improved ANSI C compatibility. Used kpse_find_file() and |
| 157 |
kpse_program_name(). Handle `\kern', allow `em/ex'for dimensions, |
| 158 |
handle glue specs. Added the never-interactive option to prevent flex |
| 159 |
from creating a problematic prototype for isatty(). Renamed |
| 160 |
ERROR -> my_ERROR to avoid a conflict with WIN32 headers. Used binary |
| 161 |
mode for output file (Peter Breitenlohner and Werner Lemberg) |
| 162 |
|
| 163 |
Insert a space in place of right curly brace (Eric Miotto). |
| 164 |
|
| 165 |
Provide 'make uninstall'. Install man page when running 'make install'. |
| 166 |
|
| 167 |
(Version 2.8.3) -- February, 2018 |
| 168 |
Added -r option that replaces math environments with nouns and verbs in a way that keeps sentences readable. Thanks to Sophie Huiberts. |
| 169 |
|
| 170 |
Changed Makefile to fix a Mac OS X problem where frequently an empty output file was produced. |
| 171 |
|
| 172 |
Removed states.sed that modified detex.l to avoid Lex memory overrun - no longer needed on current machines. Added detex.c to the distributed package to allow compiling OpenDetex without having Flex. |
| 173 |
|
| 174 |
Removed 'mathmatica' from the default list of environments which contents are ignored - 'mathmatica' is not supported by TeX. Added more ignored environments: algorithm, align, smallmatrix and several more. |
| 175 |
|
| 176 |
Fixed compilation on Cygwin. |
| 177 |
|
| 178 |
Removed special files for OS/2 - they required compilers that no longer exist. OpenDetex should be able to be compiled using GCC for OS/2. |
| 179 |
|
| 180 |
(Version 2.8.4) -- July, 2018 |
| 181 |
|
| 182 |
Stoped generating additional spaces after commands (#41). Thanks to Martin Nowack. |
| 183 |
|
| 184 |
Fixed space missing in output when two newlines follow a macro (#42). Thanks to sgerwk. |
| 185 |
|
| 186 |
Started treating newlines in inline math as spaces (#45). Thanks to sgerwk. |
| 187 |
|
| 188 |
(Version 2.8.5) -- January, 2019 |
| 189 |
|
| 190 |
Fixed man page on macOS (#47). Thanks to FX Coudert. |
| 191 |
|
| 192 |
Added -v option for showing version. |
| 193 |
|
| 194 |
(Version 2.8.6) -- January, 2020 |
| 195 |
|
| 196 |
Fixed buffer overflow (CVE-2019-19601 #60). Thanks to Akira Kakuto, Norbert Preining and TeX Live team. |
| 197 |
|
| 198 |
(Version 2.8.7) -- June, 2020 |
| 199 |
|
| 200 |
Reduced size of .tar.bz2 package by excluding object file added by mistake. |
| 201 |
|
| 202 |
Handle forcing placement with ! (#62). Thanks to schrc3b6. |
| 203 |
|
| 204 |
Added option to print source information with -1 (#64). Thanks to Victor Cacciari Miraldo. |
| 205 |
|
| 206 |
(Version 2.8.8) -- June, 2020 |
| 207 |
|
| 208 |
Fixed compilation on old compilers supported by TeX Live (#65). Thanks to Akira Kakuto and Hironobu Yamashita. |
| 209 |
|
| 210 |
(Version 2.8.9) -- December, 2020 |
| 211 |
|
| 212 |
Include escaped percent sign in output (#70). Thanks to Max Leonhardt. |
| 213 |
|
| 214 |
(Version 2.8.10) -- December, 2023 |
| 215 |
|
| 216 |
Fixes to man page. Thanks to kberry and Hilmar Preusse. |
| 217 |
|
| 218 |
(Version 2.8.11) -- December, 2023 |
| 219 |
|
| 220 |
Fixed segmentation fault on unterminated \verb. |