Is there a way to markup index-terms and generate an index?

Sorry if the answer is obvious … I’m somewhat new to latex/mmd/scrivener combination.

Thanks - Sophie

The MMD Syntax Guide has a section on glossaries. A note of warning: Most of the sorting tools bundled with TeX (as in bibtex or makeindex) do not allow the sorting of Unicode data. If you want to sort non-english material, you should have a look at xindy. IIRC, it’s already included in the all new MacTeX 2008.

There is not currently a shortcut to create an index using MMD and LaTeX. You can use the usual indexing syntax for LaTeX.

I have thought about implementing something, but to be honest, every idea I have had would end up feeling somewhat “half-baked”.

You can create custom XSLT to generate indexes for certain elements. For example, I created an XSLT to generate an index from first lines in a poetry collection.


Does latex markup in the scrivener document get passed through? Any rules to follow?


In scrivener, I’m currently adding index entries by putting them above or below the text in the scrivening:

<!-- \index{guitar} -->
<!-- \index{Marshal} -->

It's *always* fun to play the guitar in a big room, especially when plugged into a huge Marshal head!

I’ve only done a couple, and I don’t like it much. I’m thinking that I might introduce my own MMD syntax to do this. Perhaps something like:

It's always fun to play the :guitar in a big room, especially when plugged into a huge :Marshall head!

This would then create the index entries for ‘guitar’ and ‘marshal’. Of course, I’d have to update the MMD code + XSLT to detect this syntax and handle it for LaTeX, XHTML etc.

This might also result in incorrect page numbers, depending on how TeX inserts the page breaks.

That is precisely the route I took, except my format was ^Word. I recommend doing things this way if you have the skills to adjust the files appropriately. You might be able to do it all in XSLT, depending on how you set up the syntax. I just added a clause to the main Perl script, though—that seemed easier to me since I know Perl reasonably well and XSLT only vaguely.