Hello Dario,

On 12 February 2013 10:36, Dario Hamidi <dario.ham...@gmail.com> wrote:

> Hello,
>
> I discovered a problem when exporting source blocks containing braces to
> texinfo using `ox-texinfo'.  The texinfo exporter wraps source blocks
> into a `example' environment, which takes care of source block
> indentation but doesn't allow any braces to occur in the contained text,
> since braces have a special meaning in TeX.
>
> After reading the `texinfo' manual, it became clear that literal examples
> should be exported also in a `verbatim' environment.  A patch making
> this change to the exporter is attached.
>


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 had chosen to go with @example rather than @verbatim because it does state
that lisp blocks should be wrapped in @lisp which is synonymous to @example.

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

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.

Regards,
Jon


>  Dario
>

Reply via email to