Re: [NTG-context] ConTeXt on the Mac (TexShop). Problem of a newbie

2013-01-10 Thread Meigen, Thomas
Hello Sietse,

thank you for your proposal.
I guess that there is not a lack of options here.

However, my problem may be simpler than I had described in the
first place. I am not so much concerned with using a specific
slide layout (be it s-pre-05 or some fancy simple- or complexslide
layout), but whether I want to use ConTeXt at all...

... and as life is already complicated enough ;-), my decision
has more to do with usability and reliability than with the number
of options. I am a software developer for more than 20 years now,
so I know very well how easy it is to implement some
bug in recently updated XYZ code as Hans had diagnosed my
problem. But would it be possible to use ConTeXt without
having to care about bugs in updated code or broken links
between different modules...?

So before turning to additional modules with additional questions like...

- if I use simple- or complexslide , do I need to install the 
visualcounter-module before?
- if so, is there a clear documentation of the required modules?

... I wanted to see whether a rather simple example without
any additional module would work out of the box.
Well, it did partially... ;-)

Best wishes
Thomas

Am 09.01.2013 um 17:01 schrieb Sietse Brouwer:

Hello Thomas,

Just to widen your options a bit: I have greatly enjoyed using the
\complexslides module by Aditya (and co?). I've attached an example
document, which shows inter alia how easy it is to override a design
component. (The fontscheme, in this case.)

Cheers,

Sietse
presentation-hand.pdfcomplexslides-fontscheme-sietse.tex


PD Dr. rer. nat. Thomas Meigen
Univ.-Augenklinik Würzburg
Josef-Schneider-Str. 11
97080 Würzburg

Tel. +49-(0)931-201-20437
Fax +49-(0)931-201-20430
Email: 
t.mei...@augenklinik.uni-wuerzburg.demailto:t.mei...@augenklinik.uni-wuerzburg.de

___
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] Installing beta.

2013-01-10 Thread Hans Hagen

On 1/10/2013 3:03 AM, Mojca Miklavec wrote:

On Thu, Jan 10, 2013 at 2:39 AM, Andreas Mang wrote:

Hi André Caldas,

I suppose this helps: http://wiki.contextgarden.net/ConTeXt_Standalone

fetch first-setup.sh, put it to a folder of your liking (e.g. 
/usr/local/contextBETA) and do something like

sh ./first-setup.sh --context=current


Actually --context=beta (which is default) will get you the beta version.

Currently the current version might have problems due to LuaTeX 0.74
being incompatible with the older (= current) version of ConTeXt.


it depends, on my machine it ran ok with 0.72 (which was used for the 
performance tests)


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] ConTeXt on the Mac (TexShop). Problem of a newbie

2013-01-10 Thread Hans Hagen

On 1/10/2013 9:13 AM, Meigen, Thomas wrote:


 and as life is already complicated enough ;-), my decision
has more to do with usability and reliability than with the number
of options. I am a software developer for more than 20 years now,
so I know very well how easy it is to implement some
bug in recently updated XYZ code as Hans had diagnosed my
problem. But would it be possible to use ConTeXt without
having to care about bugs in updated code or broken links
between different modules...?


some of the presentation styles started out a experiments and therefore 
can have code that should be adapted if experiments have turned feature


anyhow, the transition from mkii to mkiv involves rewrites and therefore 
there can be issues but normally they're fixed rather fast; also, 
updating is easy (just run first-setup again); it's the price we pay for 
using luatex, which is evolving



So before turning to additional modules with additional questions like...

- if I use simple- or complexslide , do I need to install the 
visualcounter-module before?
- if so, is there a clear documentation of the required modules?

 I wanted to see whether a rather simple example without
any additional module would work out of the box.
Well, it did partially... ;-)


you only need modules for special kind of functionality or rendering 
(like presentations) although one can make presentations without extra 
modules (just set the papersize to S6 or so)


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] ConTeXt on the Mac (TexShop). Problem of a newbie

