Discussion:
BibTeX: sorting problem
(too old to reply)
Phillip Helbig (undress to reply)
2020-04-17 20:08:21 UTC
Permalink
Consider these two keys:

\bibitem[{Di~Valentino et~al.(2020{\natexlab{a}})Di~Valentino, Melchiorri \&
Silk}]{EDiValentinoMS20a}
Di~Valentino E., Melchiorri A., Silk J., 2020{\natexlab{a}}, Nat. Astr., 4, 196

\bibitem[{Di~Valentino et~al.(2020{\natexlab{b}})Di~Valentino, Melchiorri \&
Silk}]{EDiValentinoMS20b}
Di~Valentino E., Melchiorri A., Silk J., 2020{\natexlab{b}}, Cosmic
discordance: Planck and luminosity distance data exclude {LCDM}.
{arXiv}:2003.04935

I want them sorted in the reference list in the order they are above.
On an old installation, this is the case; on a newer one it isn't.

Which is correct (in the sense of expected behaviour)?

Since I need it to work correctly with the new installation, how can I
force this?

Side note: the first comes from an article entry, the second from a
misc. Originally the second was also an article with many empty fields.
I had the arXiv identifier in the NOTE field, but that isn't picked up
by the bibliography style, so I changed it to misc and used the
HOWPUBLISHED field. That has the side effect of including the title. I
can live with the title or without it. At first I thought that the
wrong sorting was due to the NOTE field not being picked up, thus the
entry sorted first was a proper subset of the one sorted second, but
that doesn't seem to be the case.

