ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* vbox construct breaking MKII
@ 2010-08-04  7:16 Willi Egger
  2010-08-04  8:19 ` Hans Hagen
  0 siblings, 1 reply; 8+ messages in thread
From: Willi Egger @ 2010-08-04  7:16 UTC (permalink / raw)
  To: NTG-Context ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 270 bytes --]

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

Kind regards

Willi

[-- Attachment #2: test_braces.tex --]
[-- Type: application/octet-stream, Size: 410 bytes --]

% Works
\startbuffer[bf1]
\vbox{
test}
\stopbuffer

% Works
\startbuffer[bf2]
\vbox{
test
}
\stopbuffer

% % Breaks in MKII
% \startbuffer[bf3]
% \vbox{test}\stopbuffer  

% Breaks in MkII
% \startbuffer[bf4]
% \vbox{
% test
% }\stopbuffer

% Breaks in MkII
% \startbuffer[bf5]
% \vbox{
% test}\stopbuffer   

\starttext
\getbuffer[bf1]
\getbuffer[bf2]
\getbuffer[bf3]
\getbuffer[bf4]
\getbuffer[bf5]
\stoptext

[-- Attachment #3: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: vbox construct breaking MKII
  2010-08-04  7:16 vbox construct breaking MKII Willi Egger
@ 2010-08-04  8:19 ` Hans Hagen
  2010-08-04 16:51   ` Aditya Mahajan
  0 siblings, 1 reply; 8+ messages in thread
From: Hans Hagen @ 2010-08-04  8:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Willi Egger

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


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: vbox construct breaking MKII
  2010-08-04  8:19 ` Hans Hagen
@ 2010-08-04 16:51   ` Aditya Mahajan
  2010-08-04 16:51     ` Hans Hagen
  0 siblings, 1 reply; 8+ messages in thread
From: Aditya Mahajan @ 2010-08-04 16:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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.

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: vbox construct breaking MKII
  2010-08-04 16:51   ` Aditya Mahajan
@ 2010-08-04 16:51     ` Hans Hagen
  2010-08-04 17:23       ` Aditya Mahajan
  0 siblings, 1 reply; 8+ messages in thread
From: Hans Hagen @ 2010-08-04 16:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: vbox construct breaking MKII
  2010-08-04 16:51     ` Hans Hagen
@ 2010-08-04 17:23       ` Aditya Mahajan
  2010-08-04 18:21         ` Hans Hagen
  0 siblings, 1 reply; 8+ messages in thread
From: Aditya Mahajan @ 2010-08-04 17:23 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: vbox construct breaking MKII
  2010-08-04 17:23       ` Aditya Mahajan
@ 2010-08-04 18:21         ` Hans Hagen
  2010-08-04 19:36           ` Aditya Mahajan
  0 siblings, 1 reply; 8+ messages in thread
From: Hans Hagen @ 2010-08-04 18:21 UTC (permalink / raw)
  To: Aditya Mahajan; +Cc: mailing list for ConTeXt users

On 4-8-2010 7:23, Aditya Mahajan wrote:

> (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.

\definetype[TEXtype][option=TEX]

test \TEXtype{oeps \test{oeps}} test


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: vbox construct breaking MKII
  2010-08-04 18:21         ` Hans Hagen
@ 2010-08-04 19:36           ` Aditya Mahajan
  2010-08-04 21:20             ` Hans Hagen
  0 siblings, 1 reply; 8+ messages in thread
From: Aditya Mahajan @ 2010-08-04 19:36 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users

On Wed, 4 Aug 2010, Hans Hagen wrote:

> On 4-8-2010 7:23, Aditya Mahajan wrote:
>
>>  (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.
>
> \definetype[TEXtype][option=TEX]
>
> test \TEXtype{oeps \test{oeps}} test

But I want to store the argument "oeps \test{oeps}" in an external file, 
process that external file with vim, and \input the result.

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: vbox construct breaking MKII
  2010-08-04 19:36           ` Aditya Mahajan
@ 2010-08-04 21:20             ` Hans Hagen
  0 siblings, 0 replies; 8+ messages in thread
From: Hans Hagen @ 2010-08-04 21:20 UTC (permalink / raw)
  To: Aditya Mahajan; +Cc: mailing list for ConTeXt users

On 4-8-2010 9:36, Aditya Mahajan wrote:
> On Wed, 4 Aug 2010, Hans Hagen wrote:
>
>> On 4-8-2010 7:23, Aditya Mahajan wrote:
>>
>>> (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.
>>
>> \definetype[TEXtype][option=TEX]
>>
>> test \TEXtype{oeps \test{oeps}} test
>
> But I want to store the argument "oeps \test{oeps}" in an external file,
> process that external file with vim, and \input the result.

As pretty printing happens in lua, you can intercept the string there. 
Just look at pret-*.lua: there is a visualizer.flush_line in there that 
can write to a file, apply vim, and read in the result (can also be 
words instead of lines).

Hans



-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-08-04 21:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-04  7:16 vbox construct breaking MKII 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
2010-08-04 18:21         ` Hans Hagen
2010-08-04 19:36           ` Aditya Mahajan
2010-08-04 21:20             ` Hans Hagen

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).