0

I am using a biblatex-gost package. Here is a MWE:

\documentclass[12pt,a4paper]{article}
\begin{filecontents}{\jobname.bib}
@book{halanay,
    langid = {english},
    title = {Differential Equations, Their Stability, Time Lags, Oscillations},
    author = {A. Halanay},
    location = {New York--London},
    publisher = {Acad. Press},
    year = {1968},
    pagetotal = {568},
}
\end{filecontents}       
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[backend=biber,bibencoding=utf8,maxbibnames=999,style=gost-numeric,language=auto,autolang=other]{biblatex}
\addbibresource{\jobname.bib}

\toggletrue{bbx:gostbibliography}
\usepackage[autostyle]{csquotes}

\begin{document}
\cite{halanay}
\printbibliography
\end{document}

It produces

enter image description here

As you can see, the word Oscillations is broken. How do I prohibit hyphenation for this single word? Or is it possible to disable hyphenation for all references?

2

In principle you could add a hyphenation exception for "oscillations" and tell it to never get broken across lines with

\hyphenation{oscillations}

See also No hyphen for a word.

That approach has several disadvantages, though. It prevents hyphenation of the word everywhere - not just in the bibliography, this can lead to undesirable overfull or underfull lines in the normal document text. But even in the bibliography taking away possible hyphenation points makes justification harder. Finally you need to specify these exceptions manually for every word you to stop from breaking, that is simply not viable if you want to avoid hyphenation in general.

If you want to avoid hyphenation in the bibliography completely, I suggest you use a \raggedright (left aligned) bibliography. That way there will be no excessive stretching of space if no hyphenation can be found. See Biblatex raggedright bibliography with polyglossia hebrew.

\documentclass[12pt,a4paper]{article}
\begin{filecontents}{\jobname.bib}
@book{halanay,
    langid = {english},
    title = {Differential Equations, Their Stability, Time Lags, Oscillations},
    author = {A. Halanay},
    location = {New York--London},
    publisher = {Acad. Press},
    year = {1968},
    pagetotal = {568},
}
\end{filecontents}       
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[backend=biber,bibencoding=utf8,maxbibnames=999,style=gost-numeric,language=auto,autolang=other]{biblatex}
\addbibresource{\jobname.bib}

\AtBeginBibliography{\raggedright}

\toggletrue{bbx:gostbibliography}
\usepackage[autostyle]{csquotes}

\begin{document}
\cite{halanay}
\printbibliography
\end{document}

Ragged right bibliography without hyphenation

You could also simply disable hyphenation (see for example temporarily suppress hyphenation) but that would very likely leave you with overfull lines and since you have little possibilities to intervene manually that is not a viable solution.

  • Thank you for such a detailed answer. Unfortunately, neither \hyphenation nor \begin{sloppypar}...\end{sloppypar} didn't work. Hyphenation was still there. – user2513149 Oct 26 '18 at 8:09
  • @user2513149 Mhhh \hyphenations worked for me. I didn't try sloppypar, but I would suggest \raggedright anyway. If you don't want any hyphenation it is better to go with ragged right text. – moewe Oct 26 '18 at 8:12
  • OK, thanks anyway! I will accept this answer since it contains several solutions. – user2513149 Oct 26 '18 at 8:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.