BibTeX, biblatex and biberdisabling begin/end{thebibliography} in bbl output

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
balt
Posts: 2
Joined: Thu Nov 15, 2012 8:03 am

disabling begin/end{thebibliography} in bbl output

Post by balt »

Hi all,

How can I get bibtex to not output \begin{thebibliography}{16} as well as it's \end{..} counterpart into the *.bbl file?

Cheers

- Balt
Last edited by cgnieder on Thu Nov 15, 2012 11:36 pm, edited 1 time in total.

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

josephwright
Site Moderator
Posts: 814
Joined: Tue Jul 01, 2008 2:19 pm

Re: disabling begin/end{thebibliography} in bbl output

Post by josephwright »

This is down the the .bst file you use: you will need to create a custom one by editing the one you use with a new name. Which .bst (BibTeX style) are you using?
Joseph Wright
balt
Posts: 2
Joined: Thu Nov 15, 2012 8:03 am

Re: disabling begin/end{thebibliography} in bbl output

Post by balt »

I'm using plainnat.
josephwright
Site Moderator
Posts: 814
Joined: Tue Jul 01, 2008 2:19 pm

disabling begin/end{thebibliography} in bbl output

Post by josephwright »

Make a copy of plainnat.bst, and edit the file where it reads

Code: Select all

FUNCTION {begin.bib}
{   preamble$ empty$
    'skip$
    { preamble$ write$ newline$ }
  if$
  "\begin{thebibliography}{" number.label int.to.str$ * "}" *
  write$ newline$
  "\providecommand{\natexlab}[1]{#1}"
  write$ newline$
  "\providecommand{\url}[1]{\texttt{#1}}"
  write$ newline$
  "\expandafter\ifx\csname urlstyle\endcsname\relax"
  write$ newline$
  "  \providecommand{\doi}[1]{doi: #1}\else"
  write$ newline$
  "  \providecommand{\doi}{doi: \begingroup \urlstyle{rm}\Url}\fi"
  write$ newline$
}

EXECUTE {begin.bib}

EXECUTE {init.state.consts}

ITERATE {call.type$}

FUNCTION {end.bib}
{ newline$
  "\end{thebibliography}" write$ newline$
}
to

Code: Select all

FUNCTION {begin.bib}
{   preamble$ empty$
    'skip$
    { preamble$ write$ newline$ }
  if$
  "\providecommand{\natexlab}[1]{#1}"
  write$ newline$
  "\providecommand{\url}[1]{\texttt{#1}}"
  write$ newline$
  "\expandafter\ifx\csname urlstyle\endcsname\relax"
  write$ newline$
  "  \providecommand{\doi}[1]{doi: #1}\else"
  write$ newline$
  "  \providecommand{\doi}{doi: \begingroup \urlstyle{rm}\Url}\fi"
  write$ newline$
}

EXECUTE {begin.bib}

EXECUTE {init.state.consts}

ITERATE {call.type$}

FUNCTION {end.bib}
{ newline$ }
Using this new .bst file will prevent the lines being written to the .bbl file.

[I'm not quite sure where you are going with this!]
Joseph Wright
Post Reply