Re: [NTG-context] Value of Metapost variable as a label

2009-03-21 Thread Curious Learn
Aditya Mahajan adityam at umich.edu writes:

 
  For example, if I had to typeset (n_{1},n{2},...,n_{100}), how
  could I do that.
 
 label.bot (textext($n_{  decimal i  }), ... ) ;


Thanks Aditya. That works great.


___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Is \index command broken?

2009-03-21 Thread Curious Learn
Hi,

I tried using the \index command in my document:

\starttext

\type{\textext()} \index[textext]{\textext}

To typeset metapost variable values (not the verbatim text) using
\TEX\ markup, use this command.

\page

\completeindex

\stoptext

However, no index is created. The log file gives the following information about
the version:
This is LuaTeX, Version snapshot-0.35.0
(LearnMetaPost.tex

ConTeXt  ver: 2009.03.18 21:58 MKIV  fmt: 2009.3.19  int: english/english

Thanks



___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Is \index command broken?

2009-03-21 Thread Curious Learn
Wolfgang Schuster schuster.wolfgang at googlemail.com writes:

 
 Hi curious who wants to learn but is still unable to use the list  
 archive.
 
 http://www.ntg.nl/pipermail/ntg-context/2009/038198.html
 http://www.ntg.nl/pipermail/ntg-context/2009/037891.html
 http://www.ntg.nl/pipermail/ntg-context/2009/037365.html
 
 Wolfgang
 

Hi Wolfgang,

That was funny. Thanks for the links to the posts and thanks for being patient
with me.


___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Module taspresent

2009-03-19 Thread Curious Learn

Thanks Thomas and Lutz. Now that I have figured out how to manually install the
third party modules, I can try the simpleslides module. 

Aditya and Thomas, thanks very much for providing us with these modules.

Just for information, I wanted to inform you that some other styles, such as
blackblue, embossed, doubleframe also do not work in taspresent. Perhaps, it
might be better to update this information on the wiki where we have third-party
modules, so that others do not go through the whole process of downloading and
trying the taspresent module. 

Thanks.  



___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Step wise presentation.

2009-03-19 Thread Curious Learn
Fabrice fabrice.alpha at gmail.com writes:


 You can use the raw steps module. This works very well. You can find  
 some informations
 here:
 
 http://modules.contextgarden.net/t-rsteps
 
 Fabrice.
 

Thanks Fabrice. Yes, I was looking at the demo file yesterday once I figured out
how to install third party modules. It seems very good. I will try using that. 

The link to the authors website on the wiki page seems to be broken. At least
when I click on it, nothing happens. I am not sure what is the correct thing to
do in this case...put a note on the wiki page? 
 




___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Is there anything like developer's manual for ConTeXt?

2009-03-19 Thread Curious Learn
Aditya Mahajan adityam at umich.edu writes:


  Can someone post a link to the actual reference manual rewrite Taco
  was talking about?  I don't see anything on
  http://wiki.contextgarden.net/Main_Page#Documentation that looks like
  a reference manual in progress.
 
 The links are after the big note saying that we are working on the rewite 
 of the manual. Feel free to change the formatting to make it more 
 prominent.


Aditya, are you  talking about the svn-repository link. That link seems to be
broken. When I click on it, I get a message saying address not found

Thanks


___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Step wise presentation.

2009-03-18 Thread Curious Learn
Hans Hagen pragma at wxs.nl writes:


 
 take a look at s-pre-60 upwards; i always use s-pre-60 as basis
 
 Hans
 
Thank you Hans. Since you said that you start with s-pre-60 as the basis, could
I please ask you for an example presentation, if you have one. I looked at the
wiki but there is no example in the source code. I am not sure what are all the
commands available with the style. 

Thanks very much.


___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Tikz updated in minimals but file does not compile

2009-03-18 Thread Curious Learn
Lutz Haseloff lutz.haseloff at googlemail.com writes:

 Hello Want, hello Mojca,i had the same problem some days before. I found this
hint by Wolfgang:add to your file\unprotect\newtoks\toks at \let\z at
\zeropoint\protectand tikz works like a charm.can this be added to the module
t-tikz.tex?GreetingsLutz

Thanks Lutz (and Aditya) for the solution. I will try it later. After it did not
work yesterday and after seeing Hans Hagen's post about the possible problems
with the newest beta, I deleted the latest beta and installed the stable version
(the one that comes with --context=current option). I suppose I will have to
update it to the latest beta and try Aditya's solution.

Mojca, I was trying out a very simple tikz code to see whether it works. It was,

\usemodule[tikz]

\starttext

\starttikzpicture
  draw (0,0) -- (2,2);
\stoptikzpicture

\stoptext

Thanks to you all again for answering the questions.


___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] TeXshop instructions on Context Minimals (Mac installation)

