Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.
\documentclass[fleqn,12pt,a4paper]{article}
\usepackage{fontspec,xltxtra,xunicode}
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{color}
\usepackage{setspace}
\usepackage{hyperref}
\usepackage{cmll}
\usepackage{tabularx}
\usepackage{pifont}
\usepackage{amstext, amsmath}
\usepackage{enumerate}

 %========================================================
\begin{document}
\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. 

\end{document}
  %========================================================

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.

5  
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
add comment

2 Answers 2

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
add comment

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

\let\ursection=\section
\def\section{\pagebreak[0]\ursection}

(untested, since there is no MWE).

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

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