ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan <adityam@umich.edu>
To: Hans Hagen <pragma@wxs.nl>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: vbox construct breaking MKII
Date: Wed, 4 Aug 2010 13:23:59 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LNX.2.00.1008041317570.31926@ybpnyubfg.ybpnyqbznva> (raw)
In-Reply-To: <4C599A9C.1010705@wxs.nl>

On Wed, 4 Aug 2010, Hans Hagen wrote:

> On 4-8-2010 6:51, Aditya Mahajan wrote:
>>  On Wed, 4 Aug 2010, Hans Hagen wrote:
>> 
>> >  On 4-8-2010 9:16, Willi Egger wrote:
>> > >  Hi all,
>> > > 
>> > >  Any variation of the following construct breaks in MKII as long as 
>> > >  there
>> > >  is no new line after the closing } of the vbox. MKIV does not have 
>> > >  this
>> > >  problem.
>> > > 
>> > >  \startbuffer[bf4]
>> > >  \vbox{
>> > >  test
>> > >  }\stopbuffer
>> > > 
>> > >  Please refer to the testfile
>> > 
>> >  \stopbuffer has to be on a line of its own so
>> > 
>> >  }
>> >  \stopbuffer
>>
>>  Is it possible to have an "inline" version of \start...stopbuffer. So that
>>
>>  \buffer[options]{...} is similar to
>>
>>  \startbuffer[options]
>>  ...
>>  \stopbuffer
>>
>>  The functionality is already there. \type parses the contents correctly,
>>  and
>>  \startbuffer writes it to an external file. Something that combines the
>>  two will
>>  be great.
>>
>>  Such a feature will be handy for inline syntax highlighting with the t-vim
>>  module.
>
> \setbuffer[bla]more bla\endbuffer

That does not work in mkii and does not look right for the user interface. 
For pretty printing using the inbuilt macros, one can use

\startTEX
....
\stopTEX

and \typeTEX{...}

Normally, I want the "display" version to insert blank spaces while the 
"inline" version to leave them alone. In the t-vim module, I can create 
environment

\startvimTEX
...
\stopvimTEX

(that writes contents to file and inputs the result) but cannot easily 
create \typevimTEX. For that I will need to reimplement all the catcode 
trickery of \definetype and \definebuffer.

Aditya
___________________________________________________________________________________
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	other threads:[~2010-08-04 17:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-04  7:16 Willi Egger
2010-08-04  8:19 ` Hans Hagen
2010-08-04 16:51   ` Aditya Mahajan
2010-08-04 16:51     ` Hans Hagen
2010-08-04 17:23       ` Aditya Mahajan [this message]
2010-08-04 18:21         ` Hans Hagen
2010-08-04 19:36           ` Aditya Mahajan
2010-08-04 21:20             ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LNX.2.00.1008041317570.31926@ybpnyubfg.ybpnyqbznva \
    --to=adityam@umich.edu \
    --cc=ntg-context@ntg.nl \
    --cc=pragma@wxs.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).