109

This is the error I am getting since I have added some new references to my .bib file. I think is more than a filled stack. Any ideas? references.bib

It was requested a minimum working example but I am working on a template and it was quite difficult for me cut it out. This is my complete structure. The master document is thesis.tex and the problem is raised only under related_work chapter. If you have the time to look at it, I would highly appreciate it. Here is the complete document.

10
  • 4
    The BIB file looks fine to me. Please add a minimal working example (MWE) that generates this problem with this BIB file. Jul 27, 2011 at 17:04
  • There is no related_work chapter in your very non-minimal example (which compiles without error).
    – Lev Bishop
    Jul 28, 2011 at 0:03
  • 1
    @ShinTakezou @Martin it looks like when i am changing \bibliographystyle{Latex/Classes/PhDbiblio-url2} to another class like \bibliographystyle{Latex/Classes/PhDbiblio-case} the problem is getting resolved.
    – Chris-Top
    Jul 28, 2011 at 13:12
  • 1
    even with url2, I can't reproduce the error. It goes fine for me. Jul 28, 2011 at 18:43
  • It compiles fine for me, too. My stack size is set to 5000. What TeX distribution do you use? Jul 30, 2011 at 4:24

8 Answers 8

93

It seems that the PhDbiblio-url2 bibliography style does not want the url field to contain \url{...}. It takes care of the url formating itself, enclosing the contents of the url field in \href{...}.

If you have something like

url = {\url{http://example.com/}};

in you .bib file, the PhDbiblio-url2 style translates that into

\href{\url{http://example.com/}}

which creates an infinite loop in the hyperref package.

The proper way to include url in the bibliography, when using this style, is just

url = {http://example.com};
1
  • I found also url = "\url{example.com}"; making the error too. Just correct it as well using ctrl+F buttons.
    – Mike22LFC
    Jul 17, 2017 at 5:48
49

Not a useful general answer, but a specific case in Beamer:

A \begin{block} statement (without a name option) will cause this error. The correct format is \begin{block}{Block title}, or \begin{block}{} if you want no title.

4
  • 2
    This is the right answer
    – Amir
    Apr 17, 2016 at 18:32
  • 4
    @Amir: No, it is quite specifically the wrong answer for the question, since the question is not about beamer.
    – naught101
    Apr 18, 2016 at 5:40
  • 4
    @naught101 but if you have the beamer problem, google the error, you end up here, so it IS a VERY useful answer (:
    – drevicko
    Jul 25, 2016 at 11:33
  • 5
    @drevicko: useful: yes, right: no :)
    – naught101
    Jul 26, 2016 at 1:34
11

I found the solution: there was a conflict between hyperref and frenchle, so I got it fixed by replacing \usepackage{frenchle} by \usepackage[french]{babel}.

1
  • 10
    Please note that this very general error can occur for a wide variety of reasons. While switching from frenchle to the standard babel package (which is indeed very recommendable) removed the error in your document, it doesn't mean that it is a general solution. Jan 24, 2012 at 10:28
11

There's a config file where some numbers about "memory" TeX uses are written, I have it into /etc/texmf/texmf.cnf; you may need to change some value and regenerate formats.

stack_size = 5000        % simultaneous input sources

Add

Of course the problem may arise from a bug in TeX macros you're using, that consumes all the stack; so we need more information.

EDIT

If you want to edit that file, avoid editing /etc/texmf/texmf.cnf as always in configuration files. Instead edit the specific file in /etc/texmf/texmf.d/ - on Ubuntu currently /etc/texmf/texmf.d/95NonPath.cnf.

After editing the file you have to execute update-texmf to rewrite the configuration file.

EDIT2

Often it happens you can't have access to /etc or other system directories, so you need your own cnf file (and TeX tree). This link talks about it.

6
  • 9
    Changing the stack size won't fix it. It's always some TeX macro. Jul 27, 2011 at 20:48
  • The stack_size threw another error on a param_size, it didn't fix it as mentioned.
    – Chris-Top
    Jul 27, 2011 at 21:31
  • 1
    @Martin not at all. It will fix it, if it's not a bug but a real need of some complex macro. Once I needed it to do some heavy tricks. If it wouldn't be so, setting another value for stack_size, like 100, wouldn't cause problems. Jul 28, 2011 at 5:07
  • @Chris-Top we need investigate better your work; I've seen you put a link, unfortunately it is blocked by job websense, so I'll take a look later (very later) Jul 28, 2011 at 5:10
  • ... so later that I've forgot... anyway about the EDIT, the best way should be to set up things so that a common user has no to edit files in /etc at all, since common users usually can't edit them unless there's an admin flaw. Jun 13, 2012 at 5:34
5

Another answer which only applies to Beamer:

Somehow beamer doesn't like the ' in formulas. That means if I write $t'$ I get the error, whereas $t^\prime$ works. I'm not sure if this only happens under certain conditions -- just mentioning it here since it's another possible source of this error.

2

I think the correct answer is to find an MWE.

In my case, the error message pointed to the \maketitle command, which was of no help. I found I could eliminate the entire body of the document and still got the error. I eventually traced the problem to the use of \thanks{} within \author{}, which is supported by article and several other document classes, but not acmart and amsart. The class documentation says to use \authornote{} instead, and outside \author{}.

2

For me, it works after I clear the cache in the overleaf. enter image description here

1

In my case, the error was caused by typing documentclass[article] instead of documentclass{article}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .