ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* t-vim: additional space in \inlineX{}
@ 2011-09-20 22:19 Romain Diss
  2011-09-21  1:39 ` Aditya Mahajan
  0 siblings, 1 reply; 8+ messages in thread
From: Romain Diss @ 2011-09-20 22:19 UTC (permalink / raw)
  To: ConTeXt users

Hi,

I tried the t-vim module today and I had a line-break problem with \inlineX. I 
found the thread started by Peter Münster (last week). So I downloaded the 
last context beta and this problem is gone.

But I got another problem : there is an unwanted additional space at the 
begining of the \inlineX content.

See this minimal example (copy paste from Peter Münster mail):

\usemodule[vim]
\definevimtyping[C][syntax=c]
\starttext
bla \inlineC{void func(void)} bla
\stoptext


Thanks for help.

-- 
Romain Diss
<romain.diss@yahoo.fr>
___________________________________________________________________________________
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: t-vim: additional space in \inlineX{}
  2011-09-20 22:19 t-vim: additional space in \inlineX{} Romain Diss
@ 2011-09-21  1:39 ` Aditya Mahajan
  2011-09-21 19:52   ` Romain Diss
  0 siblings, 1 reply; 8+ messages in thread
From: Aditya Mahajan @ 2011-09-21  1:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1012 bytes --]

On Wed, 21 Sep 2011, Romain Diss wrote:

> I tried the t-vim module today and I had a line-break problem with \inlineX. I
> found the thread started by Peter Münster (last week). So I downloaded the
> last context beta and this problem is gone.
>
> But I got another problem : there is an unwanted additional space at the
> begining of the \inlineX content.
>
> See this minimal example (copy paste from Peter Münster mail):
>
> \usemodule[vim]
> \definevimtyping[C][syntax=c]
> \starttext
> bla \inlineC{void func(void)} bla
> \stoptext

\ReadFile introduces a spurious space when reading the file! Here is a 
minimal example (compare the output of \ReadFile and \input):

\startbuffer[test]
{\bf bold}
\stopbuffer

\savebuffer[test][test]
\starttext
»{\bf bold}«
\endlinechar\minusone %to prevent line break after reading file
»\ReadFile{\jobname-test.tmp}«
»\input\jobname-test.tmp\relax«
\stoptext

t-vim uses \ReadFile internally and hence inherits the bug.

Aditya

[-- Attachment #2: Type: text/plain, Size: 485 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: t-vim: additional space in \inlineX{}
  2011-09-21  1:39 ` Aditya Mahajan
@ 2011-09-21 19:52   ` Romain Diss
  2011-09-22  2:36     ` Aditya Mahajan
  0 siblings, 1 reply; 8+ messages in thread
From: Romain Diss @ 2011-09-21 19:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Aditya Mahajan wrote:
> \ReadFile introduces a spurious space when reading the file!
> (...)
> t-vim uses \ReadFile internally and hence inherits the bug.
Is this a long known bug which nobody can solve or is it possible to solve the 
problem ?

-- 
Romain Diss
<romain.diss@yahoo.fr>
___________________________________________________________________________________
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: t-vim: additional space in \inlineX{}
  2011-09-21 19:52   ` Romain Diss
@ 2011-09-22  2:36     ` Aditya Mahajan
  2011-09-22  2:58       ` Aditya Mahajan
  0 siblings, 1 reply; 8+ messages in thread
From: Aditya Mahajan @ 2011-09-22  2:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, 21 Sep 2011, Romain Diss wrote:

> Aditya Mahajan wrote:
>> \ReadFile introduces a spurious space when reading the file!
>> (...)
>> t-vim uses \ReadFile internally and hence inherits the bug.
> Is this a long known bug which nobody can solve

No, I just noticed this.

> or is it possible to solve the problem ?

\def\InputFile#1{\input#1\relax}
\setupvimtyping[readcommand=\InputFile]

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: t-vim: additional space in \inlineX{}
  2011-09-22  2:36     ` Aditya Mahajan
@ 2011-09-22  2:58       ` Aditya Mahajan
  2011-09-22 12:36         ` Romain Diss
  0 siblings, 1 reply; 8+ messages in thread
From: Aditya Mahajan @ 2011-09-22  2:58 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, 21 Sep 2011, Aditya Mahajan wrote:

> On Wed, 21 Sep 2011, Romain Diss wrote:
>
>> Aditya Mahajan wrote:
>>> \ReadFile introduces a spurious space when reading the file!
>>> (...)
>>> t-vim uses \ReadFile internally and hence inherits the bug.
>> Is this a long known bug which nobody can solve
>
> No, I just noticed this.

In file-res.mkvi change

  \long\def\dodoreadfile#true#false%
-  {#true
+  {#true%
     \relax
     \normalinput{\readfilename}%
     \relax}

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: t-vim: additional space in \inlineX{}
  2011-09-22  2:58       ` Aditya Mahajan
@ 2011-09-22 12:36         ` Romain Diss
  2011-09-22 16:28           ` Aditya Mahajan
  0 siblings, 1 reply; 8+ messages in thread
From: Romain Diss @ 2011-09-22 12:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On tue, 22 Sep 2011, Aditya Mahajan wrote:
> In file-res.mkvi change
> 
>   \long\def\dodoreadfile#true#false%
> -  {#true
> +  {#true%
>      \relax
>      \normalinput{\readfilename}%
>      \relax}
This change does nothing here but the following works:

> \def\InputFile#1{\input#1\relax}
> \setupvimtyping[readcommand=\InputFile]

Another not so linked question: what is the .mkvi extension for (in  file-
res.mkvi)? The future of mkiv?


-- 
Romain Diss
<romain.diss@yahoo.fr>
___________________________________________________________________________________
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: t-vim: additional space in \inlineX{}
  2011-09-22 12:36         ` Romain Diss
@ 2011-09-22 16:28           ` Aditya Mahajan
  2011-09-22 19:31             ` Romain Diss
  0 siblings, 1 reply; 8+ messages in thread
From: Aditya Mahajan @ 2011-09-22 16:28 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, 22 Sep 2011, Romain Diss wrote:

> On tue, 22 Sep 2011, Aditya Mahajan wrote:
>> In file-res.mkvi change
>>
>>   \long\def\dodoreadfile#true#false%
>> -  {#true
>> +  {#true%
>>      \relax
>>      \normalinput{\readfilename}%
>>      \relax}
> This change does nothing here but the following works:

You also need to regenerate the format.

>> \def\InputFile#1{\input#1\relax}
>> \setupvimtyping[readcommand=\InputFile]
>
> Another not so linked question: what is the .mkvi extension for (in  file-
> res.mkvi)? The future of mkiv?

Yes. This allows you to write symbolic variable names (#true, #false) 
rather than numeric variables (#1, #2). I think this is documented in the 
mkiv manual.

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: t-vim: additional space in \inlineX{}
  2011-09-22 16:28           ` Aditya Mahajan
@ 2011-09-22 19:31             ` Romain Diss
  0 siblings, 0 replies; 8+ messages in thread
From: Romain Diss @ 2011-09-22 19:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On tue, 22 Sep 2011, Aditya Mahajan wrote:
> > This change does nothing here but the following works:
> You also need to regenerate the format.
Done... and it works of course! So obvious but I forgot to do it.

> > Another not so linked question: what is the .mkvi extension for (in 
> > file- res.mkvi)? The future of mkiv?
> 
> Yes. This allows you to write symbolic variable names (#true, #false)
> rather than numeric variables (#1, #2). I think this is documented in the
> mkiv manual.
Ok thank you very much for all these informations.

Nevertheless, I made some search on the wiki and I didn’t found much about 
mkvi. It only says that the syntax is different.
I also made a search with 'pdfgrep' on all the context documents, examples, 
magazines, manuals... and I found nothing.
Is the mkiv manual you mentioned something very recent?

All the best.

-- 
Romain Diss
<romain.diss@yahoo.fr>
___________________________________________________________________________________
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:[~2011-09-22 19:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-20 22:19 t-vim: additional space in \inlineX{} Romain Diss
2011-09-21  1:39 ` Aditya Mahajan
2011-09-21 19:52   ` Romain Diss
2011-09-22  2:36     ` Aditya Mahajan
2011-09-22  2:58       ` Aditya Mahajan
2011-09-22 12:36         ` Romain Diss
2011-09-22 16:28           ` Aditya Mahajan
2011-09-22 19:31             ` Romain Diss

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