From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Rakestraw Subject: Re: Help with new exporter Date: Thu, 11 Jul 2013 19:05:15 -0400 Message-ID: <8244e492846dd7d4cb0c65fd6c54245a@johnrakestraw.com> References: <28c5d705dc41bc66d5a17e23d5dc9324@johnrakestraw.com> <51DDB809.8050001@mpip-mainz.mpg.de> <37de0540be0008c1748751bae1f6c044@johnrakestraw.com> <51DE4125.7050608@mpip-mainz.mpg.de> <826a0029d8425d046554458b414e1063@johnrakestraw.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxPvJ-0001s9-Gp for emacs-orgmode@gnu.org; Thu, 11 Jul 2013 19:05:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UxPvI-0003zK-EP for emacs-orgmode@gnu.org; Thu, 11 Jul 2013 19:05:17 -0400 Received: from www3.webmail.pair.com ([66.39.3.34]:53317) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1UxPvI-0003zE-8O for emacs-orgmode@gnu.org; Thu, 11 Jul 2013 19:05:16 -0400 In-Reply-To: <826a0029d8425d046554458b414e1063@johnrakestraw.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi, list -- I understand the value of working on this myself -- what better way to learn? -- but after a few hours of reading the docs and scouring the list, I've reached the point of seeking at least a hint for where to go. (There's much more information higher in this thread, but I'm trying to focus rather narrowly on the problem here to keep the email relatively short.) I'm trying to export to a pdf, using Phil Hirschhorn's exam.cls. The document class definition I have (thanks, Robert!) gets me almost to where I need to be. However, it leaves me with square brackets at several points in the tex file. I need to delete those brackets. That is, I need to change "\begin[]{questions}" to "{\begin{questions}". Following Charles's advice, I'm trying to define and use a filter. However, I know little enough about LaTeX and lisp that I can't figure out why what I have isn't working. At the risk of making it very clear I know even less than nothing, here's what I've worked up: --8<---------------cut here---------------start------------->8--- (defun jr-org-delete-brackets-from-tex-file (text backend info) (while (re-search-forward "\\[]" nil t) (replace-match "")) text) (add-to-list 'org-export-filter-final-output-functions 'jr-org-delete-brackets-from-tex-file) --8<---------------cut here---------------end--------------->8--- This doesn't work. Can someone at least give me a hint on what I need to do differently? Thanks very much. -- John Rakestraw