From: Carsten Dominik <cdominik@newartisans.com>
To: emacs-orgmode@gnu.org
Subject: [Accepted] Make the latex export preprocessor rewrite #+INDEX to \index.
Date: Wed, 4 May 2011 09:59:43 +0200 (CEST) [thread overview]
Message-ID: <20110504075943.46A1743B538@u016822.science.uva.nl> (raw)
In-Reply-To: 1303991243-30731-2-git-send-email-rpgoldman@sift.info
Patch 767 (http://patchwork.newartisans.com/patch/767/) is now "Accepted".
Maintainer comment: Pushed with modifications. Some optimization, and the original patch would have stopped at the first #+index line that was missing the entry... Please verify that it still works
This relates to the following submission:
http://mid.gmane.org/%3C1303991243-30731-2-git-send-email-rpgoldman%40sift.info%3E
Here is the original message containing the patch:
> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [O] Make the latex export preprocessor rewrite #+INDEX to \index.
> Date: Thu, 28 Apr 2011 16:47:23 -0000
> From: Robert Goldman <rpgoldman@sift.info>
> X-Patchwork-Id: 767
> Message-Id: <1303991243-30731-2-git-send-email-rpgoldman@sift.info>
> To: emacs-orgmode@gnu.org
> Cc: "Robert P. Goldman" <rpgoldman@real-time.com>
>
> From: Robert P. Goldman <rpgoldman@real-time.com>
>
> ---
> lisp/org-latex.el | 13 +++++++++++++
> 1 files changed, 13 insertions(+), 0 deletions(-)
>
> diff --git a/lisp/org-latex.el b/lisp/org-latex.el
> index e7307ef..731d6e6 100644
> --- a/lisp/org-latex.el
> +++ b/lisp/org-latex.el
> @@ -1775,6 +1775,8 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
> (end-of-line 1)
> (insert "\n")))))
>
> +
> +
> (defun org-export-latex-fixed-width (opt)
> "When OPT is non-nil convert fixed-width sections to LaTeX."
> (goto-char (point-min))
> @@ -2322,6 +2324,17 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
> (and (looking-at "[ \t]*ORG-VERSE-END.*")
> (org-replace-match-keep-properties "\\end{verse}" t t)))
>
> + ;; Convert #+INDEX to LaTeX \\index.
> + (goto-char (point-min))
> + (while
> + (and
> + (let ((case-fold-search t))
> + (re-search-forward "^[ \t]*#\\+index:[ \t]*\\(.*?\\)[ \t]*$" nil t))
> + (> (match-end 1) (match-beginning 1)))
> + (let ((entry (match-string 1)))
> +;; (message "Found a #+INDEX match...")
> + (replace-match (format "\\index{%s}" entry) t t)))
> +
> ;; Convert center
> (goto-char (point-min))
> (while (search-forward "ORG-CENTER-START" nil t)
>
next prev parent reply other threads:[~2011-05-04 7:59 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-28 11:47 Translate #+INDEX to Latex \index{} on export rpgoldman
2011-04-28 11:47 ` [PATCH] Make the latex export preprocessor rewrite #+INDEX to \index rpgoldman
2011-04-28 12:33 ` Nick Dokos
2011-04-28 15:23 ` Robert Goldman
2011-04-28 15:29 ` Robert Goldman
2011-04-28 15:38 ` Patch --- adding an easy template for #+index rpgoldman
2011-04-28 19:11 ` Bernt Hansen
2011-04-28 19:59 ` Robert Goldman
2011-04-28 21:31 ` Bernt Hansen
2011-04-28 15:38 ` [PATCH] Add an easy template for index (i), and move include file to I from i rpgoldman
2011-05-04 7:49 ` [Accepted] " Carsten Dominik
2011-04-29 21:45 ` Bug Re: [PATCH] Make the latex export preprocessor rewrite #+INDEX to \index Robert Goldman
2011-05-04 7:59 ` Carsten Dominik [this message]
2011-05-04 15:08 ` [Accepted] " Robert Goldman
2011-05-04 22:36 ` Carsten Dominik
2011-05-04 22:46 ` Robert Goldman
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110504075943.46A1743B538@u016822.science.uva.nl \
--to=cdominik@newartisans.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.