Hi,

how can I adjust the left margin of the output of the vim module?

The core typing mechanism implements a “margin” key for this. The
vim output also does not react to the “leftoffset” setting of the
background mechanism.

\usemodule [vim]

\definetextbackground [code]
  [location=paragraph,
   %leftoffset=1cm,
   topoffset=5mm]

\definevimtyping [C]
  [syntax=c,
   before={\starttextbackground[code]},
   after=\stoptextbackground]

\setuptyping [typing]
  [margin=1cm,
   before={\starttextbackground[code]},
   after=\stoptextbackground]

\starttext

\startC
/* This MEMB() definition defines a memory pool from
 * which we allocate neighbour entries. */
MEMB(neighbours_memb, struct neighbour, MAX_NEIGHBOURS);
\stopC

\blank

\starttyping
/* This MEMB() definition defines a memory pool from
 * which we allocate neighbour entries. */
MEMB(neighbours_memb, struct neighbour, MAX_NEIGHBOURS);
\stoptyping

\stoptext


Marco

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to