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


[NTG-context] latest beta: trouble with font loading

2009-11-20 Thread Thomas A. Schmitz
Hi Hans, all,

the two latest betas have trouble loading fonts from my own typescripts. All 
errors point to the same line in font-syn.lua. I don't have a minimal example 
yet, but here's a minimal command line that triggers the error on my box:

mtxrun --script fonts --list --pattern=*gentium*
...text/tex/texmf-context/tex/context/base/font-syn.lua:706: bad argument #1 to 
'next' (table expected, got nil)

Any pointers? 

Thomas
___
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] latest beta: trouble with font loading

2009-11-20 Thread Taco Hoekwater


Thomas A. Schmitz wrote:
 Hi Hans, all,
 
 the two latest betas have trouble loading fonts from my own typescripts. All 
 errors point to the same line in font-syn.lua. I don't have a minimal example 
 yet, but here's a minimal command line that triggers the error on my box:
 
 mtxrun --script fonts --list --pattern=*gentium*
 ...text/tex/texmf-context/tex/context/base/font-syn.lua:706: bad argument #1 
 to 'next' (table expected, got nil)
 
 Any pointers? 

I changed that line to:

  if not data or not next(data) or not next(data.specifications) then

and now it works again.


___
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] latest beta: trouble with font loading

2009-11-20 Thread Taco Hoekwater


Taco Hoekwater wrote:
 
 Thomas A. Schmitz wrote:
 Hi Hans, all,

 the two latest betas have trouble loading fonts from my own typescripts. All 
 errors point to the same line in font-syn.lua. I don't have a minimal 
 example yet, but here's a minimal command line that triggers the error on my 
 box:

 mtxrun --script fonts --list --pattern=*gentium*
 ...text/tex/texmf-context/tex/context/base/font-syn.lua:706: bad argument #1 
 to 'next' (table expected, got nil)

 Any pointers? 
 
 I changed that line to:
 
   if not data or not next(data) or not next(data.specifications) then
 
 and now it works again.

otoh: it now always returns only one font


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


Re: [NTG-context] Notepad++ calltips

2009-11-20 Thread richard . stephens

 On Wed, 18 Nov 2009 09:58:26 -0700, richard.steph...@converteam.com

 wrote:
 
  Does anyone use Notepad++ with the function calltips
feature? Checking 
  the
  context.xml definition file, there are calltips defined for 
  \startitemize, but
  they never appear when I'm typing, even though the auto-completion
works 
  fine.
 
  Trying a .cpp file gives calltips okay, so it seems to be something
to 
  do with
  the Context implementation.
 
 I did some experimenting with calltips about a year ago... it took
me a 
 while to figure it out though...
 
 In context.xml I implemented only one:
 
KeyWord name=startitemize func=yes
 Overload retVal=

   Param name=[.1.]
n a A KA r R KR m g G -number- each /
 /Overload  

 Overload retVal=

   Param name=[..,.2.,..]
standard -n-*broad -n-*serried packed 
 unpacked stopper joinedup atmargin inmargin autointro loose section

 intext/
 /Overload  

 Overload retVal=

   Param name=margin
= no standard -dimension- /
 /Overload  
  
/KeyWord
 
 
 It used to work, in my present Npp 5.5.1 it seems broken; even cpp

 calltips don't work -- although normal autocompletion works fine.
Does 
 this one calltip work for you? What version of Npp are you running?
 
 In any case, it will be a major task to fill out all calltips for

 context.xml, unless there is a minimally structured source file for
all 
 context command options that can be sorted by text-processing [beyond
my 
 skill set].
 
 Best wishes
 Idris

Idris,

Thank-you for your response. I am using Npp 5.5.1
and the calltips for C++ work okay. I saw the startitemize tip in the context.xml
file and tried it out but it didn't work. I was hoping to complete just
a few calltips for commands that I use rarely enough not to remember the
parameters but often enough to make looking them up annoying! Calltips
for all commands would be a wonderful thing!

Anyway, if it used to work for you, perhaps I should
address the Notepad++ community instead.

Thanks again for your help.

Richard






Converteam UK Ltd. Registration Number: 5571739 and Converteam Ltd. Registration
Number: 2416188

Registered in England and Wales.

Registered office: Boughton Road, Rugby, Warwickshire, CV21 1BU.



