[NTG-context] equivalent to \newcommand{...}{\ensuremath{...}}

2014-12-09 Thread j. van den hoff

hi list,

new to `context' and my first question to the list: how can I achieve the  
following (`latex') behaviour:


\newcommand{\km}{\ensuremath{K_m}}
We can now use \km\ in the body text as well as in this
\begin{equation}
   \km = 1
\end{equation}
display equation.

in `context'? I've tried something like

\def\km{\math{K_m}}
We can now use \km\ in the body text but get sytnax errors when
putting it in this
\startformula
   \km = 1
\stopformula
formula.

but this fails for obvious reasons (as would using `$$' instead of  
`ensuremath' in the `latex' case).


so what I need is a way of defining (potentially complex) math-expressions  
via some shortcuts/definitions/macros/abbreviations (whatever) which I can  
then use
in the formula environment (or whatever it's called in `context'...) as  
well as in the body text.


any help appreciated,

joerg
--
Using Opera's revolutionary email client: http://www.opera.com/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] equivalent to \newcommand{...}{\ensuremath{...}}

2014-12-09 Thread Wolfgang Schuster

 Am 08.12.2014 um 17:41 schrieb j. van den hoff veedeeh...@googlemail.com:
 
 hi list,
 
 new to `context' and my first question to the list: how can I achieve the 
 following (`latex') behaviour:
 
 \newcommand{\km}{\ensuremath{K_m}}
 We can now use \km\ in the body text as well as in this
 \begin{equation}
   \km = 1
 \end{equation}
 display equation.
 
 in `context'? I've tried something like
 
 \def\km{\math{K_m}}
 We can now use \km\ in the body text but get sytnax errors when
 putting it in this
 \startformula
   \km = 1
 \stopformula
 formula.
 
 but this fails for obvious reasons (as would using `$$' instead of 
 `ensuremath' in the `latex' case).
 
 so what I need is a way of defining (potentially complex) math-expressions 
 via some shortcuts/definitions/macros/abbreviations (whatever) which I can 
 then use
 in the formula environment (or whatever it's called in `context'...) as well 
 as in the body text.
 
 any help appreciated,

In ConTeXt you have to write

\define\km{\mathematics{K_m}}

but there is not much to gain from this because you can enter math mode in the 
text with \m{…}.

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] equivalent to \newcommand{...}{\ensuremath{...}}

2014-12-09 Thread j. van den hoff
On Tue, 09 Dec 2014 09:42:03 +0100, Wolfgang Schuster  
schuster.wolfg...@gmail.com wrote:




Am 08.12.2014 um 17:41 schrieb j. van den hoff  
veedeeh...@googlemail.com:


hi list,

new to `context' and my first question to the list: how can I achieve  
the following (`latex') behaviour:


\newcommand{\km}{\ensuremath{K_m}}
We can now use \km\ in the body text as well as in this
\begin{equation}
  \km = 1
\end{equation}
display equation.

in `context'? I've tried something like

\def\km{\math{K_m}}
We can now use \km\ in the body text but get sytnax errors when
putting it in this
\startformula
  \km = 1
\stopformula
formula.

but this fails for obvious reasons (as would using `$$' instead of  
`ensuremath' in the `latex' case).


so what I need is a way of defining (potentially complex)  
math-expressions via some shortcuts/definitions/macros/abbreviations  
(whatever) which I can then use
in the formula environment (or whatever it's called in `context'...) as  
well as in the body text.


any help appreciated,


In ConTeXt you have to write

\define\km{\mathematics{K_m}}

but there is not much to gain from this because you can enter math mode  
in the text with \m{…}.


thanks for the response. in my silly example you are right (but even there  
it saves more than 50% of keystrokes). but I'm thinking of course of more  
tedious math expressions where it rapidly is handy to use such  
abbreviations -- the more so, if you have, say, 20 different ones  
appearing repeatedly in the document. but that would work with the  
`\def..\math' construct in the body text. what does _not_ work, then, is  
to use the definition in a display (\startformula...\stopformula) equation  
(which it _does_ in latex when isolating the math expression with  
`ensuremath'). so my real question(s) are:


