Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Hyperref with pagebackref: linebreak too early

38 views
Skip to first unread message

florian....@googlemail.com

unread,
Jan 12, 2012, 8:09:03 AM1/12/12
to
Hi,
I think there is sometimes an unintended linebreak when using
pagebackref.
Using Miktext 2.9 on Win7 64 bit, editor is TexnicCenter 2.0 A3,
hyperref version "2011-12-07" my example is:

\documentclass[pdftex]{scrbook}
\usepackage[pagebackref]{hyperref}
\begin{document}
\bibliographystyle{plain}
\cite{Minimal}\clearpage
\cite{Minimal}\clearpage
\bibliography{bibi}
\end{document}

Using a bibi.bib file containing:
@ARTICLE{Minimal,
author = {A. Aaaaa and A. Aaaaa and A. Aaaaa and A. Aaaaa and A.
Aaaaa and
A. Aaaaa},
title = {BBBBBB BBBBBBBB BBBBBBBBB BBBBBBb},
journal = {CCCCCCCCC CCCCCCCCC},
year = {2042},
volume = {42},
pages = {42}
}

It produces this behaviour: http://www.uni-due.de/~hp0052/linebreak.jpg
When removing only one "C" in the journal, it produces:
http://www.uni-due.de/~hp0052/nolinebreak.jpg
In my opinion there is plenty of space to not produce a linebreak in
my example. This is not a big problem, but when I use my own stylefile-
bst, where I replaced the fin.entry like:
FUNCTION {fin.entry}
{ write$
" {\hfill} " write$
newline$
}
The result is: http://www.uni-due.de/~hp0052/hfill.jpg , and that's
ugly and not intended. My expected behaviour is like this:
http://www.uni-due.de/~hp0052/hfilokl.jpg , where I use the same
stylefile and only change the length of the bibi.bib content.

Where to I have to look for the problem? \hfill? or in my stylefile?
Because of my first example I would suggest the problem is produced by
hyperref.

kind regards

Donald Arseneau

unread,
Jan 13, 2012, 1:54:35 AM1/13/12
to
"florian....@googlemail.com" <florian....@googlemail.com> writes:

> I think there is sometimes an unintended linebreak when using
> pagebackref.

Nothing to do with pagebackref.

> In my opinion there is plenty of space to not produce a linebreak in
> my example.

Indeed there is.

The problem is a poor balance between the paragraph typesetting parameters
\adjdemerits (adjacent-line mismatch demerits) (too high) and \linepenalty
(too low). The combination will encourage teX to add an extra line to
the paragraph to get adjacent lines stretched by a similar amount.

Try setting \adjdemerits=1000 in your preamble.

Donald Arseneau as...@triumf.ca

florian....@googlemail.com

unread,
Jan 13, 2012, 3:05:00 AM1/13/12
to
> Try setting \adjdemerits=1000 in your preamble.

Thanks. I tried \adjdemerits=1 , 10, 100, 666, 1000, 10000, 100000,
1000000
but nothing was changed.
I set \adjdemerits=666 combined with \linepenalty=777777 -> works! The
compilation is slower now, but that's ok. \linepenalty=77777 works,
too.

Thank you very much!

Now there is just a minor problem left:
http://www.uni-due.de/~hp0052/minor1.jpg
http://www.uni-due.de/~hp0052/minor1.jpg

Florian

florian....@googlemail.com

unread,
Jan 13, 2012, 4:32:39 AM1/13/12
to
> compilation is slower now, but that's ok. \linepenalty=77777 works,

changed it to 77, but I can't find the default value

florian....@googlemail.com

unread,
Jan 13, 2012, 4:39:42 AM1/13/12
to
I have given the "minor problem" some thought and decided, that's the
correct way. I don't want two dotted lines.

Problem completely solved.

Thanks again.

Donald Arseneau

unread,
Jan 13, 2012, 6:08:58 AM1/13/12
to
"florian....@googlemail.com" <florian....@googlemail.com> writes:

> > Try setting \adjdemerits=1000 in your preamble.
>
> Thanks. I tried \adjdemerits=1 , 10, 100, 666, 1000, 10000, 100000,
> 1000000
> but nothing was changed.

Then something went wrong with the assignment. Maybe it got
re-assigned later by some ? Or maybe the spelling was wrong.

> I set \adjdemerits=666 combined with \linepenalty=777777 -> works! The

Eek! That is an incredibly large linepenalty! The default value is 10.
Your problem is solved by increasing it to 27. Your infinite value will
force the minimum lines per paragraph without regard to any other
typesetting quality.


Donald Arseneau as...@triumf.ca
0 new messages