2013-01-10 Thread Keith J. Schultz
Hi Thomas,

In your original post you stated that stated that you have be using LaTeX for 
your work.
That would suggest to me that you are not proficient with TeX proper. ConTeXt 
runs, in my
opinion, along the lines of TeX proper. That is you need intimate knowledge of 
TeX. Furthermore,
you need a good background in ConTeXt and its use of Lua. 
These facts would have me advise you to not use ConTeXt.

Furthermore ConTeXt is a moving target. That is, it is still in development. At 
least you can 
compare it to the early days of LaTeX2e.  Things change fast, especially if you 
use the standalone,
even though it is probably the best option.

do not get me wrong ConTeXt is powerful and usable, but you really need to know 
what
you are doing and what the modules really do.

I assume I am in a similar position as you I prefer a LaTeX approach. Though 
ConText is
quite advanced and interesting, it is too TeXian for me. I follow this list 
because I am
interested to and using Lua(La)TeX. (Please ConTeXt group disregard my somewhat 
negative
opinion of ConTeXt, just is not my cup of tee!)

I noticed that you are using a MacBook Pro with OSX 10.6. My suggestion would 
be to use
MacTeX and TeXLive 2012. It is most likely to give you more mileage. 

Furthermore try out LuaLaTeX. It gives you the advantage of using what you know 
and
you can use Lua for doing things that are not that easy to do with LaTeX alone. 
Once you are
comfortable with LuaLaTeX or LuaTeX then you may want to switch to ConTeXt.

As a side note I am using a mid 2009 MacBook Pro 17 with OSX 10.8.2 and 
MacTeX/TeXLive 2012.

Hope this helps.

regards
Keith


Am 10.01.2013 um 09:13 schrieb Meigen, Thomas 
t.mei...@augenklinik.uni-wuerzburg.de:

 Hello Sietse,
 
 thank you for your proposal.
 I guess that there is not a lack of options here.
 
 However, my problem may be simpler than I had described in the
 first place. I am not so much concerned with using a specific
 slide layout (be it s-pre-05 or some fancy simple- or complexslide
 layout), but whether I want to use ConTeXt at all...
 

___
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] ConTeXt on the Mac (TexShop). Problem of a newbie

2013-01-10 Thread Keith J. Schultz
Hi Hans,

I am kind of confused about the relationship between luatex and ConTeXt.

The way I read the wikis and web sites luatex and ConTeXt are basically two
different animals. They have a common core, but two different code bases, where
the ConTeXt group doing most the work advancing the Lua code base and those
changes integrated into the LuaTeX side. 

Your statements below would suggest things are the other way around!?

Would your care to elaborate or anybody else for that matter if this request is 
not
to OT.

Thanx in advance.

regards
Keith.
 
Am 10.01.2013 um 10:11 schrieb Hans Hagen pra...@wxs.nl:

 [snip, snip]
 some of the presentation styles started out a experiments and therefore can 
 have code that should be adapted if experiments have turned feature
 
 anyhow, the transition from mkii to mkiv involves rewrites and therefore 
 there can be issues but normally they're fixed rather fast; also, updating is 
 easy (just run first-setup again); it's the price we pay for using luatex, 
 which is evolving
 

___
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] ConTeXt on the Mac (TexShop). Problem of a newbie

2013-01-10 Thread Martin Schröder
2013/1/10 Keith J. Schultz keithjschu...@web.de:
 I am kind of confused about the relationship between luatex and ConTeXt.

http://www.tug.org/levels.html

ConTeXt MkIV needs LuaTeX.

Best
   Martin
___
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] ConTeXt on the Mac (TexShop). Problem of a newbie

2013-01-10 Thread Aditya Mahajan

On Thu, 10 Jan 2013, Hans Hagen wrote:

you only need modules for special kind of functionality or rendering (like 
presentations) although one can make presentations without extra modules 
(just set the papersize to S6 or so)


I created an example to show how to create basic slides from scratch.

