I am testing out the Babel feature in org-mode, with this small block.
#+BEGIN_SRC sh :results verbatim :exports both
banner -w 35 e
#+END_SRC
#+RESULTS:
: #####
: #########
: #### # ###
: # # ##
: ## # #
: # # ##
: # # ###
: # #####
(The banner
command writes an ASCII art heading. So in this example I'm just printing out an e
, sideways. The leading whitespace characters are all spaces.)
I try to export this to TeX, and in the TeX file I see that some of the leading spaces have been replaced with tabs; namely any group of 8 spaces gets replaced with a tab. Therefore the lines don't show up properly when the TeX is exported to PDF. I had a look at the source code of org
and I found that it might be org-trim
causing this. There's also the option org-src-preserve-indentation
, but that doesn't seem to act on the output of the source code, only the source itself. Can I stop org
from converting the whitespaces to tabs?
EDIT: Just tried sed 's/<tab-character>/ /g'
on the TeX file to replace each tab with 8 spaces, and the problem is fixed immediately. So org must be changing them somewhere, I just need to know where...
EDIT #2: Apparently there is some normalizing going on that might be the issue. Listing here for reference.