From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Goldman Subject: Re: Request for suggestions including source code Date: Wed, 04 May 2011 17:29:18 -0500 Message-ID: <4DC1D33E.3090700@sift.info> References: <4DC1BCE7.8060503@sift.info> <3B495FCF-216C-4B81-BC13-DC74B8C401B9@tsdye.com> <4DC1CC32.4090003@sift.info> Reply-To: rpgoldman@sift.info Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:57897) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHkZQ-00047x-2T for emacs-orgmode@gnu.org; Wed, 04 May 2011 18:29:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QHkZO-0004F9-Tp for emacs-orgmode@gnu.org; Wed, 04 May 2011 18:29:24 -0400 Received: from mpls.sift.info ([75.146.46.193]:39404) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHkZO-0004Ev-KN for emacs-orgmode@gnu.org; Wed, 04 May 2011 18:29:22 -0400 In-Reply-To: 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: "Thomas S. Dye" Cc: Org Mode On 5/4/11 May 4 -5:23 PM, Thomas S. Dye wrote: > > On May 4, 2011, at 11:59 AM, Robert Goldman wrote: > >> On 5/4/11 May 4 -4:13 PM, Thomas S. Dye wrote: >>> Aloha Robert, >>> >>> Have a look at the listings and minted packages. You can specify font >>> size on a per-document or per-language basis. I believe listings has an >>> option to wrap long lines (don't remember this for minted, though). >>> >>> The instructions here might be helpful: >>> >>> http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-12_2 >> >> Hm. I'm still grappling with this. I am including many of these >> examples by using a source snippet (in sh) that goes out and pulls the >> example out of a source code file. >> >> Even after adding >> >> #+LaTeX_HEADER \usepackage{listings} >> >> and >> >> #+src: setup-listings >> > > Sorry for the confusion. In the example, the line > > #+source: setup-listings > > names the source code block that follows. I don't think it will do > anything by itself in your document. > > That code block named setup-listings contains an example of a listings > setup that maps Org-mode's output for Emacs Lisp code blocks to > something listings recognizes. It can be executed in Org-mode, using > Babel, to setup the listings export. After this is done, then the > example should export correctly. > > I'm not sure what is going wrong on your end. Perhaps > org-export-latex-custom-lang-environments needs to be configured for the > language you're using? Is there any chance that this won't work because I have a source snippet in one language (sh) that returns as results a source snippet in a /different/ language (a lisp-like domain-specific language)? I don't off-hand see how I can come up with a single label for the source block that takes this into account.... This may be a weird enough case that I should be aiming at a solution that is much simpler: e.g., just figuring out how to change all of my verbatim environments to use a smaller font or changing the export behavior so that /all/ verbatim blocks turn into listings blocks. Best, r