From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hsiu-Khuern Tang Subject: Re: Wishlist: indicate language in LaTeX export of literal source examples Date: Tue, 9 Feb 2010 09:51:02 -0800 Message-ID: References: <87ocjzi2dw.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NeuF6-0000HB-5t for emacs-orgmode@gnu.org; Tue, 09 Feb 2010 12:51:20 -0500 Received: from [199.232.76.173] (port=48175 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NeuF5-0000Gx-Ky for emacs-orgmode@gnu.org; Tue, 09 Feb 2010 12:51:19 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NeuF3-0006hc-5i for emacs-orgmode@gnu.org; Tue, 09 Feb 2010 12:51:19 -0500 Received: from mail-gx0-f211.google.com ([209.85.217.211]:40282) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NeuF2-0006hY-SX for emacs-orgmode@gnu.org; Tue, 09 Feb 2010 12:51:17 -0500 Received: by gxk3 with SMTP id 3so1882663gxk.6 for ; Tue, 09 Feb 2010 09:51:16 -0800 (PST) In-Reply-To: <87ocjzi2dw.fsf@gmail.com> 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: Eric Schulte Cc: emacs-orgmode@gnu.org Hi Eric, Thanks for telling me about this solution. It is somewhat of an overkill, but I'll take it :) The listings documentation is also quite impressive. -- Hsiu-Khuern. On Mon, Feb 8, 2010 at 6:11 PM, Eric Schulte wrote= : > Hi Hsiu-Khuern, > > This may be overkill, but you could try the following which will > indicate the source-code language in the generated .tex > > ;; tell org to use listings > (setq org-export-latex-listings t) > > If you actually want to use the listings package you can also include > the following > > ;; you must include the listings package > (add-to-list 'org-export-latex-packages-alist '("" "listings")) > ;; if you want colored source code then you need to include the color pac= kage > (add-to-list 'org-export-latex-packages-alist '("" "color")) > > in either case a block such as > > #+begin_src R > ... > #+end_src > > will export to > > \lstset{language=3DR} > \begin{lstlisting} > ... > \end{lstlisting} > > Best -- Eric > > Hsiu-Khuern Tang writes: > >> (Resending because of earlier problems -- my apologies if this is a dupl= icate!) >> >> Hi, >> >> Currently, literal examples (#+BEGIN_EXAMPLE and #+BEGIN_SRC) are export= ed to >> >> \begin{verbatim} >> ... >> \end{verbatim} >> >> in LaTeX. =A0For #+BEGIN_SRC blocks, could we indicate the language in a >> LaTeX comment, e.g., >> >> #+BEGIN_SRC R >> ... >> #+END_SRC >> >> becomes >> >> % R >> \begin{verbatim} >> ... >> \end{verbatim} >> >> >> I'm trying to post-process the LaTeX output, and knowing the language wo= uld >> help me. >> >> Thanks! >> >> -- >> Best, >> Hsiu-Khuern. >> >> >> _______________________________________________ >> Emacs-orgmode mailing list >> Please use `Reply All' to send replies to the list. >> Emacs-orgmode@gnu.org >> http://lists.gnu.org/mailman/listinfo/emacs-orgmode >