emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] src blocks in texinfo export


From: Dario Hamidi
Subject: Re: [O] src blocks in texinfo export
Date: Tue, 12 Feb 2013 23:09:12 +0100
User-agent: mu4e 0.9.9.5-dev6; emacs 24.2.1

Hello Jonathan,

> Using your patch as is would wrap the source blocks in both example and
> verbatim blocks.  If going with verbatim it would be better to remove all
> references to @example/@end example.

I don't understand where the problem lies with having a address@hidden'
within a address@hidden'. Could you maybe explain to me why this is
problematic?

Using both environments seems to achieve the goal of having an idented
source block in the resulting info file without having to further
process the source block before export.

Consider exporting 

    #+BEGIN_SRC sh
    function fails
    {
        echo "this causes an error with makeinfo"
    }
    #+END_SRC

with only the verbatim environment:

    File: test.info,  Node: Top,  Up: (dir)
    
    Manual
    ******
    
    function fails
    {
        echo "this causes an error with makeinfo"
    }

and with verbatim in example:

    File: test.info,  Node: Top,  Up: (dir)
    
    Manual
    ******
    
         function fails
         {
             echo "this causes an error with makeinfo"
         }

> It should be possible to escape any braces or @ before inserting them into
> the
> example block to ensure there is no expansion.

While it certainly is possible, it would also mean to properly escape
*all* characters with a special meaning to TeX.  I suppose that making
text containing such characters visible in a document without having to
escape them is what the verbatim environment is for.

> The only differences in using @verbatim over escaping any characters in
> @example are the following:
>   - Tabs are treated as tabs and not as single spaces
>   - The code block is not indented.

Preserving whitespace seems like a good idea when displaying python
source code or makefiles.

Dario



reply via email to

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