Re: [NTG-context] mkiv and MetaPost

2009-01-14 Thread Otared Kavian


On 14 janv. 09, at 08:57, Taco Hoekwater wrote:


Otared Kavian wrote:
Thanks Aditya for your explanation, but I must say that it is not  
convincing because with mkiv one of the buffers is processed with  
\processMPbuffer, while the other is not… So there must be some  
other hidden behaviour which has changed between mkii and mkiv.


I will leave it for Hans to figure what exactly goes wrong, but the  
problem is caused by the comment characters in the axes-1 buffer.


Best wishes,
Taco


Hi Taco,

Thanks for finding the problem: indeed as you point out, in the  
minimal example which I reproduce below, one sees that the comment  
character

%
in the \startbuffer[axes-2] part is not interpreted correctly in mkiv:  
if one puts that character at the end of last line of the buffer the  
ouput is correct, while if one puts it at the end of other lines the  
result is undefined.


So for the file I have to typeset right now, I'll remove those nasty  
%, but I hope that the problem will be solved in mkiv…
By the way, in one of your messages some time ago you said that there  
is a command

\luatexversion
but it doesn't exist on my installation: is it removed or I understod  
wrong?


Best wishes: OK

% bug-metapost-1.tex
%!TEX TS-program = mkiv
\setupcolors[state=start]

\starttext

\startbuffer[axes-1]
numeric u ; u := .5cm ;
path xox ; xox := (-u,0)--(8u,0) ;
path yoy ; yoy := (0,-u)--(0,7u) ;
draw xox withcolor blue ;
draw yoy withcolor blue ;
\stopbuffer

\startbuffer[axes-2]
numeric u ; u := .5cm ;
path xox ; xox := (-u,0)--(8u,0) ;
path yoy ; yoy := (0,-u)--(0,7u) ;
draw xox withcolor blue ; % -- here is the problem
draw yoy withcolor blue ;
\stopbuffer

This file has been typeset
on \currentdate{}
at \currenttime,
with
\doifmodeelse{mkiv}
{mkiv,
LuaTeX revision \luatexrevision,
(LuaTeX date stamp \luatexdatestamp)}
{mkii,
using the command:
\type{texexec basic-test.tex}},
ConTeXt version \contextversion.
% LuaTeX version \luatexversion,

\blank[2*big]

This MetaPost graphic is shown correctly with mkiv:
\placefigure[middle][-]{}{\processMPbuffer[axes-1]} {}

\blank
but not this one
\placefigure[middle][-]{}{\processMPbuffer[axes-2]} {}

\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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] mkiv and MetaPost

2009-01-14 Thread Taco Hoekwater


Otared Kavian wrote:
 
 By the way, in one of your messages some time ago you said that there is
 a command
 \luatexversion
 but it doesn't exist on my installation: is it removed or I understod
 wrong?

Try \the\luatexversion, and \luatexrevision.

Best wishes,
Taco


___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] mkiv and MetaPost

2009-01-14 Thread Otared Kavian


On 14 janv. 09, at 09:31, Taco Hoekwater wrote:




Otared Kavian wrote:


By the way, in one of your messages some time ago you said that  
there is

a command
   \luatexversion
but it doesn't exist on my installation: is it removed or I understod
wrong?


Try \the\luatexversion, and \luatexrevision.

Best wishes,
Taco



Thanks! This works…

Best wishes: OK
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Fourier in ConTeXt (was Fonts readily available in Context)

2009-01-14 Thread Mikael Persson
Hi,

I am starting a new thread about this:

Is there really support for fourier in current ConTeXt? I've not been
able to get it
working since long time ago. I get utopia text working, but not
fourier math. See the previous threads:
http://archive.contextgarden.net/message/20070830.154143.005528b8.en.html
and
http://archive.contextgarden.net/message/20080928.193441.874bb515.en.html

1) Can anyone explain to me why these fonts are not working at the moment?
2) Is there any plan on fixing this issue?
3) If there is anything I (as a simple user) can do, please tell me.

Kindest regards, Mikael
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] mkiv and MetaPost

2009-01-14 Thread Otared Kavian


On 14 janv. 09, at 11:30, Hans Hagen wrote:


Hans Hagen wrote:

Otared Kavian wrote:
I will leave it for Hans to figure what exactly goes wrong, but  
the problem is caused by the comment characters in the axes-1  
buffer.

core-buf.lua: line 253
   return concat(t,separator or \n) -- \n is safer due to  
comments and such

(easier fix than passing \\n in meta-ini.mkiv


there was some more involved, i'll upload a fixed beta

Hans



Thanks… because the fisrst fix implied some unknown reaction when  
compiling again and did not solve the problem.


Best regards: OK
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Fourier in ConTeXt (was Fonts readily available in Context)

2009-01-14 Thread Mojca Miklavec
On Wed, Jan 14, 2009 at 9:50 AM, Mikael Persson wrote:
 Hi,

 I am starting a new thread about this:

 Is there really support for fourier in current ConTeXt? I've not been
 able to get it
 working since long time ago. I get utopia text working, but not
 fourier math. See the previous threads:
 http://archive.contextgarden.net/message/20070830.154143.005528b8.en.html
 and
 http://archive.contextgarden.net/message/20080928.193441.874bb515.en.html

 1) Can anyone explain to me why these fonts are not working at the moment?
 2) Is there any plan on fixing this issue?
 3) If there is anything I (as a simple user) can do, please tell me.

 Kindest regards, Mikael

Hello Mikael,

I did all kinds of experiments, so I'm not sure if it will work for
you, but it did work for me. Can you try to put this on top of your
document?

\startmathcollection[default]
\definemathsymbol [rbrace][close]   [sy] [67] [ex] [AA]
\definemathsymbol [lbrace][open][sy] [66] [ex] [A9]
\stopmathcollection

It seems that mathcollection[fou] is not loaded properly, so the
definitions from math-fou.tex are ignored.

Mojca

PS: fourier is not in minimals. At least not yet.
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Fourier in ConTeXt (was Fonts readily available in Context)

2009-01-14 Thread Mojca Miklavec
On Wed, Jan 14, 2009 at 1:57 PM, Mikael Persson wrote:

 Hi Mojca,

 thank you for your answer. Now it actually works with these braces. I
 tried to do the same to get \hat working. Adding

  \definemathsymbol [hat]  [accent] [mr] [2]

 (inside \startmahtcollection[default] \stopmathcollection) from
 math-fou.tex, however $\hat{f}$ now gives f without a hat. Do I
 missunderstand something?

 However, it would be nice to get these math-fou.tex working.

I agree with that, but fonts have always been something that I hated
most in TeX :) :) :)
Does anyone else have an idea about that? I'm almost sure that the
same problem happened to lucida or some other math font, but I don't
remember which one.

 I read from the LaTeX file fourier.sty the line
 \DeclareMathAccent{\hat}{\mathalpha}{operators}{2}
 but I'm not sure howto translate that into ConTeXt code, the naive

  \definemathsymbol [hat]  [alpha] [op] [2]

 did not work...

Try:
\definemathsymbol [hat] [accent] [tf] [2]

(I thought there was a \definemathaccent, but apparently I was wrong.)

 Once this is fixed I can collect the needed files and send them to
 you(?) to get them included in the minimals if that is what people
 want (or make a package of it if that is better)

It's easiest to fetch the files directly from CTAN, the only question
is how to best organize that: it would be nice to split some fonts, so
that those who don't need extra fonts don't need to fetch them all.

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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Fourier in ConTeXt (was Fonts readily available in Context)

2009-01-14 Thread Mojca Miklavec
On Wed, Jan 14, 2009 at 1:57 PM, Mikael Persson mic...@gmail.com wrote:

 However, it would be nice to get these math-fou.tex working.

\enablemathcollection[fou]

... but it should be automatic. Hans - what's the intended usage of
\enablemathcollection? I mean - at what place should it be called?

Mojca


PS: minimal example:

\usetypescript[fourier][ec]
\setupbodyfont[fourier,10pt]
% \enablemathcollection[fou]
\starttext
\startformula
\left\{a^{b^{c^{d^{e^{f^{g^{h}}}\right\}
\stopformula
\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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Fourier in ConTeXt (was Fonts readily available in Context)

2009-01-14 Thread Mikael Persson
On Wed, Jan 14, 2009 at 3:10 PM, Mojca Miklavec
mojca.miklavec.li...@gmail.com wrote:
 On Wed, Jan 14, 2009 at 1:57 PM, Mikael Persson mic...@gmail.com wrote:

 However, it would be nice to get these math-fou.tex working.

 \enablemathcollection[fou]

Adding \enablemathcollection[fou] to my document seem to enable the
\lbrace and \rbrace and greek capital letters and probably more.


 ... but it should be automatic. Hans - what's the intended usage of
 \enablemathcollection? I mean - at what place should it be called?

 Mojca


 PS: minimal example:

 \usetypescript[fourier][ec]
 \setupbodyfont[fourier,10pt]
 % \enablemathcollection[fou]
 \starttext
 \startformula
 \left\{a^{b^{c^{d^{e^{f^{g^{h}}}\right\}
 \stopformula
 \stoptext

With
\definemathsymbol [hat]  [accent] [tf] [2]
instead of
\definemathsymbol [hat]  [accent] [mr] [2]

the \hat command works in mkii (if I change
\definefontsynonym [MathRoman] [Utopia-Regular]
to
\definefontsynonym [MathRoman] [futr8r]
in the type script)

Mojca, does it work both in mkii and mkiv for you?

Best regards, Mikael
/Mikael
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Fourier in ConTeXt (was Fonts readily available in Context)

2009-01-14 Thread Mojca Miklavec
On Wed, Jan 14, 2009 at 3:54 PM, Mikael Persson wrote:

 Mojca, does it work both in mkii and mkiv for you?

I only tested in mkii so far (I suspect that mkiv suffers from the
lack of Utopia in proper format, so one would need to check
typescripts).

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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Framing the text area of a part page w/ tikz/pgf.

2009-01-14 Thread Bart C. Wise
On Wednesday 14 January 2009 11:21:02 am Wolfgang Schuster wrote:
 \defineframedtext
    [partframed]
    [width=\textwidth,
     height=\textheight,
     rulethickness=5pt,
     top=\vfill,
     bottom=\vfill\vfill]

 \setuphead
    [part]
    [before=\startpartframed,
     after=\stoppartframed,
     align=middle,
     footer=high,
     header=high,
     placehead=yes]

 \starttext
 \part{This is part one}
 \stoptext

Thanks Wolfgang.

I like the way you implemented the solution; however, if I load the pgf/tikz 
libraries with your solution, it still forces the frame to the next page. 

Ultimately I want to load an image and have it framed for the background on 
the part page.  I like the ability that tikz gives me to adjust the opacity of 
the image, which is why I tried to find a solution using tikz.  

So I can find a solution without tikz, but is there one that will work with 
tikz?

Bart
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Framing the text area of a part page w/ tikz/pgf.

2009-01-14 Thread Bart C. Wise
On Wednesday 14 January 2009 12:03:51 pm Wolfgang Schuster wrote:
 Am 14.01.2009 um 19:42 schrieb Bart C. Wise:
  Ultimately I want to load an image and have it framed for the
  background on the part page. I like the ability that tikz gives me
  to adjust the opacity of the image, which is why I tried to find a
  solution using tikz.
  So I can find a solution without tikz, but is there one that will
  work with tikz?

 How about this?

 \setupexternalfigures[location={local,global,default}]

 \setupcolors[state=start]

 \definecolor[partwhite][s=1,t=.8,a=1]

 \defineoverlay[partimage][\overlayfigure{mill}]

 \defineframedtext
[partframed]
[width=\textwidth,
 height=\textheight,
 rulethickness=5pt,
 background={partimage,color},
 backgroundcolor=partwhite,
 top=\vfill,
 bottom=\vfill\vfill]

 \setuphead
[part]
[before=\startpartframed,
 after=\stoppartframed,
 align=middle,
 footer=high,
 header=high,
 placehead=yes]

 \starttext
 \part{This is part one}
 \stoptext


Wolfgang,

Thanks!  That one works.  And much more elegant than what I was developing.

Just so I understand:
background={partimage,color} : This creates the background from both the 
image and the backgroundcolor, correct?

What does the s=1 and the a=1 do in defining the color partwhite?  I can't 
find anything on the web.

Bart
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] horizontal space in \inframed and \hskip

2009-01-14 Thread Michael Green
I am having some trouble with horizontal spacing. I'm trying to set  
one width for \inframed and \hskip but the two are coming out different.


Here is an example. It is a syllabus for a college course. I would  
like the entries for topics (e.g. “Glaucon’s challenge”), descriptions  
(e.g. “Glaucon poses …”), and readings (e.g. “{\it Republic} …”) to  
start at the same horizontal point on the page so that their left  
edges will be aligned.


I use the longest date on which class will be held to define a  
horizontal length (longestdate). I use that length to set the width of  
a frame for text that precedes ClassTopic and an hskip that precedes  
both ClassDesc and Reading. I expected the horizontal space to be  
equal. But ClassTopic is a couple points to the right of the other two.


Thanks!

%% Start example file

%% Horizontal length of longest date -- taken from 
http://archive.contextgarden.net/message/20070314.120612.adab0a8b.en.html

\def\setwidthof#1\to#2%
{\bgroup
\setbox\scratchbox\hbox{#1}%
\expanded{\egroup\def\noexpand#2{\the\wd\scratchbox}}}

\setwidthof{{\it Wednesday, January 28.\hskip 1em}}\to\longestdate

%% Definitions

\def\ClassDate#1{\item \inframed[width= 
\longestdate,frame=off,align=right]{\it #1. }}%

\def\ClassTopic#1{{\WORD #1}}%
\def\ClassDesc#1{\hskip \longestdate #1}%
\def\Reading{\hskip \longestdate {\sc reading} }%


\starttext
\title{Syllabus test}

\startitemize[n]


\ClassDate{Monday, January 26} \ClassTopic{glaucon’s challenge}

	\ClassDesc{Glaucon poses a challenge for justice. We’ll talk about  
the nature of his test. What must Socrates prove about justice in  
order to satisfy the challenge? Do we really have to meet such a  
demanding test?}


\Reading{{\it Republic}, Bk. II, 357a–369b, pp. 38–44.}

\ClassDate{Wednesday, January 28} \ClassTopic{origins of the state}

	\ClassDesc{What problem does the state solve? That is, why would  
people who didn’t have a state want one? What did Plato believe was  
the primary cause of conflict in human affairs?}


\Reading{{\it Republic}, Bk. II, 368e–376e, pp. 43–52.}


\stopitemize


\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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] horizontal space in \inframed and \hskip

2009-01-14 Thread Michael Green

On Thu, Jan 15, 2009 at 1:04 AM, Luigi Scarso wrote:


There is a space in between \ClassDate{..} and \ClassTopic{..}:
\ClassDate{Monday, January 26} \ClassTopic{glaucon's challenge}

Is my pdf right ?

-- luigi



Oh thank you, that's exactly what I wanted. It's hard to believe that  
didn't occur to me. A space takes space. Imagine that!


mjg
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___