0

I am going to insert my references in my thesis, and I have tried to use bibtex. The problem is that I only get a question mark in the document, instead of the reference number. I know there are similar questions about this elsewhere, but I didn't manage to solve the problem.

My bibtex-file is:

  @article{miller1993introduction,
  title={An introduction to the fractional calculus and fractional differential equations},
  author={Miller, Kenneth S and Ross, Bertram},
  year={1993},
  publisher={Wiley-Interscience}
}

@article{barton1974engineering,
  title={Engineering classification of rock masses for the design of tunnel support},
  author={Barton, Nicholas and Lien, Reidar and Lunde, J},
  journal={Rock mechanics},
  volume={6},
  number={4},
  pages={189--236},
  year={1974},
  publisher={Springer}
}

which I have called bibfile.bib

The latex-file is:

        \documentclass[reqno]{report}
    \usepackage{amsmath,amsthm,amsfonts}

    \usepackage[utf8]{inputenc}

    \usepackage[table]{xcolor}
    \usepackage{multirow}
    \usepackage{graphicx}
    \usepackage{bm}
    \usepackage{mathcomp}

    \usepackage[table]{xcolor}
    \usepackage{pdfpages}
    \usepackage{amsmath,esint}
    \usepackage[T1]{fontenc}
    \usepackage[colorlinks]{hyperref}
    \usepackage{tensor}

    \usepackage{atbegshi}
    \usepackage{esvect}
    \usepackage{titlesec}
    \usepackage{listings}
    \usepackage[margin=1in]{geometry}
    \usepackage{float}
    \usepackage{minitoc}
    \usepackage{booktabs}
    \usepackage{apacite}
    \usepackage{nomencl}



    \newcommand{\vhtable}{\rule{30pt}{30pt}}
    \newcommand{\eps}{\varepsilon}
    \newcommand{\bU}{\mathbf{U}}
    \newcommand{\bH}{\mathbf{H}}
    \newcommand{\uvec}[1]{\boldsymbol{\hat{\textbf{#1}}}}
    \newcommand{\sgn}{\text{sgn}}
    \newcommand{\pw}{p^w}
    \newcommand{\epsw}{\varepsilon^w}
    \def\R{\mathbb{R}}
    \def\N{\mathbb{N}}
    \newcommand{\ud}{u^{\delta}}
    \newcommand{\vect}[1]{\boldsymbol{#1}}
    \newcommand{\md}{m^{\delta}}
    \newcommand{\nd}{n^{\delta}}
    \newcommand{\psid}{\psi_{\delta}}
    \newcommand{\cde}{c^{\delta}}
    \newcommand*\VF[1]{\mathbf{#1}}
    \newcommand*\dif{\mathop{}\!\mathrm{d}}
    \newcommand{\mde}{m^{\delta}}% same as \md ?
    \newcommand{\nde}{n^{\delta}}% same as \nd ?
    \newcommand{\ude}{u^{\delta}}% same as \ud ?

    \newcommand\MyTabHeadings{% 
    \rowcolor{Tab}\rowstyle{\bfseries\color{white}}}
    \newcommand{\mT}{\widetilde{m}}
    \renewcommand{\arraystretch}{2}
    \renewcommand{\thesection}{\arabic{section}}
    \newtheorem{deff}{Definition}[section]
    \newtheorem{thm}{Theorem}[section]
    \newtheorem{remark}{Remark}[section]
    \newtheorem{lem}{Lemma}[section]
    \newtheorem{prop}{Proposition}[section]
    \newtheorem{cor}{Corollary}[section]

    \titleformat{\chapter}{\LARGE\bfseries}{\thechapter.\ }{0em}{}
    \AtBeginDocument{\AtBeginShipoutNext{\AtBeginShipoutDiscard}}
    \makeatletter

    \newcommand*{\@rowstyle}{}

    \newcommand*{\rowstyle}[1]{% sets the style of the next row
      \gdef\@rowstyle{#1}%
      \@rowstyle\ignorespaces%
    }

    \newcolumntype{=}{% resets the row style
      >{\gdef\@rowstyle{}}%
    }

    \newcolumntype{+}{% adds the current row style to the next column
      >{\@rowstyle}%
    }

    \makeatletter
    \AtBeginDocument{%
      \let\nl@org@contentsline\contentsline
      \def\contentsline#1{%
        \def\nl@current@levelname{#1}%
        \nl@org@contentsline{#1}%
      }%
    }


    \protected\def\numberline#1{%
      \begingroup
        \edef\nl@align{%
          nl@align@%
          \@ifundefined{nl@current@levelname}{}{\nl@current@levelname}%
        }%
        \edef\nl@align{%
          \@ifundefined{\nl@align}\nl@align@{\csname\nl@align\endcsname}%
        }%
        \@ifundefined{nl@numberline@\nl@align}{%
          \errmessage{Unknown alignment '\nl@align' for \noexpand\numberline}%
          \nl@numberline@l{#1}%
        }{%
          \csname nl@numberline@\nl@align\endcsname{#1}%
        }%
      \endgroup
    }


    \newcommand*{\nl@numberline@l}[1]{% left-aligned
      \hb@xt@\@tempdima{#1 \hfil}%
    }
    \newcommand*{\nl@numberline@c}[1]{% centered
      \hb@xt@\@tempdima{\hfil#1 \hfil}%
    }
    \newcommand*{\nl@numberline@r}[1]{% right-aligned
      \hb@xt@\@tempdima{\hfil#1 }%
    }


    \def\nl@align@{l}% default
    \def\nl@align@section{r}

    \makeatletter    

    \makeatother

    \makeatletter    


    \definecolor{lightgray}{gray}{0.9}
    \makenomenclature
    \makeglossary
    \makeatletter

    \setcounter{tocdepth}{3}


    \AtBeginDocument{%
    \expandafter\newcommand\csname r@tocindent0\endcsname{0pt}
    }
    \makeatother
    \makeatother

    \begin{document}
    \begin{titlepage}
    \title{}
    \author{}
    \maketitle
    MY TITLE
    \end{titlepage}
    \begin{abstract}
    \normalsize

   testing From reference( \cite{miller1993introduction})
    %%missing


      \end{abstract}

    \bibliographystyle{apacite}
    \bibliography{bibfile}
        \end{document}

My question is therefore what I have done wrong since I get question marks in the latex document?

David
  • 1,711

0 Answers0