# [OS X TeX] Stack size limit error with hyperref

Thu Mar 24 23:23:09 EST 2005

Ross,

Thanks, you got me on the right track! It turns out that hyperref does
not like to see a \bm command inside of a section name. It also crashes
with a \boldsymbol, but not with a \mathbf, although the \mathbf
doesn't seem to do anything within a section name.

I'm using the article class, and section names are typeset in bold.
When there is a $...$ string embedded in the section name, it is not
set in bold and it doesn't look good. The \bm command used within the
$...$ string, for example $\bm{\beta T}$, corrects this.
\tableofcontents does not seem to have a problem with this, but
hyperref crashes.

So how do I get the $...$ string to be typeset in bold within the
section name, consistent with the rest of the name, and not crash
hyperref?

Richard Séguin

On Mar 24, 2005, at 1:13 AM, Ross Moore wrote:

> Hi Richard,
>
>
> On 24/03/2005, at 3:33 PM, Richard Seguin wrote:
>
>> I'm trying to typeset a 75 page document using the hyperref package,
>> and I'm getting this error message:
>>
>> ! TeX capacity exceeded, sorry [input stack size=5000].
>
> This usually indicates that an infinite loop has developed.
> I've seen this before with hyperref, particularly with
> special characters (such as '~') used incorrectly within a URL.
>
>
> I'd guess that you have defined a macro that expands to
> something containing a '~' (or perhaps '#' or '&'),
> then tried to use this as the URL part of an \href
> or similar command.
>
> That cannot work. There are ways around this.
>
>
>
>>
>> Is the hyperref package a stack hog? Is this normal on a
>> less-than-book-size 75 page document? How can the stack size be
>> increased?
>>
>> The log file says:
>>
>> If you really absolutely need more capacity,
>> you can ask a wizard to enlarge me.
>>
>>
>> Here is how much of TeX's memory you used:
>>  5745 strings out of 95321
>>  73014 string characters out of 1187504
>>  280885 words of memory out of 1707396
>>  8415 multiletter control sequences out of 10000+50000
>>  23533 words of font info for 99 fonts, out of 1000000 for 2000
>>  14 hyphenation exceptions out of 1000
>>  5000i,14n,5024p,2518b,466s stack positions out of
>> 5000i,500n,6000p,200000b,40000s
>>  800 PDF objects out of 300000
>>  290 named destinations out of 131072
>>  1617 words of extra memory for PDF output out of 65536
>> !  ==> Fatal error occurred, the output PDF file is not finished!
>>
>> This is the list of packages I'm using:
>>
>> \documentclass[11pt,psamsfonts,oneside]{article}
>> \usepackage{amssymb,amsmath,latexsym,amsthm}
>> \usepackage{verbatim}
>> \usepackage{eucal}
>> \usepackage{mathrsfs}
>> \usepackage[all]{xy}
>> \usepackage{bm}
>> \usepackage{enumerate}
>> \usepackage{hyperref}
>
>
> I need to see more of your LaTeX source to identify the
> exact problem.
>
>
>>
>> Richard Séguin
>>
>> --------------------- Info ---------------------
>> Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
>>           & FAQ: http://latex.yauh.de/faq/
>> TeX FAQ: http://www.tex.ac.uk/faq
>> List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
>>
>
>
> Hope this helps,
>
> 	Ross
>
>>
>>
>>
> -----------------------------------------------------------------------
> -
> Ross Moore                                         ross at maths.mq.edu.au
> Mathematics Department                             office: E7A-419
> Macquarie University                               tel: +61 +2 9850
> 8955
> Sydney, Australia                                  fax: +61 +2 9850
> 8114
> -----------------------------------------------------------------------
> -
>
> --------------------- Info ---------------------
> Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
>           & FAQ: http://latex.yauh.de/faq/
> TeX FAQ: http://www.tex.ac.uk/faq
> List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
>
>

--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
& FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>