Indexing in LaTeX: Setting up Sub-Entries

  • LaTeX
  • Thread starter Pauly Man
  • Start date
  • Tags
    Latex
In summary, you would use the \eqreference command in a preample to reference equations in an article.
  • #1
Pauly Man
129
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
  • #2
Use exclamation points between main entries and subentries:

http://www.image.ufl.edu/help/latex/latex_indexes.shtml
 
Last edited by a moderator:
  • #3
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]?
 

1. What is indexing in LaTeX?

Indexing in LaTeX refers to the process of creating an organized list of keywords or terms from the main text of a document. This allows readers to easily find specific information within the document.

2. How do I set up sub-entries in my index?

To set up sub-entries in your index, you can use the \index command followed by a comma and the sub-entry term. For example, \index{main term!sub-entry term}.

3. Can I customize the appearance of my index?

Yes, you can customize the appearance of your index by using the \makeindex command in the preamble of your document. You can also use packages such as makeidx and imakeidx to further customize the style of your index.

4. Is it possible to create multiple indexes in one document?

Yes, you can create multiple indexes in one document by using the \makeindex command multiple times with different names. For example, \makeindex[name=main, title={Main Index}] and \makeindex[name=author, title={Author Index}].

5. How do I add cross-references in my index?

To add cross-references in your index, you can use the \index command followed by the main term and a \see command for the cross-referenced term. For example, \index{main term|see{cross-referenced term}}.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
3K
  • Linear and Abstract Algebra
Replies
15
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
  • Programming and Computer Science
3
Replies
75
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • General Math
Replies
16
Views
2K
  • Classical Physics
Replies
0
Views
80
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
275
Replies
15
Views
5K
  • Programming and Computer Science
Replies
6
Views
3K
Back
Top