Re: [NTG-context] two questions on ConTeXt terminology

2014-02-04 Thread Keith J. Schultz
Hi Pablo,

Like I mentioned it depends of the paradigm one uses or to be more 
expressive: the meta level of discussion.

To All: please excuse the use of buzz words in the following.

The start/stop mechanism has a different semio-syntactic usage depending on the
context (not ConTeXt) it is used in.

It can be used for :
1) do command 

2) usage of format or element

3) set a variable as in start/stopbuffer

 This different semantic usage is somewhat unfortunate, but has the advantage 
of keeping
the instruction set(syntax) of ConTeXt simple!

The best nomenclature would be entity, but that is not easy to understand for 
the average joe and jane.

On the other side the start/stop mechanism can be seen, in terms of OO, a 
method that is applied to a object
that is passed to. This method is dynamic in that it calls other methods 
depending of the type of object passed.
So we are in the middle of the dynamic OO-programming.
If you wish it is a method that is overloaded.

Note to Hans, Wolfgang, et al: I realize that it is not implemented as above, 
but it does reflect the basic concept,
  to my knowledge and its 
usage in ConTeXt. 

Start/stop is a mechanism that is applied to an element, object, entity. 
Depending on the Enity used with it the semantics
of the mechanism is different.

So it boils down to the fact what kind of audience you are addressing and what 
level of knowledge  you expect them to have!

If you care to discuss this topic more in depth we can go off list.

regards
Keith
 

Am 03.02.2014 um 20:35 schrieb Pablo Rodriguez oi...@gmx.es:

 Hi Keith,
 
 many thanks for your explanation.
 
 I cannot see the “structural” difference ;-) between the start/stop and
 the begin/end pairs.
 
 But I think structure is fine. Structural element seems too complex to me.
 
 Many thanks for your help again,
 
 Pablo
 
 
 On 02/03/2014 10:07 AM, Keith J. Schultz wrote:
 Hi Pablo,
 
 The start/stop mechanism in ConTeXt is not easy to relate to LaTeX.
 
 As the name indicates it means start/stop doing 'something' !
 
 This something can be either equivalent to Command or Enviroment
 in LaTeX.
 
 e.g: 
 \startbuffer
 ...
 \stopbuffer
 
 starts storing things in a buffer(aka. Variable). This would be simailar
 to command as you can access the buffer with \getbuffer and \putbuffer.
 Of course one could argue that it is actually like an LaTeX environment that 
 has
 a side effect of setting a variable for later use. 
 
 On the other side you have \starttable \stoptable which one would put in the 
 realm of
 LaTeX-environments.
 
 One can practically, use the start/stop mechanism almost anything you define.
 
 
 Depending on the paradigm that you use structure (and/or) element would be 
 appropriate!
 That is is a program source the definition of a function/procedure/method is 
 a
 structure/element of the program. Structure element is not necessarily 
 reserved for
 data structures!!
 
 Just my two cents worth.
 
 Hope this helps
 
 regards
  Keith. 
 
 
 -- 
 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
 ___

___
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] Columns and clubpenalty problem

2014-02-04 Thread Thomas Floeren
Hi,

with the recent Betas, and the Current, I have a problem with columns and 
clubpenalty. In the following minimal the long item (item 1) will introduce 
a column break (instead of a simple line break):

\def \defaultclubpenalty{\plustenthousand}

\starttext
\startitemize [columns]
\item This is just a long line and should stay in the left column. 
\dorecurse{10}{\item bla bla bla}
\stopitemize
\stoptext

Older ConTeXt versions work as expected (no column break in item 1), for 
example 
Beta 2013.11.13 12:28 or Current 2013.05.28 00:36.


Thomas Floeren

___
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] two questions on ConTeXt terminology

2014-02-04 Thread Pablo Rodriguez
Hi Keith,

many thanks for your explanation.

Now I understand why start/stop in ConTeXt and begin/end in LaTeXt may
be different.

The audience I intend to address is people that can use a word
processor. The less technical the details are, the easier would be the
explanation to be understood.

Many thanks again for your help,


Pablo