1. is there any way to achieve the same functionality in `context'  
(expansion of math-containing defintion/macro/abbreviation in text _and_  
math environment? if yes, how would I do this?


2. if no, would it be sensible (and feasible) to modify `\math' behaviour  
and to make it aware of whether it is called from within text or from  
within a display equation (in which case it should do nothing...), i.e.   
mkae it behave like `\ensuremath' in latex?


thx/joerg



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
___



--
Using Opera's revolutionary email client: http://www.opera.com/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] equivalent to \newcommand{...}{\ensuremath{...}}

2014-12-09 Thread Wolfgang Schuster

 Am 09.12.2014 um 09:59 schrieb j. van den hoff veedeeh...@googlemail.com:
 
 On Tue, 09 Dec 2014 09:42:03 +0100, Wolfgang Schuster 
 schuster.wolfg...@gmail.com mailto:schuster.wolfg...@gmail.com wrote:
 
 
 Am 08.12.2014 um 17:41 schrieb j. van den hoff veedeeh...@googlemail.com:
 
 hi list,
 
 new to `context' and my first question to the list: how can I achieve the 
 following (`latex') behaviour:
 
 \newcommand{\km}{\ensuremath{K_m}}
 We can now use \km\ in the body text as well as in this
 \begin{equation}
  \km = 1
 \end{equation}
 display equation.
 
 in `context'? I've tried something like
 
 \def\km{\math{K_m}}
 We can now use \km\ in the body text but get sytnax errors when
 putting it in this
 \startformula
  \km = 1
 \stopformula
 formula.
 
 but this fails for obvious reasons (as would using `$$' instead of 
 `ensuremath' in the `latex' case).
 
 so what I need is a way of defining (potentially complex) math-expressions 
 via some shortcuts/definitions/macros/abbreviations (whatever) which I can 
 then use
 in the formula environment (or whatever it's called in `context'...) as 
 well as in the body text.
 
 any help appreciated,
 
 In ConTeXt you have to write
 
\define\km{\mathematics{K_m}}
 
 but there is not much to gain from this because you can enter math mode in 
 the text with \m{…}.
 
 thanks for the response. in my silly example you are right (but even there it 
 saves more than 50% of keystrokes). but I'm thinking of course of more 
 tedious math expressions where it rapidly is handy to use such abbreviations 
 -- the more so, if you have, say, 20 different ones appearing repeatedly in 
 the document. but that would work with the `\def..\math' construct in the 
 body text. what does _not_ work, then, is to use the definition in a display 
 (\startformula...\stopformula) equation (which it _does_ in latex when 
 isolating the math expression with `ensuremath'). so my real question(s) are:
 
 1. is there any way to achieve the same functionality in `context' (expansion 
 of math-containing defintion/macro/abbreviation in text _and_ math 
 environment? if yes, how would I do this?
 
 2. if no, would it be sensible (and feasible) to modify `\math' behaviour and 
 to make it aware of whether it is called from within text or from within a 
 display equation (in which case it should do nothing...), i.e.  mkae it 
 behave like `\ensuremath' in latex?


1 + 2:

\define\Foo{\mathematics{f(x)}}
\define\Bar{\mathortext {f(x)}{\m{g(x)}}}

\starttext

a \Foo\ \Bar\ b

\startformula
\Foo\ \Bar
\stopformula

\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] Pass a lua table to metapost

2014-12-09 Thread Hans Hagen

On 12/8/2014 4:48 PM, Mojca Miklavec wrote:

On Mon, Dec 8, 2014 at 4:34 PM, DesdeChaves wrote:

I use the last context minimals. In my system a have a new luatex binary (v.
0.78.2) but I don't know how install it in minimals. If i just  copy/paste
the new binary to the folder  .../tex/texmf-osx-64/bin I found a eeror
message  This went wrong:
.../Context/tex/texmf-context/tex/context/base/spac-ver.lua:933: attempt to
index field 'properties' (a nil value)

Why context minimals don't coming with the last luatex?


Hans, what version of LuaTeX is needed?


we have 0.79.2 now but 0.79.1 is also ok i think


Jorge, which version of luatex do you have in minimals / what OS are
you using? It's not 100% clear to me whether you have 0.78.2 in
minimals or somewhere else. If 0.78.2 comes from minimals, you must be
using PowerPC or armel and we need to ask the maintainer of these
binaries for a rebuild.

If LuaTeX 0.79.2 is needed, we just need to send an email to everyone
(or rather: we should do that anyway). Maybe I just forgot to send a
notice to the builders to make new builds when LuaTeX 0.79.2 came out.


indeed, 0.79.2 is the latest greatest

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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] equivalent to \newcommand{...}{\ensuremath{...}}

2014-12-09 Thread j. van den hoff
On Tue, 09 Dec 2014 10:05:22 +0100, Wolfgang Schuster  
schuster.wolfg...@gmail.com wrote:




Am 09.12.2014 um 09:59 schrieb j. van den hoff  
veedeeh...@googlemail.com:


On Tue, 09 Dec 2014 09:42:03 +0100, Wolfgang Schuster  
schuster.wolfg...@gmail.com mailto:schuster.wolfg...@gmail.com  
wrote:




Am 08.12.2014 um 17:41 schrieb j. van den hoff  
veedeeh...@googlemail.com:


hi list,

new to `context' and my first question to the list: how can I achieve  
the following (`latex') behaviour:


\newcommand{\km}{\ensuremath{K_m}}
We can now use \km\ in the body text as well as in this
\begin{equation}
 \km = 1
\end{equation}
display equation.

in `context'? I've tried something like

\def\km{\math{K_m}}
We can now use \km\ in the body text but get sytnax errors when
putting it in this
\startformula
 \km = 1
\stopformula
formula.

but this fails for obvious reasons (as would using `$$' instead of  
`ensuremath' in the `latex' case).


so what I need is a way of defining (potentially complex)  
math-expressions via some shortcuts/definitions/macros/abbreviations  
(whatever) which I can then use
in the formula environment (or whatever it's called in `context'...)  
as well as in the body text.


any help appreciated,


In ConTeXt you have to write

   \define\km{\mathematics{K_m}}

but there is not much to gain from this because you can enter math  
mode in the text with \m{…}.


thanks for the response. in my silly example you are right (but even  
there it saves more than 50% of keystrokes). but I'm thinking of course  
of more tedious math expressions where it rapidly is handy to use such  
abbreviations -- the more so, if you have, say, 20 different ones  
appearing repeatedly in the document. but that would work with the  
`\def..\math' construct in the body text. what does _not_ work, then,  
is to use the definition in a display (\startformula...\stopformula)  
equation (which it _does_ in latex when isolating the math expression  
with `ensuremath'). so my real question(s) are:


1. is there any way to achieve the same functionality in `context'  
(expansion of math-containing defintion/macro/abbreviation in text  
_and_ math environment? if yes, how would I do this?


2. if no, would it be sensible (and feasible) to modify `\math'  
behaviour and to make it aware of whether it is called from within text  
or from within a display equation (in which case it should do  
nothing...), i.e.  mkae it behave like `\ensuremath' in latex?



1 + 2:

\define\Foo{\mathematics{f(x)}}
\define\Bar{\mathortext {f(x)}{\m{g(x)}}}

\starttext

a \Foo\ \Bar\ b

\startformula
\Foo\ \Bar
\stopformula

\stoptext


feeling silly: now it works (so there was no real problem in the first  
place...), but previously I definitely got syntax errors when compiling if  
the `\def'
was used in the display equation (no idea, why, but I must have overlooked  
some dumb typo or similar). anyway, sorry for the noise and thanks again...


since I'm really new to `context': are there any potential problems with  
inserting white space in `\define' lines like `\define \Foo {  
\mathematics{f(x)} }' which I might miss? `context' seems to ignore them  
and they don't creep into the formatted output AFAICS (which is good).


j.

ps: `\mathortext' is nice. should this not be in the manuals/documentation  
somewhere? it seems it is not ...




Wolfgang



--
Using Opera's revolutionary email client: http://www.opera.com/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] equivalent to \newcommand{...}{\ensuremath{...}}

2014-12-09 Thread Hans Hagen

On 12/9/2014 1:36 PM, j. van den hoff wrote:


since I'm really new to `context': are there any potential problems with
inserting white space in `\define' lines like `\define \Foo {
\mathematics{f(x)} }' which I might miss? `context' seems to ignore them
and they don't creep into the formatted output AFAICS (which is good).


in math mode spaces don't matter much

in definitions you can do this:

\starttexdefinition foo
f
o
o
\stoptexdefinition

and get 'foo'

\starttexdefinition foo
\starttexdefinition unexanded foo
\starttexdefinition foo #1#2
\starttexdefinition unexpanded foo #1#2

in a mkvi document you can also say:

\starttexdefinition foo #first#second
\starttexdefinition unexpanded foo #first#second

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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] Problems with repeating layers

2014-12-09 Thread Reza Housseini
On Mon, Dec 8, 2014 at 10:19 AM, Pablo Rodriguez oi...@gmx.es wrote:

 On 12/08/2014 08:42 AM, Reza Housseini wrote:
  Hello
 
  I try to use layers to position a figure on top of the leftmargin area.
  I use code like the following:
 
  \definelayer[MyLayer][option=test]
  \setupbackgrounds[text][leftmargin][background=MyLayer]
  \setlayer[MyLayer][x=0cm,y=0cm]
  {\externalfigure[cow][width=2cm]}
 
  This image get's repeated every page but I only want it on the first
  page. The parameter state=start does not change anything. Is there a way
  to disable the layer on the next page?

 Hi Reza,

 I don’t know whether this is a bug or a feature.

 But this document might achieve what (I guess) you want (as you wrote
 yourself):

  \definelayer[MyLayer]
 \setlayer[MyLayer][x=0cm,y=4.5cm]
 {\externalfigure[cow][width=2cm]}
 \setupbackgrounds[page][background=MyLayer]
   \starttext
   \dorecurse{5}{\input knuth}
   \stoptext

  Also there seems to be a bug with \showframe. When I use this command
  my figure is only displayed on the first page (as desired).

 I wasn’t able to reproduce this.

 Placing \showframe before of after \setupbackgrounds in the previous
 document, states (http://wiki.contextgarden.net/Layers#State) work fine.

 I hope it helps,


 Pablo
 --
 http://www.ousia.tk

 ___
 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

 ___



Thanks Pablo

I already used this solution. For me it looks like a bug that the state
argument does not change anything because the manual clearly states the
expected behaviour of state.
But anyhow I'll use the other solution.

Cheers,
Reza
___
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] equivalent to \newcommand{...}{\ensuremath{...}}

2014-12-09 Thread Aditya Mahajan

On Mon, 8 Dec 2014, j. van den hoff wrote:

new to `context' and my first question to the list: how can I achieve the 
following (`latex') behaviour:


\newcommand{\km}{\ensuremath{K_m}}
We can now use \km\ in the body text as well as in this
\begin{equation}
   \km = 1
\end{equation}
display equation.


As a side remark, you should normally avoid using lowercase commands like 
\km (especially if they are small) as you may inadvertently overwrite an 
inbuilt TeX command (e.g., if you redefine \span or \omit, amongst 
others). Unlike LaTeX, ConTeXt does not halt at the redefinition of these 
commands; it simply spews a warning. Personally, I find that a safer 
alternative is to use uppercase or camelcase words to define your own 
commands: either \KM or \Km. This way you avoid conflict with inbuilt 
commands.


If you are using macros for abbreviations, you can also use the following:

\definesynonyms[mathnotation][mathnotations][\infull]

\mathnotation [KM] {\mathematics{K_m}} {Viscosity of membrane}

\starttext

\placelistofmathnotations

\section{Test}

We can use \KM\ to denote \infull{KM}.

\startformula
  \KM = 10
\stopformula

\stoptext

This way, you get a list of notation for free.

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] MP/Lua binding information flow

