emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* source block exported with tabs replacing spaces?
@ 2015-06-10 12:01 Alan Schmitt
  2015-06-10 12:43 ` Rainer M Krug
  2015-06-10 14:36 ` Charles C. Berry
  0 siblings, 2 replies; 6+ messages in thread
From: Alan Schmitt @ 2015-06-10 12:01 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 915 bytes --]

Hello,

I'm working on a presentation and I noticed that some of my source
blocks have spaces exported as tabs. Here is an example:

 #+begin_src js :wrap center :results output :exports both
 console.log((![]+[])[+!+[]]+
             (![]+[])[!+[]+!+[]]+
             (![]+[])[+!+[]]+
             ([][[]]+[])[+!+[]])
 #+end_src

get exported to the following latex code
 \begin{minted}[frame=lines,fontsize=\scriptsize]{js}
console.log((![]+[])[+!+[]]+
	    (![]+[])[!+[]+!+[]]+
	    (![]+[])[+!+[]]+
	    ([][[]]+[])[+!+[]])
\end{minted}

(Note the tabs instead of the 8 spaces). I have `indent-tabs-mode' set
to nil in both the file and the exporter setting (I'm using the
asynchronous exporter with a specified file).

How can I tell org to preserve the spaces?

Thanks,

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Weekly CO₂ average (2015-05-30, Mauna Loa Observatory): 403.41 ppm

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: source block exported with tabs replacing spaces?
  2015-06-10 12:01 source block exported with tabs replacing spaces? Alan Schmitt
@ 2015-06-10 12:43 ` Rainer M Krug
  2015-06-10 19:48   ` Alan Schmitt
  2015-06-10 14:36 ` Charles C. Berry
  1 sibling, 1 reply; 6+ messages in thread
From: Rainer M Krug @ 2015-06-10 12:43 UTC (permalink / raw)
  To: Alan Schmitt; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1524 bytes --]

Alan Schmitt <alan.schmitt@polytechnique.org> writes:

> Hello,
>
> I'm working on a presentation and I noticed that some of my source
> blocks have spaces exported as tabs. Here is an example:
>
>  #+begin_src js :wrap center :results output :exports both
>  console.log((![]+[])[+!+[]]+
>              (![]+[])[!+[]+!+[]]+
>              (![]+[])[+!+[]]+
>              ([][[]]+[])[+!+[]])
>  #+end_src
>
> get exported to the following latex code
>  \begin{minted}[frame=lines,fontsize=\scriptsize]{js}
> console.log((![]+[])[+!+[]]+
> 	    (![]+[])[!+[]+!+[]]+
> 	    (![]+[])[+!+[]]+
> 	    ([][[]]+[])[+!+[]])
> \end{minted}
>
> (Note the tabs instead of the 8 spaces). I have `indent-tabs-mode' set
> to nil in both the file and the exporter setting (I'm using the
> asynchronous exporter with a specified file).
>
> How can I tell org to preserve the spaces?

This might not be org, but minted in LaTex which is formating the code
blocks. I would look there if there is an option to disable the
replacement of tabs with strings.

Cheers,

Rainer

>
> Thanks,

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax :       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      Rainer@krugs.de

Skype:      RMkrug

PGP: 0x0F52F982

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 494 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: source block exported with tabs replacing spaces?
  2015-06-10 12:01 source block exported with tabs replacing spaces? Alan Schmitt
  2015-06-10 12:43 ` Rainer M Krug
@ 2015-06-10 14:36 ` Charles C. Berry
  2015-06-10 19:55   ` Alan Schmitt
  1 sibling, 1 reply; 6+ messages in thread
From: Charles C. Berry @ 2015-06-10 14:36 UTC (permalink / raw)
  To: Alan Schmitt; +Cc: emacs-orgmode

On Wed, 10 Jun 2015, Alan Schmitt wrote:

> Hello,
>
> I'm working on a presentation and I noticed that some of my source
> blocks have spaces exported as tabs. Here is an example:
>
> #+begin_src js :wrap center :results output :exports both
> console.log((![]+[])[+!+[]]+
>             (![]+[])[!+[]+!+[]]+
>             (![]+[])[+!+[]]+
>             ([][[]]+[])[+!+[]])
> #+end_src
>
> get exported to the following latex code
> \begin{minted}[frame=lines,fontsize=\scriptsize]{js}
> console.log((![]+[])[+!+[]]+
> 	    (![]+[])[!+[]+!+[]]+
> 	    (![]+[])[+!+[]]+
> 	    ([][[]]+[])[+!+[]])
> \end{minted}
>
> (Note the tabs instead of the 8 spaces). I have `indent-tabs-mode' set
> to nil in both the file and the exporter setting (I'm using the
> asynchronous exporter with a specified file).
>
> How can I tell org to preserve the spaces?


Customize `org-src-preserve-indentation'

HTH,

Chuck

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: source block exported with tabs replacing spaces?
  2015-06-10 12:43 ` Rainer M Krug
@ 2015-06-10 19:48   ` Alan Schmitt
  2015-06-10 19:55     ` Rainer M Krug
  0 siblings, 1 reply; 6+ messages in thread
From: Alan Schmitt @ 2015-06-10 19:48 UTC (permalink / raw)
  To: Rainer M Krug; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 540 bytes --]

On 2015-06-10 14:43, Rainer M Krug <Rainer@krugs.de> writes:

> This might not be org, but minted in LaTex which is formating the code
> blocks. I would look there if there is an option to disable the
> replacement of tabs with strings.

Thank you for the suggestion, but the tex that is generated has the tabs
(before minted has a chance to see it). So it seems they are introduced
when going from org to tex.

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Weekly CO₂ average (2015-05-30, Mauna Loa Observatory): 403.41 ppm

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: source block exported with tabs replacing spaces?
  2015-06-10 19:48   ` Alan Schmitt
@ 2015-06-10 19:55     ` Rainer M Krug
  0 siblings, 0 replies; 6+ messages in thread
From: Rainer M Krug @ 2015-06-10 19:55 UTC (permalink / raw)
  To: Alan Schmitt; +Cc: emacs-orgmode



Envoyé de mon iPhone

> Le 10 juin 2015 à 21:48, Alan Schmitt <alan.schmitt@polytechnique.org> a écrit :
> 
> On 2015-06-10 14:43, Rainer M Krug <Rainer@krugs.de> writes:
> 
>> This might not be org, but minted in LaTex which is formating the code
>> blocks. I would look there if there is an option to disable the
>> replacement of tabs with strings.
> 
> Thank you for the suggestion, but the tex that is generated has the tabs
> (before minted has a chance to see it). So it seems they are introduced
> when going from org to tex.

True - haven't thought about that the formatting from tex is happening later. 

Cheers,

Rainer

> 
> Alan
> 
> -- 
> OpenPGP Key ID : 040D0A3B4ED2E5C7
> Weekly CO₂ average (2015-05-30, Mauna Loa Observatory): 403.41 ppm

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: source block exported with tabs replacing spaces?
  2015-06-10 14:36 ` Charles C. Berry
@ 2015-06-10 19:55   ` Alan Schmitt
  0 siblings, 0 replies; 6+ messages in thread
From: Alan Schmitt @ 2015-06-10 19:55 UTC (permalink / raw)
  To: Charles C. Berry; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 452 bytes --]

On 2015-06-10 16:36, "Charles C. Berry" <ccberry@ucsd.edu> writes:

> On Wed, 10 Jun 2015, Alan Schmitt wrote:
>
>> How can I tell org to preserve the spaces?
>
> Customize `org-src-preserve-indentation'

Thank you, this was it. I searched the manual for "tabs" and
"tabulations", I should have searched for "whitespace".

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Weekly CO₂ average (2015-05-30, Mauna Loa Observatory): 403.41 ppm

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-06-10 19:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-10 12:01 source block exported with tabs replacing spaces? Alan Schmitt
2015-06-10 12:43 ` Rainer M Krug
2015-06-10 19:48   ` Alan Schmitt
2015-06-10 19:55     ` Rainer M Krug
2015-06-10 14:36 ` Charles C. Berry
2015-06-10 19:55   ` Alan Schmitt

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).