Re: [O] LaTex Output with Index
Am 15.05.19 um 11:02 schrieb Fraga, Eric: > On Tuesday, 14 May 2019 at 23:58, Robert Love wrote: >> However, I have one hitch. How do I generate an index with an entry >> that has an “@“ symbol in it? > > Unfortunately, this is beyond my latex-fu. May have something to do > with @ being a protected symbol. If you want to play, you could try > > #+index: {\makeatletter @} term > > but this could lead you down a rabbit hole. Not sure how org & LaTeX & > makeindex will interact... I think the main reason is the fact that @ has special meaning within index entries: it tells where to put something for cases where the automatical sorting fails. I just googled and found the following advice: »In order to place values with !, @, or |, which are otherwise escape characters, in the index, one must quote these characters in the \index command by putting a double quotation mark (") in front of them, and one can only place a " in the index by quoting it (i.e., a key for " would be \index{""}). This rule does not hold for \", so to put the letter ä in the index, one may still use \index{a@\"{a}}.« So perhaps #+index: "@term works? HTH, Julius
Re: [O] LaTex Output with Index
On Tuesday, 14 May 2019 at 23:58, Robert Love wrote: > However, I have one hitch. How do I generate an index with an entry > that has an “@“ symbol in it? Unfortunately, this is beyond my latex-fu. May have something to do with @ being a protected symbol. If you want to play, you could try #+index: {\makeatletter @} term but this could lead you down a rabbit hole. Not sure how org & LaTeX & makeindex will interact... -- Eric S Fraga via Emacs 27.0.50, Org release_9.2.2-290-g300f15
Re: [O] LaTex Output with Index
With your instructions I can now generate a document with an index. Thanks. However, I have one hitch. How do I generate an index with an entry that has an “@“ symbol in it? For example #+index: @ terms I’ve tried \@ and \verb{@} and several other ideas but once there is an @ sign, no entry shows up. If I have “terms” instead of “@ terms” it works fine. The @ sign shows up OK in the body of the document, just not in an index. Any suggestions? > On May 12, 2019, at 2:21 PM, Fraga, Eric wrote: > > 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
Re: [O] LaTex Output with Index
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
[O] LaTex Output with Index
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?