From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Klein Subject: Note/hint on latex export of listings w/ lstlistings Date: Thu, 09 Jan 2014 21:12:48 +0100 Message-ID: <52CF02C0.3040307@roklein.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49672) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W1LyN-0001qN-0g for emacs-orgmode@gnu.org; Thu, 09 Jan 2014 15:13:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W1LyF-00073Z-Nm for emacs-orgmode@gnu.org; Thu, 09 Jan 2014 15:12:58 -0500 Received: from moutng.kundenserver.de ([212.227.126.186]:51756) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W1LyF-000738-DY for emacs-orgmode@gnu.org; Thu, 09 Jan 2014 15:12:51 -0500 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, if you want to export e.g. config file snippets using src blocks, you can (add-to-list 'org-latex-listings-langs '(text " ")) in your configuration. You have to take care to put a blank between the double quotes (" " instead of "") or you can't run the export through (pdf)latex. The reason is, the function org-latex--make-option-string returns "language" for empty double quotes, resulting in e.g.: \lstset{language,numbers=none} A blank between the double quotes causes org-latex--make-option-string to return "language= " and results in a latex-compilable: \lstset{language= ,numbers=none} This is nice to know, when you're documenting configurations or configuration files. Best regards Robert