2

I'm creating a PDF which will mainly be used on mobile apps. I have a clickable table of contents via the following:

\documentclass{report}

\usepackage{hyperref}
\hypersetup{
    colorlinks,
    citecolor=black,
    filecolor=black,
    linkcolor=blue,
    urlcolor=black
}

\begin{document}
\tableofcontents
\chapter{A}
Lorem ipsum

\chapter{a}
Lorem ipsum

\chapter{aa}
Lorem ipsum

\chapter{aal}
Lorem ipsum

\chapter{aalii}
Lorem ipsum

\chapter{aam}
Lorem ipsum

\chapter{Aani}
Lorem ipsum

\chapter{aardvark}
Lorem ipsum

\chapter{aardwolf}
Lorem ipsum

\chapter{Aaron}
Lorem ipsum

\chapter{Aaronic}
Lorem ipsum

\chapter{Aaronical}
Lorem ipsum

\chapter{Aaronite}
Lorem ipsum

\chapter{Aaronitic}
Lorem ipsum

\chapter{Aaru}
Lorem ipsum

\chapter{Ab}
Lorem ipsum

\chapter{aba}
Lorem ipsum

\chapter{Ababdeh}
Lorem ipsum

\chapter{Ababua}
Lorem ipsum

\chapter{abac}
Lorem ipsum

\chapter{abaca}
Lorem ipsum

\chapter{abacate}
Lorem ipsum

\chapter{abacay}
Lorem ipsum

\chapter{abacinate}
Lorem ipsum

\chapter{abacination}
Lorem ipsum

\chapter{abaciscus}
Lorem ipsum

\chapter{abacist}
Lorem ipsum

\chapter{aback}
Lorem ipsum

\chapter{abactinal}
Lorem ipsum

\chapter{abactinally}
Lorem ipsum

\chapter{abaction}
Lorem ipsum

\chapter{abactor}
Lorem ipsum

\chapter{abaculus}
Lorem ipsum

\chapter{abacus}
Lorem ipsum

\chapter{Abadite}
Lorem ipsum

\chapter{abaff}
Lorem ipsum

\chapter{abaft}
Lorem ipsum

\chapter{abaisance}
Lorem ipsum

\chapter{abaiser}
Lorem ipsum

\chapter{abaissed}
Lorem ipsum

\chapter{abalienate}
Lorem ipsum

\chapter{abalienation}
Lorem ipsum

\chapter{abalone}
Lorem ipsum

\chapter{Abama}
Lorem ipsum

\end{document}

The problem is, the table of contents is huge, so it's difficult for a user to navigate to chapter 2, section 500, subsection 350. It's a lot of scrolling within the table of contents (in the example, the table of contents is 2 pages long).

To solve this problem, I want to have a table of contents before the table of contents, which does something like this (the sections are alphabetized):

Meta-table of contents

  1. A-Ababua
  2. abac-Abama

Table of contents

  1. A
  2. a
  3. aa

...

  1. Ababua

---Page break---

  1. abac

...

  1. Abama

Actual content

...

How can I achieve this in LaTeX? Can I hook into the table of contents somehow or will I have to generate my own table of contents? I don't need page numbers, so if I have to generate my own table of contents I wouldn't have to worry about that.

3
  • Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
    – user31729
    Commented Sep 15, 2014 at 20:29
  • It seems you want to get a short version of your toc for a quick view. Let us see a MWE for know if I'm right or is something different what you want.
    – Aradnix
    Commented Sep 15, 2014 at 22:21
  • The MWE above needs to be compiled twice. Commented Sep 15, 2014 at 22:58

1 Answer 1

1

Here is something I set up for quick access to 100 different chess puzzles.

links

\documentclass{beamer}
\begin{document}\large

