Thanks to all that have posted here and on Fletcher’s site! My Scrivener-Markdown-LaTeX workflow is working well in almost every particular.
I’ve used my workflow to produce the first draft of a reference work that contains a table of contents, table of figures, appendices, index, images, etc. all set up exactly the way I would like and all getting internally referenced correctly. It is great.
I have only one remaining issue, and I am at an impasse: I cannot figure out how to generate a glossary, which is very important for this work. The most help on setting up a glossary comes from Fletcher’s “MultiMarkdown User’s Guide,” but I have exhausted my abilities to figure out where I am going astray. (I also have been studying Huw Evans’ “A toad’s guide to using Scrivener – MultiMarkDown – Latex, which has been indispensable. Much thanks to both Fletcher and Huw for these great references.)
I know this post is inexcusably long and that few forum members, if any, will want to wade through it. However, as this is, in Fletcher’s words, an “Advanced” topic, for anyone that might be willing to help, I figure providing more info is better than providing less. For anyone who even attempts to wade through this post, I am very, very grateful.
This is where I am:
Per Fletcher’s guide, MultiMarkdown has a feature that allows footnotes to be specified as glossary terms. He states that the glossary format for the footnotes is:
[^glossaryfootnote]: glossary: term (optional sort key)
the actual definition belongs on a new line, and can continue on
just as other footnotes.
Trying to follow that, I am leaving out the sort key and creating an entry as follows:
[^civilization]: glossary: civilization
the society, culture, and way of life of a particular area
Question One: Do I need to, like I would with a footnote, put a separate anchor in the text? For example, if the above glossary entry were really a footnote, then someplace in the text I would write: [^civilization]
If I do include a separate anchor, I end up with the following in the “.tex” file that is produced when I compile my project in Scrivener:
. . .fugiat nulla pariatur. Excepteur \newglossaryentry{civilization}{name={civilization},description={the society, culture, and way of life of a particular area}}\glsadd{civilization} sint occaecat cupidatat
Does this look right?
(Just so you know, the gibberish text around the glossary term is Lorum Ipsum.)
Question Two: How do I generate the Glossary?
Fletcher writes:
Unfortunately, it takes an extra step to generate the glossary when creating a pdf from a latex file:
-
You need to have the basic.gst file installed, which comes with the memoir class.
-
You need to run a special makeindex command to generate the
.glo file: makeindex -s ‘kpsewhich basic.gst‘ -o “filename.gls” “filename.glo” -
Then you run the usual pdflatex command again a few times.
My questions:
- Where should “basic.gst” be found? It is a little unclear to me where “basic.gst” is installed. I was able to find “basic.gst” installed in the following path on my computer:
/usr/local/texlive/2014/texmf-dist/makeindex/memoir
So hopefully that means I have satisfied Fletcher’s first requirement. Is that where “basic.gst” should be found?
- Is it right that I should run the makeindex command as specified above from an OSX terminal window? If so, it is not working. This is the step that I believe is failing for me. Here is what I can tell you:
-
After I have compiled in Scrivener, I have about four files, one of which is the “.tex” file. My next step is to use TexShop and typeset the document with the LaTeX engine. After my first typeset run using the LaTeX engine, additional files are created, including a “.glo” file. Should I be running the makeindex command first, before any type of “.glo” file is created?
-
Does it matter what directory I am in when I try to run the makeindex in terminal?
-
Should Fletcher’s reference to “filename.gls” and “filename.glo” mean that I should, when running the makeindex command, replace “filename” with my own project name?
If I do the substitution of “filename” with my own project name, running makeindex from the terminal gives me the following message: “Index style file kpsewhich basic.gst not found.” As I pointed out, I know that basic.gst is on the computer. I’m afraid I do not understand what “kpsewhich” is and whether that needs to be installed. (And, if that is the case, where would I find it and where would it need to be installed.)
- Although I am using the memoir class, I am using the custom LaTeX options in Scrivener and invoking the memoir document class there. My custom LaTeX code includes in the header section the following lines:
\usepackage{glossaries}
\glstoctrue %Adds glossary to toc on additional typsetting run
\makeglossaries
and, in the footer section, after the command \backmatter, I include:
\printglossaries
Am I missing something there?
I doubt anyone will get this far in an attempt to help, but if so, here is a hearty “Thank you!” I am only doing this because I’m not certain what is left for me to try. Consider this a desperate Hail Mary pass—and I apologize if I have violated any forum rules in the length of this post or if I should have asked this question in a different way or different place.