CONFIDENTIALITY : This e-mail and any attachments are confidential and
may be privileged. If you are not a named recipient, please notify the
sender immediately and do not disclose the contents to another person,
use it for any purpose or store or copy the information in any medium.



Please consider the environment before printing this e-mail




___
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] latest beta: trouble with font loading

2009-11-20 Thread Wolfgang Schuster

Am 20.11.2009 um 11:45 schrieb Thomas A. Schmitz:

 Hi Hans, all,
 
 the two latest betas have trouble loading fonts from my own typescripts. All 
 errors point to the same line in font-syn.lua. I don't have a minimal example 
 yet, but here's a minimal command line that triggers the error on my box:
 
 mtxrun --script fonts --list --pattern=*gentium*
 ...text/tex/texmf-context/tex/context/base/font-syn.lua:706: bad argument #1 
 to 'next' (table expected, got nil)
 
 Any pointers? 

1. delete the luatex cache
2. luatools --selfupdate
   mtxrun --selfupdate
3. luatools --generate

Wolfgang

___
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] latest beta: trouble with font loading

2009-11-20 Thread Yanrui Li
2009/11/20 Wolfgang Schuster schuster.wolfg...@googlemail.com:

 Am 20.11.2009 um 11:45 schrieb Thomas A. Schmitz:

 Hi Hans, all,

 the two latest betas have trouble loading fonts from my own typescripts. All 
 errors point to the same line in font-syn.lua. I don't have a minimal 
 example yet, but here's a minimal command line that triggers the error on my 
 box:

 mtxrun --script fonts --list --pattern=*gentium*
 ...text/tex/texmf-context/tex/context/base/font-syn.lua:706: bad argument #1 
 to 'next' (table expected, got nil)

 Any pointers?

 1. delete the luatex cache
 2. luatools --selfupdate
   mtxrun --selfupdate
 3. luatools --generate


I did so and solved this problem. However I can not use Chinese OTF
fonts such as 'AdobeSongStd-Light.otf', because luatex need very very
large memory to load it in the stage of *enhancing* . This is a test
file:

\definefont[song][name:adobesongstd]
\starttext
\song 测试
\stoptext

The process of compiling stops here:

!load otf   : loading:
/usr/share/fonts/adobe/AdobeSongStd-Light.otf (hash:
adobesongstd-light)
!load otf   : file size: 16229772
!load otf   : enhancing ...
^C


-- 
Best regards,

Li Yanrui
___
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] latest beta: trouble with font loading

2009-11-20 Thread Hans Hagen

Thomas A. Schmitz wrote:

Hi Hans, all,

the two latest betas have trouble loading fonts from my own typescripts. All 
errors point to the same line in font-syn.lua. I don't have a minimal example 
yet, but here's a minimal command line that triggers the error on my box:

mtxrun --script fonts --list --pattern=*gentium*
text/tex/texmf-context/tex/context/base/font-syn.lua:706: bad argument #1 
to 'next' (table expected, got nil)

Any pointers? 


i'll add a safeguard

once you get it working you may also try:

mtxrun --script fonts --list --spec gentium

ok, gentium is a bad example but some fonts report weight, style and 
width info (given that we have a sane font)


you can in context now use

\definefont[ThomasFavourite][spec:somename-bold-italic]
\definefont[ThomasFavourite][spec:somename-bold]
\definefont[ThomasFavourite][spec:somename-italic]
\definefont[ThomasFavourite][spec:somename-bold-italic-condensed]

etc. kind of experimental, as everything mkiv (and not to be confused 
with the simple fonts alternative)


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] latest beta: trouble with font loading

2009-11-20 Thread Thomas A. Schmitz

On Nov 20, 2009, at 1:17 PM, Wolfgang Schuster wrote:

 Hi Hans, all,
 
 the two latest betas have trouble loading fonts from my own typescripts. All 
 errors point to the same line in font-syn.lua. I don't have a minimal 
 example yet, but here's a minimal command line that triggers the error on my 
 box:
 
 mtxrun --script fonts --list --pattern=*gentium*
 ...text/tex/texmf-context/tex/context/base/font-syn.lua:706: bad argument #1 
 to 'next' (table expected, got nil)
 
 Any pointers? 
 
 1. delete the luatex cache
 2. luatools --selfupdate
   mtxrun --selfupdate
 3. luatools --generate

Taco, Wolfgang,

thanks for your replies. Wolfgang: that doesn't change anything here. Taco: 
after applying this patch, a luatex-cache hangs at 

