Re: [NTG-context] How to not gobble space after a command

2009-11-30 Thread Matthijs Kooijman
Hi Luigi,

  hm , some problem here
  # context --version
  MTXrun | main context file: context.tex
  MTXrun | current version: 2009.11.10 13:30
 
  Your example works fine for me on an older beta:
 
   $ context --version
   MTXrun | main context file: /usr/share/texmf/tex/context/base/context.tex
   MTXrun | current version: 2009.10.28 19:27

I've just tried on a somewhat newer context which I found lying around, which
does not give the error you gave (so it does know the \autoinsertnextspace
command), but it doesn't work properly either (it never inserts a space
AFAICT).

matth...@xanthe:~$ context --version
MTXrun | main context file: /usr/share/texmf/tex/context/base/context.tex
MTXrun | current version: 2009.11.24 10:13

I'll have another go with the newest version soon.

Gr.

Matthijs


signature.asc
Description: Digital signature
___
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
___


Re: [NTG-context] How to not gobble space after a command

2009-11-30 Thread luigi scarso
On Mon, Nov 30, 2009 at 9:53 PM, Matthijs Kooijman matth...@stdin.nl wrote:
 Hi Luigi,

  hm , some problem here
  # context --version
  MTXrun | main context file: context.tex
  MTXrun | current version: 2009.11.10 13:30
 
  Your example works fine for me on an older beta:
 
   $ context --version
   MTXrun | main context file: /usr/share/texmf/tex/context/base/context.tex
   MTXrun | current version: 2009.10.28 19:27

 I've just tried on a somewhat newer context which I found lying around, which
 does not give the error you gave (so it does know the \autoinsertnextspace
 command), but it doesn't work properly either (it never inserts a space
 AFAICT).

 matth...@xanthe:~$ context --version
 MTXrun | main context file: /usr/share/texmf/tex/context/base/context.tex
 MTXrun | current version: 2009.11.24 10:13

 I'll have another go with the newest version soon.

 Gr.

 Matthijs

 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.9 (GNU/Linux)

 iEYEARECAAYFAksUMOEACgkQz0nQ5oovr7wW/QCgwwSkz4uBofdezdDlWfVNLRWe
 MrEAoJzsKZwGtXADqSplbFVeRLopT3A4
 =9QuU
 -END PGP SIGNATURE-

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


%%% test.tex
\starttext
\autoinsertnextspace
A
\stoptext

#context test.tex

! Undefined control sequence.
l.3 \autoinsertnextspace


# context --version
MTXrun | main context file:
/opt/luatex/minimals-beta/tex/texmf-context/tex/context/base/context.tex
MTXrun | current version: 2009.11.27 21:24

# luatex --version
This is LuaTeX, Version beta-0.46.0-2009112820

It works with texexec
#texexec test.tex

...
Output written on test-matt.pdf (1 page, 15725 bytes).

-- 
luigi
___
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
___


Re: [NTG-context] How to not gobble space after a command

2009-11-30 Thread Matthijs Kooijman
Hi Luigi,

forget my last post. I was in a hurry last week and put a

  \def\autoinsertnextspace{}

in my document just to get it compiling on context 2009.11.24. If I remove
that, it stops working with texexec --lua (as well as just context) with
the same undefined control sequence error. It still works with just texexec
(e.g., with MkII).

So, it works for me with 2009.10.28, and gives errors with 2009.11.24. There
is no version where it silently fails, that was my own fault :-)

Actually, it does in fact seem the macro has completely disappeared. With the
old version:

  /usr/share/texmf/tex/context/base$ grep def.autoinsertnextspace *
  
spac-gen.mkii:\def\autoinsertnextspace{\futurelet\nexttoken\doautoinsertnextspace}
  
spac-hor.mkiv:\def\autoinsertnextspace{\futurelet\nexttoken\doautoinsertnextspace}

With the new version:

  /usr/share/texmf/tex/context/base$ grep def.autoinsertnextspace *
  
spac-gen.mkii:\def\autoinsertnextspace{\futurelet\nexttoken\doautoinsertnextspace}

The comment in the old version does say:

  %D This is a dangerous feature because it makes the \TEX\ source
  %D less portable, i.e. any parser now needs to apply exactly the
  %D same algorithm when it wants to interpret the source. We
  %D strongly recommend not to mention this feature in manuals! It's
  %D provided for users who are hooked to such a mechanism.

