emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Hendy <jw.hendy@gmail.com>
To: Sharon Kimble <boudiccas@skimble.plus.com>
Cc: org-mode <emacs-orgmode@gnu.org>
Subject: Re: How to generate an index?
Date: Tue, 6 May 2014 13:53:00 -0500	[thread overview]
Message-ID: <CA+M2ft_W9NAki2n8ZthN2pH4KRv=xaTk16R8EC5M9=Pjv5m+yw@mail.gmail.com> (raw)
In-Reply-To: <87wqdyzrj8.fsf@skimble.plus.com>

On Tue, May 6, 2014 at 1:32 PM, Sharon Kimble
<boudiccas@skimble.plus.com> wrote:
>
> Now I've got the bibliography working I'm looking at getting indexes
> to be generated.
>
> Using my long-suffering "cat.org" with this code in my ".emacs"
> --8<---------------cut here---------------start------------->8---
> ;; org to latex customisations, -shell-escape needed for minted
> (setq org-export-dispatch-use-expert-ui t ; non-intrusive export dispatch
>       org-latex-pdf-process             ; for regular export
>       '("xelatex -shell-escape -interaction nonstopmode -output-directory %o %f"
>                 "biber %b"
>         "xelatex -shell-escape -interaction nonstopmode -output-directory %o %f"
>         "xelatex -shell-escape -interaction nonstopmode -output-directory %o %f"))
> --8<---------------cut here---------------end--------------->8---
>
> and this is my "cat.org"
> --8<---------------cut here---------------start------------->8---
> # -*- mode:org; mode:reftex; indent-tabs-mode:nil; tab-width:2 -*-
> #+OPTIONS: toc:nil num:nil
> #+OPTIONS: ^:{}
> #+TITLE: Cat on the mat - 2014
> #+AUTHOR: Sharon Kimble.
> #+LATEX_CMD: xelatex
> #+LATEX_CLASS: article
> #+LATEX_CLASS_OPTIONS: [a4paper]
> #+LaTeX_HEADER: \usepackage{makeidx} %robustindex % Indexing
> #+LaTeX_HEADER: \usepackage[backend=biber,style=verbose,style=numeric]{biblatex}
> #+LaTeX_HEADER: \bibliography{cat}
> #+LATEX_HEADER: \usepackage[colorlinks=true]{hyperref}
> \makeindex
> \pagebreak
> \makeindex
> \begin{document}
> * Chapter 1
> Lorem ipsum dolor sit amet, consectetuer \cite{5} adipiscing elit, sed diam nonummy
> nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi
> enim ad minim veniam \cite{15}.
>
> * Chapter 2
> Lorem ipsum dolor sit amet, consectetuer \cite{7} adipiscing elit, sed diam
> nonummy nibh euismod tincidunt ut laoreet dolore magna\index{magna} aliquam
> erat volutpat. Ut wisi enim ad minim veniam,\cite{1} quis nostrud exerci
> tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo
> consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit
> esse molestie consequat\cite{12}.
>
> \printbibliography
>
> \printindex
>
> \end{document}
> --8<---------------cut here---------------end--------------->8---
>
> And I run "C-c C-e l p" to generate the "cat.tex" and the "cat.pdf",
> but no "cat.idx" or "cat.aux" is generated. I've tried running "C-c
> C-e l l" three times then generating the "cat.pdf" but I can't get
> one generated.
>
> I've googled and looked in the "Org Manual" but haven't found how
> to do it. Can anyone help please?

Org is great, but I steer away from looking for Org documentation when
LaTeX isn't working. Like others have mentioned, figure out the LaTeX
first, then figure out how to make Org do your LaTeX bidding.

Did you read through/follow some start-to-finish instructions on how
to generate indexes with LaTeX? I've never done it, but just googling
"generate index latex" gets me this:
- http://en.wikibooks.org/wiki/LaTeX/Indexing

Looks like you have most of what it suggests:
1) \usepackage{makeidx}
2) \makeindex in preamble (though I'm not sure why you have it twice)
3) \printindex to show the index

What I don't see of it's suggestions are:
1) Use \index{key} to tell it /what/ to index. What are you hoping
shows up in your index? Looks like LaTeX has no idea what words to
spit out unless you tell it!
2) Looks like you still might have to run `makeindex cat` after
compiling with LaTeX?

Re. that last bit, can you try replacing your opening bit with:

* Chapter 1
\index{Lorem} ipsum dolor...

Then:
- Run C-c C-e l p (hopefully that spits out a .idx file since there's
at least one word you want to index)
- Run `makeindex cat`, which will process the hopefully-output file,
cat.idx from the previous step
- Re-run C-c C-e l p from Org

If that doesn't work, I'd still try LaTeX manually before posting back. So:
- pdflatex cat
- biber cat
- makeindex cat
- pdflatex cat

Or something like that for your full bib/index workflow. Then, if
successful, someone can tell you how to get Org to call the right
LaTeX stuff.


John

>
> Sharon.
> --
> A taste of linux = http://www.sharons.org.uk
> my git repo = https://bitbucket.org/boudiccas/dots
> TGmeds = http://www.tgmeds.org.uk
> Debian testing, Fluxbox 1.3.5, emacs 24.4.50.19

  reply	other threads:[~2014-05-06 18:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-06 18:32 How to generate an index? Sharon Kimble
2014-05-06 18:53 ` John Hendy [this message]
2014-05-07 14:31   ` Sharon Kimble
2014-05-07 15:01     ` Ken Mankoff
2014-05-07 15:02     ` John Hendy
2014-05-07 15:20     ` Nick Dokos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+M2ft_W9NAki2n8ZthN2pH4KRv=xaTk16R8EC5M9=Pjv5m+yw@mail.gmail.com' \
    --to=jw.hendy@gmail.com \
    --cc=boudiccas@skimble.plus.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).