(Message texhax/v96:14) From: owner-texhax-digest To: texhax-digest Subject: TeXhax Digest V96 #14 Reply-To: TeXhax@tex.ac.uk Errors-To: owner-texhax-digest Precedence: bulk TeXhax Digest Friday, 1 November 1996 Volume 96 : Number 014 (incorporating UKTeX Digest) Today's Topics: unsuscribe Phone: +44 171 380 7293 Converting LaTex2e to HTML Re: TeXhax Digest V96 #13 Downloading TeX & LaTeX Plain TeX query about \csname ... \endcsname Memory question 'none' ---------------------------------------------------------------------- From: Dave Elliman Date: Tue, 15 Oct 96 12:07:16 +0100 Subject: unsuscribe ------------------------------ From: Russel Winder Date: Tue, 15 Oct 1996 14:11:08 +0100 Subject: Phone: +44 171 380 7293 Jose, > From: Jose Manuel Souto Menendez > Date: Fri, 4 Oct 1996 19:14:51 +0100 (WET DST) > Subject: Answers > > I am writing a book with Latex and I would like to know how it is posible > to write the answers of some of the exercises in such a way that that > they appear at the end of the book. Are there any macros to solve > this problem? (I am using AMSLaTeX, and with LaTeX2e). > Thank you very much, > Jose M. Souto I do not know of any macros for doing this, I have to admit I didn't look that hard. I wrote my own macros for doing this, initially as TeX macros then as LaTeX(209|2e) environment(s). My basic algorithm was to write the exercise and answers out to a file and then read them in at the appropriate place in the text. This is not entirely trivial as the writing has to be of the original code; the verbatim stuff from the standard TeX/LaTeX(209|2e) came in very handy at this point. I suppose I should have turned these macros into a separate package and submitted it, if there is enough interest I can do this. Otherwise I could let you have a copy of my macros. Russel. ======================================================================= Dr Russel Winder Reader in Software Engineering Editor-in-Chief, Object Oriented Systems Information Systems Research Group Department of Computer Science Phone: +44 (0)171 380 7293 University College London Fax: +44 (0)171 387 1397 Gower Street EMail: R.Winder@cs.ucl.ac.uk London WC1E 6BT UK URL: http://www.cs.ucl.ac.uk/staff/R.Winder/ ======================================================================= ------------------------------ From: reynoldd@ccmail.dcu.ie Date: Wed, 16 Oct 1996 08:53:11 +0000 (GMT) Subject: Converting LaTex2e to HTML Dear TeXhax Digest, Presumably there's alot of work being done on how to convert LaTex2e to HTML. I want to put lecture notes with equations onto our intranet. Can you point me to where I might find relevant advice. Latex2html seems a good answer for unix users. However I use DOS, WIN 3.11 and OS2 Warp. I did find correspondence on a newsgroup about compiling a DOS version of LaTex2HTML, but there was much discussion about perl and fork, about which I am ignorant. Any advice would be gratefully received. Regards, David Reynolds ------------------------------ From: Andreas Schlechte Date: Thu, 17 Oct 1996 18:48:23 +0100 (MET) Subject: Re: TeXhax Digest V96 #13 Hi, In reply to > From: Jose Manuel Souto Menendez > Date: Fri, 4 Oct 1996 19:14:51 +0100 (WET DST) > Subject: Answers > I am writing a book with Latex and I would like to know how it is posible > to write the answers of some of the exercises in such a way that that > they appear at the end of the book. Are there any macros to solve > this problem? (I am using AMSLaTeX, and with LaTeX2e). > Thank you very much, > Jose M. Souto Well, you can either use the macros, Knuth is using in his TeXbook. But it's (a bit) difficult to implement these. I use some other macros, based on the package "moreverb.sty", which must be included. ---- solution.sty ---- % % open new file solution.tex for writing % \newwrite\solutionout \immediate\openout\solutionout=solution.tex % % define environment solutionwrite % \def\solutionwrite{% \@bsphack \let\do\@makeother\dospecials \catcode`\^^M\active \catcode`\^^I=12 \def\verbatim@processline{\immediate\write\solutionout{\the\verbatim@line}}% \verbatim@start} \def\endsolutionwrite{\@esphack} % % Use this command to close file % \def\closesolutionfile{\immediate\closeout\solutionout} ---- end ---- With these package you will be able to write any string into the file. Here is an example: \documentclass{book} \usepackage{moreverb,solution} \begin{document} \begin{solutionwrite} You may use any character in this environment. its although possible to write TeX-command into the file: \begin{quote} Like this quoted block. \end{quote} \end{solutionwrite} %... \closesolutionfile \input solution.tex \end{document} The only restriction is, that you might not write the string \end{solutionwrite} into the file. In my opinion there is rather no need for this. Hope, this helps a little bit at least, Andi - -- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< > Andreas Schlechte Tel.: +49-5323-1289 Q < > Am Klepperberg 2 +49-5323-9499-7 < > 38678 Clausthal-Zellerfeld Fax.: +49-5323-9499-3 < > Andreas.Schlechte@tu-clausthal.de http://www.tu-clausthal.de/~inas < >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ------------------------------ From: "P. WISUTHSERIWONG" Date: Fri, 18 Oct 1996 15:07:26 +0000 Subject: Downloading TeX & LaTeX Hi there, I'm wondering if you could help. I'm interested in using LaTeX but have no idea where & how I can get the programmes. Could you tell me the actual file names I need to download from the ctan site please? Oh, do I have to have TeX in order to run LaTeX? Thanks very much for your time. P. Wisuthseriwong ------------------------------ From: cgm@ssci.liv.ac.uk (Colin Mason) Date: Tue, 22 Oct 1996 15:08:54 GMT Subject: Plain TeX query about \csname ... \endcsname If you do: \tracingrestores=1 {\expandafter\xdef\csname 777\endcsname{555}} \bye you get the message: {retaining \777=macro:->555} in the log file. Page 301 of the TeXbook says that nothing needs to go on the save stack at the time of a global assignment so I was initially surprised to get the message. However, page 213 says that \csname ... \endcsname defines the control sequence to be like \relax if it is not currently defined. So, it would appear that \csname ... \endcsname first locally defines \777 to be like \relax and the \xdef then globally redefines it to be 555. If you then do: \tracingrestores=1 {\globaldefs=1 \expandafter\xdef\csname 777\endcsname{555}} \bye it makes no difference. Why? Shouldn't the \csname ... \endcsname globally define \777 to be like \relax? Or is this some strange exception to the rules? Thanks in advance for any help. Colin Mason. ------------------------------ From: Mark Freeman Date: Mon, 28 Oct 1996 14:29:49 GMT Subject: Memory question On 29/8/96 I posted a question to TeXhax on a memory problem that I was encountering running LaTeX2.09 under Dos on a document with many references. The following reply was sent to me by Jonathan Fine: > So far as I can tell, the problem is with the lines of code > > \def\bibcite#1#2{\global\@namedef{b@#1}{#2}} > > \def\@namedef#1{\expandafter\def\csname #1\endcsname} > in the main source file for latex, version 2.09. (Comments on LaTeX > 2e appear later.) > > Please place the definition > > \def\bibcite#1#2{\begingroup\expandafter\endgroup\expandafter > > \gdef\csname b@#1\endcsname{#2}} > somewhere in the preamble to your document. If I am correct, then > the problem will go away. > > Explanation. When \csname ... \endcsname produces an undefined > control sequence, it is as a local assignment given the value \relax. > This has the side effect of occupying space in the save stack. The > replacement definition does not remove this side effect, but makes it > harmless. The \expandafter's function so that the local definition > is valid only within the > > \begingroup\expandafter\endgroup > group of \bibcite. At the end of this group, the previous value of > \undefined is restored for \b@#1, and this frees up the space in the > save stack. Use \tracingall to get the gory details. > > For another explanation, see my article in Baskerville (4)1, > published 1994. In my article I wrote "This [side effect] can cause > problems in processing LaTeX documents which have a lot of > cross-references." So far as I can tell, this problem remains with > LaTeX 2e. As I am running \harvardcite as opposed to \bibcite I made the following minor adjustment to Jonathan's proposed solution: \def\harvardcite#1#2#3#4{\begingroup\expandafter\endgroup \expandafter\gdef\csname b@#1\endcsname{#2} \begingroup\expandafter\endgroup \expandafter\gdef\csname bhf@#1\endcsname{#2} \begingroup\expandafter\endgroup \expandafter\gdef\csname bha@#1\endcsname{#3} \begingroup\expandafter\endgroup \expandafter\gdef\csname bhy@#1\endcsname{#4}} This appears to have fixed my problem. I hope that others might find this correspondance useful. Regards, Mark Freeman. ------------------------------ From: "Robert Greer c/o CUNY 212-346-8450 (fax 346-8453)" Date: Fri, 01 Nov 96 10:43:13 EST Subject: 'none' Acknowledge-To: ------------------------------ End of TeXhax Digest V96 #14 **************************** About TeXhax... Please send contributions to: TeXhax@tex.ac.uk Subscription and unsubscription requests: send a one line mail message to TeXhax-Request@tex.ac.uk containing only the line subscribe texhax or unsubscribe texhax If you have problems with un/subscribing, please mail texhax-owner@nottingham.ac.uk For information on the TeX Users Group, please send a message to TUG@TUG.org, or write TeX Users Group, 1850 Union Street, #1637 San Francisco CA 94123 (phone: 1 415 982 8449, fax: 1 415 982 8559) Backnumbers of all the digests are stored in the Comprehensive TeX Archive Network (CTAN) and can be retrieved on the Internet by anonymous ftp. The hosts comprising CTAN include, among others, ftp.dante.de (129.69.1.12) -- Germany ftp.tex.ac.uk (128.232.1.87) -- UK Please use your nearest server, to keep network load down. The file /tex-archive/CTAN.sites on each of these hosts gives a list of other sites which maintain full or partial mirrors of the CTAN. Alternatively, finger ctan_us@ftp.shsu.edu for full details. TeXhax Digest back issues are filed below /tex-archive/digests/texhax/ Keyword-In-Context indexes are filed in /tex-archive/digests/indexes/ A Hypermail version of TeXhax is also available on the World-Wide Web at URL http://www.tex.ac.uk/tex-archive/digests/hyper/ \bye