On 02/04/2014 10:01 AM, Keith J. Schultz wrote:
 Hi Pablo,
 
 Like I mentioned it depends of the paradigm one uses or to be more 
 expressive: the meta level of discussion.
 
 To All: please excuse the use of buzz words in the following.
 
 The start/stop mechanism has a different semio-syntactic usage depending
 on the
 context (not ConTeXt) it is used in.
 
 It can be used for :
 1) do command 
 
 2) usage of format or element
 
 3) set a variable as in start/stopbuffer
 
  This different semantic usage is somewhat unfortunate, but has the
 advantage of keeping
 the instruction set(syntax) of ConTeXt simple!
 
 The best nomenclature would be entity, but that is not easy to
 understand for the average joe and jane.
 
 On the other side the start/stop mechanism can be seen, in terms of OO,
 a method that is applied to a object
 that is passed to. This method is dynamic in that it calls other methods
 depending of the type of object passed.
 So we are in the middle of the dynamic OO-programming.
 If you wish it is a method that is overloaded.
 
 Note to Hans, Wolfgang, et al: I realize that it is not implemented as
 above, but it does reflect the basic concept,
   to my knowledge
 and its usage in ConTeXt. 
 
 Start/stop is a mechanism that is applied to an element, object, entity.
 Depending on the Enity used with it the semantics
 of the mechanism is different.
 
 So it boils down to the fact what kind of audience you are addressing
 and what level of knowledge  you expect them to have!
 
 If you care to discuss this topic more in depth we can go off list.
 
 regards
 Keith

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


[NTG-context] draw random branched hydrocarbons

2014-02-04 Thread DesdeChaves
I wrote this code to randomly draw organic branched structures.
Since the organic structures have different dimensions I'm using the scale
function to normalize the width.
The result is a rather ugly because the structures are displayed with fonts
with different sizes.
Is there a way to normalize the structures width only when it exceeds a
certain size?

Thanks a lot

Jorge


\usemodule[chemie]
 \usemodule[fullpage][style={margin,empty},margin=15mm]

\starttext

\startluacode
context.bTABLE()
beginchemical={\\scale[width=.40\\textwidth]{\\startchemical[height=fit,width=fit,frame=off]

endchemical=\\stopchemical}}


firstC=\\chemical[ONE, Z0, SAVE][H_3C]

-- go and branch below
skeletonforBELOW={\\chemical[RESTORE,MOV1,Z0,SB153,SAVE][CH],
\\chemical[RESTORE,MOV1,Z0,SB5][CH_2]\\chemical[MOV1,Z0,SB153,SAVE][CH]}
-- 
\\chemical[RESTORE,MOV1,Z0][CH_2]\\chemical[MOV1,Z0,SB5][CH_2]\\chemical[MOV1,Z0,SB153,SAVE][CH]}

-- go and branch above
skeletonforABOVE={\\chemical[RESTORE,MOV1,Z0,SB517,SAVE][CH],
\\chemical[RESTORE,MOV1,Z0,SB5][CH_2]\\chemical[MOV1,Z0,SB517,SAVE][CH]}



-- go and not branch

skeletonnobranched={\\chemical[RESTORE,MOV1,Z0,SB5,SAVE][CH_2],
\\chemical[RESTORE, MOV1,Z0,SB5][CH_2]\\chemical[MOV1,Z0,SB5,SAVE][CH_2]}


-- last C: two ways

lastC={\\chemical[RESTORE,MOV1, Z0, SB5][CH_3],
\\chemical[RESTORE,MOV1,Z0,SB5][CH_2]\\chemical[MOV1, Z0, SB5][CH_3]}


-- branch below

branchedBELOW={\\chemical[MOV3, Z0, SB7][CH_3],
\\chemical[MOV3,Z0,SB7][CH_2]\\chemical[MOV3,Z0,SB7][CH_3],
\\chemical[MOV3,Z0,SB7][CH_2]\\chemical[MOV3,Z0,SB7][CH_2]\\chemical[MOV3,Z0,SB7][CH_3],
\\chemical[MOV3,Z0][Cl],
\\chemical[MOV3,Z0][F],\\chemical[MOV3,Z0][I]}

-- branch above

branchedABOVE={\\chemical[MOV7, Z0, SB3][CH_3],
\\chemical[MOV7,Z0,SB3][CH_2]\\chemical[MOV7,Z0,SB3][CH_3],
\\chemical[MOV7,
Z0,SB3][CH_2]\\chemical[MOV7,Z0,SB3][CH_2]\\chemical[MOV7,Z0,SB3][CH_3],
\\chemical[MOV7,Z0][Cl],
\\chemical[MOV7,Z0][F],\\chemical[MOV7,Z0][I]}

-- rows
for j=1,5 do
context.bTR()

-- columns
for i=1,2 do
context.bTD()

-- begin chemical
context(beginchemical)

-- draw the first CH3
context(firstC)

-- define the maximum for branches
for k=1,3 do

-- linear or branched
branched=math.random(1,100)30

if branched then

-- below or above
 branchedBA=math.random(1,100)30

 if branchedBA then
branch=branchedBELOW[math.random(1,6)];
skeleton=skeletonforBELOW[math.random(1,2)]
 else
branch=branchedABOVE[math.random(1,6)];
skeleton=skeletonforABOVE[math.random(1,2)]
 end
