ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans van der Meer <hansm@science.uva.nl>
Subject: spurious space in cite
Date: Sun, 15 Jan 2006 13:26:51 +0100	[thread overview]
Message-ID: <115138F5-471A-4C0B-93D4-C879D6627E19@science.uva.nl> (raw)

I was typesetting bibliography references with the command
	\cite[data][ref]
and then found that a spce preceded the author name; surrounding the  
space with X and Y, it gives
	"X Yauthor" instead of "XYauthor

I was able to trace it down to the macro invertedshortauthor in thise  
case, but I suspect the others (invertedauthor,  normalauthor,  
normalshortauthor) will exhibit the same phenomenon.
The macro is:

\def\invertedshortauthor#1#2#3#4#5%
   {\bibdoif{#2}{#2\bibalternative\c!vonsep}%
    #3\bibalternative\c!surnamesep
    \bibdoif{#5}{#5\bibalternative\c!juniorsep}%
    \bibdoif{#4}{#4\unskip}}

tracingmacros shows an empty #2-argument takes the \c!vonsep, in bibl- 
apa.tex defined as a space.

I first wondered if the \bibdoif's shouldn't be replaced by a  
\bibdoifnot.
Anyway, that makes the spurious spaces go away.
But it seems not right, so I investigated the bibdoif's and found the  
following behaviour when calling with empty and nonempty arguments.

			bibdoif:\crlf
			empty = \bibdoif{}{empty}\crlf
			notempty = \bibdoif{x}{notempty}\par
			bibdoifnot:\crlf
			empty = \bibdoifnot{}{empty}\crlf
			notempty = \bibdoifnot{x}{notempty}\par
			bibdoifelse:\crlf
			empty = \bibdoifelse{}{first}{second}\crlf
			notempty = \bibdoifelse{x}{first}{second}\par

Typesetting gives as a result:

bibdoif:
empty = empty
notempty = notempty
bibdoifnot:
empty =
notempty =
bibdoifelse:
empty = first
notempty = first

So I have my doubts about the doif's.


Finally another observation on the typesetting by \cite[data][ref].
When typesetting a reference ending on a period, for example "Publ.  
Co. Inc.", the result has a double period "Publ. Co. Inc.."
That looks somewhat silly.

yours sincerely,
dr. H. van der Meer

             reply	other threads:[~2006-01-15 12:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-15 12:26 Hans van der Meer [this message]
2006-01-15 12:41 ` Taco Hoekwater
2006-01-15 18:59   ` Hans van der Meer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=115138F5-471A-4C0B-93D4-C879D6627E19@science.uva.nl \
    --to=hansm@science.uva.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).