emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] LaTex Output with Index


From: Fraga, Eric
Subject: Re: [O] LaTex Output with Index
Date: Sun, 12 May 2019 19:21:30 +0000

On Sunday, 12 May 2019 at 10:17, Robert Love wrote:
> Can someone point to an example of using Org mode to generate a LaTeX
> document with an index?  I see the Org has section 13.1.8 Generating
> an index.  What is the means to turn that into LaTex with an index?
> Do I have to use a project?  Is there a simple example?

That part of the manual is for publishing to HTML, not for creating a
PDF via LaTeX.

To generate an index for LaTeX, you add

#+index: term

lines to your org file.  

You need to have a couple of extra bits in your org file for LaTeX to
know about creating an index.  In particular, you need:

#+LaTeX_HEADER: \usepackage{makeidx} \makeindex

and then a \printindex statement somewhere in your org file (probably at
the end) for the index to be generated.

Once you have your org file the way you want it, you then need to use
LaTeX itself to create the index.  So:

1. export to LaTeX
2. run pdflatex on the LaTeX file
3. run it again just to make sure (sometimes 3 runs are needed...)
4. then run makeindex on the file (base name)
5. finally run pdflatex again (maybe twice)

You can do all these steps from within Emacs.  You can either visit the
LaTeX file directly to execute steps 2-5 or you can modify
org-latex-pdf-process (via file local variables, for instance) to insert
the makeindex command.

HTH.
-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.2.3-327-g3375f0

reply via email to

[Prev in Thread] Current Thread [Next in Thread]