GeneralGreat trouble with bibliography! PLEASE SOMEONE HELP ME!

LaTeX specific issues not fitting into one of the other forums of this category.
neologisma
Posts: 7
Joined: Wed Sep 17, 2008 1:08 am

Great trouble with bibliography! PLEASE SOMEONE HELP ME!

Post by neologisma »

Hi folks,

I need to write a bibliography page according to the ABNT norms. For that, I use abnt.cls and abnt-num.bst. On the other hand, my institution has this STUPID requirement: if my reference is written as

1 GRASSBERGER, P. Problems in quantifying self-generated complexity, Helvetica
Physica Acta
, v.62, p.489-510, 1989.
(single space)

they want it to be changed to

1 GRASSBERGER, P. Problems in quantifying self-generated complexity, Helvetica
...Physica Acta
, v.62, p.489-510, 1989.
(double space)

The .... above stands for the space alignment with the author name at first line.

How the hell do I do this???? And where?

If this helps, the .cls part concerning the bibliography is:

Code: Select all

% ====  thebibliography  ====
% Almost equal to old thebibliography, but without capital page marks
% and automatically in toc if active ``sumario completo''
\renewenvironment{thebibliography}[1]%
  {% replacing \chapter*{\refname\@mkboth...}
   \if@openright\cleardoublepage\else\clearpage\fi%
   \thispagestyle{\chaptertitlepagestyle}%
   \global\@topnum\z@%
   \@afterindentfalse%
   \@mkboth{\refname}{\refname}% end \chapter*{\refname...}
   \ifthenelse{\boolean{ABNTincludeintoc}}%
      {\ABNTaddcontentsline{toc}{chapter}{\refname}}%
      {}%
    \if@twocolumn%
      \@topnewpage[\@makeschapterhead{\refname}]%
    \else%
      \@makeschapterhead{\refname}%
      \@afterheading%
    \fi%
   \list{\@biblabel{\@arabic\c@enumiv}}%
        {\settowidth\labelwidth{\@biblabel{#1}}%
         \leftmargin\labelwidth%
         \advance\leftmargin\labelsep%
         \@openbib@code%
         \usecounter{enumiv}%
         \let\p@enumiv\@empty%
         \renewcommand\theenumiv{\@arabic\c@enumiv}}%
   \sloppy%
   \espaco{simples} %
   \clubpenalty4000%
   \@clubpenalty \clubpenalty%
   \widowpenalty4000%
   \sfcode`\.\@m%
  }% end of \begin{thebibliography}
  {\def\@noitemerr
       {\@latex@warning{Empty `thebibliography' environment}}%
   \endlist%
  }% end of \end{thebibliography}


Thanks so much to the good souls that will help me! :)

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Great trouble with bibliography! PLEASE SOMEONE HELP ME!

Post by Juanjo »

The abnt class and abnt-num bibstyle are not installed in my system, so I can't test any eventual solution. Anyway, in this thread, someone asked for a way to "compact" items in the bibliography (i.e., to reduce vertical space between entries). You seem to have an analogous problem, since you need to increase the space between items. Perhaps you may try the solution given there with a small change. Put this in the preamble:

Code: Select all

\let\thebibliographyOLD\thebibliography
\renewcommand{\thebibliography}[1]{\thebibliographyOLD{#1}\setlength{\itemsep}{\baselineskip}}
Instead of \baselineskip, you may try a different length.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
neologisma
Posts: 7
Joined: Wed Sep 17, 2008 1:08 am

Re: Great trouble with bibliography! PLEASE SOMEONE HELP ME!

Post by neologisma »

Thank you so much dude! It has worked. But there is still the problem of aligning the lines with the author name.... (in my original post, I represented it with the dots "....."). Would you or anyone else happen to know what parameter must I change?

Thank you so much!
User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Great trouble with bibliography! PLEASE SOMEONE HELP ME!

Post by Juanjo »

I've downloaded abnTeX from here (for the next time, please, provide useful links or files in order to simplify helping you). In my opinion, there is a bug in abnt-num.bst, since, in the bbl file generated by BibTeX, the thebibliography environment has an empty mandatory argument. Open such a file and look inside. This argument, according to the definition of thebibliography, is basic to set up the width of the label and so the left margin. Since this argument is empty, the left margin is smaller that one could expect. You can get rid off this problem with a small modification of the code I've already provided. Assuming that your bibliography has between 10 and 99 entries, write now:

Code: Select all

\let\thebibliographyOLD\thebibliography
\renewcommand{\thebibliography}[1]{\thebibliographyOLD{99}\setlength{\itemsep}{\baselineskip}}
If you have less entries, replace 99 by 9. If you have more than 99, put 999. I don't think you need 9999 :D
By the way, you may write to the authors of abnTeX about this problem. This may help them and help others encountering a similar problem.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
neologisma
Posts: 7
Joined: Wed Sep 17, 2008 1:08 am

Re: Great trouble with bibliography! PLEASE SOMEONE HELP ME!

Post by neologisma »

Thank you for all you attention juanjo. I've done the changes you've suggested in my main file but the alignment of the lines is still being done with respect to the number of the reference, instead of the name of the author, as required by my institution. The double space between entries is fine. Am I missing something??

Thanx!!
User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Re: Great trouble with bibliography! PLEASE SOMEONE HELP ME!

Post by Juanjo »

I can't give futher advise without some code, since I don't know what are you doing precisely. You should provide a minimal working example showing the problem. Attach at least the tex file (once simplified to the maximum) and the bib file you are using. Say also which version of abnTeX are you using. A screen capture may also help.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
neologisma
Posts: 7
Joined: Wed Sep 17, 2008 1:08 am

Great trouble with bibliography! PLEASE SOMEONE HELP ME!

Post by neologisma »

Sorry, I'm a new in this stuff...

Ok, there you go:

http://web.mac.com/nhorner/fly/TESE.zip

With the files in this link you will be able to compile the problematic part: in page 5, under the "Referencias" title. What I must do is align the lines with the author names (in capital letters). Therefore, "system" must be aligned with "BAPTISTA" and not with "1", and so forth.

Thank you so much.
User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Great trouble with bibliography! PLEASE SOMEONE HELP ME!

Post by Juanjo »

In my previous tests, I was only playing with abnt.cls and abnt-num.bst. Things are more complicated, since, in addition, you load the abntcite package. Without a full install of abnTeX, which I haven't done, it is really difficult to compile your file "as is". Anyway, the source of conflicts is abntcite.sty. This package redefines thebibliography and forces the left margin in the bibliography to be 0 cm. This is the cause of the misalignment you want to avoid. In that file you can read the following lines:

Code: Select all

% To ensure that the margin settings of this package works, \leftmargin
% (inside thebibliography) must be 0cm. \@openbib@code is a hook inside
% thebibliography.
\let\@openbib@codeBACKUP\@openbib@code
\def\@openbib@code{\@openbib@codeBACKUP\setlength{\leftmargin}{0cm}}
It is quite difficult for me to see how to override this setting of the left margin. Thus, I can only offer two alternatives: (1) leave things as they are now, (2) don't load abntcite, so losing some citation commands like \citeauthor (perhaps you may replace them with those in the natbib package or simply replacing them "by hand").
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
neologisma
Posts: 7
Joined: Wed Sep 17, 2008 1:08 am

Great trouble with bibliography! PLEASE SOMEONE HELP ME!

Post by neologisma »

Soorry, I didn't knw the abntcite.sty was needed. This is the sty file:

http://web.mac.com/nhorner/fly/abntcite.sty

I've tried to change some parameters but didn't work. But I think we're close!! :D
User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Great trouble with bibliography! PLEASE SOMEONE HELP ME!

Post by Juanjo »

Remove \usepackage[num]{abntcite} as well as \bibliographystyle{abnt-num}, and put this in the preamble:

Code: Select all

\usepackage[num,rightalign=yes,biblabel-on-margin]{abntcite}
\let\ABCIthebibliformatOLD\ABCIthebibliformat
\renewcommand{\ABCIthebibliformat}{\ABCIthebibliformatOLD
  \setlength{\itemsep}{\baselineskip}}
The option biblabel-on-margin solves the problem with the left margin, whereas the redefinition of \ABCIthebibliformat (instead of that of \thebibliography) takes account of the question on vertical space. I also propose to use the rightalign=yes option, since, in my opinion, the bibliography looks better.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
Post Reply