emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Org not preserving Python indent levels on LaTex export due to t


From: John Hendy
Subject: Re: [O] Org not preserving Python indent levels on LaTex export due to tabs
Date: Sun, 2 Feb 2014 12:05:14 -0600

I think it was very recently added (i.e. yesterday) due to this thread
about a very similar (same) issue:
- http://www.mail-archive.com/address@hidden/msg81203.html

I'd love to update Worg/documentation to include it... out of
curiosity, where were you looking for it to be documented? That way, I
can add it to the most intuitive/popular location.


Thanks,
John

On Sun, Feb 2, 2014 at 11:32 AM, James Ryland Miller
<address@hidden> wrote:
> Thank you! That worked perfectly. Is '-i' not in the docs?
>
> On Sun, Feb 2, 2014 at 1:49 AM, Nicolas Goaziou <address@hidden> wrote:
>> Hello,
>>
>> James Ryland Miller <address@hidden> 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
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]