Justifying Bibliography

2,737 views
Skip to first unread message

shady

unread,
Sep 30, 2012, 3:29:51 PM9/30/12
to latexus...@googlegroups.com
Hi,
I am using Bibtex to generate bibliography, but the references are not justified. Can anyone tell how to justify the references ? I thought references are automatically justified but by default they are coming to be left-justified

Attached is the screen shot of the same.

Thanks.

Shady

Screenshot_Left_Justified.png

Peter Flynn

unread,
Oct 1, 2012, 5:25:44 AM10/1/12
to latexus...@googlegroups.com
On Sun, Sep 30, 2012 at 8:29 PM, shady <sin...@gmail.com> wrote:
Hi,
I am using Bibtex to generate bibliography, but the references are not justified. 
Can anyone tell how to justify the references ? I thought references are automatically justified but by default they are coming to be left-justified

No, the bibliography just adopts whatever was in force for the rest of the document unless you are using a special style that makes it unjustified (actually I usually use \raggedright for bibliographies anyway, because they often contain long unhyphenatable words).

You haven't said what packages you are using. Something is making this happen: you need to find what it is and turn it off.

If you have something preceding the bibliography that is turning justification off (eg \raggedright or \flushleft) then put it inside a group so that it terminates before the bibliography starts.

As an absolute last resort you could undo the effect of \raggedright by reversing what it does, which is defined in latex.ltx as:

\def\raggedright{%
  \let\\\@centercr\@rightskip\@flushglue \rightskip\@rightskip
  \leftskip\z@skip
  \parindent\z@}

This is absolute, which is why \raggedright must always be used inside a group. To undo its effects, you need to re-establish the original meaning of \\ thus:

\makeatletter
\renewcommand\\{%
  \let \reserved@e \relax
  \let \reserved@f \relax
  \@ifstar{\let \reserved@e \vadjust \let \reserved@f \nobreak
             \@xnewline}%
          \@xnewline}

and then set the right skip back to zero:

\@rightskip\z@skip\rightskip\z@skip
\makeatother

You will then need to reset \parindent to whatever it ought to be (LaTeX default is 20pt): \raggedright drops the value on the floor, so there isn't any way to retrieve it when \raggedright is used outside a group.

///Peter

Reply all
Reply to author
Forward
0 new messages