emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BibTeX-mode: Key generation when latin-1 characters appear in author


From: Christian Schlauer
Subject: Re: BibTeX-mode: Key generation when latin-1 characters appear in author field
Date: Tue, 12 Apr 2005 16:38:44 +0200
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (windows-nt)

Hello Stefan, hello all,

Stefan Monnier <address@hidden> writes:

>> Now, press `C-c C-c' inside the entry -- Emacs suggests `blöd05:_test'
>> as the key to use -- and hit RET: Emacs writes in the minibuffer `New
>> inserted entry yields duplicate key'.
>
> Does the patch below fix the problem for you?

I tested your patch a little: first a case without `funny characters',
and then I'll add some umlauts here and there.

@Article{,
  author =       {Some Name},
  title =        {Umlaut title},
  journal =      {None for the moment},
  year =         {2005},
  chrsc =        Summary:
}

Gives the key `name05:_umlaut_title'. Using umlauts in the author
field gives

@Article{näme05:_umlaut_title,
  author =       {Söme Näme},
  title =        {Umlaut title},
  journal =      {None for the moment},
  year =         {2005},
  chrsc =        Summary:
}

so that works. Making the first word of the title starting with an
umlaut gives

@Article{näme05:_title,
  author =       {Söme Näme},
  title =        {Ümlaut title},
  journal =      {None for the moment},
  year =         {2005},
  chrsc =        Summary:
}

Now the `ümlaut' is missing in the key, it should be
`näme05:_ümlaut_title' instead of `näme05:_title'. Replacing `Ümlaut'
with `Umläut' gives the same result. Replacing `title' with `titlö'
gives

@Article{näme05:_umlaut,
  author =       {Söme Näme},
  title =        {Umlaut titlö},
  journal =      {None for the moment},
  year =         {2005},
  chrsc =        Summary:
}

so it seems to me that words in the title containing umlauts are just
skipped, while umlauts in the author field do not harm:

@Article{überall05:_umlaut,
  author =       {Ärwin Überall},
  title =        {Umlaut titlö},
  journal =      {None for the moment},
  year =         {2005},
  chrsc =        Summary:
}

gives `überall05' and not only `05'. So except for the `skip all words
with funny characters in the title' problem, your patch works well.

There is one more questionmark, though: should these keys contain
non-ASCII characters?
<URL:http://www.tex.ac.uk/cgi-bin/texfaq2html?label=usebibtex>
explains that the keys get written in the .aux file, which is read by
bibtex, which in turn produces a .bbl file. Hm. I don't know how
error-prone it is to have accented characters in the key. It is
probably safer to use only ASCII characters (in the key). What do you
think? I found one thread in de.comp.text.tex (Message-ID:
<address@hidden>, sorry for the German thread, but that
is all I found) where an umlaut in the key has caused problems:

,----[ Message-ID: <address@hidden> ]
| ! Missing \endcsname inserted.
| <to be read again> 
|                    \protect 
| l.8 ...accent 127\fontdimen 5\font address@hidden a}tsch}{7}

[ and he gets this error when the following bibliography is latexed: ]

| \begin{thebibliography}{99}
| \bibitem{green} N.N. Greenwood, A. Earnshaw: Chemie der Elemente, VCH
|     Weinheim (1988)

[...]

| \bibitem{krätsch} W. Krätschmer, L.D. Lamb, K.Fostiropolous, D.R. Huffmann,
|     Nature {\bf347}, 354 (1990)

[...]

| \end{thebibliography}
`----

So it would be safer to ``strip accents'', I guess?

-- 
Christian Schlauer





reply via email to

[Prev in Thread] Current Thread [Next in Thread]