I need to hyphenate a long lastname with a hyphen in it in a reference, e.g.:
@article{LastHyphenName:2013xy,
author = {Longlast-Namewithhyphen, Antonio and Anotherlastname, David},
title = {{How to hyphenate a reference that has a lastname with a hyphen?}},
journal = {Contributions To the TeX Stackexchange},
year = {2013},
volume = {2},
pages = {539--557},
}
I read in Line breaking (or hyphenation?) of references in apalike that one can hyphenate even a word from the .bib file with \hyphenation
, but words that already have a hyphen cannot be hyphenated, or you do something like it's done in this SO thread. However, I think there has to be another way than manipulating the BibTeX entries.
Any solutions for this?
EDIT:
-
I'm editing my library externally and it is still growing as I'm
adding new references to the bibliography during the writing process,
thus substituting the hyphens with ashorthand
in the final
(exported) .bib file is not very efficient time-wise. -
Also, my bibliography has a ton of authors with their last names
being of hispanic origin which would mean time-costly, manual editing
of the .bib file (I know that hispanic last names are normally not
connected with a hyphen, but the hyphens is internationally
introduced to avoid confusion).
I'm writing my thesis with \classicthesis
, so the preamble is much more complex, but here's a MWE:
\documentclass{scrbook} % KOMA-Script article
\usepackage[english]{babel}
\usepackage{lipsum}
\usepackage[round]{natbib}
\usepackage{fontspec}
\usepackage{xunicode}
\setmainfont[Mapping=tex-text]{Minion Pro}
\usepackage[english]{babel}
\begin{document}
\hyphenchar\font=\string"7F
\parbox{1cm}{\cite{LastHyphenName:2013xy}}
\bibliographystyle{kluwer}
\bibliography{lib}
\end{document}
.bib file
@article{LastHyphenName:2013xy,
author = {Longlast-Namewithhyphen, Antonio and Anotherlastname, David},
title = {{How to hyphenate a reference that has a lastname with a hyphen?}},
journal = {Contributions To the TeX Stackexchange},
year = {2013},
volume = {2},
pages = {539--557},
}
Changing the hyphenchar is not working.
Best Answer
with package
babel
useand then