3

\citep causes problem at the margin when the last name has an umlaut (\"{}). This post is related to my last post here:

apacite produces inline citations out of text area when using custom margins and parindent

Mico's solution of adding [natbibapa] solved the problem except for with the umlaut, so I'm asking a new question.

Here is MWE .tex file:

\documentclass[11 pt]{article}
\usepackage[natbibapa]{apacite}
\setlength{\textwidth}{6.5in}\setlength{\textheight}{9.2in}
\setlength{\oddsidemargin}{-.05in} \setlength{\topmargin}{-.5in}
\setlength{\parindent}{30pt}

\begin{document}
\par Text text text text text text text text text text text text text text text text textsss \citep{mweauth}. Text text text text text text text text text text text text text text. Text text text text text text text text text text text text. Text text text text text text text text text text text text text. Text text text text text text text text text text text text text. Text text text text text text text text text text text text text. Text text text text text text text text text text text text text. Text text text text text text text text text text text text text. Text text text text text text text text text text text text text.
\bibliographystyle{apacite}
\bibliography{mwe}
\end{document}

MWE .bib file:

@book{mweauth,
    Author={Firstname L\"{o}nglastname},
    Title={Book Title},
    Publisher={Publishing Company},
    Address={City, State},
    Year={2015} }

Here's a picture of the problematic output:

Picture of problem

The warning message:

Warning message

bsbk
  • 219

1 Answers1

3

As @AlanMunn has already noted in a comment, you need to use a font encoding other than OT1 (TeX's original font encoding, and still the default for most LaTeX document classes). Assuming you need "only" glyphs that occur in Western and Central European languages, you should probably use the T1 font encoding.

Assuming further that one ore more of the long names that need to be hyphenated in order to avoid overfull lines aren't hyphenated correctly by default, you may wish to (a) explicitly state a suitable input encoding, e.g., utf8, and (b) write out the names using the accented characters directly, say, "ö" instead of "\"{o}". Any hyphenation exceptions can then be addressed via suitable \hyphenation instructions.

The only time this method may raise issues is when you have several authors with similar spellings for the accented character, e.g., A. LongLastName, B. L{\"o}ngLastName, C. L{\o}ngLastName, and D. L{\H o}ngLastName. If your document (and the bibliography in particular) features such names, you may be well advised to switch from BiBTeX to biblates.

enter image description here

\RequirePackage{filecontents}
\begin{filecontents}{mwe.bib}
@book{mweauth,
    Author={Firstname Lönglastname},
    Title={Book Title},
    Publisher={Publishing Company},
    Address={City, State},
    Year={2015} }
\end{filecontents}

\documentclass[11pt]{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\hyphenation{löng-last-name} % fix hyphenation

\usepackage[natbibapa]{apacite}
\bibliographystyle{apacite}

\setlength{\textwidth}{6.5in}
\setlength{\textheight}{9.2in}
\setlength{\oddsidemargin}{-.05in} 
\setlength{\topmargin}{-.5in}
\setlength{\parindent}{30pt}
\begin{document}
\par Text text text text text text text text text text text text text text text text textsss \citep{mweauth}. Text text text text text text text text text text text text text text. Text text text text text text text text text text text text.
\bibliography{mwe}
\end{document}
Mico
  • 506,678