https://github.com/adityam/context-slides-example/commits/master

The first commit starts with a basic skeleton document, Each additional 
commit adds new functionality (pagesetup, layout, fonts, heads, style, 
bullets) and shows how to incrementally add features to a style. When I 
get the time, I'll add code to show how to create a titlepage etc.


Basically, you don't need any modules for slides as creating your own 
style is relatively simple


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] Metafun textext()

2013-01-10 Thread Alan BRASLAU
Metafun textext() has been changed in an attempt to be more efficient. However, 
this has a side effet that it now handles colors differently, among other 
things. The following example, intended to cause difficulties for the color 
blind, no longer works. Is this a bug or a feature?

\starttext
\startMPcode
picture T ;
T := thelabel(textext(I'm seeing double),origin) ;

draw T withcolor green ;
draw T shifted (-1mm,1mm) withcolor blue ;
\stopMPcode
\stoptext

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
___


Re: [NTG-context] Metafun textext()

2013-01-10 Thread Aditya Mahajan

On Thu, 10 Jan 2013, Alan BRASLAU wrote:

Metafun textext() has been changed in an attempt to be more efficient. 
However, this has a side effet that it now handles colors differently, 
among other things. The following example, intended to cause 
difficulties for the color blind, no longer works. Is this a bug or a 
feature?


\starttext
\startMPcode
picture T ;
T := thelabel(textext(I'm seeing double),origin) ;

draw T withcolor green ;
draw T shifted (-1mm,1mm) withcolor blue ;
\stopMPcode
\stoptext


Since the beginning of MkIV, colors in metapost labels need to be set at 
the ConTeXt end (Untested):


T := thelabel(textext(\color[blue]{I'm seeing double}), origin);

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
___


Re: [NTG-context] ConTeXt on the Mac (TexShop). Problem of a newbie

2013-01-10 Thread Hans Hagen

On 1/10/2013 12:19 PM, Martin Schröder wrote:

2013/1/10 Keith J. Schultz keithjschu...@web.de:

I am kind of confused about the relationship between luatex and ConTeXt.


http://www.tug.org/levels.html

ConTeXt MkIV needs LuaTeX.


That's a somewhat confusing description.

(1) Context is just a format, so it should be mentioned as format.

(2) We call all instances context, i.e. we don't combine engine names 
with 'context' so there is no 'pdfcontext', although one could do that.


(3) As there are language dependent user interfaces, we have more 
formats (cont-en, cont-nl, ...).


(4) We use a management script to run the engine with the context 
format. Reasons for this are: we need to manage multiple runs, we might 
need to call intermediate programs (in mkii for instance we need to sort 
indices).


(5) This also permits us to present to user with an engine independent 
call to context. In mkii we had 'texexec' (on top of a more generic 
script manager called texmfstart), in mkiv we have 'context' (and again 
a script manager called mtxrun).


Now, to come to luatex: this project is quite related to context as it 
all started in the context community. We also use context for testing 
and exploring new functionality. For this we use mkiv/mkvi which is a 
rewrite of context using the full potential of luatex so that we can go 
beyond what traditional tex engines can do. We explicitly have chosen 
for a lua + tex combination so that we don't have to hardcode solutions 
in the engine (macro packages have too many conflicting demands anyway) 
and are more future proof.


Given that mkii is frozen, and given that type1 fonts are sort of 
obsolete (context has always been an early adopter of lm and gyre 
fonts), and given that utf is the way to go (so no messing with input 
and font encodings any more), and given some more reasons, in practice 
users will no longer use pdftex and/or xetex but luatex. In that sense 
context depends on luatex and also keep the development of that engine 
going.


The philosophy of context is that by having most functionality in the 
core, users can rather easy create their own styles (the average style 
has not that many lines anyway). I'm always sort of puzzled when I see 
remarks that context is close to plain, as I cannot see where that 
conclusion comes from. The whole reason that context exists is that I 
didn't want to hack around in low level style files and deal with funny 
commands having @ in their names.


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] ConTeXt on the Mac (TexShop). Problem of a newbie

2013-01-10 Thread Hans Hagen

On 1/10/2013 11:47 AM, Keith J. Schultz wrote:


I am kind of confused about the relationship between luatex and ConTeXt.

The way I read the wikis and web sites luatex and ConTeXt are basically two
different animals. They have a common core, but two different code bases, where
the ConTeXt group doing most the work advancing the Lua code base and those
changes integrated into the LuaTeX side.


The context lua code base is independent and not part of luatex. 
However, the font related code (opentype stuff) is writen in such a way 
that it can be used in plain and latex. I could probably write much of 
the context lua code so that it can be shared and seen as an extensions 
but it will never pay of.


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] Node for startbuffer.

2013-01-10 Thread Andre Caldas
 How do I identify a specific node? Like...
 [...]

 Here is a start. I've added the markers code to the beta so that we
 have an abstract way to deal with such matters.
 [...]
 \hbox \boxmarker{mymarker}{2}

Can't the mark be a string?


André Caldas.
___
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] hbar (and probably some other symbols) doesn't work in latest beta

2013-01-10 Thread Michael Murphy
Well actually the last remark makes sense: I should have done
\let\hbar\hslash


On 8 January 2013 19:37, Michael Murphy murphy...@gmail.com wrote:

 Hi all,

 thanks for your responses.

 @Hans: yes, hbar is extremely common in quantum physics, in fact I'd go as
 far to say as ubiquitous. It might be considered strange that the glyph
 doesn't exist, but it's actually defined in TeX as a ligature:

 \def\hbar{{\mathchar'26\mkern-9muh}

 I tried defining this but it doesn't work: I still get nothing.

 As it happens, \hslash seems to work fine, and in my opinion is a suitable
 substitute so I will just

 \def\hbar\hslash

 (although actually that didn't work, I had to do \def\hbar{\hslash} for
 some reason or I got an error in some tikz code I wrote).

 Michael

 --
 Michael Murphy
 murphy...@gmail.com


 On Saturday, 5 January 2013 at 04:49, Khaled Hosny wrote:

  On Sat, Jan 05, 2013 at 02:10:50AM +0100, Hans Hagen wrote:
  
   It looks like hbar (LATIN SMALL LETTER H WITH STROKE 0x127) is not
   in the math fonts.
 
 
 
  \hbar should be a glyph variant of \hslash (U+0210F), according to STIX
  people, if the font provides such a variant.
 
  Regards,
  Khaled
 
 ___
  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] Node for startbuffer.

2013-01-10 Thread Hans Hagen

On 1/10/2013 1:18 PM, Andre Caldas wrote:

How do I identify a specific node? Like...
[...]


Here is a start. I've added the markers code to the beta so that we
have an abstract way to deal with such matters.
[...]
\hbox \boxmarker{mymarker}{2}


Can't the mark be a string?


currently not (not hard to implement, but no time now).

-
  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] Metafun textext()

2013-01-10 Thread Alan BRASLAU
On Thu, 10 Jan 2013 06:51:50 -0500
Aditya Mahajan adit...@umich.edu wrote:

 Since the beginning of MkIV, colors in metapost labels need to be set at 
 the ConTeXt end (Untested):
 
 T := thelabel(textext(\color[blue]{I'm seeing double}), origin);
 
 Aditya

I don't believe that this is true, but I am most likely wrong.
Indeed \blue text has worked, but 'draw T withcolor blue;' *should* work as 
well.
The processing of textext() has changed recently, it seems.

\startMPcode
label(textext(I'm seeing double),origin) withcolor green ;
label(textext(I'm seeing double),(-1mm,1mm)) withcolor blue ;
\stopMPcode

DOES work.

Of course, these are much simplified minimal examples of what I would like to 
do.

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
___


Re: [NTG-context] ConTeXt on the Mac (TexShop). Problem of a newbie

2013-01-10 Thread Aditya Mahajan

On Thu, 10 Jan 2013, Aditya Mahajan wrote:


On Thu, 10 Jan 2013, Hans Hagen wrote:

you only need modules for special kind of functionality or rendering (like 
presentations) although one can make presentations without extra modules 
(just set the papersize to S6 or so)


I created an example to show how to create basic slides from scratch.

https://github.com/adityam/context-slides-example/commits/master

The first commit starts with a basic skeleton document, Each additional 
commit adds new functionality (pagesetup, layout, fonts, heads, style, 
bullets) and shows how to incrementally add features to a style. When I get 
the time, I'll add code to show how to create a titlepage etc.


Basically, you don't need any modules for slides as creating your own style 
is relatively simple


Added the code for creating titlepage as well. See the complete example 
at:


https://github.com/adityam/context-slides-example/blame/master/slides.tex

Thus, one can get a completely functional presentation style by just 
tweaking around 10 setups. The only non-trivial part of this setup is


\unprotect
\c_strc_itemgroups_spacing_mode\plusone
\protect

which is needed to get the correct vertical spacing around the second 
level of itemizations.


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
___


Re: [NTG-context] Metafun textext()

2013-01-10 Thread Mojca Miklavec
On Thu, Jan 10, 2013 at 2:01 PM, Alan BRASLAU wrote:
 On Thu, 10 Jan 2013 06:51:50 -0500
 Aditya Mahajan wrote:

 Since the beginning of MkIV, colors in metapost labels need to be set at
 the ConTeXt end (Untested):

 T := thelabel(textext(\color[blue]{I'm seeing double}), origin);

 Aditya

 I don't believe that this is true, but I am most likely wrong.

Based on a snippet from mp-gnuplot (and agreeing with your point of
view that it would be nice if it worked without the extra hassle) I
tend to agree with Aditya (and I seem to remember that Hans
implemented \colored[r=...,g=...,b=...] command exactly when this
became a problem):

  % Returns an image with colored text according to current color
  % This only makes sense for mkiv text. Mkii is handled with \sometxt
  % and colors are working properly there. /.../
  vardef gp_colored_mkiv_text(expr str) =

% since withcolor doesn't work any more, we need to provide a workaround.
save r, g, b;
r = redpart   gp_color_current;
g = greenpart gp_color_current;
b = bluepart  gp_color_current;

rawtextext(\colored[r=  decimal(r)  ,g=  decimal(g)  ,b=
 decimal(b)  ]{  str  })
  enddef;

Mojca
___
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] Metafun textext()

2013-01-10 Thread Aditya Mahajan

On Thu, 10 Jan 2013, Alan BRASLAU wrote:


On Thu, 10 Jan 2013 06:51:50 -0500
Aditya Mahajan adit...@umich.edu wrote:


Since the beginning of MkIV, colors in metapost labels need to be set at
the ConTeXt end (Untested):

T := thelabel(textext(\color[blue]{I'm seeing double}), origin);

Aditya


I don't believe that this is true, but I am most likely wrong.


Well, I think it was true in the beginning (as I remember a discussion 
from Mojca on how to handle labels differently in the gnuplot module), 
but clearly that is not the case now.



Indeed \blue text has worked, but 'draw T withcolor blue;' *should* work as 
well.
The processing of textext() has changed recently, it seems.

\startMPcode
label(textext(I'm seeing double),origin) withcolor green ;
label(textext(I'm seeing double),(-1mm,1mm)) withcolor blue ;
\stopMPcode

DOES work.

Of course, these are much simplified minimal examples of what I would like to 
do.


Minimal example to show what is happening:

\startbuffer[initialize]
  picture T;
  T := textext(Hello);

  picture Q;
  Q := T;
\stopbuffer

\startbuffer[T]
  draw T withcolor blue;
\stopbuffer

\startbuffer[Q]
  draw Q shifted (-1mm, 1mm) withcolor red;
\stopbuffer

\startlines
Only draw T: \processMPbuffer[initialize,T]
Only draw Q: \processMPbuffer[initialize,Q]
Draw T  Q : \processMPbuffer[initialize,T,Q]
Draw Q  T : \processMPbuffer[initialize,Q,T]
\stoplines

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] [luat-env.lua] typo in function loadluafile()

2013-01-10 Thread Philipp Gesang
Hi Hans,

this revision introduced a typo in luat-env.lua:

  
http://repo.or.cz/w/context.git/commitdiff/31c8bf0930a6d3e353a552d6bab71f62bc25f34e

Patch appended.

Regards
Philipp

--- /tmp/ctx/luat-env.lua   2013-01-10 14:26:37.561102331 +0100
+++ luat-env.lua2013-01-10 14:33:08.292726460 +0100
@@ -335,8 +335,8 @@
 local lucname, luaname, chunk
 local basename = file.removesuffix(filename)
 if basename == filename then
-luaname = fiule.addsuffix(basename,luasuffixes.lua)
-lucname = fiule.addsuffix(basename,luasuffixes.luc)
+luaname = file.addsuffix(basename,luasuffixes.lua)
+lucname = file.addsuffix(basename,luasuffixes.luc)
 else
 luaname = basename -- forced suffix
 lucname = nil


pgpA6ZEjktpnv.pgp
Description: PGP signature
___
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] ConTeXt on the Mac (TexShop). Problem of a newbie

2013-01-10 Thread Pavneet Arora

Thanks Aditya!

This is tremendously helpful for all of us who use ConTeXt to do our slides.

Regards.



--

Message: 2
Date: Thu, 10 Jan 2013 06:22:47 -0500 (EST)
From: Aditya Mahajan adit...@umich.edu
To: mailing list for ConTeXt users ntg-context@ntg.nl
Subject: Re: [NTG-context] ConTeXt on the Mac (TexShop). Problem of a
newbie
Message-ID: alpine.DEB.2.02.1301100615390.5047@nqv-guvaxcnq
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

On Thu, 10 Jan 2013, Hans Hagen wrote:


you only need modules for special kind of functionality or rendering (like
presentations) although one can make presentations without extra modules
(just set the papersize to S6 or so)


I created an example to show how to create basic slides from scratch.

https://github.com/adityam/context-slides-example/commits/master

The first commit starts with a basic skeleton document, Each additional
commit adds new functionality (pagesetup, layout, fonts, heads, style,
bullets) and shows how to incrementally add features to a style. When I
get the time, I'll add code to show how to create a titlepage etc.

Basically, you don't need any modules for slides as creating your own
style is relatively simple

Aditya




--
-
- Pavneet Arora

Waroc Fine Audio + Custom Home Cinema
www.waroc.com  416.937.WAROC (9276)

___
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] ConTeXt on the Mac (TexShop). Problem of a newbie

2013-01-10 Thread Pavneet Arora

Hans,

This is a most lucid explanation.  I have been waiting for this myself.

To quote the great American philosopher, Corporal Radar O'Reilly, from the 
television show of the 1970s, M*A*S*H:


Ah, Bark! [He was instructed to say Ah, Baaah! by Hawkeye Pierce]

I apologise in advance for this most peculiar and culturally specific bit of 
history.


Regards.



--

Message: 5
Date: Thu, 10 Jan 2013 12:58:43 +0100
From: Hans Hagen pra...@wxs.nl
To: mailing list for ConTeXt users ntg-context@ntg.nl
Subject: Re: [NTG-context] ConTeXt on the Mac (TexShop). Problem of a
newbie
Message-ID: 50eeacf3.9040...@wxs.nl
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 1/10/2013 12:19 PM, Martin Schr?der wrote:

2013/1/10 Keith J. Schultz keithjschu...@web.de:

I am kind of confused about the relationship between luatex and ConTeXt.


http://www.tug.org/levels.html

ConTeXt MkIV needs LuaTeX.


That's a somewhat confusing description.

(1) Context is just a format, so it should be mentioned as format.

(2) We call all instances context, i.e. we don't combine engine names
with 'context' so there is no 'pdfcontext', although one could do that.

(3) As there are language dependent user interfaces, we have more
formats (cont-en, cont-nl, ...).

(4) We use a management script to run the engine with the context
format. Reasons for this are: we need to manage multiple runs, we might
need to call intermediate programs (in mkii for instance we need to sort
indices).

(5) This also permits us to present to user with an engine independent
call to context. In mkii we had 'texexec' (on top of a more generic
script manager called texmfstart), in mkiv we have 'context' (and again
a script manager called mtxrun).

Now, to come to luatex: this project is quite related to context as it
all started in the context community. We also use context for testing
and exploring new functionality. For this we use mkiv/mkvi which is a
rewrite of context using the full potential of luatex so that we can go
beyond what traditional tex engines can do. We explicitly have chosen
for a lua + tex combination so that we don't have to hardcode solutions
in the engine (macro packages have too many conflicting demands anyway)
and are more future proof.

Given that mkii is frozen, and given that type1 fonts are sort of
obsolete (context has always been an early adopter of lm and gyre
fonts), and given that utf is the way to go (so no messing with input
and font encodings any more), and given some more reasons, in practice
users will no longer use pdftex and/or xetex but luatex. In that sense
context depends on luatex and also keep the development of that engine
going.

The philosophy of context is that by having most functionality in the
core, users can rather easy create their own styles (the average style
has not that many lines anyway). I'm always sort of puzzled when I see
remarks that context is close to plain, as I cannot see where that
conclusion comes from. The whole reason that context exists is that I
didn't want to hack around in low level style files and deal with funny
commands having @ in their names.

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
-




--
-
- Pavneet Arora

Waroc Fine Audio + Custom Home Cinema
www.waroc.com  416.937.WAROC (9276)

___
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] Metapost nodes.

2013-01-10 Thread Andre Caldas
Hello!

1. How does a metapost figure (\startMPcode) becomes a node?
2. When does it become a node?
3. What type of node it becomes?
4. Can I change its attributes?
5. Can I change its colors or transparency levels?


André Caldas.
___
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] Metapost nodes.

2013-01-10 Thread Hans Hagen

On 1/10/2013 5:15 PM, Andre Caldas wrote:

Hello!

1. How does a metapost figure (\startMPcode) becomes a node?


never, that is: it's turned into whatsit nodes with pdf operators and 
mixed with regular nodes when text is used



2. When does it become a node?


sometime in the mp converter


3. What type of node it becomes?


whatsits mixed with regular (for text)


4. Can I change its attributes?


whatsits can of course have attributes but as the content is arbitrary 
pdf these attributes don't play a role



5. Can I change its colors or transparency levels?


only by parsing the content or by hooking code into the converter or 
(better and more robust) by just applying color or transparency at the 
mp level


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] Place an annotation before it is defined

2013-01-10 Thread Wolfgang Schuster

Am 07.01.2013 um 23:20 schrieb Marco Patzer home...@lavabit.com:

 On 2013–01–07 Wolfgang Schuster wrote:
 
 Blocks, in contrast to buffers, seem to be able to place content
 before it is defined. I did not check how they work, but since I
 didn't see any temporary files, the only possibility is to write the
 data to the tuc file, I assume. It is by any chance possible to
 provide a “method=block”?
 
 Yes, blocks are stored in the tux-file while buffers are only stored in 
 memory.
 
 I played for a while with \setdataset to store the content but dropped it 
 because
 it required multiple runs and especially in the first run the output would 
 be always
 wrong
 
 That's no problem IMO. Two-pass data is always wrong the first run.
 In the worst case, it needs an additional run if text moves around
 too much. But since it's just another method, which is optional,
 this only applies if it's activated and then the user knows what
 he/she is doing and that it might be slower.
 
 I can consider it as a optional method.
 
 I think it would be a nice feature. It enables placement of elements
 where they logically belong, instead of where they are supposed to
 be printed. It's nothing mission critical though, but you can keep
 it in mind for a rainy afternoon.

You can try the beta from my bitbucket site [0] which uses a two mechanism
for named buffers (\startannotation[NAME] … \stopannotation) which can
be accessed with \getannotation[NAME].

[0] https://bitbucket.org/wolfs/annotation/src

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] Metafun textext()

2013-01-10 Thread Hans Hagen

On 1/10/2013 2:18 PM, Aditya Mahajan wrote:

On Thu, 10 Jan 2013, Alan BRASLAU wrote:


On Thu, 10 Jan 2013 06:51:50 -0500
Aditya Mahajan adit...@umich.edu wrote:


Since the beginning of MkIV, colors in metapost labels need to be set at
the ConTeXt end (Untested):

T := thelabel(textext(\color[blue]{I'm seeing double}), origin);

Aditya


I don't believe that this is true, but I am most likely wrong.


Well, I think it was true in the beginning (as I remember a discussion
from Mojca on how to handle labels differently in the gnuplot module),
but clearly that is not the case now.


Indeed \blue text has worked, but 'draw T withcolor blue;' *should*
work as well.
The processing of textext() has changed recently, it seems.


The mkiv implementation has always been rather different from the mkii 
one: text handling as well as dealing with colors.



\startMPcode
label(textext(I'm seeing double),origin) withcolor green ;
label(textext(I'm seeing double),(-1mm,1mm)) withcolor blue ;
\stopMPcode

DOES work.

Of course, these are much simplified minimal examples of what I would
like to do.


Minimal example to show what is happening:

\startbuffer[initialize]
   picture T;
   T := textext(Hello);

   picture Q;
   Q := T;
\stopbuffer

\startbuffer[T]
   draw T withcolor blue;
\stopbuffer

\startbuffer[Q]
   draw Q shifted (-1mm, 1mm) withcolor red;
\stopbuffer

\startlines
Only draw T: \processMPbuffer[initialize,T]
Only draw Q: \processMPbuffer[initialize,Q]
Draw T  Q : \processMPbuffer[initialize,T,Q]
Draw Q  T : \processMPbuffer[initialize,Q,T]
\stoplines


You and Alan can pick up the beta from the ftp server and play with this:

\setupbodyfont[dejavu]

\starttext

\startMPpage[offset=10pt]

picture MyText ; MyText := textext(Dummy) ; % not used later on

picture MyText ; MyText := textext(\red Red) ;

draw MyText ;

draw MyText scaled 2 shifted (0,-1cm) ;

draw MyText scaled 3 shifted (0,-2cm) ;

picture MyText ; MyText := textext(Blue Green Red) ;

draw MyText rotatedaround(center MyText,10) shifted (0,-3cm) 
withcolor blue ;


draw MyText shifted (0,-4cm) withcolor green ;

draw MyText rotatedaround(center MyText,-10) shifted (0,-5cm) 
withcolor red ;


picture MyText ; MyText := image (
draw textext(Green Red Blue {\yellow YELLOW} Whatever 1) ;
draw textext(Green Red Blue {\yellow YELLOW} Whatever 2) 
shifted (10cm,0) ;

) ;

draw MyText shifted (0,-6cm) withcolor green ;

draw MyText shifted (0,-7cm) withcolor red ;

draw MyText shifted (0,-8cm) withcolor blue ;

\stopMPpage

\stoptext

The complication is that we reuse a picture which once defined has 
frozen properties. However, after hours of lua/tex juggling I managed to 
made a variant that better keeps track of applied colors. I'm not sure 
if this is foolproof but it's probably quite ok for what Alan wants to 
do. Although ... being a scientist he will look for the next frontier 
... (or even more scientific: try to prove me wrong).


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
-


textext-002.pdf
Description: Adobe PDF 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
___