The reason for the sorting order I want, that in the examples above, is
publication order, but that information is not available in the .bib
file (and even if it were it probably wouldn't be used.)

Any ideas?
Phillip Helbig (undress to reply)
2020-04-17 20:11:16 UTC
Permalink
Post by Phillip Helbig (undress to reply)
Side note: the first comes from an article entry, the second from a
misc. Originally the second was also an article with many empty fields.
I had the arXiv identifier in the NOTE field, but that isn't picked up
by the bibliography style, so I changed it to misc and used the
HOWPUBLISHED field.
It isn't picked up with the new installation. It is with the old.
Post by Phillip Helbig (undress to reply)
That has the side effect of including the title. I
can live with the title or without it. At first I thought that the
wrong sorting was due to the NOTE field not being picked up, thus the
entry sorted first was a proper subset of the one sorted second, but
that doesn't seem to be the case.
The reason for the sorting order I want, that in the examples above, is
publication order, but that information is not available in the .bib
file (and even if it were it probably wouldn't be used.)
Any ideas?
Pieter van Oostrum
2020-04-18 08:39:03 UTC
Permalink
Post by Phillip Helbig (undress to reply)
\bibitem[{Di~Valentino et~al.(2020{\natexlab{a}})Di~Valentino, Melchiorri \&
Silk}]{EDiValentinoMS20a}
Di~Valentino E., Melchiorri A., Silk J., 2020{\natexlab{a}}, Nat. Astr., 4, 196
\bibitem[{Di~Valentino et~al.(2020{\natexlab{b}})Di~Valentino, Melchiorri \&
Silk}]{EDiValentinoMS20b}
Di~Valentino E., Melchiorri A., Silk J., 2020{\natexlab{b}}, Cosmic
discordance: Planck and luminosity distance data exclude {LCDM}.
{arXiv}:2003.04935
I want them sorted in the reference list in the order they are above.
On an old installation, this is the case; on a newer one it isn't.
Which is correct (in the sense of expected behaviour)?
Since I need it to work correctly with the new installation, how can I
force this?
The sorting is done by the bibstyle (bst). So either you use a different bibstyle, or the bibstyle has changed. Try to find the older one, and compare them.
--
Pieter van Oostrum
www: http://pieter.vanoostrum.org/
PGP key: [8DAE142BE17999C4]
Phillip Helbig (undress to reply)
2020-04-18 09:39:16 UTC
Permalink
Post by Pieter van Oostrum
Post by Phillip Helbig (undress to reply)
\bibitem[{Di~Valentino et~al.(2020{\natexlab{a}})Di~Valentino, Melchiorri \&
Silk}]{EDiValentinoMS20a}
Di~Valentino E., Melchiorri A., Silk J., 2020{\natexlab{a}}, Nat. Astr., 4, 196
\bibitem[{Di~Valentino et~al.(2020{\natexlab{b}})Di~Valentino, Melchiorri \&
Silk}]{EDiValentinoMS20b}
Di~Valentino E., Melchiorri A., Silk J., 2020{\natexlab{b}}, Cosmic
discordance: Planck and luminosity distance data exclude {LCDM}.
{arXiv}:2003.04935
I want them sorted in the reference list in the order they are above.
On an old installation, this is the case; on a newer one it isn't.
Which is correct (in the sense of expected behaviour)?
Since I need it to work correctly with the new installation, how can I
force this?
The sorting is done by the bibstyle (bst). So either you use a
different bibstyle, or the bibstyle has changed. Try to find the older
one, and compare them.
They are exactly the same.
Phillip Helbig (undress to reply)
2020-04-18 09:44:36 UTC
Permalink
Post by Phillip Helbig (undress to reply)
Post by Pieter van Oostrum
Post by Phillip Helbig (undress to reply)
\bibitem[{Di~Valentino et~al.(2020{\natexlab{a}})Di~Valentino, Melchiorri \&
Silk}]{EDiValentinoMS20a}
Di~Valentino E., Melchiorri A., Silk J., 2020{\natexlab{a}}, Nat. Astr., 4, 196
\bibitem[{Di~Valentino et~al.(2020{\natexlab{b}})Di~Valentino, Melchiorri \&
Silk}]{EDiValentinoMS20b}
Di~Valentino E., Melchiorri A., Silk J., 2020{\natexlab{b}}, Cosmic
discordance: Planck and luminosity distance data exclude {LCDM}.
{arXiv}:2003.04935
I want them sorted in the reference list in the order they are above.
On an old installation, this is the case; on a newer one it isn't.
Which is correct (in the sense of expected behaviour)?
Since I need it to work correctly with the new installation, how can I
force this?
The sorting is done by the bibstyle (bst). So either you use a
different bibstyle, or the bibstyle has changed. Try to find the older
one, and compare them.
They are exactly the same.
I copied the file from the one installation to the other and used diff
to compare them; even though the versions were the same, perhaps someone
had changed something by hand. No. Exactly the same.

The versions of LaTeX are different, though.

I've noted several diffrences in the output of BibTeX between the old
and new installations. Usually, the old is correct. Its bug is a comma
instead of a full stop after the name of a book for proceedings (but not
for other books). The newer one ignores the note field for the article
entries, sorts in the wrong order, writes "?." if the title of a book
ends with a question mark, and repeats chapter and page information for
cross-referenced entries.
Pieter van Oostrum
2020-04-18 12:25:53 UTC
Permalink
Post by Phillip Helbig (undress to reply)
Post by Phillip Helbig (undress to reply)
They are exactly the same.
I copied the file from the one installation to the other and used diff
to compare them; even though the versions were the same, perhaps someone
had changed something by hand. No. Exactly the same.
The versions of LaTeX are different, though.
I've noted several diffrences in the output of BibTeX between the old
and new installations. Usually, the old is correct. Its bug is a comma
instead of a full stop after the name of a book for proceedings (but not
for other books). The newer one ignores the note field for the article
entries, sorts in the wrong order, writes "?." if the title of a book
ends with a question mark, and repeats chapter and page information for
cross-referenced entries.
Can you compare the .bbl files (old and new)?
--
Pieter van Oostrum
www: http://pieter.vanoostrum.org/
PGP key: [8DAE142BE17999C4]
Phillip Helbig (undress to reply)
2020-04-18 13:53:22 UTC
Permalink
Post by Pieter van Oostrum
Post by Phillip Helbig (undress to reply)
Post by Phillip Helbig (undress to reply)
They are exactly the same.
I copied the file from the one installation to the other and used diff
to compare them; even though the versions were the same, perhaps someone
had changed something by hand. No. Exactly the same.
The versions of LaTeX are different, though.
I've noted several diffrences in the output of BibTeX between the old
and new installations. Usually, the old is correct. Its bug is a comma
instead of a full stop after the name of a book for proceedings (but not
for other books). The newer one ignores the note field for the article
entries, sorts in the wrong order, writes "?." if the title of a book
ends with a question mark, and repeats chapter and page information for
cross-referenced entries.
Can you compare the .bbl files (old and new)?
Such a comparison is what the remarks about are based on. But they
otherwise look quite different with regard to the \bibitem stuff, the
newer one having \protect{\citeauthoryear} and so on and the other one
not. That is perhaps to be expected; I'm concerned with why there are
differences even though I am using the same .bst.

At least I hope I am. According to the paths, the same should be
loaded. However, the version is not reported in any log files, as far
as I can see.

I noticed two more bugs in the old version: "edn." (as in "2nd edn.) is
in the wrong place, and what should be "eds" (according to the journal
style) is "eds." (British usage: no full stop after abbreviation if the
last letter of the abbreviation is the same as the last letter of that
which is abbreviated, hence Mr and Dr but etc. and et al. Both have
"edn."; perhaps that should be "edn".).
Phillip Helbig (undress to reply)
2020-04-18 12:11:02 UTC
Permalink
Post by Pieter van Oostrum
The sorting is done by the bibstyle (bst). So either you use a
different bibstyle, or the bibstyle has changed. Try to find the older
one, and compare them.
I actually see many slight differences between the .bbl files from two
vastly different installations BUT WITH THE SAME BIBSTYLE (.BST). So
something else is responsible.

BibTeX? My impression was that this has been frozen at 0.99 for years.

The .cls file? I don't think that this influences how BibTeX behaves,
but could influence what is written to the .aux file. But does BibTeX
read that at all?

LaTeX? Same comments.

NatBiB? Again, same versions are used, as in .bst.

The differences are all in the .bbl files, not in the way that LaTeX
formats what is there, because if I correct the goofs by hand in the
.bbl files, then I get the result I want.

So, what determines the content of a .bbl besides BibTeX and the .bst
file? LaTeX? NatBib? The class file? Something else?
Pieter van Oostrum
2020-04-18 12:43:26 UTC
Permalink
Post by Phillip Helbig (undress to reply)
Post by Pieter van Oostrum
The sorting is done by the bibstyle (bst). So either you use a
different bibstyle, or the bibstyle has changed. Try to find the older
one, and compare them.
I actually see many slight differences between the .bbl files from two
vastly different installations BUT WITH THE SAME BIBSTYLE (.BST). So
something else is responsible.
BibTeX? My impression was that this has been frozen at 0.99 for years.
The .cls file? I don't think that this influences how BibTeX behaves,
but could influence what is written to the .aux file. But does BibTeX
read that at all?
LaTeX? Same comments.
NatBiB? Again, same versions are used, as in .bst.
The differences are all in the .bbl files, not in the way that LaTeX
formats what is there, because if I correct the goofs by hand in the
.bbl files, then I get the result I want.
So, what determines the content of a .bbl besides BibTeX and the .bst
file? LaTeX? NatBib? The class file? Something else?
I think the .bbl file is completely determined by the .bst file, the
.bib file and the \citation commands in the .aux file. Especially the
sorted order. However, later processing by LaTeX (after Bibtex) may
depend on packages that (re)define the commands in the .bbl file.

But you should also look in the .log file to see if maybe a non-standard file is used.
And also look in the .blg file for anomalies.
--
Pieter van Oostrum
www: http://pieter.vanoostrum.org/
PGP key: [8DAE142BE17999C4]
Phillip Helbig (undress to reply)
2020-04-18 13:55:53 UTC
Permalink
Post by Pieter van Oostrum
I think the .bbl file is completely determined by the .bst file, the
..bib file and the \citation commands in the .aux file.
The first two are the same. The last one is probably different.
Post by Pieter van Oostrum
Especially the
sorted order. However, later processing by LaTeX (after Bibtex) may
depend on packages that (re)define the commands in the .bbl file.
That's not the case; if I correct the mistakes by hand and run latex
again, the result is what I want. The problem is that the contents of
the .bbl are different, despite the same .bib and .bst.
Post by Pieter van Oostrum
But you should also look in the .log file to see if maybe a non-standard file is used.
And also look in the .blg file for anomalies.
Nothing strange there.
Pieter van Oostrum
2020-04-18 14:25:20 UTC
Permalink
Post by Phillip Helbig (undress to reply)
Post by Pieter van Oostrum
I think the .bbl file is completely determined by the .bst file, the
..bib file and the \citation commands in the .aux file.
The first two are the same. The last one is probably different.
Post by Pieter van Oostrum
Especially the
sorted order. However, later processing by LaTeX (after Bibtex) may
depend on packages that (re)define the commands in the .bbl file.
That's not the case; if I correct the mistakes by hand and run latex
again, the result is what I want. The problem is that the contents of
the .bbl are different, despite the same .bib and .bst.
Post by Pieter van Oostrum
But you should also look in the .log file to see if maybe a non-standard file is used.
And also look in the .blg file for anomalies.
Nothing strange there.
Then I suspect a different .bst file is used than you think. Or WAS used in the older system.
--
Pieter van Oostrum
www: http://pieter.vanoostrum.org/
PGP key: [8DAE142BE17999C4]
Dr Eberhard Lisse
2020-04-20 10:54:57 UTC
Permalink
What I like to do in these cases is to copy them to two different names
and then use one after the other, so I really know which one is throwing
the error. And that way I can also be sure that if I diff them thery
are the files I want tot diff :-)-O

I try however to have the latex MacTeX Basic on all my machines running
tlmgr daily or whenever I access the machine, so that I have the same
environment everywhere.

I "support" two collaborators overseas (or rather wean them off Word
slowly :-)-O) and we can update this via Zoom easily

greetings, el
[...]
Then I suspect a different .bst file is used than you think. Or WAS
used in the older system.
--
If you want to email me, replace nospam with el
Phillip Helbig (undress to reply)
2020-04-18 14:36:18 UTC
Permalink
In article <r7f0t9$1eu6$***@gioia.aioe.org>,
***@asclothestro.multivax.de (Phillip Helbig (undress to reply))
writes:

My bad. It turns out that the .bst files were different after all.

My mistake was that I thought that bibtex reads from the same path as
latex by default. Either it doesn't, or I have something defined which
causes differences between the paths.

It turns out that I was using a .bst file from 1997, apparently
generated with makebst. I don't remember doing that, but it looks like
I did, even for several other journals which I have never written for.
My guess is that at the time the journal didn't supply their own .bst
file.

When the journal updated their latex class a few years ago (and I AM
using the new class), I also downloaded the new .bst, but put it
somewhere where it couldn't be found. As it turns out, it has
significantly more bugs than the old, self-generated one. (And those
bugs are probably due to the fact that I was a makebst novice. I don't
even remember running it back then. I did use makebst to generate some
new .bst files recently, and based on that experience it is certainly
probable that I made a few mistakes back in the day.)

I will suggest to the journal that they supply a .bst which actually
works.

If they don't, I'll probably use makebst to generate one which does.
With my recent makebst experience, that should be relatively easy.

For now, everything has been fixed by hand, and since I don't plan to
submit anything to this journal for a few months, I should have time to
sort out the .bst before I need to use it again.
Phillip Helbig (undress to reply)
2020-04-18 14:39:14 UTC
Permalink
Post by Phillip Helbig (undress to reply)
My bad. It turns out that the .bst files were different after all.
That would have been obvious if BibTeX were to write the version, rather
than just the name, of the .bst used into the .blg. :-|
Peter Flynn
2020-04-18 22:00:51 UTC
Permalink
Post by Phillip Helbig (undress to reply)
My mistake was that I thought that bibtex reads from the same path as
latex by default. Either it doesn't, or I have something defined which
causes differences between the paths.
Somewhere there will be a file (called texmf.cnf on modern systems)
which sets the paths for the various programs. bibtex and latex would
probably use very different paths because they share almost nothing
between them. You should always be able to find what file will be used
by using the kpsewhich command, eg kpsewhich foobar.bst will respond
with the full path to the file that will get used.
Post by Phillip Helbig (undress to reply)
My guess is that at the time the journal didn't supply their own
.bst file.
Fairly common even nowadays.
Post by Phillip Helbig (undress to reply)
When the journal updated their latex class a few years ago (and I AM
using the new class), I also downloaded the new .bst, but put it
somewhere where it couldn't be found.
That's when kpsewhich can help, by showing where bibtex will expect to
find it.

The alternative, which I STRONGLY recommend, is to create a personal TeX
directory separate from your documents, with subdirectories exactly
matching the pattern of the subdirectory structure of your main
installation (only the ones needed). Any personal, private,
non-conformist, publisher-supported, extraneous, or experimental
classes, styles, etc go in there. If you create this in the default
location (see below), TeX and friends will automatically look there
first, before going off to the main directories, so what you put in
there will take precedence – under MiKTeX you do have to add it manually
to the FNDB and keep that updated, but on other systems it happens
automatically. The canonical default locations are:

UNIX and GNU Linux: ~/texmf
Mac OS X: ~/Library/texmf
Windows 95/98/XP/ME: C:\texmf
Windows 7–10+: Computer\System\Users\yourname\texmf

I don't know the location on VMS but this will be in the paths file I
mentioned at the top of this post. If you know or find that location I'd
be happy to add it to my documentation at
http://latex.silmaril.ie/formattinginformation/personal.html
Post by Phillip Helbig (undress to reply)
As it turns out, it has
significantly more bugs than the old, self-generated one.
Why am I not surprised. Publishers' code is rarely useful (with one or
two shining exceptions).
Post by Phillip Helbig (undress to reply)
I will suggest to the journal that they supply a .bst which actually
works.
And suggest that if they document their classes, styles, and bib stuff,
they should submit it to CTAN so that it can be found and distributed
with TeX installations. There is no shortage of people who will help
them, I think.
Post by Phillip Helbig (undress to reply)
For now, everything has been fixed by hand, and since I don't plan
to submit anything to this journal for a few months, I should have
time to sort out the .bst before I need to use it again.
Excellent!

