[NTG-context] [OT] Book complete and thank you

2013-12-10 Thread Kip Warner
Friends,

I have completed my book typeset using ConTeXt[1]. I'd like to extend my
gratitude to this list for the many questions answered. In particular,
I'd like to thank in no particular order Hans Hagen, Luigi Scarso,
Wolfgang Schuster, Mojca Miklavec, and Taco Hoekwater. I'd also like to
thank Adam Reviczky for his help in preparing debs for ConTeXt.



Without these peoples' help, it would have been more difficult to
develop my project.

Take care,

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
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] Understanding the basics of \define

2013-12-10 Thread Peter Münster
On Tue, Dec 10 2013, Wolfgang Schuster wrote:

> One way to set values is the \getparameters command but the disadvantage
> of this is that you to ensure not to call values (e.g. \testthree) which 
> aren’t set
> (e.g. not “three={…}” setting for the \test command).

You can preset the values: \getparameters[test][one=, two=my default 2, three=, 
#1]


> \def\test
>   {\dosingleargument\dotest}

Wouldn't it be better (for users who don't know the source by heart),
to use camelcase names (for example "\Test"), to avoid clashes with
internal ConTeXt macros?

-- 
   Peter
___
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] incrementing counters in tables

2013-12-10 Thread Jannik Voges
Thanks, that helps.


Am 10.12.2013 um 19:55 schrieb Aditya Mahajan :

> On Tue, 10 Dec 2013, Jannik Voges wrote:
> 
>> Dear ConTeXt-Users,
>> 
>> 
>> I want to use counters in tables. But incrementing counters in tables 
>> doesn’t work as expected. For example, when I typeset the following example, 
>> I get numbers between 80 and 119, I would expect numbers between 0 and 39. 
>> How can I get the desired numbers?
>> 
>> \definenumber[test]
>> 
>> \starttext
>> \bTABLE
>> \dorecurse{8}{
>>  \bTR
>>  \dorecurse{5}{\bTD \rawcountervalue[test]\incrementnumber[test] \eTD}
>>  \eTR
>> }
>> \eTABLE
>> \stoptext
> 
> Change that to:
> 
> \rawcountervalue[test]\iftrialtypesetting\else\incrementnumber[test]\fi
> 
> Aditya___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
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] incrementing counters in tables

2013-12-10 Thread Aditya Mahajan

On Tue, 10 Dec 2013, Jannik Voges wrote:


Dear ConTeXt-Users,


I want to use counters in tables. But incrementing counters in tables doesn’t 
work as expected. For example, when I typeset the following example, I get 
numbers between 80 and 119, I would expect numbers between 0 and 39. How can I 
get the desired numbers?

\definenumber[test]

\starttext
\bTABLE
\dorecurse{8}{
\bTR
\dorecurse{5}{\bTD \rawcountervalue[test]\incrementnumber[test] \eTD}
\eTR
}
\eTABLE
\stoptext


Change that to:

\rawcountervalue[test]\iftrialtypesetting\else\incrementnumber[test]\fi

Aditya___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] incrementing counters in tables

2013-12-10 Thread Jannik Voges
Dear ConTeXt-Users,


I want to use counters in tables. But incrementing counters in tables doesn’t 
work as expected. For example, when I typeset the following example, I get 
numbers between 80 and 119, I would expect numbers between 0 and 39. How can I 
get the desired numbers?

\definenumber[test]

\starttext
\bTABLE
\dorecurse{8}{
\bTR
\dorecurse{5}{\bTD \rawcountervalue[test]\incrementnumber[test] \eTD}
\eTR
}
\eTABLE
\stoptext

Thanks

Jannik Voges


signature.asc
Description: Message signed with OpenPGP using GPGMail
___
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] Understanding the basics of \define

2013-12-10 Thread Wolfgang Schuster

Am 10.12.2013 um 17:54 schrieb Alan Braslau :

> Perhaps you might want to do something processing a comma separated
> list:
> 
> http://wiki.contextgarden.net/System_Macros/Comma_Separated_Lists


A short example can help to show how it can be used:

\def\test
  {\dosingleargument\dotest}

