Re: [NTG-context] about the defining itemized columns.

2018-07-26 Thread Jeong Dal
Dear Hans,

Thanks for the solution.
It works perfectly.

Best regards,
Dalyoung


>> define[1]\iCol
>  {\starttabulate[|*{#1}{|lw(\dimexpr.84\makeupwidth/#1\relax)|}]}
> 
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] about the defining itemized columns.

2018-07-26 Thread Hans Hagen

On 7/26/2018 9:06 AM, Jeong Dal wrote:

Dear all,

In mathematics, there are many occasions to make exercise problems in columns, 
and I did that using “tabulate” as following.Thanks Hans for this method!
%%%
\define\iTwo{\starttabulate[||w(.42\makeupwidth)||lw(.42\makeupwidth)|]}
\define\iThree{\starttabulate[||lw(.28\makeupwidth)||lw(.28\makeupwidth)||lw(.28\makeupwidth)|]}
\define\iFour{\starttabulate[||lw(.21\makeupwidth)||lw(.21\makeupwidth)||lw(.21\makeupwidth)||lw(.21\makeupwidth)|]}

\starttext
\startitemize[n]
\iTwo
\NC \itemtag \NC test1
\NC \itemtag \NC test2 \NC\NR
\NC \itemtag \NC test3
\NC \itemtag \NC test4 \NC\NR
\NC \itemtag \NC test5
\NC \itemtag \NC test6 \NC\NR
\stoptabulate
\stopitemize
\stoptext

%%%
It works well.
Since the numbers in the definitions are calculated by .84/2, .84/3, .84/4, I 
want to combine those definitions in one form.
Is it possible to define a one definition which can be set by argument as 
following.

\define[1]\iCol{\starttabulate[|*{#1}{|lw(.84/#1)\makeupwidth|}]}

When I call it \iCol{2}, the first *{#1} is working, but the second #1 is a 
problem.
I tried \ctxlua for division, but it didn’t work either.
Is there a nice way to define them in one definition?
It may be my greedy hope.

\define[1]\iCol
  {\starttabulate[|*{#1}{|lw(\dimexpr.84\makeupwidth/#1\relax)|}]}


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] about the defining itemized columns.

2018-07-26 Thread Jeong Dal
Dear all,

In mathematics, there are many occasions to make exercise problems in columns, 
and I did that using “tabulate” as following.Thanks Hans for this method!
%%%
\define\iTwo{\starttabulate[||w(.42\makeupwidth)||lw(.42\makeupwidth)|]}
\define\iThree{\starttabulate[||lw(.28\makeupwidth)||lw(.28\makeupwidth)||lw(.28\makeupwidth)|]}
\define\iFour{\starttabulate[||lw(.21\makeupwidth)||lw(.21\makeupwidth)||lw(.21\makeupwidth)||lw(.21\makeupwidth)|]}

\starttext
\startitemize[n]
\iTwo
\NC \itemtag \NC test1 
\NC \itemtag \NC test2 \NC\NR
\NC \itemtag \NC test3 
\NC \itemtag \NC test4 \NC\NR
\NC \itemtag \NC test5 
\NC \itemtag \NC test6 \NC\NR
\stoptabulate
\stopitemize
\stoptext

%%%
It works well. 
Since the numbers in the definitions are calculated by .84/2, .84/3, .84/4, I 
want to combine those definitions in one form.
Is it possible to define a one definition which can be set by argument as 
following.

\define[1]\iCol{\starttabulate[|*{#1}{|lw(.84/#1)\makeupwidth|}]}

When I call it \iCol{2}, the first *{#1} is working, but the second #1 is a 
problem.
I tried \ctxlua for division, but it didn’t work either.
Is there a nice way to define them in one definition?
It may be my greedy hope.

Thanks for reading.

Best regards,

Dalyoung




___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___