\null\vfil
\begin{center}
\begin{tabular}{rrrrrrrrrr}
\multicolumn{10}{c}{Links}\\
\\
\hyperlink{p1}{1}&\hyperlink{p2}{2}&\hyperlink{p3}{3}&\hyperlink{p4}{4}&\hyperlink{p5}{5}
&\hyperlink{p6}{6}&\hyperlink{p7}{7}&\hyperlink{p8}{8}&\hyperlink{p9}{9}&\hyperlink{p10}{10}\\
\hyperlink{p11}{11}&\hyperlink{p12}{12}&\hyperlink{p13}{13}&\hyperlink{p14}{14}&\hyperlink{p15}{15}
&\hyperlink{p16}{16}&\hyperlink{p17}{17}&\hyperlink{p18}{18}&\hyperlink{p19}{19}&\hyperlink{p20}{20}\\
\hyperlink{p21}{21}&\hyperlink{p22}{22}&\hyperlink{p23}{23}&\hyperlink{p24}{24}&\hyperlink{p25}{25}
&\hyperlink{p26}{26}&\hyperlink{p27}{27}&\hyperlink{p28}{28}&\hyperlink{p29}{29}&\hyperlink{p30}{30}\\
\hyperlink{p31}{31}&\hyperlink{p32}{32}&\hyperlink{p33}{33}&\hyperlink{p34}{34}&\hyperlink{p35}{35}
&\hyperlink{p36}{36}&\hyperlink{p37}{37}&\hyperlink{p38}{38}&\hyperlink{p39}{39}&\hyperlink{p40}{40}\\
\hyperlink{p41}{41}&\hyperlink{p42}{42}&\hyperlink{p43}{43}&\hyperlink{p44}{44}&\hyperlink{p45}{45}
&\hyperlink{p46}{46}&\hyperlink{p47}{47}&\hyperlink{p48}{48}&\hyperlink{p49}{49}&\hyperlink{p50}{50}\\
\hyperlink{p51}{51}&\hyperlink{p52}{52}&\hyperlink{p53}{53}&\hyperlink{p54}{54}&\hyperlink{p55}{55}
&\hyperlink{p56}{56}&\hyperlink{p57}{57}&\hyperlink{p58}{58}&\hyperlink{p59}{59}&\hyperlink{p60}{60}\\
\hyperlink{p61}{61}&\hyperlink{p62}{62}&\hyperlink{p63}{63}&\hyperlink{p64}{64}&\hyperlink{p65}{65}
&\hyperlink{p66}{66}&\hyperlink{p67}{67}&\hyperlink{p68}{68}&\hyperlink{p69}{69}&\hyperlink{p70}{70}\\
\hyperlink{p71}{71}&\hyperlink{p72}{72}&\hyperlink{p73}{73}&\hyperlink{p74}{74}&\hyperlink{p75}{75}
&\hyperlink{p76}{76}&\hyperlink{p77}{77}&\hyperlink{p78}{78}&\hyperlink{p79}{79}&\hyperlink{p80}{80}\\
\hyperlink{p81}{81}&\hyperlink{p82}{82}&\hyperlink{p83}{83}&\hyperlink{p84}{84}&\hyperlink{p85}{85}
&\hyperlink{p86}{86}&\hyperlink{p87}{87}&\hyperlink{p88}{88}&\hyperlink{p89}{89}&\hyperlink{p90}{90}\\
\hyperlink{p91}{91}&\hyperlink{p92}{92}&\hyperlink{p93}{93}&\hyperlink{p94}{94}&\hyperlink{p95}{95}
&\hyperlink{p96}{96}&\hyperlink{p97}{97}&\hyperlink{p98}{98}&\hyperlink{p99}{99}&\hyperlink{p100}{100}
\end{tabular}
\end{center}

\newpage
\hypertarget{p1}{1}

\newpage
\hypertarget{p2}{2}

\end{document}
4
  • How does this answer the question?
    – user31729
    Commented Sep 16, 2014 at 2:43
  • You may not be able to squeeze 10 chapter titles side by side, but the same approach with fewer columns will take up a lot less room than a table of contents. Commented Sep 16, 2014 at 3:29
  • @JohnKormylo Thanks for your answer, but my chapter titles are arbitrary-length and won't fit nicely into columns, so this doesn't help me. Commented Sep 16, 2014 at 18:08
  • How about a paragraph of links separated by \hfills? That could easily be implemented using the existing toc file. Commented Sep 17, 2014 at 11:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .