2

My Master's thesis has a problem with citing a certain entry. It gives me the following error: "TeX capacity exceeded, sorry [input stack size=5000]. ...coe/prognostic-data-repository/#battery}}"

My .tex-file (minimalized) looks like this:

\documentclass[ 12pt,               % Font size
twoside,            % Comment if you want to print on one side
openright,
headsepline,        % Adds a line under the page header
headings=small,     % Defines sizing of the headers
numbers=noenddot,   % No point at the right side of the section number
%draft=false,
BCOR=15mm,          % Absolute value of the binding correction.
DIV=10,             % larger value --> larger use of the page
%captions=tableheading,
paper=a4,           % only change if you want  another paper size
abstracton,
]{scrreprt}

\usepackage{ifpdf}

\ifpdf
%We use PDFLaTeX
\usepackage[pdftex]{graphicx} 
\pdfimageresolution=100
\pdfminorversion=7
\pdfcompresslevel=9
\usepackage[pdftex,
urlcolor=blue,
linktoc=all,
colorlinks=true,
linkcolor=black,
citecolor=black,
pdfview=FitH,
pdfstartview=FitH,
plainpages=false]{hyperref} % Allows cross references and hyperlinks
\hypersetup{
    pdfauthor={Your Name},
    pdftitle={Name of your thesis},
    pdfsubject={},
    pdfkeywords={Keywords},
    pdfproducer={LaTeX with hyperref},
    pdfcreator={pdflatex}}
\usepackage[figure,figure*]{hypcap}
\else
%DVI oder PS Ausgabe
\usepackage{graphicx} 
\fi
\usepackage{pdfpages}   

\usepackage[square]{natbib}
\newcommand{\Literaturename}{Literature}

\begin{document}
    \citet{Saha.data}

    \protect\bibliographystyle{plainnat}
    \bibliography{Literature}
\end{document}

And my .bib-file includes the Saha.data-entry as follows:

@misc{Saha.data,
 author = {Saha, B. and Goebel, K.},
 year = {2007},
 title = {{Battery Data Set}},
 url = {\url{https://ti.arc.nasa.gov/tech/dash/groups/pcoe/prognostic-data-repository/#battery}},
 publisher = {{NASA AMES Prognostics Data Repository}},
 institution = {{NASA Ames Research Center, Moffett Field, CA}}
}
2

The problem is with the url field, you do not have to include \url in the Bibtex url filed. The plainnat style will insert it for you.

If you do include \url then, in the bbl file you will have

\newblock URL
  \url{\url{https://ti.arc.nasa.gov/tech/dash/groups/pcoe/prognostic-data-repository/#battery}}.

and this causes the problem.

  • Thank you, Guido! This is the solution for my problem. However it wasn't working as I tried this before posting my question. Additionally I had to delete my bbl-file before compiling again. Also since I'm using Citavi as literature management tool when exporting from there I need to make sure that use URL-package remains unchecked! – evensure Jul 12 at 12:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.