From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsd@tsdye.com (Thomas S. Dye) Subject: Re: Help with new exporter Date: Thu, 11 Jul 2013 17:00:45 -1000 Message-ID: References: <28c5d705dc41bc66d5a17e23d5dc9324@johnrakestraw.com> <51DDB809.8050001@mpip-mainz.mpg.de> <37de0540be0008c1748751bae1f6c044@johnrakestraw.com> <51DE4125.7050608@mpip-mainz.mpg.de> <826a0029d8425d046554458b414e1063@johnrakestraw.com> <8244e492846dd7d4cb0c65fd6c54245a@johnrakestraw.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47853) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxTun-00065d-B2 for emacs-orgmode@gnu.org; Thu, 11 Jul 2013 23:21:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UxTuk-0005Bm-A2 for emacs-orgmode@gnu.org; Thu, 11 Jul 2013 23:21:01 -0400 Received: from oproxy14-pub.unifiedlayer.com ([67.222.51.224]:44289) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1UxTuk-0005BA-36 for emacs-orgmode@gnu.org; Thu, 11 Jul 2013 23:20:58 -0400 In-Reply-To: <8244e492846dd7d4cb0c65fd6c54245a@johnrakestraw.com> (John Rakestraw's message of "Thu, 11 Jul 2013 19:05:15 -0400") 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: John Rakestraw Cc: emacs-orgmode@gnu.org Hi John, I think your search string might better be "\[\]", or something along those lines (perhaps it needs to be "\\[\\]"). hth, Tom John Rakestraw writes: > 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: > > (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) > > This doesn't work. > > Can someone at least give me a hint on what I need to do differently? > > Thanks very much. -- Thomas S. Dye http://www.tsdye.com