!load otf   : loading: 
/Users/tas/texmf/fonts/truetype/greek/gentium/GenAR102.TTF (hash: 
genar102-gentium)

So it looks like the font loading mechanism has some deeper problems. The same 
binary works as exoected with an older version of ConTeXt, so it doesn't appear 
to be a luatex problem.

All best

Thomas
___
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] latest beta: trouble with font loading

2009-11-20 Thread Hans Hagen

Thomas A. Schmitz wrote:

On Nov 20, 2009, at 1:17 PM, Wolfgang Schuster wrote:


Hi Hans, all,

the two latest betas have trouble loading fonts from my own typescripts. All 
errors point to the same line in font-syn.lua. I don't have a minimal example 
yet, but here's a minimal command line that triggers the error on my box:

mtxrun --script fonts --list --pattern=*gentium*
...text/tex/texmf-context/tex/context/base/font-syn.lua:706: bad argument #1 to 
'next' (table expected, got nil)

Any pointers? 

1. delete the luatex cache
2. luatools --selfupdate
  mtxrun --selfupdate
3. luatools --generate


Taco, Wolfgang,

thanks for your replies. Wolfgang: that doesn't change anything here. Taco: after applying this patch, a luatex-cache hangs at 


!load otf   : loading: 
/Users/tas/texmf/fonts/truetype/greek/gentium/GenAR102.TTF (hash: 
genar102-gentium)

So it looks like the font loading mechanism has some deeper problems. The same 
binary works as exoected with an older version of ConTeXt, so it doesn't appear 
to be a luatex problem.


do you have a small test file?


-
  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] latest beta: trouble with font loading

2009-11-20 Thread Hans Hagen

Yanrui Li wrote:

2009/11/20 Wolfgang Schuster schuster.wolfg...@googlemail.com:

Am 20.11.2009 um 11:45 schrieb Thomas A. Schmitz:


Hi Hans, all,

the two latest betas have trouble loading fonts from my own typescripts. All 
errors point to the same line in font-syn.lua. I don't have a minimal example 
yet, but here's a minimal command line that triggers the error on my box:

mtxrun --script fonts --list --pattern=*gentium*
...text/tex/texmf-context/tex/context/base/font-syn.lua:706: bad argument #1 to 
'next' (table expected, got nil)

Any pointers?

1. delete the luatex cache
2. luatools --selfupdate
  mtxrun --selfupdate
3. luatools --generate



I did so and solved this problem. However I can not use Chinese OTF
fonts such as 'AdobeSongStd-Light.otf', because luatex need very very
large memory to load it in the stage of *enhancing* . This is a test
file:

\definefont[song][name:adobesongstd]
\starttext
\song 测试
\stoptext

The process of compiling stops here:

!load otf   : loading:
/usr/share/fonts/adobe/AdobeSongStd-Light.otf (hash:
adobesongstd-light)
!load otf   : file size: 16229772
!load otf   : enhancing ...


that's only the first time


-
  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] latest beta: trouble with font loading

2009-11-20 Thread Yanrui Li
2009/11/20 Hans Hagen pra...@wxs.nl:
 Yanrui Li wrote:

 I did so and solved this problem. However I can not use Chinese OTF
 fonts such as 'AdobeSongStd-Light.otf', because luatex need very very
 large memory to load it in the stage of *enhancing* . This is a test
 file:

 \definefont[song][name:adobesongstd]
 \starttext
 \song 测试
 \stoptext

 The process of compiling stops here:

 !load otf       : loading:
 /usr/share/fonts/adobe/AdobeSongStd-Light.otf (hash:
 adobesongstd-light)
 !load otf       : file size: 16229772
 !load otf       : enhancing ...

 that's only the first time


But it looks like abnormal. It is still *enhancing* after spending
3.3GB memory and about 1 minute. Finally I got the message:

!load otf   : loading:
/usr/share/fonts/adobe/AdobeSongStd-Light.otf (hash:
adobesongstd-light)
!load otf   : file size: 16229772
!load otf   : enhancing ...
! LuaTeX fatal error not enough memory.
\lowleveldefinefont ...dimexpr \textface \relax )}
  \edef \somefontspec {at \s...
\dododefinefont ...inefont {#2}\rawfontidentifier
  \csname \rawfontidentifier...
l.3 \song
  测试
!  == Fatal error occurred, no output PDF file produced!MTXrun |
fatal error: return code: 1

-- 
Best regards,

Li Yanrui
___
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] latest beta: trouble with font loading

2009-11-20 Thread Thomas A. Schmitz

On Nov 20, 2009, at 1:50 PM, Hans Hagen wrote:

 
 do you have a small test file?
 

Not yet. It looks like it has something to do with font features, but I can't 
reproduce it with a minimal file yet (it occurs in a presentation with our 
simple-slides module). I'll try and see if I can find a small file that 
triggers the error.

Thomas
___
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] Notepad++ calltips

