TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
\usepackage{amstext, amsmath}

\section{This is Header1 6.1.77} \label{6.1.77}
\subsection*{This is sub header}
.a document of 100 pages
.a document of various tables and other sections 
.recalled lables at various places through out the document,
\nameref{} entire section header appeared nicely. 


Above code worked like a charm, I can use \nameref{} anywhere in the document and it created a hyperlink. I went crazy and created as many as 3900 subsections and now the PDF prints only two pages and I get stack over flow error. Hyperlinks appear as ??. I tried using enumerate and it does not hyperlink to specific line as it does in case of \section{}, also tried putting lines with labels and still it did not work.

share|improve this question

closed as not a real question by Joseph Wright May 12 '12 at 7:12

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

I don't understand what you mean by “now the PDF prints only two pages and I get stack over flow error”. Have you gotten a PDF from TeX that your PDF viewer cannot handle? What exactly is the error you are seeing? – Harald Hanche-Olsen Nov 22 '10 at 20:23
My crystal ball guesses: you have no text at all between those 3k subsections, hence there is no possibility for pagebreaks, on a TeX level, your second page becomes immensely long and breaks the ~400cm limit. – Ulrich Schwarz Jan 23 '11 at 8:36
Your title does not reflect your question especially well. – N.N. Aug 30 '11 at 11:04

Yea, I agree that a little more information might be needed for that error but just a side note after glancing at your code: it's recommended that \usepackage{hyperref} comes last in the order of packages that you load. occasionally a package requires placement after hyperref but i don't think there are many. hyperref might get overwritten otherwise, so maybe you can see if that changes your hyperlink behavior any.

The hyperref manual should have more info if you care to look into it.

share|improve this answer

In case Ulrich's guess is right, you can give special permission to Latex to start new pages at sections, so:


(untested, since there is no MWE).

share|improve this answer
Another old unanswered qn. – Charles Stewart Apr 20 '11 at 8:08

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