LaTeX forum ⇒ GeneralTeX capacity exceeded !? Topic is solved

LaTeX specific issues not fitting into one of the other forums of this category.
User avatar
Cham
Posts: 904
Joined: Sat Apr 02, 2011 4:06 pm

TeX capacity exceeded !?

Postby Cham » Tue Feb 17, 2015 7:53 pm

I'm experiencing an error which I never got before.

Here's the simple line of code which apparently gives the error in my main code, while it's woking with any simple MWE code :

  1. \subsubsection{Variables indépendantes $\tilde{Q}$}


The problem appears to be related to the tilde command inside a subsubsection, since everything compiles fine without it. The error message is this one :

TeX capacity exceeded, sorry
[input stack size = 5000]


The document has about 80 pages and contains lots of equations, but not THAT much. So I don't understand why the tilde inside a subsubsection gives any trouble in my main code file (and the tilde do works elsewhere in the same code file !).

Again, take note that this problematic code line DO works in any MWE that I tried.

Any idea ?

Tags:

User avatar
Stefan Kottwitz
Site Admin
Posts: 9436
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Tue Feb 17, 2015 9:11 pm

Hi Cham,

Cham wrote:this problematic code line DO works in any MWE that I tried.


you just did not go the perfect way to am MWE. Generating an MWE from scratch may often work, but not always.

There's the way which works always: start with the copy of the problem document, and reduce it step by step, testing during each step. Either you end up with a perfect MWE, or you isolated it within one step, which also can be made a perfect MWE.

I'm sure we will find the cause with such an MWE.

Stefan
Site admin

User avatar
Cham
Posts: 904
Joined: Sat Apr 02, 2011 4:06 pm

Postby Cham » Tue Feb 17, 2015 10:03 pm

Thanks Stefan.

Isolating the cause and creating a MWE (which triggers the "bug") will be difficult, since my main code preamble is really HUGE ! Yet, everything is working very nicely, except that pesky tilde inside a subsubsection title (what the ... !?).

In the preamble, I didn't changed the subsubsection settings, except the font style (using textsf instead of the default style). Or course, I tested this too, and it doesn't appears to be related to my issue.

I'll try to make a MWE which triggers the bug. May take some time... :x

User avatar
Cham
Posts: 904
Joined: Sat Apr 02, 2011 4:06 pm

Postby Cham » Tue Feb 17, 2015 10:21 pm

Wew ! It was much faster that what I thought.

Here's a simple MWE which triggers the bug. Very weird to me. Appears as a kind of packages clash or conflict.

  1. \documentclass[12pt,letterpaper,twoside]{book}
  2. \usepackage[T1]{fontenc}
  3. \usepackage{amsmath}
  4. \usepackage{tocloft}
  5. \setcounter{tocdepth}{3}
  6. \usepackage{hyperref}
  7. \usepackage{accents}
  8.  
  9. \begin{document}
  10. \subsubsection{Test title $\tilde{Q}$}
  11. Bla bla bla
  12. \end{document}


As soon as I remove any of the lines in that preamble, under \usepackage{amsmath}, the bug disappears !

EDIT : Ah ! I think the issue is related to the ToC. LaTeX may have a problem showing the tilde in the ToC, for a small subsubsection title. I think it's a three ways issue, since the ToC is also clickable (from hyperref).

User avatar
Cham
Posts: 904
Joined: Sat Apr 02, 2011 4:06 pm

Postby Cham » Tue Feb 17, 2015 10:45 pm

I'm closing much faster to the cause and a solution ! :)

The ToC is showing in the PDF viewer (on the side of the PDF document), and the tilde (or any mathematical expression, actually) can't be drawn correctly, there.

Using the command \texorpdfstring{}{} in the title solves the issue. 8-)

Is my interpretation right ?

User avatar
Stefan Kottwitz
Site Admin
Posts: 9436
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Tue Feb 17, 2015 11:32 pm

That's correct, the PDF standard doesn't support special symbols in bookmarks. You found it!

Stefan
Site admin

User avatar
Cham
Posts: 904
Joined: Sat Apr 02, 2011 4:06 pm

Postby Cham » Tue Feb 17, 2015 11:33 pm

Ok, case solved then.

Thanks !


Return to “General”

Who is online

Users browsing this forum: No registered users and 7 guests