Article View: comp.text.tex
Article #1724Delimiters
From: Jonathan Deane
Date: Wed, 26 Aug 1992 13:04
Date: Wed, 26 Aug 1992 13:04
43 lines
1559 bytes
1559 bytes
Here is a simple problem to do with delimiters in LaTeX. Suppose you make
frequent references to Scientific American and decide to define a macro to
do it for you. You want to type "\sciamref{date}{page no.}". Here is a
possibility
**********************************
\documentstyle[11pt]{report}
\def\sciamref#1#2
% #1 is the date, #2 the page number
{({\em Sci.\ Am.}\enspace#1, p.\hskip2pt#2)}
\begin{document}
%Two examples of its use:
This approach has been tried before \sciamref{May 1989}{54}.
See our previous article \sciamref{September 1983}{72} for details.
\end{document}
**********************************
but it doesn't work. The first line comes out as
...tried before (Sci. Am. May 1989, p. 54.)
^
[the final fullstop has come inside the bracket, even though it was
outside the } in the input file.]
The second line comes out as
...article (Sci. Am. September 1983, p. 72)for details
^
[there is no space between the closing bracket and the "for details"].
What is going wrong?
Thanks for any help,
J.
Technical Details
Message-ID:
<1992Aug26.130422.7351@EE.Surrey.Ac.UK>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!uos-ee!ee.surrey.ac.uk!J.DeaneShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!uos-ee!ee.surrey.ac.uk!J.Deane From: J.Deane@ee.surrey.ac.uk (Jonathan Deane) Newsgroups: comp.text.tex Subject: Delimiters Keywords: LaTeX, \def, delimiters Message-ID: <1992Aug26.130422.7351@EE.Surrey.Ac.UK> Date: 26 Aug 92 13:04:22 GMT Sender: ees1jd@ee.surrey.ac.uk (Jonathan Deane) Organization: University of Surrey, Guildford, England Lines: 43