2009-03-18 Thread Curious Learn
Bowen Alan C. acbowen at Princeton.edu writes:


 In Terminal try:
 
 cd Users/Name/Library/TeXShop/Engines/
 
 and then
 
 chmod +x ConTeXt-MKIV.engine
 
 which will allow you to execute the file.

Thanks Alan. That worked great. I have added that to the instructions
on the Wiki.

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Module taspresent

2009-03-18 Thread Curious Learn
As mentioned on the wiki, I tried to install taspresent module by running

./first-setup.sh --extras=t-taspresent in the terminal. 

A lot of things happened and then I ran 

luatools --generate

and then

context --make. 

Then I tried to compile the file 

\usemodule[taspresent][style=blackblue] 

\starttext
 
This is a presentation

\stoptext 

This gives me just a plain page with the line This is a presentation.  

The log window says that module taspresent not found. 

Before I did all the above, I also installed taspresent manually in the
~/Library/texmf/tex/context/taspresent folder. I downloaded the .zip file from
ctan and unzipped it inside the taspresent folder mentioned above. Still no
success. How do I use taspresent?

Thanks very much. 

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Module taspresent

2009-03-18 Thread Curious Learn
I figured out how and where to install the taspresent module. Now when I try to
compile the file it loads the module. However, I do not get any of the colors or
the frames. For example, the following code does not give me any color. It does
though take out the page numbers and sets the correct papersize. Other than that
everything is as if it is a plain text file.

The presentation I am trying is

\usemodule[taspresent][style=bluegray]

\starttext

A presentation

\stoptext

Does anyone have an idea why this is happening?

Thanks very much.



___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Problem updating Tikz in minimals

2009-03-17 Thread Curious Learn
Mojca Miklavec mojca.miklavec.lists at gmail.com writes:

 
 When you install the minimals, add
--extras=t-tikz
 either to first-setup.sh or run ./first-setup.sh --extras=t-tikz
 
 (Run luatools --generate afterwards.)
 
 Mojca

