0

I have a german article to cite, and in my bib file I typed something like the following

@article{müjaaa2005,
  title={aaaa},
  author={Müjaaa},
  journal={aaaa},
  pages={111},
  year={2005},
  publisher={aaa}
}

however \cite{müjaaa2005} only shows a question mark.

The beginning part of my tex file looks like the following:

 \begin{filecontents}{preliminary.sty}
\ProvidesPackage{preliminary}
\DeclareOption{draft}{%
  \AtBeginDocument{%
    \renewcommand\maketitlehookc{%
      \begin{center}(Preliminary and Incomplete)\end{center}}}}
\ProcessOptions
\RequirePackage{titling}
\endinput
\end{filecontents}
\documentclass[12pt]{article}
\usepackage{preliminary}
\usepackage[ngerman]{babel}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[round,authoryear]{natbib}

Anyone knows how to fix this problem, and let it show müjaaa(2005) ?

Thanks!

3
  • 2
    Unfortunately, BibTeX does not provide full Unicode support. You will need to use US-ASCII characters only for the entry key, try muejaaa2005 or mujaaa2005.
    – moewe
    Aug 2, 2020 at 8:00
  • 4
    The code works out of the box (if you change \usepackage[utf8x]{inputenc} to \usepackage[utf8]{inputenc}) if you use biblatex with Biber.
    – moewe
    Aug 2, 2020 at 8:01
  • @moewe Thank you so much! These are very helpful. I also figured out a way that worked. Aug 2, 2020 at 8:02

1 Answer 1

1

I just found that changing to the following

@article{mujaaa2005,
  title={aaaa},
  author={M{\"{u}}jaaa},
  journal={aaaa},
  pages={111},
  year={2005},
  publisher={aaa}
}

as well as \cite{mujaaa2005} has solved the problem.

3
  • 1
    Note that M\"ujaaa has some advantages.
    – Wrzlprmft
    Aug 2, 2020 at 9:20
  • 1
    @Wrzlprmft Note that there is a difference here between 'normal' text in the document body (where \"u is preferable) and input in the .bib file (where you need the additional pair of braces to get sorting right). The officially documented input for macro-escapes in .bib files includes the braces, so {\"u} would be correct. If you drop the braces, you don't get into trouble with kerning, but BibTeX won't be able to sort the character. This is no issue with Biber, which can handle Unicode, so there the preferred input is just ü without additional braces.
    – moewe
    Aug 2, 2020 at 9:32
  • 1
    @moewe: I usually do not use the extra braces (except for initials) because it avoids some actual problem (though I cannot remember which). This may botch sorting, but you have to get very unlucky for this to matter and there is no established, international way for sorting in accented characters anyway.
    – Wrzlprmft
    Aug 2, 2020 at 9:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .