1

I'm editing a copy of unsrt.bst to change the format of the author's names in FUNCTION {format.names}, by replacing:

 s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't := 

with:

 s nameptr "{vv }{ll}{, f.}{ jj}" format.name$ 't := 

For some reason, the *.bbl file produced by BibTeX now shows Martínez where it was a Martínez, so PDFLaTeX complains. My preamble includes the \usepackage[utf8]{inputenc} and \usepackage[T1]{fontenc} lines.

The problem arises when leaving just f or f. instead of ff, even with no change in the ordering. What's happening?

5
  • 4
    BibTeX doesn't understand UTF-8. The name should be input as Mart{\'i}nez Commented Jul 31, 2024 at 9:02
  • I'll do the replacement, but everything goes perfectly before the ff to f change :( Commented Jul 31, 2024 at 9:06
  • 2
    With ff, BibTeX didn't have to apply any formatting to any parts of the full name complex. (It did, obviously, have to parse the full name in order to determine the ff, vv, ll, and jr components.) After you switch from ff to f., BibTeX does have to perform some formatting, and all bets are off as to what BibTeX will end up doing if you input the name's ll component as Martínez instead of as Mart{\'i}nez. Commented Jul 31, 2024 at 9:59
  • 1
    I cannot reproduce this particular behaviour if I try the same modification with plain.bst, but as egreg says, BibTeX does not support non-ASCII-chars, so you cannot expect Martínez to work even though it generally works fine (or at least appears to work fine). I'd love to take a closer look at this though (I won't be able to offer a solution apart from the already suggested Mart{\'i}nez). Can you double-check that you can reproduce the issue in a new, empty folder and can you then give us a detailed instruction to reproduce the issue? Commented Jul 31, 2024 at 10:01
  • 1
    Oops, I should probably mention that I also tested the same modification with unsrt.bst (as well as plain.bst) and the result was exactly the same: I got the expected output without any error or weird encoding issues. Commented Jul 31, 2024 at 11:51

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.