BibTeX, biblatex and biberNeed refs in brackets [1] [2] not 1. 2.

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
ehound
Posts: 4
Joined: Tue Dec 27, 2011 10:57 pm

Need refs in brackets [1] [2] not 1. 2.

Post by ehound »

Greetings and salutations,

In a Springer journal article the citations pdf correctly in brackets in the text [1] [2], however at the end list 1. 2. Whereas the journal requires [1] [2] in the bibliography. Here's a minimal working extract:

Code: Select all

\begin{filecontents*}{example.eps}
gsave
newpath
  20 20 moveto
  20 220 lineto
  220 220 lineto
  220 20 lineto
closepath
2 setlinewidth
gsave
  .4 setgray fill
grestore
stroke
grestore
\end{filecontents*}
%
\documentclass[referee]{svjour2}                    
\journalname{ijp}

\usepackage{graphicx}
\usepackage{subfigure}
\usepackage{amsmath} 
\usepackage{latexsym}
\usepackage{revsymb}
\usepackage{natbib}
\usepackage{eucal}
\usepackage{amsfonts, amssymb}
\usepackage{times}
\usepackage{bm}

\begin{document}

\title{Title}

\maketitle

The references need to appear in brackets like this \cite{Wieman:1994} \cite{Harness:2010Maple} in the following bibliography list below:

% BibTeX users please use one of
%\bibliographystyle{spbasic}      % basic style, author-year citations
%\bibliographystyle{spmpsci}      % mathematics and physical sciences
%\bibliographystyle{spphys}       % APS-like style for physics
%\bibliography{}   % name your BibTeX data base

\bibliographystyle{plain}

% Non-BibTeX users please use
\begin{thebibliography}{99}
\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi
\expandafter\ifx\csname bibnamefont\endcsname\relax
\def\bibnamefont#1{#1}\fi
\expandafter\ifx\csname bibfnamefont\endcsname\relax
  \def\bibfnamefont#1{#1}\fi
\expandafter\ifx\csname citenamefont\endcsname\relax
  \def\citenamefont#1{#1}\fi
\expandafter\ifx\csname url\endcsname\relax
  \def\url#1{\texttt{#1}}\fi
\expandafter\ifx\csname urlprefix\endcsname\relax\def\urlprefix{URL }\fi
\providecommand{\bibinfo}[2]{#2}
\providecommand{\eprint}[2][]{\url{#2}}

\bibitem{Wieman:1994}
\bibinfo{author}{\bibfnamefont{H}} \bibnamefont{Wieman}
\bibinfo{author}{\bibnamefont{and the EOS Collaboration}}
\emph{\bibinfo{title}{Heavy Ion Reaction Measurements with the EOS TPC (Looking for Central Collisions with Missing Energy)}}
(\bibinfo{publisher}{in the Proceedings of the Tenth Winter Workshop on Nuclear Dynamics}) 
\bibinfo{year}{(1994)}

\bibitem{Harness:2010Maple}
\bibinfo{author}{\bibnamefont{D A}} \bibnamefont{Harness}
\emph{\bibinfo{title}{Simulated Reality Hologram Matrix State Space (click-through calibration check)}},\
(\bibinfo{publisher}{Ontario : Waterloo Maplesoft Inc}) \bibinfo{year}{(2010)}
\url{http://www.maplesoft.com/applications/view.aspx?SID=95142}
 
\end{thebibliography}

\end{document}
I tried toggling between BibTex and Latex...same difference. I'd appreciate any advice. Thanks.
Last edited by ehound on Thu Jan 19, 2012 3:48 am, edited 6 times 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.

zeroan
Posts: 2
Joined: Tue Dec 27, 2011 11:02 pm

Re: Need refs in brackets [1] [2] not 1. 2.

Post by zeroan »

If i use /bibliographystyle{plain} it puts both in brackets
ehound
Posts: 4
Joined: Tue Dec 27, 2011 10:57 pm

Re: Need refs in brackets [1] [2] not 1. 2.

Post by ehound »

OK great zeroan thanks...um, I changed %\bibliographystyle{spbasic} right where it is to \bibliographystyle{plain}...and mine pdf's the same as before. So do I need to move the command somewhere else, and not still use /begin{thebibliography}{99}?
ehound
Posts: 4
Joined: Tue Dec 27, 2011 10:57 pm

Re: Need refs in brackets [1] [2] not 1. 2.

Post by ehound »

Dang, I made the above change that worked for zeroan -> \bibliographystyle{plain} however on my system it didn't put brackets around the bibliography numbers. I'm running TexShop Version 2.43 on a Mac OS X Version 10.5.8. Anyway I got a response on this forum right away. I've posted the same question on another forum with no response yet. Thanks to the Latex Community for putting time into the global knowledge synthesis.
ehound
Posts: 4
Joined: Tue Dec 27, 2011 10:57 pm

Need refs in brackets [1] [2] not 1. 2.

Post by ehound »

Bingo! From another post "change bibliography style" someone wanted a custom bib label so kaiserkarl13 replied:

Code: Select all

\makeatletter
\def\@biblabel#1{[Exhibit: #1]}
\makeatother
So I changed that to the following which puts references in text and bibliography in brackets...thanks y'all I'm stoked now.

Code: Select all

\makeatletter
\def\@biblabel#1{[#1]}
\makeatother
Last edited by Stefan Kottwitz on Wed Dec 28, 2011 6:54 pm, edited 1 time in total.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Re: Need refs in brackets [1] [2] not 1. 2.

Post by Stefan Kottwitz »

Thanks for posting the solution!

Btw. the forum provides a code button, you can use it when editing for marking code listings, I just did it for you above to show the effect.

And, nice that you used the checkmark as icon for your most recent post, however it would be better to set that icon to the first post - the question - so it's seen in the question list. It would be great if you would edit the question and set the checkmark as topic icon there.

Thanks,

Stefan
LaTeX.org admin
Post Reply