Thanks Aditya and Mojca. Mojca, I tried running that; a lot of things happen,
but the process stops with following lines (last few lines I copied and pasted
from my terminal window

__

LuaTools | saving merge from cont-nl.lua
LuaTools | using compiled initialization file: cont-nl.luc
LuaTools | using lua initialization file: cont-nl.luc
LuaTools | running command: luatex --ini --lua=cont-nl.luc
/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/cont-nl.tex
\\dump

This is LuaTeX, Version snapshot-0.35.0
(/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/cont-nl.tex
(/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/context.tex
(/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/context.mkiv
(/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/syst-ini.tex
! LuaTeX error \directlua0:1: attempt to call field 'extraprimitives' (a nil
value)
stack traceback:
\directlua0:1: in main chunk.
l.111 }
   
? h
The lua interpreter ran into a problem, so the
remainder of this lua chunk will be ignored.

? 
__

I tried deleting everything in minimals folder and restarted the process and I
get the same error. If I do not type the --extras=t-tikz (after deleting
everything, except texmf-local, from the minimals folder) then there is no
problem.  




___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Step wise presentation.

2009-03-17 Thread Curious Learn

Currently what is the best solution for presentation with steps in Context that
works with the stable version of MKIV. The one that you can get with
./first-setup.sh --context=current

If I need to install any addon module for your recommendation (i.e., if it does
not come with minimals), kindly let me know.

Thanks for your feedback.

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] TeXshop instructions on Context Minimals (Mac installation)

2009-03-17 Thread Curious Learn
Hello,

I installed the stable version of Context Minimals and then followed the
instructions given on the Context Minimals/Mac Installation page. When I choose
ConTeXt-MKIV as my engine and try to typeset the document I get the following
error. 

Users/Name/Library/TeXShop/Engines/ConTeXt-MKIV.engine does not have the
executable bit set.

This is when only pdftex is selected in the dropdown Typeset menu. 

It is true that the instructions on Context Minimals/Mac Installation page say
that Context should also be selected in this dropdown Typeset menu. But if I
try to do that, the engine automatically switches to Context that existed in
the Engines menu, before I installed Minimals and before I added Context-MKII
and ConTeXt-MKIV engines. This ConTeXt engine is MKII. 

Can someone please help with this?

Thanks.

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] \FlushStep in module s-pre-50 adds too much space

2009-03-16 Thread Curious Learn
Thanks very much for replying. From your replies, it seems easiest to do what
Aditya suggested; use the commands

luatools --generate
context --make

I looked at this message and also went to the link he had in his message. 

My question is, am I supposed to be in any specific folder when I run those. I
went to terminal (on Mac OS X) and typed

luatools --generate

but got the following message:


LuaTools | error unable to identify cnf file
LuaTools | error unable to identify cnf file
LuaTools | no cnf files found (TEXMFCNF may not be set/known)
LuaTools | 
LuaTools | runtime: 0.002 seconds

Can someone please help? I know nothing about Unix. 

Thanks very much.

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] \FlushStep in module s-pre-50 adds too much space

2009-03-16 Thread Curious Learn
Wolfgang Schuster schuster.wolfgang at googlemail.com writes:

 http://wiki.contextgarden.net/ConTeXt_Minimals#Usage
 http://archive.contextgarden.net/message/20090121.222035.3c27dbbc.en.html
 
 Wolfgang

Perhaps I am not getting something which I should. Wolfgang, it seems to me that
the links that you have suggested talk about installation of Context minimals
and then how to get it working. I want to use MKIV that comes with TexLive. I
already have TexLive. I thought that by running the luatools --generate
(without the quotes), and the other command mentioned by Aditya, I can use MKIV
that comes with TexLive and do not necessarily need to install minimals. Am I
wrong in thinking that? 

 




___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] \FlushStep in module s-pre-50 adds too much space

2009-03-16 Thread Curious Learn
Okay, I have installed the minimals. It works with a file I tried without tikz.
The examples on the wiki also work well. It does not work with a file that has
tikz code in it. It stops compiling with

! Undefined control sequence.
l.13 \starttikzpicture


Does Tikz not work with mkiv?

Thanks.

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] \FlushStep in module s-pre-50 adds too much space

2009-03-15 Thread Curious Learn
Hans Hagen pragma at wxs.nl writes:


 in mkii it's injecting nodes, so you need to keep the \FlushStep 
 attached to the previous paragraph if possible like here\FlushStep
 
 in mkiv it should not matter

Thank you Hans. I will try to install Context Minimals in a couple of days. In
MKII it does not help even if I keep it attached to the previous paragraph. 

The reason I have not been installing Context Minimals is that I am not sure how
I will make the text editor I use (TextMate) to use it. The instructions for Mac
OS X talk about TexShop and another one, but not textmate. Also, from the
instructions (for Mac OSx) it is not clear whether it will install the latest
stable version or the latest beta. 

If anyone can clarify these things that would be great.

In any case, when will MKIV be included in the TexLive distribution.

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] \FlushStep in module s-pre-50 adds too much space

2009-03-14 Thread Curious Learn
Hello,

I tried using module s-pre-50 to get stepwise revelation of the content in my
presentation today. I noticed that the command \FlushStep adds what seems to be
too much space between successive items. Is there a way, I can prevent
\FlushStep from adding this much space.

Thank you.

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Thanks. Two new questions: rotate and scale

2009-03-13 Thread Curious Learn
Albrecht Kauffmann alkauffm at rz.uni-potsdam.de writes:

 
 only to (1): try
 
 draw (((0,0) -- dir(0)*u -- dir(60)*u --cycle) rotated 60);

Thanks Albrecht. That worked great.

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Thanks. Two new questions: rotate and scale

2009-03-13 Thread Curious Learn
Taco Hoekwater taco at elvenkind.com writes:


  (2) Is there a command to scale the whole picture...not the components?
 
 Parse error. In my view, the whole picture *is* the components.
 
 Best wishes,
 Taco

Hi Taco,

Sorry for the typo and for not being clear. I meant the following. I know that
scaled command can be used to scale any particular component. To scale the
whole picture does one have to scale each and every component individually, or
is there one command that scales every component. 