context(skeleton)
context(branch)
else

-- no branch
context(skeletonnobranched[math.random(1,2)])
end


end

-- draw the last CH3
last=lastC[math.random(1,2)]
context(last)

-- end chemical
context(endchemical)
context.eTD()
end
context.eTR()
end
context.eTABLE()

\stopluacode

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

[NTG-context] another question on simplefonts

2014-02-04 Thread Pablo Rodriguez
Hi Wolfgang,

I have the following code:

\definefontfeature[fakeslanted][slant=.25]
\definefontfamily[mainface][serif][TeX Gyre Pagella][slantedfont={*
Regular},sl=features:fakeslanted]
\setupbodyfont[mainface]
\starttext
This is {\em slanted}.
\stoptext

But I don’t know how to define slantedfont={* Regular} with the new
syntax. sl=style:tf or sl=style:regular don’t work (the italic font
is the slanted one).

Which is the right way to do it in the new version of simplefonts?

BTW, I think I should update the simplefonts article in the wiki to add
the new syntax.

After reading the font-sel.mkvi file, I have two questions:

Which are the option keys that come before a colon? I mean, taking
tf=style:bf as a sample, they would be style, file, features? Which ones
am I missing?

How about a new range preset for Hebrew?

Many thanks for your help,


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
___


Re: [NTG-context] draw random branched hydrocarbons

2014-02-04 Thread Alan BRASLAU
On Tue, 4 Feb 2014 19:55:41 +
DesdeChaves desdecha...@gmail.com wrote:

 I wrote this code to randomly draw organic branched structures.
 Since the organic structures have different dimensions I'm using the
 scale function to normalize the width. The result is a rather ugly
 because the structures are displayed with fonts with different sizes.
 Is there a way to normalize the structures width only when it exceeds
 a certain size?

Why do you normalize the width?
If you set a fixed width (rather than width=fit), then the bounding box
will be normalized whatever is the size of the chemical structure.

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

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


[NTG-context] Problem with matematics (derivative and brackets combinations) + wrong pagenumbering

2014-02-04 Thread Jaroslav Hajtmar

Hello ConTeXist.

I type some math now. When I use the symbol derivative in combination 
with symbols brackets, so the result does not look too good. Compared to 
the result in LaTeX output is almost unusable. It is possible to achieve 
a better result?


In addition, I noticed that the page numbering starts from number 2. Is 
it a bug or I wrong?


Thanx Jaroslav Hajtmar

Here is my example:

% This is LuaTeX, Version beta-0.78.2 (TeX Live 2013/W32TeX) (rev 4771)
% ConTeXt  ver: 2014.01.30 22:19 MKIV beta  fmt: 2014.1.30  int: 
english/english



\starttext

$\left(f\pm g\right)'= f'\pm g'$

\blank[big]

$\left(f\cdot g\right)'= f'\cdot g + f\cdot g'$

\blank[big]

\mathematics{\left(\frac{f}{g}\right)'=\frac{f'\cdot g - f\cdot 
g'}{g^2}}, $g\neq0$


\blank[big]

\startformula
\left(\frac{f}{g}\right)'=\frac{f'\cdot g - f\cdot g'}{g^2}
\stopformula

\blank[big]

$\left(c\cdot f\right)'=c\cdot f'$

\blank[big]

$\left[f\left(g\right)\right]'=f'(g)\cdot g'$

\blank[big]

\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] another question on simplefonts

2014-02-04 Thread Wolfgang Schuster

Am 04.02.2014 um 21:19 schrieb Pablo Rodriguez oi...@gmx.es:

 Hi Wolfgang,
 
 I have the following code:
 
 \definefontfeature[fakeslanted][slant=.25]
 \definefontfamily[mainface][serif][TeX Gyre Pagella][slantedfont={*
 Regular},sl=features:fakeslanted]
 \setupbodyfont[mainface]
 \starttext
 This is {\em slanted}.
 \stoptext
 
 But I don’t know how to define slantedfont={* Regular} with the new
 syntax. sl=style:tf or sl=style:regular don’t work (the italic font
 is the slanted one).
 
 Which is the right way to do it in the new version of simplefonts?

\definefontfeature[fakeslanted][slant=.25]

\definefontfamily[mainface][serif][TeX Gyre 
Pagella][sl={style:regular,features:{default,fakeslanted}}]

\setupbodyfont[mainface]

\starttext
This is {\em slanted}.
\stoptext

 BTW, I think I should update the simplefonts article in the wiki to add
 the new syntax.
 
 After reading the font-sel.mkvi file, I have two questions:
 
 Which are the option keys that come before a colon? I mean, taking
 tf=style:bf as a sample, they would be style, file, features? Which ones
 am I missing?

