Indexing in LaTeX: Setting up Sub-Entries

  • Context: LaTeX 
  • Thread starter Thread starter Pauly Man
  • Start date Start date
  • Tags Tags
    Latex
Click For Summary
SUMMARY

The discussion focuses on indexing in LaTeX, specifically how to set up sub-entries within an index. Users can create sub-entries using the syntax \index{Function, Linear} for hierarchical indexing. Additionally, the conversation addresses challenges in referencing equations within the appendix when using the book document class, highlighting the need for a custom command to achieve the desired output format. The user seeks guidance on modifying their \newcommand to correctly reference equations in the appendix.

PREREQUISITES
  • Familiarity with LaTeX document classes, particularly article and book.
  • Understanding of LaTeX indexing commands, specifically \index{}.
  • Knowledge of creating custom commands in LaTeX using \newcommand.
  • Basic understanding of referencing equations in LaTeX.
NEXT STEPS
  • Research LaTeX indexing techniques, focusing on sub-entries and hierarchical structures.
  • Explore the LaTeX "The LaTeX Companion" for comprehensive indexing and referencing guidance.
  • Learn about the differences in referencing equations between the article and book document classes in LaTeX.
  • Investigate advanced LaTeX commands for customizing index output formats.
USEFUL FOR

Writers and researchers using LaTeX for large documents, particularly those needing to implement complex indexing and equation referencing in their work.

Pauly Man
Messages
129
Reaction score
0
Hi Guys,

I am currently writing two rather large articles with latex. I've added an index to each file, and am currently looking through each article and adding relevant references to bits and pieces so they'll show up in the index. That bit is easy, you just use the \index{The Text You Want to Appear in the Index} after the word you want to index. However many index entries have sub-entries, such as:

Function,
Linear
Non-Linear
Trigonometric
etc

How do you go about setting that up in latex? At the moment I have resorted to indexing like topics like so:

\index{Function, Linear}
\index{Function, Trigonometric}

Any help would be appreciated, as I'm still learning.
 
Physics news on Phys.org
Thanx for that, helped heaps. However I have still found no detailed info anywhere on the net. Once I get some cash I'll grab a copy of the "Latex COmpanion", but until then, I'm stumped on a few other things.

For instance, how do you get the index to print the letter, eg:

A
Alphabet
Animation

B
Butter
Butterfly

etc...

Also this is bugging me majorly. I can correctly refernce equations when using the article document class, but I can't using the book document class. Well, more specifically I can't reference the equations I have in the appendix. I have one appendix, which is a chapter. And at present one section in the appendix. So that subsection is numbered A.1[\B]. I have a few equations in that section, labelled A.1.n[\B], where n is a given number. Now I have set up a newcommand in the preample that I use to correctly reference equations in an article (where I have sections and sub-sections, instead of chapters and sections):

\newcommand{\eqreference}[1]{(\thesubsection.\ref{#1})}

where #1 is the key of the equation.

The above command would output A.n.m[\B] for an equation in the appendix of an article. The code below is what I am using in a book:

\newcommand{\eqreference}[1]{(\thesection.\ref{#1})}

Which outputs A.1.A.n[\B], which isn't what I want at all! How do I change the above code so that it outputs A.n.m[\B]?
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 9 ·
Replies
9
Views
6K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 10 ·
Replies
10
Views
664
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
5K