One way is perhaps to define a variable, say u=1cm and express all measurements
in terms of u. Then by changing just u one can scale the whole picture (and
all the components) up or down. Is there another way? For example, in TikZ there
is a command scale which scales the entire picture if put as an option to
\begin{tikzpicture}. I was wondering if something like that is available in
Metapost too.




___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Thanks. Two new questions: rotate and scale

2009-03-13 Thread Curious Learn
Taco Hoekwater taco at elvenkind.com writes:

 
 You want this, I think:
 
   beginfig(1);
   ... do stuff ...
   currentpicture := currentpicture scaled X;
   endfig;
 
 
Awesome!! This is exactly what I was looking for. 

Thanks Taco and Mikael.


___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Thanks. Two new questions: rotate and scale

2009-03-12 Thread Curious Learn
Aditya and Hans,

Thanks very much for your replies. I suppose I should install minimals afterall.
Still using the TexLive version. 

I have two new questions:

(1) In the following code the triangle outline (obtained with the draw
command) does not rotate, i.e., I get the same triangle as without the rotated
command. On the other hand the fill command rotates as expected. What is wrong?

\startuseMPgraphic{Dir} 
pickup pencircle scaled 2pt;
numeric u;
u=2cm;
draw (0,0) -- dir(0)*u -- dir(60)*u --cycle rotated 60;
fill (0,0) -- dir(0)*u -- dir(60)*u --cycle rotated 60 withcolor 
(0.58,0.94,0.9);
\stopuseMPgraphic  
\useMPgraphic{Dir} 


(2) Is there a command to scale the whole picture...not the components? 

Thanks very much. 

I have said this before but want to say this again. Thanks so much to the
developers of Context who have given us this wonderful system. Thanks also to
all the people on this mailing list who take their precious time to answer
questions.   

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Command show in Metapost/Metafun

2009-03-11 Thread Curious Learn
Hi,

I am trying to learn Metapost using Context. I tried a few examples for drawing
things and they worked well. But the show command does not seem to work. For
example, the code 

\startuseMPgraphic{GridDots}
u=1cm;
pickup pencircle scaled 8pt
for i = 0 upto 2:
for j = 0 upto 2: draw (i*u,j*u); endfor
endfor 
\stopuseMPgraphic  
\useMPgraphic{GridDots}  

from John Hobby's manual works great. 

However, the following code gives no output in the PDF file. Am I doing
something wrong?

\startuseMPgraphic{LinearEq}
   a+b = 2a - b = 3;
   show a,b;
\stopuseMPgraphic  
\useMPgraphic{LinearEq}  

I am using the following version from Texlive
ConTeXt  ver: 2008.05.21 15:21 MKII  fmt: 2008.10.1  int: english/english

Thanks for your help.

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] \dorecurse and \recurselevel in Natural Tables

2009-03-06 Thread Curious Learn
Aditya Mahajan adityam at umich.edu writes:

 My summary of this thread:

http://randomdeterminism.wordpress.com/2009/03/05/tex-programming-the-past-the-present-and-the-future/
 
 Aditya

I like the Luatex code of Luigi. Though it is longer than what Wolfgang
suggested (and in this case, I am using Wolfgang's solution now that I know
about it), the luatex code seems to be the kind of programming that I am more
comfortable with. In fact, in Latex when I was trying to achieve this, I used
the python.sty package to code this in Python.

To be able to do this using Lua (Luatex), do I need to learn the Lua programming
language. Do I pick up any beginners book on Lua? Any recommendations based on
experience of those who use Luatex here.

For example, one of the lines in the code is 

 tprint = function(s) tex.sprint(tex.ctxcatcodes,s) end 

Is this Lua or LuaTex?

Thanks. 

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] \dorecurse and \recurselevel in Natural Tables

2009-03-06 Thread Curious Learn


Arthur and Luigi, thanks for your responses. Arthur, your response makes it very
clear, what I need to do. I will start with the book you recommend.



___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Two questions - Cross Referencing (Auto mated label generation + Random items)