2009-11-20 Thread richard . stephens

 On Wed, 18 Nov 2009 09:58:26 -0700, richard.steph...@converteam.com

 wrote:
 
  Does anyone use Notepad++ with the function calltips
feature? Checking 
  the
  context.xml definition file, there are calltips defined for 
  \startitemize, but
  they never appear when I'm typing, even though the auto-completion
works 
  fine.
 
  Trying a .cpp file gives calltips okay, so it seems to be something
to 
  do with
  the Context implementation.


After some experiments, I think the problem is that
Notepad++ is ignoring the case of the commands when searching for calltips.
By re-sorting the list I was able to get calltips to work. However, with
this new sorting the auto-complete no longer works! This is definitely
one for the Notepad++ developers.

Regards,

Richard





Converteam UK Ltd. Registration Number: 5571739 and Converteam Ltd. Registration
Number: 2416188

Registered in England and Wales.

Registered office: Boughton Road, Rugby, Warwickshire, CV21 1BU.



CONFIDENTIALITY : This e-mail and any attachments are confidential and
may be privileged. If you are not a named recipient, please notify the
sender immediately and do not disclose the contents to another person,
use it for any purpose or store or copy the information in any medium.



Please consider the environment before printing this e-mail




___
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] \completelistofacronyms does not typeset meaning, only repeats the acronym itself

2009-11-20 Thread Kevin D. Robbins
Thanks, Hans. I just tested with the latest betas from the minimals, and
\completelistofacronyms works again.

Kevin

On Tue, Nov 10, 2009 at 11:54 AM, Kevin D. Robbins 
robbins.kevi...@gmail.com wrote:

 In the latest beta from minimals, \completelistofacronyms does not typeset
 the meaning of the acronym, but just repeats the acronym. I've attached a
 minimal example that shows the problem.

 Kevin

___
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] \completelistofacronyms does not typeset meaning, only repeats the acronym itself

2009-11-20 Thread Hans Hagen

Kevin D. Robbins wrote:
Thanks, Hans. I just tested with the latest betas from the minimals, and 
\completelistofacronyms works again.


should work ok in the beta now

-
  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] latest beta: trouble with font loading

2009-11-20 Thread Hans Hagen

Yanrui Li wrote:

2009/11/20 Hans Hagen pra...@wxs.nl:

Yanrui Li wrote:

I did so and solved this problem. However I can not use Chinese OTF
fonts such as 'AdobeSongStd-Light.otf', because luatex need very very
large memory to load it in the stage of *enhancing* . This is a test
file:

\definefont[song][name:adobesongstd]
\starttext
\song 测试
\stoptext

The process of compiling stops here:

!load otf   : loading:
/usr/share/fonts/adobe/AdobeSongStd-Light.otf (hash:
adobesongstd-light)
!load otf   : file size: 16229772
!load otf   : enhancing ...

that's only the first time



But it looks like abnormal. It is still *enhancing* after spending
3.3GB memory and about 1 minute. Finally I got the message:


fixed in beta, was some kind of loop


-
  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] bib module problem with mkiv

2009-11-20 Thread Chen Shen
Hi all,

I was trying the following bib example on MkIV beta 2009.11.20 and
luatex beta-0.44.0-2009103007.
There isn't an apparent error message, but neither the bib reference or the
publication list appears in the pdf.

Observations:
1. In MkII, it works well.
2. In MkIV, if you use the [criterium=all] option, both bib ref and pub list
show properly. Other criterium, e.g. [criterium=section] doesn't work.

thanks a lot.

regards,
shenchen

= test.tex ===
\usemodule[bib,bibltx]
\setupbibtex[database=xampl]
\starttext

  \cite[a] .
  \completepublications
  %\completepublications[criterium=all]

\stoptext