2014-12-09 Thread DesdeChaves
In the code in the attachment I have  intend that everytime  the data
generated by Lua are updated metapost should make immediately their
representation.
However, it insists into represent only the last data generated.
How can I fix this problem?

thanks

Jorge


calltemplates.tex
Description: TeX document
___
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] equivalent to \newcommand{...}{\ensuremath{...}}

2014-12-09 Thread j. van den hoff
On Tue, 09 Dec 2014 16:12:08 +0100, Aditya Mahajan adit...@umich.edu  
wrote:



On Mon, 8 Dec 2014, j. van den hoff wrote:

new to `context' and my first question to the list: how can I achieve  
the following (`latex') behaviour:


\newcommand{\km}{\ensuremath{K_m}}
We can now use \km\ in the body text as well as in this
\begin{equation}
   \km = 1
\end{equation}
display equation.


As a side remark, you should normally avoid using lowercase commands  
like \km (especially if they are small) as you may inadvertently  
overwrite an inbuilt TeX command (e.g., if you redefine \span or \omit,  
amongst others). Unlike LaTeX, ConTeXt does not halt at the redefinition  
of these commands; it simply spews a warning. Personally, I find that a


is this behavior configurable (I think I'd rather prefer `latex' behavior  
here

and still use lowercase abbreviations until I hit a real names clash)