2009-03-04 Thread Curious Learn
Wolfgang Schuster schuster.wolfgang at googlemail.com writes:


 You don't need \nextrandom any longer, it's fixed with the last beta.
 
 \newcounter\choicecounter
 
 \define[1]\Rightitem
{\doglobal\increment\choicecounter
 \startitem[\choicecounter]#1\stopitem}
 
 \define[1]\Wrongitem
{\startitem#1\stopitem}
 
 \processbetween{rightitem}\Rightitem
 \processbetween{wrongitem}\Wrongitem
 

  \startrightitem This is the CORRECT answer. \stoprightitem
  \startwrongitem Yet another wrong answer.   \stopwrongitem

 You can use a fixed random order for the items (the don't change after
 each new run) with '\setupsystem[random=3456]', you can change the order
 when you user another number.
 
 Wolfgang
 

Awesome solution. Works great. Thanks very much Wolfgang. I can now use your
solution. If it is not too difficult to explain, I would appreciate if someone
could explain why the following does not work. It is not necessary because
Wolfgang's solution is great but will help me understand it better.

\def\AnsT
   {\doglobal\increment\choicecounter
 \startitem[\choicecounter]#1\stopitem}
\def\eAns{\stopitem}

With these commands if I use

\AnsT This is the CORRECT answer. \eAns
\startwrongitem Yet another wrong answer.   \stopwrongitem

I get the error File ended while scanning use of \startitem






___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Two questions - Cross Referencing (Au tomated label generation + Random items)

2009-03-04 Thread Curious Learn

 The low level way to do this is:
 
 \def\AnsT#1\eAns
{\doglobal\increment\choicecounter
 \startitem[\choicecounter]#1\stopitem}
 

 Wolfgang


Beautiful! Thanks again Wolfgang. I tried the low level command and it works
great. I will try the Context way later.

Hans, thanks very much for bringing to my attention the file m-educat.tex. Can
you please tell me where I can find it?

Even if I do not use it as it is, I am sure I can learn something and it can
give me some ideas. 


___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Two questions - Cross Referencing (Auto mated label generation + Random items)

2009-03-04 Thread Curious Learn
Mikael Persson mickep at gmail.com writes:


 
 Dear Curious Learn (strange name, it can be considered rude not to use
 the real one)
 
 You can find m-educat.tex at
 tex/texmf-context/tex/context/base/m-educat.tex
 if you use the minimals
 It is also listed at
 http://wiki.contextgarden.net/Modules
 if you dont have that installation.
 
 Best regards, Mikael Persson

Thanks for the information Mikael. I am sorry if my use of a non real name
offended anyone. It seems to be the standard practice on many forums (I agree
not on this one) and I stuck to it. Feel just more comfortable this way. Again,
I apologize if it offended anyone.



___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] \dorecurse and \recurselevel in Natural Tables

2009-03-04 Thread Curious Learn
Can someone please explain why the second example below works but the first does
not work? 
Thanks very much.

\starttext 

\bTABLE
\dorecurse{5}
{\bTR \bTD \recurselevel. \eTD 
  \bTD \recurselevel  \eTD\eTR}
\eTABLE 

\dorecurse{2}
{\recurselevel. \recurselevel\crlf}

\stoptext



___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] \dorecurse and \recurselevel in Natural Tables

2009-03-04 Thread Curious Learn
Wolfgang Schuster schuster.wolfgang at googlemail.com writes:

 
 \bTABLE
 \dorecurse{5}{\bTR\expanded{\bTD\recurselevel\eTD}\eTR}
 \eTABLE
 
 Wolfgang

As your other solutions, this worked great. I suppose I have to use \expanded
for every \bTD \eTD pair. Can you please explain why this is necessary or point
me to a document that contains the explanation.

Thanks very much.


___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] \dorecurse and \recurselevel in Natural Tables

2009-03-04 Thread Curious Learn

 Not really.
 
 \bTABLE
 \dorecurse{5}{\bTR\bTD#1\eTD\eTR}
 \eTABLE
 
 Wolfgang
 

Awesome How does one learn these things? Is this Tex programming or Context
programming.

Thanks very much.




___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] problem with defineitemgroup command

2009-03-03 Thread Curious Learn
Aditya Mahajan adityam at umich.edu writes:


 Change this to
 
 \setupitemgroup[options][1][a,packed]
 \setupitemgroup[options][1][stopper=)]
 
 You cannot mix options (a, packed, etc) with assignments (key=value).
 
 Aditya

