[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
Re: [O] Org not preserving Python indent levels on LaTex export due to tabs
Thu, 13 Feb 2014 17:32:58 -0700
i can't seem to find the -i flag in the manual. perhaps i used the
wrong search term? i looked in literal examples and in working with
source code. i am using maint.
- is there another flag to set org-src-preserve-indentation to nil?
- will -i still work if org-src.preserve-indentation is t?
i'd be happy with a fixed 2-space indentation, but that is not
possible in current org. i find org-src-preserve-indentation to cause
more issues than it improves, so i am going to transition to it being
t, which feels safer even though it is not the default and does not
have the 2 spaces.
On 2/2/14, Nicolas Goaziou <address@hidden> wrote:
> 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
> This should prevent Org from touching indentation within the block.
> Nicolas Goaziou
The Kafka Pandemic: http://thekafkapandemic.blogspot.com
The disease DOES progress. MANY people have died from it. ANYBODY can get it.
Denmark: free Karina Hansen NOW.