Peter
Phillip Helbig (undress to reply)
2020-04-19 07:26:44 UTC
Permalink
Post by Peter Flynn
The alternative, which I STRONGLY recommend, is to create a personal TeX
directory separate from your documents, with subdirectories exactly
matching the pattern of the subdirectory structure of your main
installation (only the ones needed). Any personal, private,
non-conformist, publisher-supported, extraneous, or experimental
classes, styles, etc go in there. If you create this in the default
location (see below), TeX and friends will automatically look there
first, before going off to the main directories, so what you put in
there will take precedence
That's essentially what I do, at least for LaTeX.
Post by Peter Flynn
UNIX and GNU Linux: ~/texmf
Mac OS X: ~/Library/texmf
Windows 95/98/XP/ME: C:\texmf
Windows 7–10+: Computer\System\Users\yourname\texmf
I don't know the location on VMS but this will be in the paths file I
mentioned at the top of this post. If you know or find that location I'd
be happy to add it to my documentation at
http://latex.silmaril.ie/formattinginformation/personal.html
I'll have a look and let you know.
Post by Peter Flynn
And suggest that if they document their classes, styles, and bib stuff,
they should submit it to CTAN so that it can be found and distributed
with TeX installations. There is no shortage of people who will help
them, I think.
It might already be, I'm not sure. It is mnras.cls and mnras.bst.
Pieter van Oostrum
2020-04-19 12:12:30 UTC
Permalink
Post by Phillip Helbig (undress to reply)
It might already be, I'm not sure. It is mnras.cls and mnras.bst.
I helped you some time ago to make changes to mnras.bst. I don't know if
that has something to do with it.
--
Pieter van Oostrum
www: http://pieter.vanoostrum.org/
PGP key: [8DAE142BE17999C4]
Phillip Helbig (undress to reply)
2020-04-19 15:02:00 UTC
Permalink
Post by Pieter van Oostrum
Post by Phillip Helbig (undress to reply)
It might already be, I'm not sure. It is mnras.cls and mnras.bst.
I helped you some time ago to make changes to mnras.bst. I don't know if
that has something to do with it.
The newest I have is 17-JUN-2015. Was it then or back in 1997? The one
I have from 17-JUN-2015 is the one provided by the publisher.
Pieter van Oostrum
2020-04-19 19:21:12 UTC
Permalink
Post by Phillip Helbig (undress to reply)
Post by Pieter van Oostrum
Post by Phillip Helbig (undress to reply)
It might already be, I'm not sure. It is mnras.cls and mnras.bst.
I helped you some time ago to make changes to mnras.bst. I don't know if
that has something to do with it.
The newest I have is 17-JUN-2015. Was it then or back in 1997? The one
I have from 17-JUN-2015 is the one provided by the publisher.
That was a few months ago. I posted it here, I think. But it seems you never saw it.
--
Pieter van Oostrum
www: http://pieter.vanoostrum.org/
PGP key: [8DAE142BE17999C4]
Pieter van Oostrum
2020-04-19 19:27:25 UTC
Permalink
Post by Phillip Helbig (undress to reply)
Post by Pieter van Oostrum
Post by Phillip Helbig (undress to reply)
It might already be, I'm not sure. It is mnras.cls and mnras.bst.
I helped you some time ago to make changes to mnras.bst. I don't know if
that has something to do with it.
The newest I have is 17-JUN-2015. Was it then or back in 1997? The one
I have from 17-JUN-2015 is the one provided by the publisher.
It was 21 Feb - 3 March of this year in this group.
Subject: Re: .bst to cite all three authors at first citation
Message-ID: <***@cochabamba.vanoostrum.org>
--
Pieter van Oostrum
www: http://pieter.vanoostrum.org/
PGP key: [8DAE142BE17999C4]
Phillip Helbig (undress to reply)
2020-04-19 20:45:41 UTC
Permalink
Post by Pieter van Oostrum
It was 21 Feb - 3 March of this year in this group.
Subject: Re: .bst to cite all three authors at first citation
Right. In this particular case, almost all citations were two-author
papers. Using \cite{p|t}* manually is ugly, but works. However, the
other problems were more pressing, so I put this on the backburner.

