Article View: comp.text.tex
Article #12185Re: texinfo tables with borders
From: Donald Arseneau
Date: Tue, 11 Jul 2000 00:00
Date: Tue, 11 Jul 2000 00:00
37 lines
2263 bytes
2263 bytes
jhallen@world.std.com (Joseph H Allen) writes:
> Over the weekend I've finally learned TeX for real. It's actually a breeze
> (for programmers, anyway) with good material: I recommend these two books: A
> Beginner's Book of TeX by Raymond Seroul and Silvio Levy (ISBN
> 0-387-97562-4), and The Advanced TeXbook by David Salomon (ISBN
> 0-387-94556-3). These are vastly better than The TeXbook
They must be, to learn TeX in a weekend! Congratulations!
> % Write a label to the cross-reference file
> \def\label#1#2{\immediate\write\aux
> {\noexpand\def\expandafter\noexpand\csname#2\endcsname{{#1}{\folio}}}}
This is incorrect -- You need to use plain \write to get the
page-reference right. Of course you want to evaluate the
ordinary reference immediately. Something like:
\def\label#1#2{\begingroup
\let\folio\relax
\edef\labeL{\def\expandafter\string\csname#2\endcsname{{#1}{\folio}}}
\write\aux{\labeL}
\endgroup
}
> \def\figure#1#2{\advance\fignum by 1 \label{\the\fignum}{#1}{Figure \the\fignum \ #2}
> \edef\save{\string\fg\the\fignum:#2\string\page\noexpand\folio%
> \string\\}
> \write\lof\expandafter{\save}}
The same problem here with page numbers.
Also you should use \global\advance\fignum
They look amazingly good for someone who just learned.
Donald Arseneau asnd@triumf.ca
Technical Details
Message-ID:
<yfizonnnc1t.fsf@triumf.ca>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<FxAAsI.D5p@world.std.com> <3969BF3B.C18583B0@gdn.dsi.unifi.it> <slrn8mmfq5.6qb.mdw@mull.ncipher.com> <FxJJ9I.1BK@world.std.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f9e16,4b3cd7e7e2dd6889 X-Google-Attributes: gidf9e16,public X-Google-Thread: 109f73,4b3cd7e7e2dd6889 X-Google-Attributes: gid109f73,public X-Google-Thread: 1025b4,4b3cd7e7e2dd6889 X-Google-Attributes: gid1025b4,public From: Donald Arseneau <asnd@triumf.ca> Subject: Re: texinfo tables with borders Date: 2000/07/11 Message-ID: <yfizonnnc1t.fsf@triumf.ca> X-Deja-AN: 645346986 Sender: asnd@mutant References: <FxAAsI.D5p@world.std.com> <3969BF3B.C18583B0@gdn.dsi.unifi.it> <slrn8mmfq5.6qb.mdw@mull.ncipher.com> <FxJJ9I.1BK@world.std.com> X-Trace: nntp.itservices.ubc.ca 963380172 4542 142.90.112.22 (12 Jul 2000 05:36:12 GMT) Organization: TRIUMF: Canada's national meson facility Followup-To: comp.text.tex Newsgroups: comp.text.tex,gnu.utils.help,gnu.misc.discuss X-Complaints-To: abuse@interchange.ubc.ca