emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Code blocks in lists?


From: Sebastien Vauban
Subject: Re: [O] Code blocks in lists?
Date: Fri, 18 May 2012 22:38:48 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.97 (windows-nt)

Hi Eric,

Eric Schulte wrote:
> "Sebastien Vauban" <address@hidden> writes:
>> If I change my list to something like this:
>>
>> 1. Download and install color-theme.
>>
>>    #+begin_src emacs-lisp
>>    (add-to-list 'load-path "/path/to/color-theme-6.6.0")
>>    (require 'color-theme)
>>    #+end_src
>>
>>    1. Download and install color-theme-leuven.
>>
>>       #+begin_src emacs-lisp
>>       (add-to-list 'load-path "/path/to/color-theme-leuven")
>>       (require 'color-theme-leuven)
>>       #+end_src
>>
>>       1. Restart Emacs.
>>
>>          #+begin_src emacs-lisp
>>          (restart)
>>          #+end_src
>>
>> The export (see HTML), while being semantically correct in the sense that 
>> code
>> blocks do belong to the items, seems wrong wrt the indentation, something 
>> like
>> this:
>>
>> 1. Download and install color-theme.
>>
>>       #+begin_src emacs-lisp
>>       (add-to-list 'load-path "/path/to/color-theme-6.6.0")
>>       (require 'color-theme)
>>       #+end_src
>>
>>    1. Download and install color-theme-leuven.
>>
>>             #+begin_src emacs-lisp
>>             (add-to-list 'load-path "/path/to/color-theme-leuven")
>>             (require 'color-theme-leuven)
>>             #+end_src
>>
>>       1. Restart Emacs.
>>
>>                   #+begin_src emacs-lisp
>>                   (restart)
>>                   #+end_src
>>
>> A bit like if the indentation was "doubled" each time. What do you think of
>> that?
>
> This indentation is an HTML/CSS issue, as far as I can tell Org-mode is
> generating the correct HTML.

I don't think it's a HTML/CSS issue: if you look at the produced HTML, you see
respectively 3 whitespaces (or 6 or 9) in front of every line of the code
block.

That is: the "indentation" whitespaces in your Org buffer are copied over to
HTML. And, as the code blocks are now correctly indented under their parent
item, the leading whitespaces are further indenting the code blocks.

So, for me, there should be no extra whitespace added to the code block in the
PRE tags.

>> [1] BTW, GitHub seems to use that setting, as they show the same problem as I
>> had initially, when exporting README.org to HTML.
>
> Github uses a ruby library named "org-ruby" to export, it is an entirely
> separate export implementation.

OK.

Best regards,
  Seb

-- 
Sebastien Vauban




reply via email to

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