I did try your change, but the problem with the path meant that it was
not picked up. :-|

I've since learned that natbib has a longnamesfirst feature which, I
think, can do the same thing.

Since I'm actually writing many papers now, I don't have that much time
for trouble-shooting, but I'll definitely take a look, as other people
(who presumably don't have a path problem) have also reported that
citing all three authors on the first citation doesn't work as claimed.
Peter Flynn
2020-04-19 17:51:30 UTC
Permalink
On 19/04/2020 08:26, Phillip Helbig (undress to reply) wrote:
[...]
Post by Phillip Helbig (undress to reply)
I don't know the location on VMS [...]
I'll have a look and let you know.
Thank you, that would be useful.
Post by Phillip Helbig (undress to reply)
[...] submit it to CTAN
It might already be, I'm not sure. It is mnras.cls and mnras.bst.
That's good: it seems to be — version 3:

https://ctan.org/pkg/mnras?lang=en

The mnras.bst file is dated 09 March 2015
The mnras.cls file is dated 2015/05/22

Peter
jfh
2020-04-19 23:16:05 UTC
Permalink
Post by Phillip Helbig (undress to reply)
\bibitem[{Di~Valentino et~al.(2020{\natexlab{a}})Di~Valentino, Melchiorri \&
Silk}]{EDiValentinoMS20a}
Di~Valentino E., Melchiorri A., Silk J., 2020{\natexlab{a}}, Nat. Astr., 4, 196
\bibitem[{Di~Valentino et~al.(2020{\natexlab{b}})Di~Valentino, Melchiorri \&
Silk}]{EDiValentinoMS20b}
Di~Valentino E., Melchiorri A., Silk J., 2020{\natexlab{b}}, Cosmic
discordance: Planck and luminosity distance data exclude {LCDM}.
{arXiv}:2003.04935
I want them sorted in the reference list in the order they are above.
On an old installation, this is the case; on a newer one it isn't.
Which is correct (in the sense of expected behaviour)?
Since I need it to work correctly with the new installation, how can I
force this?
Side note: the first comes from an article entry, the second from a
misc. Originally the second was also an article with many empty fields.
I had the arXiv identifier in the NOTE field, but that isn't picked up
by the bibliography style, so I changed it to misc and used the
HOWPUBLISHED field. That has the side effect of including the title. I
can live with the title or without it. At first I thought that the
wrong sorting was due to the NOTE field not being picked up, thus the
entry sorted first was a proper subset of the one sorted second, but
that doesn't seem to be the case.
The reason for the sorting order I want, that in the examples above, is
publication order, but that information is not available in the .bib
file (and even if it were it probably wouldn't be used.)
Any ideas?
I had a sorting problem some years ago because Lighthill's earlier works were by M.J.Lighthill and his later ones (after he became Sir James) by J.Lighthill.
That made all his earlier works come after his later ones. I was grateful that Oren Patashnik suggested putting this in the preamble of bib.bib :

@preamble{"\providecommand{\noopsort}[1]{} "}

Then the body of bib.bib could include things like

author = {Lighthill{\noopsort{1950}}, M. J.},

author = {Lighthill{\noopsort{1978}}, James},

The effect was to sort his surname as if it were Lighthill1950 and Lighthill1978 but print it as Lighthill. Can Phliilp's problem be solved that way?
Phillip Helbig (undress to reply)
2020-04-20 05:29:12 UTC
Permalink
Post by jfh
I had a sorting problem some years ago because Lighthill's earlier works were by M.J.Lighthill and his later ones (after he became Sir James) by J.Lighthill.
@preamble{"\providecommand{\noopsort}[1]{} "}
Then the body of bib.bib could include things like
author = {Lighthill{\noopsort{1950}}, M. J.},
author = {Lighthill{\noopsort{1978}}, James},
The effect was to sort his surname as if it were Lighthill1950 and Lighthill1978 but print it as Lighthill. Can Phliilp's problem be solved that way?
Probably. In the meantime, I have noticed that there are other problems
with the .bst, so I'll probably modify it or create a new one of my own
without the problems.

In my case, though, the authors' names are exactly the same.
jfh
2020-04-20 22:14:56 UTC
Permalink
Post by Phillip Helbig (undress to reply)
Post by jfh
I had a sorting problem some years ago because Lighthill's earlier works were by M.J.Lighthill and his later ones (after he became Sir James) by J.Lighthill.
@preamble{"\providecommand{\noopsort}[1]{} "}
Then the body of bib.bib could include things like
author = {Lighthill{\noopsort{1950}}, M. J.},
author = {Lighthill{\noopsort{1978}}, James},
The effect was to sort his surname as if it were Lighthill1950 and Lighthill1978 but print it as Lighthill. Can Phliilp's problem be solved that way?
Probably. In the meantime, I have noticed that there are other problems
with the .bst, so I'll probably modify it or create a new one of my own
without the problems.
In my case, though, the authors' names are exactly the same.
That \noopsort trick is not restricted to surnames. When BibTeX put two papers by the same author in the same year out of chronological order because they had been sorted in alphabetical order of their titles, I put {\noopsort{a}} and {\noopsort{b}} at the beginning of the two titles to get the order right.
Phillip Helbig (undress to reply)
2020-04-21 06:13:27 UTC
Permalink
Post by jfh
That \noopsort trick is not restricted to surnames. When BibTeX put two
pap papers by the same author in the same year out of chronological
order because = they had been sorted in alphabetical order of their
titles, I put {\noopsort{a}} and {\noopsort{b}} at the beginning of the
two titles to get the order right.
My "problem" is perhaps that BibTeX sorted them by title, even though
the title does not appear in the .bbl file. I would prefer them to be
sorted by month (which also does not appear in the .bbl file). I agree
that sorting by title makes sense if titles appear in the .bbl (at least
if months don't).

Loading...