\def\dotest[#1]%
  {\starttabulate
   \NC 1 \EQ \getfromcommalist[#1][1]\commalistelement \NC\NR
   \NC 2 \EQ \getfromcommalist[#1][2]\commalistelement \NC\NR
   \stoptabulate}

\starttext
\test[First row,Second row]
\stoptext

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
___


[NTG-context] [OT] Type:Rider

2013-12-10 Thread Flavien Lambert
Dear all, I am pretty sure that some of you are fond of typography so I
dared to make you aware of a really beautiful game running on phones and
tablets dedicated to typography. Called Type:Rider, it is composed of
several chapters, each dealing with a period of time illustrating the main
techniques, fonts and design ideas. The game is really well done in terms
of picture and music, the character being two dots evolving on letters from
the main font of the time with background extracted from well-known art
scenes.
Best regards,
Flavien.
___
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] Adding a space between multiple years from same authors

2013-12-10 Thread Steffen Kram
That was the file I already looked at. But it does not contain no logic to 
format those dates. If I search for all commas in that file, none of them are 
used to format dates.

Thanks for the pointer but it does not solve my case.

Cheers, Steffen


Am 09.12.2013 um 16:57 schrieb Alan BRASLAU :

> See
> texmf-context/text/context/bib/bibl-apa-de.tex
> 
> Alan
> 
> On Mon, 9 Dec 2013 15:50:32 +0100
> Steffen Kram  wrote:
> 
>> Hi,
>> 
>> I’m using the apa-de style. When my citation includes publications
>> from the same authors, then using
>> 
>> \cite[authorFirstRef,authorSecondRef]
>> 
>> or 
>> 
>> \cite[authoryear][authorFirstRef,authorSecondRef]
>> 
>> will not include Spaces between the years, e.g.
>> 
>> \cite[Dyer:2012ts,Dyer:2012hy,Dyer:2013te]
>> => … (Dyer et al., 2012a,2012b,2013a)
>> 
>> \cite[authoryear][Dyer:2012ts,Dyer:2012hy,Dyer:2013te]
>> => … Dyer et al. (2012a,2012b,2013a)
>> 
>> How can I accomplish that the years are separated by comma and space:
>> 
>> => … Dyer et al. (2012a, 2012b, 2013a)
>> 
>> I already played with the setupcite command and peeked at the source
>> code but could not find the right place or an idea how to change
>> this. Seems like setupcite has not option and this is somewhere
>> buried deep in the compact-layout code.
>> 
>> Any ideas?
>> 
>> Cheers,
>> Steffen
> 
> 



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
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] Understanding the basics of \define

2013-12-10 Thread Alan Braslau
Perhaps you might want to do something processing a comma separated
list:

http://wiki.contextgarden.net/System_Macros/Comma_Separated_Lists

Alan

On Wed, 11 Dec 2013 00:29:07 +0900
Pavel Stupin  wrote:

> ..Alas, I was too hasty to congratulate myself as it obviously doesn't
> work as intended (the arguments in the nested function get hard-coded
> and are of no use). :) So I'm still looking forward for ConTeXt
> masters to enlighten me.
> 
> Kind regards, Pavel.
> 
> 2013/12/11 Pavel Stupin :
> > To answer my own question. I think I've solved the problem by
> > splitting a macros into several ones and then nesting them into each
> > opther. A sort of a clumsy solution but it works. Kind regards,
> > Pavel.
> >
> > 2013/12/10 Pavel Stupin :
> >> Thank you, Wolfgang!  Much to my delight, \startembeddedxtable
> >> works indeed, however, when I increase the number of arguments up
> >> to 10 --- to use the simplest example possible, without any tables:
> >> \define[10]\myText{#1 #2 #3 #4 #5 #6 #7 #8 #9 #10} --- it doesn't
> >> work again (works fine with 9 arguments). Am I correct assuming
> >> that there's an inherent limitation to 9 arguments only or the
> >> 2+-digit numbers should be written somehow differently? Is there
> >> any workaround?
> >>
> >> Kind regards, Pavel.
> >>
> >> 2013/12/10 Wolfgang Schuster :
> >>>
> >>> Am 10.12.2013 um 12:23 schrieb Pavel Stupin
> >>> :
> >>>
>  Hello:
> 
>  I'm struggling with understanding the way \define is supposed to
>  work. I would like to have a macros to generate tables and
>  populate them with some specific data submitted as arguments. I
>  apologize for my lack of understanding of the very basics, but
>  e.g. the following code just doesn't compile:
> 
>  \define[1]\mytable{
>  \startxtable
>  \startxrow
>  \startxcell #1 \stopxcell
>  \stopxrow
>  \stopxtable}
> 
>  \mytable{abc}
> 
> 
>  I would appreciate your help and maybe some references to read
>  (if any) in order to educate myself.
> >>>
> >>> The problem in your example isn’t define but the stable which
> >>> uses a buffer to collect the content and buffers and be used in
> >>> \def or \define commands.
> >>>
> >>> What you can do in this case is to replace \startxtable with
> >>> \startembeddedxtable and change your code to
> >>>
> >>> \dfeine[1]\mytable
> >>>   {\startembeddedxtable
> >>>  \startxrow
> >>>\startxcell#1\stopxcell
> >>>  \stopxrow
> >>>\stopembeddedxtable}
> >>>
> >>> 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
> >>> ___
> ___
> 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
> ___


-- 
Alan Braslau
CEA DSM-IRAMIS-SPEC
CNRS URA 2464
Orme des Merisiers
91191 Gif-sur-Yvette cedex FRANCE
tel: +33 1 69 08 73 15
fax: +33 1 69 08 87 86
mailto:alan.bras...@cea.fr
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Understanding the basics of \define

2013-12-10 Thread Wolfgang Schuster

Am 10.12.2013 um 15:24 schrieb Pavel Stupin :

> Thank you, Wolfgang!  Much to my delight, \startembeddedxtable works
> indeed, however, when I increase the number of arguments up to 10
> --- to use the simplest example possible, without any tables:
> \define[10]\myText{#1 #2 #3 #4 #5 #6 #7 #8 #9 #10} --- it doesn't work
> again (works fine with 9 arguments). Am I correct assuming that
> there's an inherent limitation to 9 arguments only or the 2+-digit
> numbers should be written somehow differently? Is there any
> workaround?

Yes, there is a limit of nine argument for macros. There are a few ways to 
extend
the number of arguments and it requires a few lines of code to do this and a 
better
solution is to use a key-val-interface when you have to set a lot of values.


One way to set values is the \getparameters command but the disadvantage
of this is that you to ensure not to call values (e.g. \testthree) which aren’t 
set
(e.g. not “three={…}” setting for the \test command).

\def\test
  {\dosingleargument\dotest}

\def\dotest[#1]%
  {\begingroup
   \getrawparameters[test][#1]%
   \starttabulate
   \NC 1 \EQ \testone \NC\NR
   \NC 2 \EQ \testtwo \NC\NR
   \stoptabulate
   \endgroup}

\starttext
\test[one={First row},two={Second row}]
\stoptext


You can avoid this problem with unknown keys when you use \getdummyparameters
to set the parameters and access them with \dummyparameter because when
you access the unknown values a empty string is returned.

\def\test
  {\dosingleargument\dotest}

\def\dotest[#1]%
  {\begingroup
   \getdummyparameters[#1]%
   \starttabulate
   \NC 1 \EQ \dummyparameter{one} \NC\NR
   \NC 2 \EQ \dummyparameter{two} \NC\NR
   \stoptabulate
   \endgroup}

\starttext
\test[one={First row},two={Second row}]
\stoptext

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] Understanding the basics of \define

2013-12-10 Thread Pavel Stupin
..Alas, I was too hasty to congratulate myself as it obviously doesn't
work as intended (the arguments in the nested function get hard-coded
and are of no use). :) So I'm still looking forward for ConTeXt
masters to enlighten me.

Kind regards, Pavel.

2013/12/11 Pavel Stupin :
> To answer my own question. I think I've solved the problem by
> splitting a macros into several ones and then nesting them into each
> opther. A sort of a clumsy solution but it works. Kind regards, Pavel.
>
> 2013/12/10 Pavel Stupin :
>> Thank you, Wolfgang!  Much to my delight, \startembeddedxtable works
>> indeed, however, when I increase the number of arguments up to 10
>> --- to use the simplest example possible, without any tables:
>> \define[10]\myText{#1 #2 #3 #4 #5 #6 #7 #8 #9 #10} --- it doesn't work
>> again (works fine with 9 arguments). Am I correct assuming that
>> there's an inherent limitation to 9 arguments only or the 2+-digit
>> numbers should be written somehow differently? Is there any
>> workaround?
>>
>> Kind regards, Pavel.
>>
>> 2013/12/10 Wolfgang Schuster :
>>>
>>> Am 10.12.2013 um 12:23 schrieb Pavel Stupin :
>>>
 Hello:

 I'm struggling with understanding the way \define is supposed to work.
 I would like to have a macros to generate tables and populate them
 with some specific data submitted as arguments. I apologize for my
 lack of understanding of the very basics, but e.g. the following code
 just doesn't compile:

 \define[1]\mytable{
 \startxtable
 \startxrow
 \startxcell #1 \stopxcell
 \stopxrow
 \stopxtable}

 \mytable{abc}


 I would appreciate your help and maybe some references to read (if
 any) in order to educate myself.
>>>
>>> The problem in your example isn’t define but the stable which uses a buffer
>>> to collect the content and buffers and be used in \def or \define commands.
>>>
>>> What you can do in this case is to replace \startxtable with 
>>> \startembeddedxtable
>>> and change your code to
>>>
>>> \dfeine[1]\mytable
>>>   {\startembeddedxtable
>>>  \startxrow
>>>\startxcell#1\stopxcell
>>>  \stopxrow
>>>\stopembeddedxtable}
>>>
>>> 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
>>> ___
___
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] Understanding the basics of \define

2013-12-10 Thread Pavel Stupin
To answer my own question. I think I've solved the problem by
splitting a macros into several ones and then nesting them into each
opther. A sort of a clumsy solution but it works. Kind regards, Pavel.

2013/12/10 Pavel Stupin :
> Thank you, Wolfgang!  Much to my delight, \startembeddedxtable works
> indeed, however, when I increase the number of arguments up to 10
> --- to use the simplest example possible, without any tables:
> \define[10]\myText{#1 #2 #3 #4 #5 #6 #7 #8 #9 #10} --- it doesn't work
> again (works fine with 9 arguments). Am I correct assuming that
> there's an inherent limitation to 9 arguments only or the 2+-digit
> numbers should be written somehow differently? Is there any
> workaround?
>
> Kind regards, Pavel.
>
> 2013/12/10 Wolfgang Schuster :
>>
>> Am 10.12.2013 um 12:23 schrieb Pavel Stupin :
>>
>>> Hello:
>>>
>>> I'm struggling with understanding the way \define is supposed to work.
>>> I would like to have a macros to generate tables and populate them
>>> with some specific data submitted as arguments. I apologize for my
>>> lack of understanding of the very basics, but e.g. the following code
>>> just doesn't compile:
>>>
>>> \define[1]\mytable{
>>> \startxtable
>>> \startxrow
>>> \startxcell #1 \stopxcell
>>> \stopxrow
>>> \stopxtable}
>>>
>>> \mytable{abc}
>>>
>>>
>>> I would appreciate your help and maybe some references to read (if
>>> any) in order to educate myself.
>>
>> The problem in your example isn’t define but the stable which uses a buffer
>> to collect the content and buffers and be used in \def or \define commands.
>>
>> What you can do in this case is to replace \startxtable with 
>> \startembeddedxtable
>> and change your code to
>>
>> \dfeine[1]\mytable
>>   {\startembeddedxtable
>>  \startxrow
>>\startxcell#1\stopxcell
>>  \stopxrow
>>\stopembeddedxtable}
>>
>> 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
>> ___
___
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] Understanding the basics of \define

2013-12-10 Thread Pavel Stupin
Thank you, Wolfgang!  Much to my delight, \startembeddedxtable works
indeed, however, when I increase the number of arguments up to 10
--- to use the simplest example possible, without any tables:
\define[10]\myText{#1 #2 #3 #4 #5 #6 #7 #8 #9 #10} --- it doesn't work
again (works fine with 9 arguments). Am I correct assuming that
there's an inherent limitation to 9 arguments only or the 2+-digit
numbers should be written somehow differently? Is there any
workaround?

Kind regards, Pavel.

2013/12/10 Wolfgang Schuster :
>
> Am 10.12.2013 um 12:23 schrieb Pavel Stupin :
>
>> Hello:
>>
>> I'm struggling with understanding the way \define is supposed to work.
>> I would like to have a macros to generate tables and populate them
>> with some specific data submitted as arguments. I apologize for my
>> lack of understanding of the very basics, but e.g. the following code
>> just doesn't compile:
>>
>> \define[1]\mytable{
>> \startxtable
>> \startxrow
>> \startxcell #1 \stopxcell
>> \stopxrow
>> \stopxtable}
>>
>> \mytable{abc}
>>
>>
>> I would appreciate your help and maybe some references to read (if
>> any) in order to educate myself.
>
> The problem in your example isn’t define but the stable which uses a buffer
> to collect the content and buffers and be used in \def or \define commands.
>
> What you can do in this case is to replace \startxtable with 
> \startembeddedxtable
> and change your code to
>
> \dfeine[1]\mytable
>   {\startembeddedxtable
>  \startxrow
>\startxcell#1\stopxcell
>  \stopxrow
>\stopembeddedxtable}
>
> 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
> ___
___
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] Understanding the basics of \define

2013-12-10 Thread Wolfgang Schuster

Am 10.12.2013 um 12:23 schrieb Pavel Stupin :

> Hello:
> 
> I'm struggling with understanding the way \define is supposed to work.
> I would like to have a macros to generate tables and populate them
> with some specific data submitted as arguments. I apologize for my
> lack of understanding of the very basics, but e.g. the following code
> just doesn't compile:
> 
> \define[1]\mytable{
> \startxtable
> \startxrow
> \startxcell #1 \stopxcell
> \stopxrow
> \stopxtable}
> 
> \mytable{abc}
> 
> 
> I would appreciate your help and maybe some references to read (if
> any) in order to educate myself.

The problem in your example isn’t define but the stable which uses a buffer
to collect the content and buffers and be used in \def or \define commands.

What you can do in this case is to replace \startxtable with 
\startembeddedxtable
and change your code to

\dfeine[1]\mytable
  {\startembeddedxtable
 \startxrow
   \startxcell#1\stopxcell
 \stopxrow
   \stopembeddedxtable}

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
___


[NTG-context] Understanding the basics of \define

2013-12-10 Thread Pavel Stupin
Hello:

I'm struggling with understanding the way \define is supposed to work.
I would like to have a macros to generate tables and populate them
with some specific data submitted as arguments. I apologize for my
lack of understanding of the very basics, but e.g. the following code
just doesn't compile:

\define[1]\mytable{
\startxtable
\startxrow
\startxcell #1 \stopxcell
\stopxrow
\stopxtable}

\mytable{abc}


I would appreciate your help and maybe some references to read (if
any) in order to educate myself.
Kind regards, Pavel.
___
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] Russian language support in ConTeXt

2013-12-10 Thread Pavel Stupin
Wolfgang, thank you very much for the detailed answer. It works great for me.
Best regards, Pavel.

2013/12/9 Wolfgang Schuster :
>
> Am 09.12.2013 um 09:49 schrieb Pavel Stupin :
>
>> Hello:
>>
>> I would like to use ConTeXt for typesetting documents in Russian. I
>> used it about 10 years ago and it worked just fine. Much has been
>> changed since then, however, and it doesn't work out-of-box while the
>> only howto I've been able to find
>> (http://wiki.contextgarden.net/Russian) seems to be outdated (?) as
>> none of the examples works with the latest ConTeXt. Could someone
>> please explain me what I need to set up the program, if this is
>> possible at all. I would appreciate your help and advise a lot.
>
> When you use ConTeXt MkIV (context command on the command line)
> you need a font which has cyrillic letters, e.g. the DejaVu fonts which are
> shipped with the ConTeXt Suite.
>
> \setupbodyfont[dejavu]
>
> \mainlanguage[russian]
>
> \starttext
> Немного русского текста для пробы.
> \stoptext
>
>
> You can also use other fonts on your system with have cyrillic glyphs and
> load the fonts with the simplefonts module. When you have a recent
> installation you can use the internal simplefonts commands (not the best
> example because you can load the libertine fonts also with 
> \setupbodyfont[libertine])
>
> \definefontfamily [mainface] [rm] [Linux Libertine O]
> \definefontfamily [mainface] [ss] [Linux Biolinum O]
> \definefontfamily [mainface] [mm] [Latin Modern Math]
>
> \setupbodyfont[mainface]
>
> \mainlanguage[russian]
>
> \starttext
>
> Немного русского текста для пробы.
>
> \ss Немного русского текста для пробы.
>
> \stoptext
>
> When your ConTeXt version is older (e.g. because you use TeXLive) change
> the example above to:
>
> \usemodule[simplefonts]
>
> \setmainfont [Linux Libertine O]
> \setsansfont [Linux Biolinum O]
>
> \mainlanguage[russian]
>
> \starttext
>
> Немного русского текста для пробы.
>
> \ss Немного русского текста для пробы.
>
> \stoptext
>
> 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
> ___
___
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
___