safer alternative is to use uppercase or camelcase words to define your  
own commands: either \KM or \Km. This way you avoid conflict with  
inbuilt commands.


understood.



If you are using macros for abbreviations, you can also use the  
following:


\definesynonyms[mathnotation][mathnotations][\infull]

\mathnotation [KM] {\mathematics{K_m}} {Viscosity of membrane}

\starttext

\placelistofmathnotations

\section{Test}

We can use \KM\ to denote \infull{KM}.

\startformula
   \KM = 10
\stopformula

\stoptext


really thanks a lot for this tip. this seems to be the way to go for any  
serious document. (and `viscosity of membrane' is tight, but not right:  
it's a metabolic rate (which could be influenced by membrane permeability)  
in my context ;-))


joerg



This way, you get a list of notation for free.

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
___



--
Using Opera's revolutionary email client: http://www.opera.com/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] equivalent to \newcommand{...}{\ensuremath{...}}

2014-12-09 Thread Peter Münster
On Tue, Dec 09 2014, Aditya Mahajan wrote:

 \definesynonyms[mathnotation][mathnotations][\infull]

Perhaps better: \inFull  ;)

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

[NTG-context] Parameters of a table that interfere on another table

2014-12-09 Thread Fabrice Couvreur
Hi,
I do not understand why the parameters of the first table apply to the
second table.
Best regards,
Fabrice

\setuppapersize[A4][A4]

\setuplayout[
backspace=15mm,
width=middle,
topspace=15mm,
height=middle,
header=0pt,
footer=0pt,
]
\definelabel[TableRow][text=,headcolor=red,numberconversion=characters,numberstopper=.]

\starttext
\starmidaligned
\blank[big]
\setupTABLE[row][first][align={right}]
\setupTABLE[row][first][align={right,lohi},
topframe=off,leftframe=off,rightframe=off]
\bTABLE[width=0.25\textwidth,offset=1ex]
   \bTR[nc=4]
   \bTD text \eTD
   \eTR
   \bTR
\bTD \TableRow \ text  \eTD
\bTD \TableRow \ text  \eTD
\bTD \TableRow \ text  \eTD
\bTD \TableRow \ text  \eTD
   \eTR
\bTR
\bTD
\eTD
\bTD
\eTD
\eTR
\eTABLE
\stopmidaligned

\blank[big]
\startmidaligned
\bTABLE[align={middle,lohi}]
\setupTABLE[column][first][width=0.3\textwidth]
\setupTABLE[column][two][width=0.7\textwidth]
\bTR
\bTD[nc=3]
text
\eTD
\bTD[nr=2]
\eTD
\eTR
\bTR
\bTD
text
\eTD
\bTD[nc=2]
text
\eTD
\eTR
\eTABLE
\stopmidaligned
\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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] equivalent to \newcommand{...}{\ensuremath{...}}

2014-12-09 Thread j. van den hoff

On Tue, 09 Dec 2014 14:30:50 +0100, Hans Hagen pra...@wxs.nl wrote:


On 12/9/2014 1:36 PM, j. van den hoff wrote:


since I'm really new to `context': are there any potential problems with
inserting white space in `\define' lines like `\define \Foo {
\mathematics{f(x)} }' which I might miss? `context' seems to ignore them
and they don't creep into the formatted output AFAICS (which is good).


in math mode spaces don't matter much

in definitions you can do this:

\starttexdefinition foo
 f
 o
 o
\stoptexdefinition

and get 'foo'

\starttexdefinition foo
\starttexdefinition unexanded foo
\starttexdefinition foo #1#2
\starttexdefinition unexpanded foo #1#2

in a mkvi document you can also say:

\starttexdefinition foo #first#second
\starttexdefinition unexpanded foo #first#second


thanks for clarifying this.


Hans


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



--
Using Opera's revolutionary email client: http://www.opera.com/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] Parameters of a table that interfere on another table

2014-12-09 Thread Wolfgang Schuster

 Am 09.12.2014 um 23:01 schrieb Fabrice Couvreur fabrice1.couvr...@gmail.com:
 
 
 Hi,
 I do not understand why the parameters of the first table apply to the second 
 table.

What is the problem?

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] Parameters of a table that interfere on another table

2014-12-09 Thread Wolfgang Schuster

 Am 09.12.2014 um 23:01 schrieb Fabrice Couvreur fabrice1.couvr...@gmail.com:
 
 
 Hi,
 I do not understand why the parameters of the first table apply to the second 
 table.
 Best regards,
 Fabrice
 
 \setupTABLE[column][two][width=0.7\textwidth]

This setup doesn’t work because „two“ isn’t a valid keyword for \setupTABLE, 
you have to replace it with 2.

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
___