BibTeX, biblatex and bibernumbering the references

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
darwinn
Posts: 5
Joined: Mon Aug 03, 2009 6:33 pm

numbering the references

Post by darwinn »

Hi there,
I have been trying to figure out what is wrong with my files, but after two days I give up...Please help me to find the prob.
I use winedt and I keep receiving:

Code: Select all

]
Conclusions/concl.tex
Chapter 11.
) [102
] (bii.tex (Thesis2.bbl
! Undefined control sequence.
<argument> \@listctr        
l.3 \bibitem{F62}     
? 
! You can't use `\relax' after \the.
<recently read> \c@       
l.3 \bibitem{F62}    
? 
! Undefined control sequence.
<argument> \@listctr 
when trying to compile... as a result, .pdf is created with text, but next to the text where I put \cite{F62}, only (0) appears as a number of reference. In the bibliography page it writes all the information from .bib file regarding this cite, but no numbers at all...

I know it has something to do with \counter, but I was not able to find what and where to put the counter (or edit):/
I will be grateful for help with this,
Darwin

P.S.
I use \bibliographystyle{unsrt}
anny more information needed?

Recommended reading 2024:

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

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

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

Re: numbering the references

Post by josephwright »

We are going to need a proper example of what you are doing: snippets will not help out here!
Joseph Wright
darwinn
Posts: 5
Joined: Mon Aug 03, 2009 6:33 pm

numbering the references

Post by darwinn »

I'm not sure what would you need for this:/
here is what I think might be necesssary, but if it is not enough, I will paste all the .cls and .tex files.
main file:

Code: Select all

\documentclass[oneside,etd]{thesis}
\usepackage{graphicx}
\usepackage{float}
\usepackage{amssymb}
\usepackage[polish, english]{babel}
\usepackage[cp1250]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{times}
\usepackage{epsfig}
\usepackage{color}
\usepackage{pslatex}
\usepackage{subfigure}
\usepackage{fancyhdr}
\usepackage[font=small,format=hang,labelfont=bf,up,textfont=it,up]{caption}
\usepackage{cite}
\usepackage{apalike}
\usepackage{fancyletter}
\usepackage{makeidx}
\usepackage{chngpage}
\usepackage{multirow}
\usepackage{tabulary}
[...]
\begin{document}
[...]
\include{chapter5.tex}
[...]
\nocite{}
\bibliographystyle{unsrt}
\bibliography{refo}
[...]
bibliography:

Code: Select all

@article{F62,
author="F. Freudenstein",
title="On the variety of Motions Generated by Mechanisms",
journal="ASME Journal of Engineering for Industry",
volume="84",
pages="156-160",
year="1962"
}
content chapter5.tex:

Code: Select all

\chapter{Model analysis}
blah blah blah~\cite{F62}
In .cls file I will paste only those commands that I assume might have something in common with the issue or ones I am not sure about.
class file:

Code: Select all

\NeedsTeXFormat{LaTeX2e} 
\ProvidesClass{thesis}
[...]
% A command pirated from chngpage.sty
\DeclareRobustCommand{\ch@ngetext}{%
  \setlength{\@colht}{\textheight}\setlength{\@colroom}{\textheight}%
  \setlength{\vsize}{\textheight}\setlength{\columnwidth}{\textwidth}%
  \if@twocolumn%
    \advance\columnwidth-\columnsep \divide\columnwidth\tw@%
    \@firstcolumntrue%
  \fi%
  \setlength{\hsize}{\columnwidth}%
  \setlength{\linewidth}{\hsize}%
}

\newcommand{\shortchap}{}
\newcommand{\hackchapter}[2]{
  \renewcommand{\shortchap}{\itshape \large \@chapapp \thechapter:  #2}  %%Z%%
  \chapter{#1}
}

% Define the '\clearemptydoublepage' command to clear pages but not number any blank pages inserted.
\let\cle@rdoublep@ge\cleardoublepage
\newcommand{\cle@remptydoublep@ge}{
  \clearpage
  \if@twoside
  \ifodd\c@page\else
  \fi\fi
  {\pagestyle{empty}\cle@rdoublep@ge}}

\newcommand{\clearemptydoublepage}{\cle@remptydoublep@ge}

\def\alwayssingle{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
     \else \newpage \fi}

\def\endalwayssingle{\if@restonecol\twocolumn \else \newpage \fi}

% allow redefining margins within a document
\newenvironment{changemargin}[2]{%
 \begin{list}{}{%
  \setlength{\topsep}{0pt}%
  \setlength{\leftmargin}{#1}%
  \setlength{\rightmargin}{#2}%
  \setlength{\listparindent}{\parindent}%
  \setlength{\itemindent}{\parindent}%
  \setlength{\parsep}{\parskip}%
 }%
\item[]}{\end{list}}

\DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}} 
\ProcessOptions\relax 

\LoadClass[a4paper,12pt]{book}

\RequirePackage{afterpage}

% Redefine the Bibliography to deal with a bookmarking issues
\let\TEMPbibliography\bibliography
\renewcommand{\bibliography}{
%  \providecommand\phantomsection{} \phantomsection
  \addcontentsline{toc}{chapter}{Bibliography}
  \TEMPbibliography
}
darwinn
Posts: 5
Joined: Mon Aug 03, 2009 6:33 pm

Re: numbering the references

Post by darwinn »

On a third day I finally made it! :P
8-) I found what is affecting creation of the references! ..But still it would be nice if someone can look at this problem and check what was wrong...
It was the "apalike" package that I had to dump in order to have everything working nice and smooth :)
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

numbering the references

Post by localghost »

We still miss a minimal working example (MWE) rid of all unnecessary stuff.


Best regards and welcome to the board
Thorsten
Post Reply