UKTeX Digest Friday, 19 Oct 1990 Volume 90 : Issue 36 Today's Topics: RE: non-centred displays Re: bug in enumerate or ifthen.sty? (UKTeX V90 #35) Resent: Latex re: Misplaced text \ifthenelse and enumerate problems \ifthenelse and enumerate A report of the UK TUG meeting at Aston - --------------------------------------------------------------------------- Moderator: Peter Abbott Editor: David Osborne (University of Nottingham) Submissions: uktex@uk.ac.aston Administration: uktex-request@uk.ac.aston Back Issues: These are stored in the Aston archive, in the directory DISK$TEX:[TEX-ARCHIVE.DIGESTS.UKTEX.90] Latest TeXhax: #65 Back Issues: These are stored in the Aston archive, in the directory DISK$TEX:[TEX-ARCHIVE.DIGESTS.TEXHAX.90] Latest TeXmag: V4 N4 Back Issues: These are stored in the Aston archive, in the directory DISK$TEX:[TEX-ARCHIVE.DIGESTS.TEX-MAG] ------------------------------------------------------------ Date: Mon, 08 Oct 90 17:34:39 -0000 From: P.TAYLOR@UK.AC.RHBNC.VAX Subject: RE: non-centred displays Nigel Chapman asked about manipulating the horizontal positioning of \eqalign's; I'm not certain exactly what he wanted to achieve, but it's quite easy to manipulate them ... >>> i am presently looking at some centred equations, which frankly look >>> awful, so i was womdering whether anyone out there has already tackled >>> this job -- or indeed {\it does\/} know of some \everydisplay magic that >>> could do it instead. \input a4 $$\eqalign{T(n)\le T(2^{\lceil\lg n\rceil}) &\le c(3^{\lceil\lg n\rceil}-2^{\lceil\lg n\rceil})\cr &<3c\cdot3^{\lg n}\cr &=3c\,n^{\lg3}.\cr}$$ $$\eqalign{T(n)\le T(2^{\lceil\lg n\rceil}) &\le c(3^{\lceil\lg n\rceil}-2^{\lceil\lg n\rceil})\cr &<3c\cdot3^{\lg n}\cr &=3c\,n^{\lg3}.\cr}\ \displaywidth = 0.5 \displaywidth $$ $$\eqalign{T(n)\le T(2^{\lceil\lg n\rceil}) &\le c(3^{\lceil\lg n\rceil}-2^{\lceil\lg n\rceil})\cr &<3c\cdot3^{\lg n}\cr &=3c\,n^{\lg3}.\cr} \displaywidth = 0.5 \displaywidth \displayindent = \displaywidth$$ \end Philip Taylor, Royal Holloway and Bedford New College, (The University of London at Windsor) ------------------------------ Date: Mon, 08 Oct 90 18:16:10 +0000 From: CA_ROWLEY@UK.AC.OPEN.ACS.VAX Subject: Re: bug in enumerate or ifthen.sty? (UKTeX V90 #35) Martin, > \def\boldvar#1{{\hbox{\bf #1}}} try replacing \hbox by \mbox ... and remember that, if I were Leslie Lamport you would not get an answer to this for many reasons, including: you used \def instead of \(re)newcommand you used \hbox which is NOT LaTeX. > My ifthen.sty is dated: 28 October 1986 > My latex.tex is dated: <8 Feb 1990> nice to see you are to date in Durham! chris ------------------------------ Date: Fri, 12 Oct 90 17:49:09 -0000 From: John Nissen Subject: Resent: Latex Resent mail follows: - ------- To: ABBOTTP@uk.ac.aston Cc: pauline%sunfs%uk.co.gec-epl@uk.ac.ukc From: jn Date: Tue Oct 9 12:57:33 1990 - ------- To: Peter Abbott University of Aston cc: Pauline Wright (pro Don Ward ex GEC Electrical Projects) From: John Nissen GEC-Marconi Software Systems Elstree Way Borehamwood HERTS WD6 1RX Telephone: +44 81 906 6182 (direct) Telephone: +44 81 953 2030 (switchboard) Facsimile: +44 81 906 6362 Telex: 22777 GEC BWD G We have been using Latex for several months on several large projects, running it on both Unix and VMS. I have just seen at note written by Don Ward lately of GEC Electrical Projects, dated March 1, 1989. In it he mentions use of (a) Latex for VDM and Z, (b) Latex on PCs, (c) device independent output file with (d) post-processing for dot matrix printers, and (e) Latex previewing. I am interested in (a) for formal methods. I am interested in (b) and (d) as I have a Toshiba T1000 laptop; how much space is needed? My dot-matrix printer is a Panasonic KX-P1081. What is the format for (c)? It is an interesting concept. As regards (e), previewing would be valuable when we use Latex on large complex documents. At present the main disadvantage of Latex as compared to say WriteNow on an Apple Mac is the lack of WYSIWYG, and previewing might get over this problem to some extent. Could one preview on a VT220? Could you send me information about (a) to (e)? Can you recommend a good book on Latex for our library? Don also mentions a users group and newsletter with you as a contact. How much would it cost me or my company to join the user group and receive the newsletter? Can I get the latest software via email? Are there other people in GEC using Latex to any extent? I know many who are using Interleaf for desk-top publishing. I'd like to discuss Latex for email with you some time. - ------- ------------------------------ Date: Fri, 12 Oct 90 20:02:55 -0400 From: LEICHTER%COM.LRW@UK.AC.NSFNET-RELAY Subject: re: Misplaced text In a recent UKTeX, Martin Ward reports a problem with an interaction between a macro he has defined an itemized lists. The relevant portion of the macro is: \def\S{\boldsub{S}} \def\boldvar#1{{\hbox{\bf #1}}} \def\boldsub#1#2% {\ifthenelse{\equal{#2}{}}% {\boldvar{#1}} {\ifthenelse{\equal{#2}{'}}% {\ifmmode\boldvar{#1}'\else$\boldvar{#1}'$\fi} {\ifmmode\boldvar{#1}_{#2}\else$\boldvar{#1}_{#2}$\fi}}} When \S appears as the first thing after \item, the placement of the resulting S and the item number (for an enumerate) is all wrong - the S appears before the item number. When an \mbox{} command is interpolated between \item and \S, all is well. The problem here is a failure to "follow the rules". \hbox is not a LaTeX command - the supported way to make a horizontal-mode box in LaTeX is \mbox. Had the definition of \boldvar used \mbox, everything would have worked as expected. Now, obviously you can't ALWAYS use LaTeX commands - \ifmmode isn't a LaTeX command and there is no LaTeX equivalent, but you do have to understand why LaTeX provides certain constructs that are apparently simply the equivalents of TeX constructs. \mbox{} is simply \def\mbox{\leavevmode \hbox} (well, really it's \def\mbox#1{\leavevmode \hbox{#1}} which is unfortunate but I suppose makes LaTeX more uniform: Things like catcode changes {\em never} work in arguments to LaTeX macros, even if the case of macros, like \mbox, where they could easily have been supported.) The \leavevmode is there to avoid exactly the kind of behavior that Mr. Ward is seeing. Item leaders are not actually typeset by the \item command; rather, they are stored and inserted into the text, using \everypar, when the next paragraph begins. This is necessary to provide correct handling of items that start with itemized lists, for example. With the original definition of \S, the \hbox doesn't begin a paragraph. The paragraph only begins with the first character after the \S. The item number is thus not typeset until after the \S. Interpolating the \mbox{}, or using \mbox in the definition of \S, works because the \leavevmode in the \mbox causes a paragraph to begin, triggering the insertion of the item number. -- Jerry ------------------------------ Date: Mon, 15 Oct 90 10:31:04 +0000 From: PM1MJP@UK.AC.SHEFFIELD.PRIMEA Subject: \ifthenelse and enumerate problems Martin Ward writes: > Is this a bug in enumerate or the ifthen.sty file? > The \S command is so I can type \S{} for a bold S, \S' for S' > and \S1 for S_1 etc. both inside and outside math mode. > \documentstyle[ifthen]{article} > \def\S{\boldsub{S}} > \def\boldvar#1{{\hbox{\bf #1}}} > \def\boldsub#1#2% > {\ifthenelse{\equal{#2}{}}% > {\boldvar{#1}} > {\ifthenelse{\equal{#2}{'}}% > {\ifmmode\boldvar{#1}'\else$\boldvar{#1}'$\fi} > {\ifmmode\boldvar{#1}_{#2}\else$\boldvar{#1}_{#2}$\fi}}} > \begin{document} > Consider the following cases: \\ > This puts the S in the wrong place: > \begin{enumerate} > \item \S{} is primitive\dots > \item \S{} is complicated\dots > \end{enumerate} > This does the right thing: > \begin{enumerate} > \item \mbox{} \S{} is primitive\dots > \item \mbox{} \S{} is complicated\dots > \end{enumerate} > What is going on here? > \end{document} The enumerate environment is still in vertical mode when processing the \item command. The \vbox produced by \ifthenelse is contributed to the vertical list. Try \def\S{\leavevmode\boldsub{S}} Mike Piff - ---------------------------------------------------------------------------- From Dr M. J. Piff, Department of Pure Mathematics, PO Box 597, Hicks Dreadful Noisy Building Site, Hounsfield Road, SHEFFIELD S10 2UN, England. Tel. SHEFFIELD(0742) 768555 Extension 4431. JANET MPiff@UK.AC.SHEF.PA or MPiff@UK.AC.SHEF.IBM - ---------------------------------------------------------------------------- ------------------------------ Date: Wed, 17 Oct 90 14:20:35 +0000 From: PM1MJP@UK.AC.SHEFFIELD.PRIMEA Subject: \ifthenelse and enumerate Martin Ward used \ifthenelse to implement symbols in and out of math mode. Here is one way of implementing bold symbols which can be used in and out of maths mode, primed with any number of primes, and also used as subscripts and superscripts. Mike Piff \documentstyle{article} \newif\ifMmode \Mmodefalse \def\boldsym#1{% \relax% to fool array and other alignments \bgroup \ifmmode \Mmodetrue \else $\Mmodefalse \fi {\bf #1}% \Continuebold } \def\Nothing{} \def\Prime{'} \def\Continuebold#1{% \def\Sub{#1}% subscript \ifx\Sub\Nothing% empty \let\Next\Finishoff \else \ifx\Sub\Prime \def\Next{^\bgroup\prime\Absorbprimes}% \else \def\Next{_{#1}\Finishoff}\fi \fi \Next } \def\Absorbprimes{\futurelet\Next\Seeifprime} \def\Seeifprime{% \ifx\Next'% \def\Next{\Getprime}% \else \def\Next{\egroup\Finishoff}% \fi \Next } \def\Getprime'{\prime\Absorbprimes} \def\Finishoff{\ifMmode\else$\fi\egroup} \def\S{\boldsym S} \begin{document} $S'$ \S' \S''' \S{} $ \S' \S''' \S'''''_1$ \end{document} - ---------------------------------------------------------------------------- From Dr M. J. Piff, Department of Pure Mathematics, PO Box 597, Hicks Dreadful Cold Noisy Building Site, Hounsfield Road, SHEFFIELD S10 2UN, England. Tel. SHEFFIELD(0742) 768555 Extension 4431. JANET MPiff@UK.AC.SHEF.PA or MPiff@UK.AC.SHEF.IBM - ---------------------------------------------------------------------------- ------------------------------ Date: Fri, 19 Oct 90 13:00:00 -0000 From: ROBIN@UK.CO.LASER-SCAN Subject: A report of the UK TUG meeting at Aston This was prepared for a colleague who couldn't go: I thought it might be useful to the world at large... Robin The main business of the meeting was to approve the constitution (which you will have had in the post). I had intended to read the thing on the train, but missed it and had to drive; therefore I was working blind. (But I'm used to standards meetings, and am good at that ;-) The changes that everyone agreed were needed were: 1. More `documented' openness: the member of the group agrees to abide by the rules of the group, but nowhere does the present document say that the committee need actually publish them! 2. The clauses on expulsion of members need to allow the person being expelled to send out a case for the defence *with the case for the prosecution* 3. Email shall not be regarded as an acceptable form of address. Subject to the agreement that the committee should work on amendments to the above effect, the constitution was then approved. Malcolm Clark's address was much what one would expect, except for a lot of discussion of the state of TUG. He sits on the TUG board, and would appear to find it a bit frustrating. I suspect that at least part of the problem is a cultural one: for example, he didn't accept the point that I tried to explain that conformance testing (via TRIP and TRAP) of implementations is *not* a simple matter, but has legal implications. ("It's trivial - you just publish lists of who passes and who fails." "What if someone who fails *sues*?" The basis of my point is that TRIP, for example, doesn't actually test typesetting, just the implementation of certain parts of Knuth's tortuous arithmetic. It's all tied up with the standardisation issue, and what happens to TeX now that Knuth's given up - see below.) There was a big argument over Phil Taylor's motion. When finally voted (truncated at the first full stop), it failed. The big argument for (which I supported) was that TeX, if it is to continue to be successful, has to be an international exercise. That against was that TUG just now is not in a good state, and that Malcolm's deals (in course of negotiation) for reduced membership of TUG for members of UKTUG (and Gutenberg, Dante, NTG, etc.) is as much as is useful/safe just now. Adrian Clark (no relation) (why does TeX in the UK attract Clarks?) has had a letter from Knuth defining his future role vis-a-vis TeX. TeX 3.1 has been issued (and Metafont 2.7). If new versions are required, they'll be 3.14 - 3.141 - 3.1415 ... (and 2.71828...). When Knuth dies, all banners are to be changed to say `version \pi' and `version e'. Ho ho. If anyone wants to change TeX again to future-proof it, it's not to be called TeX. I think this raises an issue that should be addressed, viz., revision of TeX for future-proofing. Knuth is no longer going to be around to take part, so let's think *now* about what needs to be done, and how to get it done. Frank Mittelbach's paper (and to a lesser extent Stephan von Bechtolsheim's) in the latest TUGboat seems to me to be a good start. What's needed is a standards committee... (Now why did I think of that?) The rest of the meeting was about the archive; what was said seemed to me to be somewhat ephemeral, and I have few notes worth repeating. There were some truly boggleworthy statistics for us all to gawp at, but most of my notes are of the form `look at this in a spare moment'. One thing that really *did* come across was that there's no way that the archive group could document what's in the archive. There's obviously an opening for people to write up documentation of things they've extracted, and what they had to do to make it all go. ------------------------------ !! UK TeX ARCHIVE at ASTON UNIVERSITY: !! !! NIFTP access: site uk.ac.aston.tex !! username public !! password public !! !! Files of interest !! [tex-archive]00readme.txt [tex-archive]00files.txt !! [tex-archive]00directory.list [tex-archive]00directory.size !! [tex-archive]00last7days.files [tex-archive]00last30days.files !! !! !! Washington TeX tape distribution: !! The latest tape is labelled !! !! TeX 3.0, Metafont 2.0, LaTeX 2.09; !! utilityfonts, cmfonts, LaTeXfonts, amsfonts. !! Unix 4.2/3BSD, Sys V. !! Tar, 1600bpi, blocked 20, 1 file !! !! I have the facility to copy this tape for anyone who sends the following !! 1 2400 tape with return labels AND RETURN postage. (2.50 pounds sterling !! for UK users, payable to `Aston University') Outside UK please ask me. !! UK users send 4.25 for two tapes or 6.60 for three tapes. !! Send to !! !! P Abbott !! Computing Service !! Aston University !! Aston Triangle !! Birmingham B4 7ET !! !! A VMS backup of the archive requires two 2400' tapes at 6250bpi. !! Remaining details as above. !! !! A VMS backup of TeX 2.991 plus PSprint is available; one tape is needed. !! !! Exabyte tape drive with Video 8 cassettes: !! Same formats available as 1/2in tapes. We use the following tapes !! SONY Video 8 cassette P5 90MP, MAXCELL Video 8 cassette P5-90 !! TDK Video 8 cassette P5-90MPB !! Postage 35p UK (stamp please), 1 pound sterling Europe, other areas 2 pounds !! !! OzTeX - Send 10 UNFORMATTED (800k) disks with return postage. !! !! ---Peter Abbott. End of UKTeX Digest *******************