BibTeX, biblatex and biberRemove blank Page before References

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
nannaqueenie
Posts: 1
Joined: Fri Apr 26, 2013 9:10 am

Remove blank Page before References

Post by nannaqueenie »

I'm using WinEdt 7. I would like to know how can I eliminate the blank page that appears before my references. This is my code (.tex):

Code: Select all

\renewcommand{\bibname}{
  \clearpage\pagestyle{myheadings}%
  \markboth{}{}%
  \renewcommand{\bibname}{REFERENCIAS BIBLIOGRÁFICAS}%
  \setboolean{SetDSpace}{false}%
  \chapter*{\bibname}%
  \addcontentsline{toc}{extrachapter}{\bibname}%
  \setboolean{SetDSpace}{true}%
}
The other code is in a custom class file but it doesn't displays well, I mean it doesn't displayed neither the title nor the link to the table of contents. So I created the above code and put it in the main .tex file. This is my class code:

Code: Select all

\renewcommand{\bibname}{REFERENCIAS BIBLIOGR\'AFICAS}%
\renewenvironment{thebibliography}[1]{%
  \renewcommand{\bibname}{REFERENCIAS BIBLIOGR\'AFICAS}%
  \clearpage\pagestyle{myheadings}%
  \markboth{}{}%
  \setboolean{SetDSpace}{false}%
  \chapter*{\bibname}%
  \addcontentsline{toc}{extrachapter}{\bibname}%
  \setboolean{SetDSpace}{true}%
  \list{\@biblabel{\@arabic\c@enumiv}}{%
    \settowidth\labelwidth{\@biblabel{#1}}%
    \setlength{\parsep}{\BaseDiff\baselineskip}%
    \setlength{\itemsep}{0ex}%
    \setlength{\leftmargin}{\labelwidth}%
    \addtolength{\leftmargin}{\labelsep}%
    \@openbib@code
    \usecounter{enumiv}%
    \let\p@enumiv\@empty
    \renewcommand\theenumiv{\@arabic\c@enumiv}}%
    \sloppy
    \clubpenalty10000
    \@clubpenalty \clubpenalty
    \widowpenalty10000%
    \sfcode`\.=1000\relax}
    {\def\@noitemerr
    {\@latex@warning{Empty `thebibliography' environment}}%
    \endlist\clearpage}

Thanks!
Last edited by localghost on Fri Apr 26, 2013 9:49 am, edited 1 time in total.

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Remove blank Page before References

Post by localghost »

Just for information to other users for awareness of possibly already existing solutions. The question has also been posted to {TeX SX}. Please read what our administrator thinks about that.
Board Rules wrote:A crossposting is always contra-productive. But there is nothing really against it as long as it is mentioned. This means that a direct link has to be added. So other users who want to help are preserved from double efforts and waste of time.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Remove blank Page before References

Post by Stefan Kottwitz »

Hi,

welcome to the board!

The problem here is that you redefined \bibname, which is just for the name of the bibliography which goes into the heading. So \chapter*{\bibname} actually nests \chapter* calls: \chapter*{...\chapter*{...}...}. Only that you redefined `\bibname` again inside, prevents an infinite recursion.

Instead, redefine thebibliography similar to the class file. So, start your own code also with

Code: Select all

\renewenvironment{thebibliography}[1]{%
...
Stefan
LaTeX.org admin
Post Reply