README 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499
  1. ===============
  2. M D W T O O L S
  3. ===============
  4. --- Licence note ---
  5. mdwtools package release note
  6. Copyright (c) 1996 Mark Wooding, except doafter, which is Copyright (c) 1996
  7. Peter Schmitt and Mark Wooding.
  8. These programs are free software; you can redistribute them and/or modify
  9. them under the terms of the GNU General Public License as published by
  10. the Free Software Foundation; either version 2 of the License, or
  11. (at your option) any later version.
  12. These programs are distributed in the hope that they will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. GNU General Public License for more details.
  16. You should have received a copy of the GNU General Public License
  17. along with these programs; if not, write to the Free Software
  18. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19. --- What it's all about ---
  20. This is a bunch of LaTeX 2e packages which have made my life as a LaTeX user
  21. easier, so I thought I'd share them. I'm mainly an ARM assembler hacker
  22. (which explains why my TeX code looks so horrible), although I have been
  23. known to write documentation for programs. This may explain the sort of
  24. things these packages do, and where I'm coming from.
  25. --- Licencing ---
  26. The packages are made available under the GNU General Public Licence (not the
  27. usual LaTeX agreement). A copy of this licence is supplied in the file
  28. COPYING. You should read this document if you haven't read it already, even
  29. if it's just for educational value. I'm not actually sure how good a thing
  30. the GNU GPL actually is, so I'm sort of testing the water. The idea that
  31. this is how all software should be distributed still fills me with a certain
  32. amount of trepidation.
  33. --- What's in the box ---
  34. You should have received the following files in whatever sort of archive
  35. thing this suite came in:
  36. README -- You've got this file for sure, because it's this one
  37. COPYING -- A textual version of the GNU General Public Licence
  38. at.dtx -- Documentation and code for `at.sty' package
  39. cmtt.dtx -- Documentation and code for `cmtt.sty'package and
  40. associated files
  41. doafter.dtx -- Documentation and code for `doafter.sty' package; the
  42. code is also used in `syntax.sty' and `mdwtab.sty'
  43. mdwlist.dtx -- Documentation and code for `mdwlist.sty' package
  44. mdwmath.dtx -- Documentation and code for `mdwmath.sty' package
  45. mdwtab.dtx -- Documentation and code for `mdwtab.sty' and `mathenv.sty'
  46. packages
  47. footnote.dtx -- Documentation and code for `footnote.sty' package; the
  48. code is used in `mdwtab.sty'
  49. sverb.dtx -- Documentation and code for `sverb.stx' package
  50. syntax.dtx -- Documentation and code for `syntax.dtx' package
  51. mdwtools.ins -- Installation script for all the packages
  52. gpl.tex -- LaTeX version of the GNU General Public Licence
  53. mdwtools.tex -- Definitions for typesetting the documentation
  54. If you're missing any of these files, complain at whoever gave the rest of
  55. them to you, and get them quickly. However, if you're lucky, you may have
  56. received some other files:
  57. at.sty -- Unpacked `at.sty' package
  58. cmtt.sty -- Unpacked `cmtt.sty' package
  59. mTTenc.def -- Unpacked encoding definition file for `cmtt.sty'
  60. mTTcmtt.fd -- Unpacked font definition file for `cmtt.sty'
  61. doafter.sty -- Unpacked `doafter.sty' package for LaTeX
  62. doafter.tex -- Unpacked `doafter.tex' package for Plain TeX
  63. mathenv.sty -- Unpacked `mathenv.sty' package
  64. mdwlist.sty -- Unpacked `mdwlist.sty' package
  65. mdwmath.sty -- Unpacked `mdwmath.sty' package
  66. mdwtab.sty -- Unpacked `mdwtab.sty' package
  67. footnote.sty -- Unpackad `savenot.dty' package
  68. sverb.sty -- Unpacked `sverb.sty' package
  69. syntax.sty -- Unpacked `syntax.sty' package
  70. at.dvi -- Typeset documentation for `at.sty'
  71. cmtt.dvi -- Typeset documentation for `cmtt.sty' and co.
  72. doafter.dvi -- Typeset documentation for `doafter.sty'
  73. mdwlist.dtx -- Typeset documentation for `mdwlist.sty'
  74. mdwmath.dvi -- Typeset documentation for `mdwmath.sty'
  75. mdwtab.dvi -- Typeset documentation for `mdwtab.sty' and `mathenv.sty'
  76. footnote.dvi -- Typeset documentation for `footnote.sty'
  77. sverb.dvi -- Typeset documentation for `sverb.sty'
  78. syntax.dvi -- Typeset documentation for `syntax.sty'
  79. If you've already got these, then great, because you don't have to generate
  80. them. If you haven't, it's not a big deal. You might also have a bunch of
  81. files with extensions like `.log', `.aux', `.tmp', `.ilg' and so on. These
  82. files are really not at all interesting, and you might as well get rid of
  83. them now.
  84. --- What the packages do ---
  85. Before we can get anywhere, you need to know what the packages do, roughly
  86. speaking. Here's a quick rundown:
  87. at.sty -- Allows you to use `@' as a sort of `command-introducing'
  88. character, a bit like `\' is already. This gives you
  89. a lot more short command names which you can assign to
  90. common constructions. For example, you can set up
  91. @/<text>/ as a command to put <text> in italics.
  92. cmtt.sty -- Provides an `mTT' encoding for the Computer Modern
  93. Typewriter font, which solves lots of messy problems.
  94. doafter.sty -- Provides a TeX programmer's utility
  95. \doafter <token> <group>
  96. which does the <token> after the group is complete,
  97. including any \aftergroup things. The code was originally
  98. written by Peter Schmitt in answer to a `challenge' I made
  99. on comp.text.tex;I tweaked it a bit to make it work
  100. slightly better. doafter.tex is a plain TeX version of
  101. the same macro.
  102. mathenv.sty -- Contains a collection of mathematical environments with
  103. a theme of aligning things in columns. There's a
  104. rewritten version of `eqnarray' which is much more
  105. powerful than the old one, and it gets the spacing right.
  106. This package requires `mdwtab.sty' in order to work. It
  107. is extracted from `mdwtab.dtx'. In general, the AmS
  108. things to a better job, although it seems that the mathenv
  109. matrix and script handling environments give prettier
  110. results than the AmS equivalents (at least to my eyes).
  111. mdwlist.sty -- Various list related environments. There's a more
  112. versatile `description' environment, and some stuff for
  113. making `compacted' lists (with no extra space between
  114. items).
  115. mdwmath.sty -- Contains a few trivial definitions for mathematical
  116. things. The main thing is that the \sqrt command for
  117. doing square roots has been improved -- there's a \sqrt*
  118. command which stops the line being drawn over the formula
  119. being square-rooted, and the positioning of the root
  120. index (the optional argument) has been improved.
  121. mdwtab.sty -- A complete ground-up rewrite of LaTeX's `tabular' and
  122. `array' environments. Has lots of advantages over
  123. the standard version, and over the version in `array.sty'.
  124. It works correctly with all the table-related packages in
  125. the Tools bundle (longtable, delarray, hhline, tabularx
  126. and dcolumn). This package includes most of the code
  127. from `doafter.sty' and `footnote.sty' (it doesn't load
  128. the packages -- it has its own copies built-in, although
  129. you won't waste memory if you do load these packages).
  130. To generate `mdwtab.sty', you require `mdwtab.dtx',
  131. `doafter.dtx' and `footnote.dtx'; the last two provide
  132. the shared code.
  133. footnote.sty -- Provides commands for saving executing footnotes; the
  134. author has noticed several packages which attempt to
  135. enable footnotes in tables, all of which eat an extra
  136. token list register. This is an attempt to offer shared
  137. code to do the job, saving space and effort. It also
  138. provides a `footnote' environment which allows verbatim
  139. text.
  140. sverb.sty -- A bunch of macros for doing verbatim things. Required
  141. for typesetting all the documentation for the other
  142. packages.
  143. syntax.sty -- A load of commands for describing syntax. There's an
  144. environment for typesetting BNF grammars. But best of
  145. all, there's a load of commands and environments for
  146. drawing syntax diagrams. Required for typesetting all
  147. the documentation for the other packages. If you're
  148. extracting syntax.sty from syntax.dtx, you also need
  149. doafter.dtx.
  150. With the exception of the dependencies listed above, the packages will all
  151. work independently of each other. If you want to typeset the documentation,
  152. you'll need `sverb.sty' and `syntax.sty'. Typesetting the documentation
  153. isn't essential, although it will probably help if you can see what the
  154. various commands actually do.
  155. --- Extracting the packages ---
  156. If you don't have the various .sty files already, you'll need to extract them
  157. from the .dtx files. This requires docstrip.tex, which should be part of
  158. your base LaTeX 2e distribution. If you have docstrip vsersion 2.3d, which
  159. is available with the December 1995 release of LaTeX, things will go rather
  160. faster. If your LaTeX release is much older than this, you should upgrade,
  161. because the packages need a fairly new LaTeX anyway. (I could do something
  162. about this, but I won't, because I want to encourage everyone to upgrade.)
  163. If everything's set up correctly, all you should need to do is say
  164. tex mdwtools.ins
  165. or
  166. latex mdwtools.ins
  167. or whatever incantation is necessary to run TeX or LaTeX on the supplied
  168. `mdwtools.ins' file on your system.
  169. TeX will grind away at the files for a bit, and then say `Done' at you. (This
  170. could take a while, so be patient.) You will then have a mdwtools.log file,
  171. which you can throw away, and a collection of sparkly new .sty files, which
  172. you should put somewhere where TeX can find them easily.
  173. --- Typesetting the documentation ---
  174. If you want to typeset the documentation for a package, you'll need the
  175. `mdwtools.tex' file provided, and the `syntax.sty' and `sverb.sty' packages.
  176. You'll also need the `.dtx' file for the package you want documentation on,
  177. and any packages it generated.
  178. For example, if you want documentation on `mathenv.sty', you need:
  179. mdwtools.tex -- Shared defintions for all the documentation files
  180. syntax.sty -- Syntax typesetting commands
  181. sverb.sty -- Verbatim text handling commands
  182. mathenv.sty -- So the documentation can use it to demonstrate its
  183. features
  184. mdwtab.sty -- Required by `mathenv.sty'
  185. mdwtab.dtx -- The documentation file from which `mathenv.sty' was
  186. extracted, and therefore the file which contains the
  187. documentation you want to read
  188. Make sure you've got all the files, and then run LaTeX on the .dtx file you
  189. want to read.
  190. TeX will start hammering away for a very short while, and then stop and ask
  191. you whether you want to build the indexing files. Generating index files
  192. takes a lot longer (I'd guess that it doubled the amount of time taken to
  193. typeset the `.dtx' file) so I don't recommend it unless:
  194. * you've got a very fast processor, or
  195. * you're very interested in how the package works internally, or
  196. * you just like everything to be complete, or
  197. * you're a masochist.
  198. Even so, there's no point writing indexing information the first time you
  199. run LaTeX on a file, because the table of contents hasn't been created yet,
  200. and when you LaTeX the file the second time, all the references will change.
  201. If you want the index files anyway, type `y' when you're asked. Otherwise,
  202. type 'n'. You know you want to type `n' really...
  203. If you want to do the job properly, you need to run LaTeX a second time
  204. to read in the contents table. /This/ is the correct time to turn on
  205. indexing, if you really want it.
  206. If you did build the index files, you should now sort the index by saying
  207. makeindex -s gind.ist <name>.idx
  208. where <name> is the same as the name of the `.dtx' file. The `gind.ist' file
  209. should have come with LaTeX. Having done this, you should run the `.dtx'
  210. file though LaTeX one final time, to insert the formatted index.
  211. You can now print or preview the generated `.dvi' file using whatever tools
  212. you usually use for such things.
  213. --- What changed? ---
  214. Here's a list of what changed in the various releases.
  215. Version Changes
  216. 1.00 * First general releases of everything.
  217. 1.01 * Fixed typos in various bits of documentation.
  218. * (mdwtab.sty) Added enhanced \cline command. Added
  219. hhline.sty to list of supported table-related packages.
  220. (I guess it always worked -- I just forgot about it.)
  221. Made some of the section titles a little sillier ;-)
  222. * (mathenv.sty) Added some new random environments, mainly
  223. because I saw some more interesting examples in /The/
  224. /TeXbook/ and had an idea... Now support nesting of
  225. various environments, albeit rather imperfectly.
  226. * (at.sty) Made @-commands really properly robust. Fixed
  227. some lies in the documentation. Removed some truly insane
  228. bits of old code here too. Made package sort of
  229. cooperate with amsmath's use of @-commands -- suggestions
  230. for improvement welcomed.
  231. * (mdwtools.tex) Fixed /really/ stupid mistake in which made
  232. typesetting the documentation about fifty times slower
  233. than it should have been (bashes self on head several
  234. times). Changed the structure here a bit too, to handle
  235. document classes as well as packages. Made TeX much
  236. quieter while it's typesetting the documentation.
  237. * (sverb.sty) Fixed duff paragraph formatting in listing
  238. environment and \verbinput command (due to the `wrong
  239. sort' of grouping). (My excuse for missing this one is
  240. that my standard document class sets \parskip=0pt.)
  241. * (mdwtools.ins) Fixed this in line with the documentation
  242. which hints that it should work with older docstrips.
  243. It's a bit hacky but it works.
  244. 1.02 * (gpl.tex) Fixed some bugs which made typesetting go wrong
  245. in larger documents. Restructured preamble so that it
  246. can be typeset on its own. Put in eplicit item numbers
  247. in the enumerate environments, for more obvious conformance
  248. to the original.
  249. * (mdwtab.sty) Lots of changes here, many suggested by
  250. David Carlisle (so oodles of thanks to him for taking
  251. an interest in my humble hackings). Fixed bugs, including
  252. one which put entirely incorrect interline spacing in
  253. `p' type columns. Redone the handling of [t] and [b]
  254. tables with top and bottom rules, and removed the
  255. `\rulefudge' parameter which is no longer necessary.
  256. Miscellaneous other changes.
  257. * (mdwtab.dtx) Tidied up some nastinesses in the
  258. documentation, and removed the `\over' commands from the
  259. maths demos, to keep certain people happy. Floated a few
  260. more of the demonstrations to make page breaking better.
  261. There's a danger that some of the demos are drifting too
  262. far away from their text, but it's not too bad yet.
  263. * (syntax.sty) Used \doafter here to fix some colour handling
  264. problems.
  265. * (syntax.sty) Tidied up the `grammar' environment quite a
  266. bit (it now uses `\item', rather than trying to emulate it
  267. internally), and fixed some vicious bugs in it and some
  268. other code.
  269. * (doafter.sty etc.) A new addition, to make the various
  270. packages handle colour properly. Mainly written by
  271. Peter Scmitt, actually, I just fiddled with it a little.
  272. Then Peter gave me a better version, and I've tried to
  273. upgrade this one.
  274. * (footnote.sty) A new addition, to offer some shared things
  275. for handling footnotes. It also enables footnotes in
  276. parboxes, which used to be difficult, and provides a
  277. `footnote' environment which allows verbatim text.
  278. * (mdwlist.sty} A new addition, providing miscellanous
  279. list-related macros. It's a sort of mixed bag of things
  280. I've had lying around various document preambles, combined
  281. with some ideas from the Companion.
  282. * (at.sty) Rewritten command name parser to be much nicer.
  283. Added support for digits within @-command names (subject
  284. to being enabled by an option). This is in response to
  285. requests in comp.text.tex for digits in command names.
  286. * (mathenv.sty) Totally overhauled the matrix spacing rules.
  287. Added `script' environment. Improved numbering things,
  288. with `\eqnumber'.
  289. * (mdwtools.tex) Some minor changes here to fix some buglets.
  290. Played with some more float parameters, to discourage
  291. float pages a bit more. Then revamped completely, turned
  292. into a docced program (although it isn't docstripped),
  293. rewritten title generation, and made much more
  294. customisable.
  295. 1.02a * (mdwtab.sty) Added support for table beautification in
  296. longtable. Documented how to do this.
  297. 1.03 * (mdwtab.sty) Completely redone the paragraph-cell handling:
  298. list environments now work properly inside tables (without
  299. funny extra space appearing at the top and bottom). Also
  300. fixed a bug in the newline handling, which ignored negative
  301. interrow space in the \\ command.
  302. * (syntax.sty) Changed the underscore handling, and some
  303. other bits, to fit in rather better with LaTeX's output
  304. encoding system. It's nastier and hackier inside, but it
  305. works better with things like the DC fonts. Also stopped
  306. re-lowercasing of `~' from escaping and messing everything
  307. up for everyone. Improved underscore appearance by
  308. lowering it some more.
  309. * (syntax.sty) Replaced some `2's with `\tw@'s. Added a
  310. comment about dvips's inaccurate positioning of rules.
  311. * (sverb.sty) Made non-* environments build end text from
  312. the name of the current environment, rather than having it
  313. hardcoded. Also stopped `unignore' environments being
  314. a group.
  315. * (sverb.dtx) Removed some porkies from the documentation.
  316. * (mdwtab.sty) Fixed some miscellaneous typos. Removed
  317. `\rulefudge' from the table of tweakables, because it
  318. was withdrawn in release 1.02.
  319. * (cmtt.dtx) New package, for handling the `cmtt' font
  320. better. It introduces a special encoding for the font,
  321. and provides a command which allows you to use all the
  322. characters without the disadvantages of verbatim text.
  323. * (other changes) Improved distribution building and
  324. testing stuff which you can't see because I'm not
  325. releasing it.
  326. 1.04 * (syntax.sty) Provided some new commands for playing with
  327. interword spacing in `tt' fonts.
  328. * (doafter.dtx and footnote.dtx) Added some docstrip guards
  329. around the meta-comments, so that the charactertable and
  330. the GPL header aren't put into other packages.
  331. Unfortunately the version of docstrip which understands
  332. this hasn't been released yet...
  333. * RCSified everything, so I can find old revisions, and I'm
  334. less likely to destroy everything.
  335. * (footnote.dtx) Added a check for AMS environments doing
  336. measuring passes, to avoid duplicated footnotes. (Spotted
  337. by Roberto Bagnara.)
  338. 1.05 * (mdwtab.dtx) Fixed stupid bug in paragraph cells which
  339. left 1000pt high table rows. (Spotted by Rowland.)
  340. * (mdwtab.dtx) Fixed horizontal spacing problems with
  341. empty paragraph cells.
  342. * (mdwlist.dtx) Allowed compact lists and resumed lists
  343. to pass arguments on to the underlying environments.
  344. --- Future plans ---
  345. doafter.sty Add Peter Schmitt's testing for implicit/explicit braces,
  346. as a package or docstrip option. (This extra testing is
  347. a significant chunk of code, and I don't think it's worth
  348. burdening the standard version with it. Peter agrees with
  349. me.)
  350. mathenv.sty Do postprocessing on display maths environments to position
  351. the equations and equation numbers properly, so they don't
  352. overlap (like the AMS environments do, although more
  353. robustly). Once this is done, I think I'll have a reasonable
  354. case for saying that this provides an alternative to the
  355. AMS environments, although quite what the advantage is I
  356. don't know: mdwtab.sty isn't exactly small.
  357. Work is currently `in progress' on this one.
  358. mdwtab.sty Consider doing postprocessing on tables (yuk) in a blkarray
  359. sort of way.
  360. footnote.sty Merge with Robin Fairbairn's package of the same name. Allow
  361. different rules for continued notes (suggested by Donald
  362. Arseneau, after a news article by Jonathan Wand).
  363. New packages I'm currently working on a little something for typesetting
  364. poetry properly (centring poems horizontally based on the
  365. longest line, etc.), handling footnotes properly, doing
  366. line numbering etc. If anyone has any wishes for this,
  367. little things a tyro like me ought to know, or knows that
  368. it's already done better than I could manage, then let me
  369. know.
  370. --- Contacting the author ---
  371. The author can be reached by email at [email protected]. This is his
  372. personal dial-up account, paid for privately, so don't expect replies after
  373. five minutes or anything like that.
  374. If you do have any comments regarding the code, its documentation, or
  375. anything else to do with these packages, don't leave me guessing -- let me
  376. know. While I won't guarantee to do anything about your comments, chances
  377. are that I'll right any wrongs and rescue any damsels in distress (oh, no,
  378. wrong spiel).
  379. -----------------------------------------------------------------------------