= xampl.bib ===
@Book{a,
  editor =   {John D. Barnsford and Ann L. Brown and Rodney R. Cocking},
  title ={{How people learn: Brain, mind, experience, and school}},
  publisher ={National Academy Press},
  year = {2000},
  address =  {Washington, DC}
}

___
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] Sort register (index) by Bible book

2009-11-20 Thread berend
 Taco == Taco Hoekwater t...@elvenkind.com writes:

Taco You could pre-assign a zero-padded number to each book
Taco (Genesis=001, Exodus=002), and use that number inside the
Taco square brackets.

Right, but that would be extremely annoying to type in all the time
:-)

I'm looking for a more automated solution, but given that even you
don't know one, it seems I have to write some sorting mechanism
myself.

Or perhaps use the trick above as the input is XML, and the verses are
clearly marked, so I could generate ConTeXt with the proper sort
codes.

Who does the index sorting, is that texexec?

-- 
Cheers,

Berend de Boer
___
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] Sort register (index) by Bible book

2009-11-20 Thread Hans Hagen

ber...@pobox.com wrote:

Taco == Taco Hoekwater t...@elvenkind.com writes:


Taco You could pre-assign a zero-padded number to each book
Taco (Genesis=001, Exodus=002), and use that number inside the
Taco square brackets.

Right, but that would be extremely annoying to type in all the time
:-)

I'm looking for a more automated solution, but given that even you
don't know one, it seems I have to write some sorting mechanism
myself.

Or perhaps use the trick above as the input is XML, and the verses are
clearly marked, so I could generate ConTeXt with the proper sort
codes.

Who does the index sorting, is that texexec?


in mkii yes, and in mkiv it's done in lua

if you go for xml, an duse mkiv, then you can write your own sorting 
code as you can access the tree


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] Sort register (index) by Bible book

2009-11-20 Thread Taco Hoekwater

ber...@pobox.com wrote:

Taco == Taco Hoekwater t...@elvenkind.com writes:


Taco You could pre-assign a zero-padded number to each book
Taco (Genesis=001, Exodus=002), and use that number inside the
Taco square brackets.

Right, but that would be extremely annoying to type in all the time
:-)


\def\Genesis#1{\index[001 #1]{Genesis #1}} etc.

Takes only 66 macros and it even saves you typing :)



I'm looking for a more automated solution, but given that even you
don't know one, it seems I have to write some sorting mechanism
myself.

Or perhaps use the trick above as the input is XML, and the verses are
clearly marked, so I could generate ConTeXt with the proper sort
codes.

Who does the index sorting, is that texexec?



___
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] Notepad++ calltips

2009-11-20 Thread Idris Samawi Hamid ادريس سماوي حامد
On Fri, 20 Nov 2009 09:21:34 -0700, richard.steph...@converteam.com  
wrote:


After some experiments, I think the problem is that Notepad++ is  
ignoring the case of the commands when searching for calltips. By  
re-sorting the list I was able to get calltips to work. However, with  
this new sorting the auto-complete no longer works! This is definitely  
one for the Notepad++ developers.


I experimented a bit and I think you are exactly right. If I comment out  
the commands that contain upper-case letters, the calltip mechanism works.  
If I resort just those commands, viz, move them to the bottom of the file,  
autocompletion does not work for the upper-case commands but it does work  
for all others.


Workaround:

in context.xml go to

Environment ignoreCase=no startFunc=[ stopFunc=] /br/

change ignoreCase

ignoreCase=yes

resort according to ignorecase

I did this for one command and it works, let me try some more.

Best wishes
Idris

--
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shi`i Studies
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

___
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] Notepad++ calltips

2009-11-20 Thread Idris Samawi Hamid ادريس سماوي حامد

Hi,

Change the name of the attached to end in .zip . I can confirm that the  
context calltips work for this version of context.xml in Npp 5.5.1.


OTOH, the ignoreCase=no used to work, and that is something that the Npp  
developers will hopefully take care of.


Richard, if you make additional calltips to context.xml, can you post your  
updates to the wiki? Maybe we can start a project to eventually add  
calltips to all commands. I have a few other ideas as well to make these  
calltips more useful, and to serve a certain book project ;-)


Best wishes
Idris

On Fri, 20 Nov 2009 13:03:19 -0700, Idris Samawi Hamid ادريس   سماوي حامد  
isha...@colostate.edu wrote:




On Fri, 20 Nov 2009 09:21:34 -0700, richard.steph...@converteam.com  
wrote:


After some experiments, I think the problem is that Notepad++ is  
ignoring the case of the commands when searching for calltips. By  
re-sorting the list I was able to get calltips to work. However, with  
this new sorting the auto-complete no longer works! This is definitely  
one for the Notepad++ developers.


I experimented a bit and I think you are exactly right. If I comment out  
the commands that contain upper-case letters, the calltip mechanism  
works. If I resort just those commands, viz, move them to the bottom of  
the file, autocompletion does not work for the upper-case commands but  
it does work for all others.


Workaround:

in context.xml go to

Environment ignoreCase=no startFunc=[ stopFunc=] /br/

change ignoreCase

ignoreCase=yes

resort according to ignorecase

I did this for one command and it works, let me try some more.


--
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shi`i Studies
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

