🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text.tex
Article #1760

Re: Delimiters

#1760
From: Bill Lear
Date: Wed, 26 Aug 1992 17:21
37 lines
1301 bytes
In article <1992Aug26.130422.7351@EE.Surrey.Ac.UK> J.Deane@ee.surrey.ac.uk (Jonathan Deane) writes:
>
[...]

I have run into something similar, but not exactly the same problem.  My
solution was to do the following:

\newcommand{\pub}[2]{%
\def\next{#2}%
\ifx\next\empty
\def\next{#1}%
\ifx\next\empty % 1 and 2 are empty
\else
, #1% 2 is empty
\fi
\else
, #1, #2% neither are empty
\fi
}
 
\newcommand{\NYT}[2]{{\em New York Times}\pub{#1}{#2}}
\newcommand{\WSJ}[2]{{\em Wall Street Journal}\pub{#1}{#2}}
\newcommand{\SA}[2]{{\em Scientific American}\pub{#1}{#2}}
%
% etc.

In use, it looks like this:

     This  was  found  in the \NYT{December 12, 1992}{pp. 33--44,} and
     was  mentioned  in  the \WSJ{}{}\/ sometime during the summer. As
     well, \SA{June 1990}{} had quite a detailed report


I hope this provides some help.


Bill Lear (rael@ll.mit.edu)
Technical Details
Message-ID: <1992Aug26.172119.3092@ll.mit.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!ames!xn.ll.mit.edu!ll.mit.edu!rael
References: <1992Aug26.130422.7351@EE.Surrey.Ac.UK>

Show Full Headers
Complete Article Headers
Newsgroups: comp.text.tex
Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!ames!xn.ll.mit.edu!ll.mit.edu!rael
From: rael@ll.mit.edu (Bill Lear)
Subject: Re: Delimiters
Message-ID: <1992Aug26.172119.3092@ll.mit.edu>
Keywords: LaTeX, \def, delimiters
Sender: news@ll.mit.edu
Organization: MIT Lincoln Laboratory
References: <1992Aug26.130422.7351@EE.Surrey.Ac.UK>
Date: Wed, 26 Aug 92 17:21:19 GMT
Lines: 37