Thanks Aditya. I appreciate it.

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Two questions - Cross Referencing (Automated label generation + Random items)

2009-03-03 Thread Curious Learn

As I mentioned earlier, I am trying to use Context to make a multiple choice
test. I have two questions.

(1) Suppose I want to get a list of answers to the the multiple choice
questions. One way I can think of doing this is by assigning a label to the
CORRECT answer as done in the following code and then referring to that label.
Is there a way these labels can be generated automatically, instead of
hardcoding them as I have done below? 

defineenumeration[problem][text= ,location=inleft] 
\setupenumerations[problem][stopper=)]

\defineitemgroup[choices][levels=1] 
\setupitemgroup[choices][1][a,packed]
\nextrandom

\starttext 

   \problem This is the first question.
 \startchoices  
 \startitem This is incorrect answer 1. \stopitem   
 \startitem This is a wrong answer too. \stopitem
 \startitem[1] This is the CORRECT answer. \stopitem   
 \startitem Yet another wrong answer. \stopitem
 \stopchoices

\problem This is the second question.
 \startchoices
   \startitem[2] This is the CORRECT answer. \stopitem   
   \startitem This is a wrong answer too. \stopitem
   \startitem This is not a correct choice. \stopitem   
   \startitem Yet another wrong answer. \stopitem
 \stopchoices


Answers to the questions
  
\in[1]

\in[2]

\stoptext 

(2) When I add the option random to the itemgroup
(\setupitemgroup[choices][1][a,packed,random]) then as expected the choices are
listed in a random order. However, the label does not change with the choice
listing. I want the reference to be attached to the CORRECT answer, which
changes its position with random option. Is there a way to have the reference
reflect the letter corresponding to the correct answer.

Thanks in advance for your help. I really appreciate it. 

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Switching off Header only on a particular page

2009-03-03 Thread Curious Learn
Hi,

Is there a way to switch off just the header on a particular page? The Context
manual gives the command \noheaderandfooterlines to switch off both. However, I
want the page number (which is in the footer) on the first page, but no headers
on the first page. 

Thanks.


___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Switching off Header only on a particular page

2009-03-03 Thread Curious Learn
Hans Hagen pragma at wxs.nl writes:


 just \setupheader[state=empty] or anything else that applies
 


Thanks very much Hans. That works great.




___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] problem with defineitemgroup command

2009-03-02 Thread Curious Learn
I am trying to define an itemgroup to list the answers for multiple choice
questions. When I try to change the stopper using the option stopper=), the list
changes from an alphabetical one to a bulleted list. Please see the difference
between choices and options below. 

\defineitemgroup[choices][levels=1] 
\setupitemgroup[choices][1][a,packed] 

\defineitemgroup[options][levels=1] 
\setupitemgroup[options][1][a,packed,stopper=)]



\starttext
  
 \startchoices
 \startitem This is choice 1. \stopitem   
 \startitem This is choice 2. \stopitem
 \stopchoices 

 \startoptions
 \startitem This is option 1. \stopitem   
 \startitem This is option 2. \stopitem
 \stopoptions


\stoptext
   
Q. How can I change the stopper in this itemgroup.

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] \itemize[random] does not work

2009-03-01 Thread Curious Learn
Aditya Mahajan adityam at umich.edu writes:

 \defineitemgroup[choices]
 
 \startmode[random]
\setupitemgroup[choices][1][random]
\nextrandom % to get rid of the randomize bug
 \stopmode

 Compile this file with texexec --mode=random  to get random choices, 
 compile without --mode=... to get normal behaviour. 

Thanks very much Aditya. That's awesome. I am going to try that for the next
test I make.









___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] \itemize[random] does not work

2009-02-27 Thread Curious Learn
I was not aware of this cool feature in Context. This could be very useful in
making multiple choice tests. I have one question. Is there a simple way in
which one can switch between itemized lists that are random and non-random? For
example, if I have 40 multiple choice questions, each of which has the following
form:

Question Text
\startitemize[random]
\startitem first item \stopitem
\startitem second item \stopitem
\startitem third item \stopitem
\startitem fourth item \stopitem
\stopitemize

If I want the PDF file that has the items in the order I entered them in (i.e.,
not a random permutation); is it possible to do that in a way other than going
and taking out the random from each itemize environment?

Thanks.


___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___