From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Org not preserving Python indent levels on LaTex export due to tabs Date: Sun, 02 Feb 2014 08:49:43 +0100 Message-ID: <874n4iq7hk.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44900) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9ro2-0005DB-MV for emacs-orgmode@gnu.org; Sun, 02 Feb 2014 02:49:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W9rnu-0005To-AH for emacs-orgmode@gnu.org; Sun, 02 Feb 2014 02:49:30 -0500 Received: from mail-we0-x233.google.com ([2a00:1450:400c:c03::233]:42881) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9rnu-0005Tk-2g for emacs-orgmode@gnu.org; Sun, 02 Feb 2014 02:49:22 -0500 Received: by mail-we0-f179.google.com with SMTP id q58so1043881wes.38 for ; Sat, 01 Feb 2014 23:49:21 -0800 (PST) In-Reply-To: (James Ryland Miller's message of "Sat, 1 Feb 2014 17:56:59 -0600") 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: James Ryland Miller Cc: emacs-orgmode@gnu.org Hello, James Ryland Miller writes: > I'm having trouble with getting python source=code blocks to export to > LaTeX properly. I've figured out what's going wrong: the exporter is > inserting tab characters on lines with 2 or more indentation levels in > python. If I use org to export to .tex first, and then untabify the > .tex files, the indent levels are preserved (assuming the tabs > correctly lined up with the corresponding python in the first place, > which many times they don't). Try to set `org-src-preserve-indentation' to a non-nil value (on a very recent Org) or add a "-i" flag to you source block: #+BEGIN_SRC python -n -i ... #+END_SRC This should prevent Org from touching indentation within the block. Regards, -- Nicolas Goaziou