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.

Chris-Top
  • 1,275
  • 4
    The BIB file looks fine to me. Please add a minimal working example (MWE) that generates this problem with this BIB file. – Martin Scharrer Jul 27 '11 at 17:04
  • There is no related_work chapter in your very non-minimal example (which compiles without error). – Lev Bishop Jul 28 '11 at 00: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 '11 at 13:12
  • 1
    even with url2, I can't reproduce the error. It goes fine for me. – ShinTakezou Jul 28 '11 at 18:43
  • It compiles fine for me, too. My stack size is set to 5000. What TeX distribution do you use? – Jan Hlavacek Jul 30 '11 at 04:24
  • @Jan Kile 2.0.85 – Chris-Top Jul 30 '11 at 18:04
  • Hm, as far as I know, kile is an editor, not a TeX distribution. What system do you use? With kile, chances are it is some sort of linux. Most linux distros have an old version of TeXLive, usually 2009, installed on them, but when I tried to compile with TeXLive2009, it still compiled fine. – Jan Hlavacek Jul 31 '11 at 00:49
  • @Jan you are right, TeX 3.1415926 (TeX Live 2009/Debian) kpathsea version 5.0.0, it compiles to both my setups with the case style. seems pretty strange, is the include related_work under thesis.text uncommented? Just in case. – Chris-Top Jul 31 '11 at 15:38
  • Chris, there is something strange going on. I downloaded and unzipped the "complete document" you link to from your question, and I cannot find any mention of "related_work" anywhere. The file thesis.tex does not contain the string related, and there seems to be no file anywhere in the archive that would have the string related in its name. – Jan Hlavacek Jul 31 '11 at 18:46
  • @Jan I don't have a clue what happened, I have updated the link with my latest code, which throws the error, thank you for everything, I am delivering tomorrow but only for curiosity i have to know whats wrong, i don't like my stacks flooded :( – Chris-Top Jul 31 '11 at 22:21

8 Answers8

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};
Jan Hlavacek
  • 19,242
  • I found also url = "\url{http://example.com/}"; making the error too. Just correct it as well using ctrl+F buttons. – Mike22LFC Jul 17 '17 at 05: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.

naught101
  • 8,224
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.

David Carlisle
  • 757,742
  • 9
    Changing the stack size won't fix it. It's always some TeX macro. – Martin Scharrer Jul 27 '11 at 20:48
  • The stack_size threw another error on a param_size, it didn't fix it as mentioned. – Chris-Top Jul 27 '11 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. – ShinTakezou Jul 28 '11 at 05: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) – ShinTakezou Jul 28 '11 at 05: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. – ShinTakezou Jun 13 '12 at 05:34
  • Remark, you can probably also specify this on command-line using -cnf-line, see https://tex.stackexchange.com/a/587178/250119. – user202729 Mar 30 '23 at 01:13
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}.

Martin Scharrer
  • 262,582
mickael
  • 111
  • 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. – Martin Scharrer Jan 24 '12 at 10:28
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.

bluenote10
  • 1,479
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}

xrisk
  • 173