BibTeX, biblatex and biberHeadings using multibib package

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
KVork
Posts: 4
Joined: Wed Mar 04, 2009 12:17 pm

Headings using multibib package

Post by KVork »

Hello group,

I have an article-class document using the multibib-package and apacite style (using TeXnicCenter). The generation of bibliographies works very well using this code:

Code: Select all

\bibliographystylep{apacite}
\bibliographyp{../generelle/bibliografi/bibliografi}
\renewcommand{\refname}{Sekundary references}
\bibliographystyle{apacite}
\bibliography{../generelle/bibliografi/bibliografi}
However, I would like to change the headings (in both TOC and in text) generated by the bibliography (or multibib?) from a section*-level to a subsection*-level.

Is that possible?

In another post I saw this command: \renewcommand{\bibsection}{\subsection{\refname}}. It doesn't work however as the \bibsection is undefined.

Any suggestions?

BR KVork

Recommended reading 2024:

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

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

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Re: Headings using multibib package

Post by gmedina »

Hi,

What document class are you using?
1,1,2,3,5,8,13,21,34,55,89,144,233,...
KVork
Posts: 4
Joined: Wed Mar 04, 2009 12:17 pm

Re: Headings using multibib package

Post by KVork »

I am using article-document-class:

\documentclass[12pt,a4paper,dvips]{article}

BR.
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Headings using multibib package

Post by gmedina »

Add the following lines in the preamble of your document:

Code: Select all

\makeatletter
\renewenvironment{thebibliography}[1]
     {\subsection*{\refname}%
      \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}%
      \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
      \clubpenalty4000
      \@clubpenalty \clubpenalty
      \widowpenalty4000%
      \sfcode`\.\@m}
     {\def\@noitemerr
       {\@latex@warning{Empty `thebibliography' environment}}%
      \endlist}
\makeatother
Perhaps you will need also something like

Code: Select all

\addcontentsline{toc}{subsection}{References}
in the body of your document, just where the bibliography will be build.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
KVork
Posts: 4
Joined: Wed Mar 04, 2009 12:17 pm

Re: Headings using multibib package

Post by KVork »

Perfect! Just the way I would like it to be.

Thank you very much :D

BR
KVork
vietnamica
Posts: 21
Joined: Thu Nov 19, 2009 6:00 am

Headings using multibib package

Post by vietnamica »

Dear gmedina:
I have the same problem as KVork's. But my document class is book and i want to downgrade my bibliography to the last section of each chapter.

I use:

Code: Select all

\bibliographystylemacro{plain}
{\small
\bibliographymacro{Vweek}
at the end of the chapter but it creates the Bibliography as a new chapter not the last section.

I did change your preamable code as follows:

Code: Select all

\makeatletter
\renewenvironment{thebibliography}[1]
     {[b]\section[/b]*{\refname}%
      \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}%
      \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
      \clubpenalty4000
      \@clubpenalty \clubpenalty
      \widowpenalty4000%
      \sfcode`\.\@m}
     {\def\@noitemerr
       {\@latex@warning{Empty `thebibliography' environment}}%
      \endlist}
\makeatother
But it does not work.

Please advise. Many thanks.
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Headings using multibib package

Post by gmedina »

Hi, vietnamica

reading your post I get the feeling that maybe you should use the chapterbib package instead of multibib since (it seems to me) you want a "References" section in every chapter of your document.

If that's not what you desire and you have to use multibib, let me know.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
vietnamica
Posts: 21
Joined: Thu Nov 19, 2009 6:00 am

Headings using multibib package

Post by vietnamica »

gmedina wrote:Hi, vietnamica

reading your post I get the feeling that maybe you should use the chapterbib package instead of multibib since (it seems to me) you want a "References" section in every chapter of your document.

If that's not what you desire and you have to use multibib, let me know.
Yes, you are right. I don't know how to use chapterbib, please advice. Thank a lot.
vietnamica
Posts: 21
Joined: Thu Nov 19, 2009 6:00 am

Headings using multibib package

Post by vietnamica »

This works very well

Code: Select all

\documentclass[11pt,a4paper,titlepage,oneside]{book}
\usepackage[sectionbib]{chapterbib}
and in at the end of the chapter tex file

Code: Select all

\bibliographystyle{plain}
{\small
\bibliography{macro}
}
Thank you all.
vietnamica
Posts: 21
Joined: Thu Nov 19, 2009 6:00 am

Re: Headings using multibib package

Post by vietnamica »

Now my problem is in the text. Although the bibliography is good, there is [?] in the text. I don't know the reason.

In addition, I want to make bibliography no display in the table of content (like a section*{}). How can i do that?
Post Reply