From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ed Hirgelt Subject: Patch to LaTeX Export verbatim Date: Wed, 17 Jun 2009 11:23:04 -0700 Message-ID: <9ABF835C-5E1E-49F8-ABF1-FC6ACEE50437@gmail.com> Mime-Version: 1.0 (Apple Message framework v935.3) Content-Type: multipart/mixed; boundary=Apple-Mail-11-667812231 Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MGzn9-0004UA-Co for emacs-orgmode@gnu.org; Wed, 17 Jun 2009 14:23:23 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MGzn3-0004Jr-Kl for emacs-orgmode@gnu.org; Wed, 17 Jun 2009 14:23:22 -0400 Received: from [199.232.76.173] (port=45769 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MGzn3-0004J7-73 for emacs-orgmode@gnu.org; Wed, 17 Jun 2009 14:23:17 -0400 Received: from mx20.gnu.org ([199.232.41.8]:49020) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MGzn2-0005LK-1P for emacs-orgmode@gnu.org; Wed, 17 Jun 2009 14:23:16 -0400 Received: from mail-ew0-f210.google.com ([209.85.219.210]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MGzmy-0008Hn-25 for emacs-orgmode@gnu.org; Wed, 17 Jun 2009 14:23:12 -0400 Received: by ewy6 with SMTP id 6so715279ewy.42 for ; Wed, 17 Jun 2009 11:23:10 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Carsten Dominik Cc: emacs-orgmode emacs-orgmode --Apple-Mail-11-667812231 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit I use memoir with LaTeX and like the boxedverbatim environment. And I often need to wrap that in a mini page to keep it all together. So I put this hack together to generalize the way that source is exported to LaTeX. Hope you can incorporate it. It is against the latest org-exp.el from git. Thanks, Ed Hirgelt --Apple-Mail-11-667812231 Content-Disposition: attachment; filename=org-exp.patch Content-Type: application/octet-stream; x-unix-mode=0664; name="org-exp.patch" Content-Transfer-Encoding: 7bit --- org-exp.el-keep 2009-06-11 15:51:10.000000000 -0700 +++ org-exp.el 2009-06-17 11:04:26.000000000 -0700 @@ -452,6 +452,19 @@ :group 'org-export-latex :type 'boolean) +(defcustom org-export-LaTeX-verbatim-wrap '("\\begin{verbatim}\n" + "\\end{verbatim}\n") + "When exporting a fixed-width section with LaTeX use the first +item in the list to open the environment and the second to close +it. + +Defaults to \\begin{verbatim} and \\end{verbatim}. +" + :group 'org-export_translation + :group 'org-export-latex + :type '(list (string :tag "Open") + (string :tag "Close"))) + (defcustom org-export-with-fixed-width t "Non-nil means, lines starting with \":\" will be in fixed width font. This can be used to have pre-formatted text, fragments of code etc. For @@ -2248,7 +2261,8 @@ ((eq backend 'latex) (setq rtn (org-export-number-lines rtn 'latex 0 0 num cont rpllbl fmt)) (concat "\n#+BEGIN_LaTeX\n" - (org-add-props (concat "\\begin{verbatim}\n" rtn "\n\\end{verbatim}\n") + (org-add-props (concat (car org-export-LaTeX-verbatim-wrap) + rtn (cadr org-export-LaTeX-verbatim-wrap)) '(org-protected t)) "#+END_LaTeX\n\n")) ((eq backend 'ascii) --Apple-Mail-11-667812231 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit --Apple-Mail-11-667812231 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --Apple-Mail-11-667812231--