context_xml_zip
Description: Binary data
___
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 load a lua file into a named lua instance

2009-11-20 Thread Kevin D. Robbins
Hi all,

I have a module with lots of lua code, and I'd like to move most of the lua
code to a separate file, say t-module.lua. I have written all of the lua
code using \modulecode and \startmodulecode ... \stopmodulecode. But, when I
move the lua code to t-module.lua and load it with dofile, it seems to load
in the global instance instead of the third party module instance. Is there
any method to load an external lua file in a named instance?

Thanks,

Kevin
___
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 load a lua file into a named lua instance

2009-11-20 Thread Hans Hagen

Kevin D. Robbins wrote:

Hi all,

I have a module with lots of lua code, and I'd like to move most of the 
lua code to a separate file, say t-module.lua. I have written all of the 
lua code using \modulecode and \startmodulecode ... \stopmodulecode. 
But, when I move the lua code to t-module.lua and load it with dofile, 
it seems to load in the global instance instead of the third party 
module instance. Is there any method to load an external lua file in a 
named instance?


\registerctxluafile{t-module}{}


-
  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 load a lua file into a named lua instance

2009-11-20 Thread Kevin D. Robbins
Hi Hans,

I started reading at \registerctxluafile in luat-cod.mkiv, but it wasn't
quite what I was looking for. But, I then stumbled on \definenamedlua in
luat-ini.mkiv. There, I learned of the function 'protect' in luat-ini.lua.
So, adding the line

protect(moduledata)

at the top of t-module.lua and then loading this file with 'dofile
(global.kpse.find_file (t-module.lua, tex))' loads all my definitions
into the moduledata environment, so that I can directly address these
definitions in other TeX files within \modulecode{} or \startmodulecode ...
\stopmodulecode.

Kevin

On Fri, Nov 20, 2009 at 3:32 PM, Hans Hagen pra...@wxs.nl wrote:

 Kevin D. Robbins wrote:

 Hi all,

 I have a module with lots of lua code, and I'd like to move most of the
 lua code to a separate file, say t-module.lua. I have written all of the lua
 code using \modulecode and \startmodulecode ... \stopmodulecode. But, when I
 move the lua code to t-module.lua and load it with dofile, it seems to load
 in the global instance instead of the third party module instance. Is there
 any method to load an external lua file in a named instance?


 \registerctxluafile{t-module}{}


 -
  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

 ___

___
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] latest beta: trouble with font loading

2009-11-20 Thread Yanrui Li
2009/11/21 Hans Hagen pra...@wxs.nl:
 Yanrui Li wrote:

 2009/11/20 Hans Hagen pra...@wxs.nl:

 Yanrui Li wrote:

 I did so and solved this problem. However I can not use Chinese OTF
 fonts such as 'AdobeSongStd-Light.otf', because luatex need very very
 large memory to load it in the stage of *enhancing* . This is a test
 file:

 \definefont[song][name:adobesongstd]
 \starttext
 \song 测试
 \stoptext

 The process of compiling stops here:

 !load otf       : loading:
 /usr/share/fonts/adobe/AdobeSongStd-Light.otf (hash:
 adobesongstd-light)
 !load otf       : file size: 16229772
 !load otf       : enhancing ...

 that's only the first time


 But it looks like abnormal. It is still *enhancing* after spending
 3.3GB memory and about 1 minute. Finally I got the message:

 fixed in beta, was some kind of loop


Sorry for my noice. The problem still exists in the latest beta
(2009.11.21 00:06, linux x86) which was installed after I removed the
previous one completely. The problem just arise in loading Chinese OTF
fonts. It is normal for loading Chinese TTF font.

-- 
Best regards,

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