The choose a certain font/style for a alternative you can use:

- name
- file
- style
- spec

Local features can be applied with:

- features

Patches etc. from a feature will can be applied with:

- goodies

 How about a new range preset for Hebrew?

What is needed for this preset?

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] Problem with matematics (derivative and brackets combinations) + wrong pagenumbering

2014-02-04 Thread Jannik Voges
You should use ^\prime instead of '.


Jannik Voges

Am 05.02.2014 um 00:07 schrieb Jaroslav Hajtmar hajt...@gyza.cz:

 Hello ConTeXist.
 
 I type some math now. When I use the symbol derivative in combination with 
 symbols brackets, so the result does not look too good. Compared to the 
 result in LaTeX output is almost unusable. It is possible to achieve a better 
 result?
 
 In addition, I noticed that the page numbering starts from number 2. Is it a 
 bug or I wrong?
 
 Thanx Jaroslav Hajtmar
 
 Here is my example:
 
 % This is LuaTeX, Version beta-0.78.2 (TeX Live 2013/W32TeX) (rev 4771)
 % ConTeXt  ver: 2014.01.30 22:19 MKIV beta  fmt: 2014.1.30  int: 
 english/english
 
 
 \starttext
 
 $\left(f\pm g\right)'= f'\pm g'$
 
 \blank[big]
 
 $\left(f\cdot g\right)'= f'\cdot g + f\cdot g'$
 
 \blank[big]
 
 \mathematics{\left(\frac{f}{g}\right)'=\frac{f'\cdot g - f\cdot g'}{g^2}}, 
 $g\neq0$
 
 \blank[big]
 
 \startformula
\left(\frac{f}{g}\right)'=\frac{f'\cdot g - f\cdot g'}{g^2}
 \stopformula
 
 \blank[big]
 
 $\left(c\cdot f\right)'=c\cdot f'$
 
 \blank[big]
 
 $\left[f\left(g\right)\right]'=f'(g)\cdot g'$
 
 \blank[big]
 
 \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
 ___

___
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] Problem with matematics (derivative and brackets combinations) + wrong pagenumbering

2014-02-04 Thread Jaroslav Hajtmar

Hello Jannik.
Thanx. I know about ^\prime but this is the same as ^{'}.
In this case is derivative symbol too higher - but emergency it can of 
course use.
Use ^{'} or  ^{\ prime}  in LaTeX leads to equally poor results (too 
higher).


Apparently to terms with the fact that it simply will not probably be 
better :-) ...
In addition, I noticed that the broken line is too short (and it needs 
to be extended with spaces.).


Thanks Jroslav Hajtmar




Dne 5.2.2014 1:41, Jannik Voges napsal(a):

You should use ^\prime instead of '.


Jannik Voges

Am 05.02.2014 um 00:07 schrieb Jaroslav Hajtmar hajt...@gyza.cz:


Hello ConTeXist.

I type some math now. When I use the symbol derivative in combination with 
symbols brackets, so the result does not look too good. Compared to the result 
in LaTeX output is almost unusable. It is possible to achieve a better result?

In addition, I noticed that the page numbering starts from number 2. Is it a 
bug or I wrong?

Thanx Jaroslav Hajtmar

Here is my example:

% This is LuaTeX, Version beta-0.78.2 (TeX Live 2013/W32TeX) (rev 4771)
% ConTeXt  ver: 2014.01.30 22:19 MKIV beta  fmt: 2014.1.30  int: english/english


\starttext

$\left(f\pm g\right)'= f'\pm g'$

\blank[big]

$\left(f\cdot g\right)'= f'\cdot g + f\cdot g'$

\blank[big]

\mathematics{\left(\frac{f}{g}\right)'=\frac{f'\cdot g - f\cdot g'}{g^2}}, 
$g\neq0$

\blank[big]

\startformula
\left(\frac{f}{g}\right)'=\frac{f'\cdot g - f\cdot g'}{g^2}
\stopformula

\blank[big]

$\left(c\cdot f\right)'=c\cdot f'$

\blank[big]

$\left[f\left(g\right)\right]'=f'(g)\cdot g'$

\blank[big]

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

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


[NTG-context] A default editor for ConTeXt standalone?

2014-02-04 Thread Marcin Borkowski
Hi all,

just a thought.  Some time ago wise people decided to include TeXworks
into TeXlive, so that newbies installing TeXlive can get a
batteries-included package (not having to choose/install an editor).
Would it be (a) reasonable and (b) not too much time-consuming to do a
similar move with ConTeXt standalone?  I'm not saying it would have to
be TeXworks (or my beloved Emacs, for that matter;)).  I am aware that
this is an additional work to maintain etc., and I'm probably not
capable of doing it myself, but...

What do you think?

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___