So perhaps this is removed intentionally? Perhaps Hans can comment?

Gr.

Matthijs


signature.asc
Description: Digital signature
___
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
___


Re: [NTG-context] How to not gobble space after a command

2009-11-30 Thread Hans Hagen

Matthijs Kooijman wrote:

Hi Luigi,

forget my last post. I was in a hurry last week and put a

  \def\autoinsertnextspace{}

in my document just to get it compiling on context 2009.11.24. If I remove
that, it stops working with texexec --lua (as well as just context) with
the same undefined control sequence error. It still works with just texexec
(e.g., with MkII).

So, it works for me with 2009.10.28, and gives errors with 2009.11.24. There
is no version where it silently fails, that was my own fault :-)

Actually, it does in fact seem the macro has completely disappeared. With the
old version:

  /usr/share/texmf/tex/context/base$ grep def.autoinsertnextspace *
  
spac-gen.mkii:\def\autoinsertnextspace{\futurelet\nexttoken\doautoinsertnextspace}
  
spac-hor.mkiv:\def\autoinsertnextspace{\futurelet\nexttoken\doautoinsertnextspace}

With the new version:

  /usr/share/texmf/tex/context/base$ grep def.autoinsertnextspace *
  
spac-gen.mkii:\def\autoinsertnextspace{\futurelet\nexttoken\doautoinsertnextspace}

The comment in the old version does say:

  %D This is a dangerous feature because it makes the \TEX\ source
  %D less portable, i.e. any parser now needs to apply exactly the
  %D same algorithm when it wants to interpret the source. We
  %D strongly recommend not to mention this feature in manuals! It's
  %D provided for users who are hooked to such a mechanism.

So perhaps this is removed intentionally? Perhaps Hans can comment?


indeed, it's a kind of hack and if we need something like that i'll make 
a better version some day ... configureable and using unicode char 
properties


i'll remove the call in mkiv

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 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
___


Re: [NTG-context] How to not gobble space after a command

2009-11-30 Thread luigi scarso
On Tue, Dec 1, 2009 at 12:14 AM, Hans Hagen pra...@wxs.nl wrote:
 indeed, it's a kind of hack and if we need something like that i'll make a
 better version some day ... configureable and using unicode char properties

 i'll remove the call in mkiv
There is no
\autoinsertnextspace
in mkiv


-- 
luigi
___
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
___


Re: [NTG-context] How to not gobble space after a command

2009-11-30 Thread Hans Hagen

luigi scarso wrote:

On Tue, Dec 1, 2009 at 12:14 AM, Hans Hagen pra...@wxs.nl wrote:

indeed, it's a kind of hack and if we need something like that i'll make a
better version some day ... configureable and using unicode char properties

i'll remove the call in mkiv

There is no
\autoinsertnextspace
in mkiv


there was a

  \c!next=\autoinsertnextspace


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 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
___


[NTG-context] How to not gobble space after a command

2009-11-20 Thread Matthijs Kooijman
Hi all,

I'm working with a few custom macros to simplify typing a bit, like:

\def\VHDL{\small{VHDL}}

However, when I use this macro in text, like \VHDL this, it gobbles the space
after it. I've seen some references that say to solve this by writing \VHDL{}
instead, but that is of course very unpretty. I've tried to put all kinds of
stuff ({}, \mbox{}, \obeyedspace, etc.) inside the \VHDL macro, but it seems
the space is already gone there, so that didn't work. (Note that just putting
a space inside the macro won't work, for cases where I use \VHDL, like this)

It seems that latex has an xspace package that does some guesswork about
whether a space is required, but it looks mightily scary. Does ConTeXt provide
for any way to solve this problem in a nice way? Or is this just so
fundamental in TeX that there is no real solution?

Gr.

Matthijs


signature.asc
Description: Digital signature
___
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
___


Re: [NTG-context] How to not gobble space after a command

2009-11-20 Thread luigi scarso
On Fri, Nov 20, 2009 at 11:23 AM, Matthijs Kooijman matth...@stdin.nl wrote:
 Hi all,

 I'm working with a few custom macros to simplify typing a bit, like:

 \def\VHDL{\small{VHDL}}

 However, when I use this macro in text, like \VHDL this, it gobbles the space
 after it. I've seen some references that say to solve this by writing \VHDL{}
 instead, but that is of course very unpretty. I've tried to put all kinds of
 stuff ({}, \mbox{}, \obeyedspace, etc.) inside the \VHDL macro, but it seems
 the space is already gone there, so that didn't work. (Note that just putting
 a space inside the macro won't work, for cases where I use \VHDL, like this)

 It seems that latex has an xspace package that does some guesswork about
 whether a space is required, but it looks mightily scary. Does ConTeXt provide
 for any way to solve this problem in a nice way? Or is this just so
 fundamental in TeX that there is no real solution?

I don't know the answer.

But I remember that a similar question time ago
trigged to me to know more about \futurelet
and I consider it a real gain for my own personal macro.

Maybe can be the same for you.

-- 
luigi
___
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
___


Re: [NTG-context] How to not gobble space after a command

2009-11-20 Thread Taco Hoekwater


luigi scarso wrote:
 On Fri, Nov 20, 2009 at 11:23 AM, Matthijs Kooijman matth...@stdin.nl wrote:
 Hi all,

 I'm working with a few custom macros to simplify typing a bit, like:

 \def\VHDL{\small{VHDL}}

 However, when I use this macro in text, like \VHDL this, it gobbles the space
 after it. I've seen some references that say to solve this by writing \VHDL{}
 instead, but that is of course very unpretty. I've tried to put all kinds of
 stuff ({}, \mbox{}, \obeyedspace, etc.) inside the \VHDL macro, but it seems
 the space is already gone there, so that didn't work. (Note that just putting
 a space inside the macro won't work, for cases where I use \VHDL, like this)

\autoinsertnextspace is the context version of \xspace (could be mkii
only)




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


Re: [NTG-context] How to not gobble space after a command

2009-11-20 Thread Matthijs Kooijman
 \autoinsertnextspace is the context version of \xspace (could be mkii
 only)
Woah, that works (in MkIV). Thanks!

Gr.

Matthijs


signature.asc
Description: Digital signature
___
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
___


Re: [NTG-context] How to not gobble space after a command

2009-11-20 Thread Matthijs Kooijman
Hi Luigi,

 hm , some problem here
 # context --version
 MTXrun | main context file: context.tex
 MTXrun | current version: 2009.11.10 13:30

Your example works fine for me on an older beta:

  $ context --version
  MTXrun | main context file: /usr/share/texmf/tex/context/base/context.tex
  MTXrun | current version: 2009.10.28 19:27

I'd upgrade to see if it breaks as well, but I have a document to ship today,
so perhaps after that :-p

Gr.

Matthijs


signature.asc
Description: Digital signature
___
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
___


Re: [NTG-context] How to not gobble space after a command

2009-11-20 Thread Alan BRASLAU
On Friday 20 November 2009 11:41:16 Matthijs Kooijman wrote:
  \autoinsertnextspace is the context version of \xspace (could be mkii
  only)
 
 Woah, that works (in MkIV). Thanks!

*Everywhere* the authors use \CONTEXT\ and \TeX\ followed by
an escaped space. (Is this space [sometimes] unbreakable?)

In my own texts, I often use {\TeX} as I find this not (too)
ugly. Also, I tend to make less mistakes with this method
(since it is very easy to forget the trailing backslash).

If \autoinsertnextspace is the right solution, perhaps this
could be included in the standard definitions in cont-log.tex.

Alan
___
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
___


Re: [NTG-context] How to not gobble space after a command

2009-11-20 Thread luigi scarso
On Fri, Nov 20, 2009 at 12:00 PM, Matthijs Kooijman matth...@stdin.nl wrote:
 Hi Luigi,

 hm , some problem here
 # context --version
 MTXrun | main context file: context.tex
 MTXrun | current version: 2009.11.10 13:30

 Your example works fine for me on an older beta:

  $ context --version
  MTXrun | main context file: /usr/share/texmf/tex/context/base/context.tex
  MTXrun | current version: 2009.10.28 19:27

 I'd upgrade to see if it breaks as well, but I have a document to ship today,
 so perhaps after that :-p
Ok
(we all together cross the finger with you now :-) )

-- 
luigi
___
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
___