Re: [NTG-context] Suggestions on fonts and foundries

2010-03-02 Thread Henning Hraban Ramm

Am 2010-03-01 um 04:54 schrieb Tom:

Some time back I recall seeing a message in which someone discussed  
using
fonts available from foundries and recommended certain ones.  
Unfortunately,
I can't seem to find that message. I will probably need one serif  
font for
the text of the book, a plain sans serif font to use for entries in  
a table,

a fancier sans serif font for chapter titles and, possibly a different
not-too-plain sans serif font for page headers. Also, I can't figure  
out how

to tell ConTeXt which font to use for page headers.


I guess you know http://wiki.contextgarden.net/Fonts ?

Without knowing the subject and/or intended audience of your book I  
can't suggest suitable fonts.


Generally I find Palatino (TeX Gyre Pagella) with Frutiger (in a  
pinch: MS Calibri) a very good combination, even if rather conservative.


SIL Gentium is also a very nice body font, if you like a soft, human  
touch. Linotype Finnegan is a matching sans-serif; perhaps try  
Libertine Biolinum, if you want a free one.


For more technically looking sans's I like LM Sans and URW Grotesk  
(especially in small sizes).



Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

___
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] Math in MKIV - HOWTO

2010-03-02 Thread Hans Hagen

On 1-3-2010 17:26, Zhichu Chen wrote:

Hi, I got some time today and checked some symbols of hlcra.tfm
(LucidaNewMath-Arrows), and got this table:


so that table replaces lbr-ma in math-vfu?

mojca/aditya: can you check this and send me an updated/patch for math-vfu?

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 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] bookmarks point to page, not to section start

2010-03-02 Thread Hans Hagen

On 26-2-2010 14:09, Mojca Miklavec wrote:


The behaviour seems to be the same in both MKII and MKIV (MKII only
doesn't respect the accented characters; but I understand the pain of
recoding).


technically mkii should be able to to the right accents when you enable 
unicode pdf output but by default it's doing pdfdoc which is somewhat 
limited; chinese can have chinese bookmarks even in mkii but why bother 
about mkii and unicode ...



I'm using the following code to place the bookmarks:

\setupinteraction
[state=start]
\setupinteractionscreen
[option=bookmark]
\placebookmarks
[section,subsection,subsubsection]
[section,subsection]

\starttext
\dorecurse{20}{\section{title} \input tufte}
\stoptext


ok, here's a little secret

\setupinteraction
  [focus=width]

don't tell anybody as i consider it useless (in dviwindo the cursor 
positioned itself, not so in acrobat)


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 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] Margin terminology -- badly documented, undocumented, or misdocumented

2010-03-02 Thread Hans Hagen

On 25-2-2010 21:17, James Fisher wrote:

Hi Hans,


Thanks for the reply -- and sorry for the rather grumpy way in which I posed
the question.  The problem for me was this mysterious width=middle,
height=middle -- this is fairly undocumented at
http://wiki.contextgarden.net/Layout .  There is a mention of
width=middle, but it's just followed by some code, most of which seems to
be irrelevant (if cutspace == 0pt then cutspace = backspace; end), and
there is no mention of height=middle.  I would be more than willing to
document this myself, but what is it that width=middle actually *does*?
And what does middle actually *mean* -- the middle of *what*?


just the space between back- and cutspace

(there's also fit, which takes edges into account as they play a role in 
interactive documents)


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 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] [ntg-context] ppchtex questions and maybe buglets

2010-03-02 Thread Hans Hagen

On 26-2-2010 15:04, Bernhard Rosensteiner wrote:


ppchtex is really nice. after experimenting with it i found some buglets:


Can you coordinate this with Alan? Just collect bugs and make small test 
files so that i can look at them in a batch.


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 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] Math in MKIV - HOWTO

2010-03-02 Thread Zhichu Chen
On Tue, Mar 2, 2010 at 6:45 PM, Hans Hagen pra...@wxs.nl wrote:
 On 1-3-2010 17:26, Zhichu Chen wrote:

 Hi, I got some time today and checked some symbols of hlcra.tfm
 (LucidaNewMath-Arrows), and got this table:

 so that table replaces lbr-ma in math-vfu?
yes. And don't forget the correction:
Correction:
[0x021D5] = 0x65, -- Downrightarrow
It's wrong, should be:
[0x021D8] = 0x65, -- Downrightarrow

 mojca/aditya: can you check this and send me an updated/patch for math-vfu?

 -
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
 -




-- 
Best Regards
Chen


  Zhi-chu Chen | Shanghai Synchrotron Radiation Facility
 No. 2019 | Jialuo Rd. | Jiading | Shanghai | P.R. China
 tel: 086 21 5955 3405 | zhichu.chen.googlepages.com
   | www.sinap.ac.cn

___
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] Suggestions on fonts and foundries

2010-03-02 Thread John Haltiwanger
This site might provide a good place to ask further advice:

http://typedia.com/forum/viewcategory/1/


On Tue, Mar 2, 2010 at 10:26 AM, Henning Hraban Ramm hra...@fiee.netwrote:

 Am 2010-03-01 um 04:54 schrieb Tom:


  Some time back I recall seeing a message in which someone discussed using
 fonts available from foundries and recommended certain ones.
 Unfortunately,
 I can't seem to find that message. I will probably need one serif font for
 the text of the book, a plain sans serif font to use for entries in a
 table,
 a fancier sans serif font for chapter titles and, possibly a different
 not-too-plain sans serif font for page headers. Also, I can't figure out
 how
 to tell ConTeXt which font to use for page headers.


 I guess you know http://wiki.contextgarden.net/Fonts ?

 Without knowing the subject and/or intended audience of your book I can't
 suggest suitable fonts.

 Generally I find Palatino (TeX Gyre Pagella) with Frutiger (in a pinch: MS
 Calibri) a very good combination, even if rather conservative.

 SIL Gentium is also a very nice body font, if you like a soft, human
 touch. Linotype Finnegan is a matching sans-serif; perhaps try Libertine
 Biolinum, if you want a free one.

 For more technically looking sans's I like LM Sans and URW Grotesk
 (especially in small sizes).


 Greetlings from Lake Constance!
 Hraban
 ---
 http://www.fiee.net/texnique/
 http://wiki.contextgarden.net
 https://www.cacert.org (I'm an assurer)



 ___
 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] Math in MKIV - HOWTO

2010-03-02 Thread Hans Hagen

On 2-3-2010 12:25, Zhichu Chen wrote:

0x021D8] = 0x65, -- Downrightarrow


ok, i'll make a beta with that vector


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 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] Math in MKIV - HOWTO

2010-03-02 Thread Mojca Miklavec
 Mojca/aditya: can you check this and send me an updated/patch for math-vfu?

What's pretty important is to fill the char-def.lua as well (maybe
together with some additional comments that the glyph names come from
the LaTeX package from Lucida, just that we'll know where the names
come from next time when we see some clashes).

Out of the whole vector only some 5-10% of glyphs works now.

A very nice check would be

   for every slot in lbr-ma
  - print out unicode point
  - print out unicode description
  - print out mathname and mathclass
  - draw the glyph
  - draw the same glyph from cambria for comparison

(I need to learn how to do that though, but it would be a nice homework.)

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] Math in MKIV - HOWTO

2010-03-02 Thread Hans Hagen

On 2-3-2010 14:49, Mojca Miklavec wrote:


What's pretty important is to fill the char-def.lua as well (maybe
together with some additional comments that the glyph names come from
the LaTeX package from Lucida, just that we'll know where the names
come from next time when we see some clashes).


hm, but for me name compatibility with every latex math package is no 
objective; i'd rather that we're unicode math compiant (and i don't care 
too much what route latex follows)



Out of the whole vector only some 5-10% of glyphs works now.


is it that bad? interesting is that lucida was one of the first fonts 
context supported so the transition from yandy-tug has really messed up 
things then



A very nice check would be

for every slot in lbr-ma
   - print out unicode point
   - print out unicode description
   - print out mathname and mathclass
   - draw the glyph
   - draw the same glyph from cambria for comparison

(I need to learn how to do that though, but it would be a nice homework.)


well, we can forget about symbols that are in lucida but not in unicode 
... it makes no sense to add all kind of symbols that only exist in one 
font


Hans


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


[NTG-context] Math integral symbols (cambria) , MK-IV

2010-03-02 Thread gummybears
Hi,

When using font Cambria, the integral symbols \iint and \iiint look funny
compared to \int.
The contour, surface and volume integrals look fine.

Version ConText version 2010.02.25 19:46.
LuaTeX version 50,0

Test file
\usetypescript[cambria]
\setupbodyfont[cambria]
\starttext
\startformula
\startalign[n=2]
\NC \text{integral} \NC \int_{a}^{b} \NR
\NC \text{double integral} \NC \iint_{a}^{b} \NR
\NC \text{triple integral} \NC \iiint_{a}^{b} \NR
\NC \text{contour integral} \NC \oint_{a}^{b} \NR
\NC \text{surface integral} \NC \oiint_{a}^{b} \NR
\NC \text{volume integral} \NC \oiiint_{a}^{b} \NR
\stopalign
\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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Math in MKIV - HOWTO

2010-03-02 Thread Mojca Miklavec
On Tue, Mar 2, 2010 at 15:28, Hans Hagen wrote:
 On 2-3-2010 14:49, Mojca Miklavec wrote:

 hm, but for me name compatibility with every latex math package is no
 objective; i'd rather that we're unicode math compiant (and i don't care too
 much what route latex follows)

I would not care too much about LaTeX either, but what does Unicode
compliance mean?

\symbol{DOWNWARDS ARROW LEFTWARDS OF UPWARDS ARROW}?

 Out of the whole vector only some 5-10% of glyphs works now.

 is it that bad? interesting is that lucida was one of the first fonts
 context supported so the transition from yandy-tug has really messed up
 things then

It's not about messing things up, but about missing mathname= in
char-def.lua for all the unicode entries for special glyphs. If those
glyphs worked in MKII from the very beginning, they won't work before
one adds several entries to

But of course they should work flawlessly when they are entered as
unicode characters. They only fail to work when one enters
\zrangeantirestriction for example.

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] Math in MKIV - HOWTO

2010-03-02 Thread Zhichu Chen
On Tue, Mar 2, 2010 at 11:23 PM, Mojca Miklavec
mojca.miklavec.li...@gmail.com wrote:
 On Tue, Mar 2, 2010 at 15:28, Hans Hagen wrote:
 On 2-3-2010 14:49, Mojca Miklavec wrote:

 hm, but for me name compatibility with every latex math package is no
 objective; i'd rather that we're unicode math compiant (and i don't care too
 much what route latex follows)

 I would not care too much about LaTeX either, but what does Unicode
 compliance mean?

 \symbol{DOWNWARDS ARROW LEFTWARDS OF UPWARDS ARROW}?

 Out of the whole vector only some 5-10% of glyphs works now.

 is it that bad? interesting is that lucida was one of the first fonts
 context supported so the transition from yandy-tug has really messed up
 things then

 It's not about messing things up, but about missing mathname= in
 char-def.lua for all the unicode entries for special glyphs. If those
 glyphs worked in MKII from the very beginning, they won't work before
 one adds several entries to

 But of course they should work flawlessly when they are entered as
 unicode characters. They only fail to work when one enters
 \zrangeantirestriction for example.

I'm sorry, this is just my comment from the unicode chart. I'm pretty sure
that won't work. I download the chart, compare the symbols in the tables
one by one without even knowing the meanings. Is there like a table of
macros of all symbols?



 Mojca




-- 
Best Regards
Chen


  Zhi-chu Chen | Shanghai Synchrotron Radiation Facility
 No. 2019 | Jialuo Rd. | Jiading | Shanghai | P.R. China
 tel: 086 21 5955 3405 | zhichu.chen.googlepages.com
   | www.sinap.ac.cn

___
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] Math in MKIV - HOWTO

2010-03-02 Thread Mojca Miklavec
On Tue, Mar 2, 2010 at 16:41, Zhichu Chen wrote:
 On Tue, Mar 2, 2010 at 11:23 PM, Mojca Miklavec wrote:

 It's not about messing things up, but about missing mathname= in
 char-def.lua for all the unicode entries for special glyphs. If those
 glyphs worked in MKII from the very beginning, they won't work before
 one adds several entries to

 But of course they should work flawlessly when they are entered as
 unicode characters. They only fail to work when one enters
 \zrangeantirestriction for example.

 I'm sorry, this is just my comment from the unicode chart. I'm pretty sure
 that won't work. I download the chart, compare the symbols in the tables
 one by one without even knowing the meanings. Is there like a table of
 macros of all symbols?

a) Take a look at lucidabr.sty (inside lucidabr.zip from CTAN). That's
the source for names of glyphs used in LaTeX for Lucida.

b) The Comprehensive LaTeX Symbol List
c) \showmathcharacters in MKII
d) any other font with extensive glyph repertoaire

Mojca

PS: F3 looks very similar to 226D, but it's not exactly that. And
there are plenty of other such characters.
___
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 bug? in MKIV

2010-03-02 Thread Troy Henderson
The following example produces expected output with MKII (texexec) but
fails the compilation process with MKIV (context).

\startuseMPgraphic{foo}
   input graph;
   path p;
   gdata(data.d, $, augment.p($1,$2););
   draw begingraph(4in,2.5in);
  gdraw p;
   endgraph;
\stopuseMPgraphic
\starttext
   \useMPgraphic{foo}
\stoptext


The data stored in data.d is as follows:
0  0
1  1
2  4

When compiling with MKIV, the following error occurs:

!mplib  : mp terminal:
(/opt/context-minimals/tex/texmf/metapost/base/graph.mp
! Redundant equation.
to be read again
   ;
l.143 Gmargin.low=-.07;
  % bbox fraction for default ra...

! Redundant equation.
to be read again
   ;
l.144 Gmargin.high=1.07;
  % bbox fraction for default ra...

)

!mplib  : mp error: unknown, no error, terminal or log messages
!mplib  : mp terminal: [1]

!mplib  : mp error: unknown, no error, terminal or log messages

-- 
Troy Henderson
___
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] Math integral symbols (cambria) , MK-IV

2010-03-02 Thread Aditya Mahajan

On Tue, 2 Mar 2010, gummybears wrote:


Hi,

When using font Cambria, the integral symbols \iint and \iiint look funny
compared to \int.


\iint and iiint are set using \repeatintegrals and it seems that for some 
reason they are in textsize rather than displaysize. I will have a look.


Hans, we really need a fallback mechanism. Since cambria actually contains 
the iint and iiint glyphs, we do not need to compose the character for it. 
For LM etc., we need the composed character. Right now, if I add anything 
in fallback key in char-def.lua, it is simply ignored.


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] MetaPost bug? in MKIV

2010-03-02 Thread Peter Rolf
Hi Troy,

I don't have the graph.mp file, but I have seen similar errors here. I
guess if you change the lines into

Gmargin.low:=-.07;
Gmargin.high:=1.07;

things work again. Sorry, I can't remember the reason why equations
cause trouble in mplib. But I'm quite sure that this is only an
incompatibility and not a bug.

Best wishes,  Peter

Am 02.03.2010 17:34, schrieb Troy Henderson:
 The following example produces expected output with MKII (texexec) but
 fails the compilation process with MKIV (context).
 
 \startuseMPgraphic{foo}
input graph;
path p;
gdata(data.d, $, augment.p($1,$2););
draw begingraph(4in,2.5in);
   gdraw p;
endgraph;
 \stopuseMPgraphic
 \starttext
\useMPgraphic{foo}
 \stoptext
 
 
 The data stored in data.d is as follows:
 0  0
 1  1
 2  4
 
 When compiling with MKIV, the following error occurs:
 
 !mplib  : mp terminal:
 (/opt/context-minimals/tex/texmf/metapost/base/graph.mp
 ! Redundant equation.
 to be read again
;
 l.143 Gmargin.low=-.07;
   % bbox fraction for default 
 ra...
 
 ! Redundant equation.
 to be read again
;
 l.144 Gmargin.high=1.07;
   % bbox fraction for default 
 ra...
 
 )
 
 !mplib  : mp error: unknown, no error, terminal or log messages
 !mplib  : mp terminal: [1]
 
 !mplib  : mp error: unknown, no error, terminal or log messages
 

___
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 bug? in MKIV

2010-03-02 Thread Taco Hoekwater


Peter Rolf wrote:
 Hi Troy,
 
 I don't have the graph.mp file, but I have seen similar errors here. I
 guess if you change the lines into
 
 Gmargin.low:=-.07;
 Gmargin.high:=1.07;
 
 things work again. Sorry, I can't remember the reason why equations
 cause trouble in mplib. But I'm quite sure that this is only an
 incompatibility and not a bug.

http://wiki.contextgarden.net/MkIV_Differences#Metapost

Best wishes,
Taco
... but it would be cool if there was a way to start a new mplib
instance for each MPfigure...
___
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 bug? in MKIV

2010-03-02 Thread Peter Rolf
Am 02.03.2010 19:42, schrieb Peter Rolf:
 Hi Troy,
 
 I don't have the graph.mp file, but I have seen similar errors here. I
 guess if you change the lines into
 
 Gmargin.low:=-.07;
 Gmargin.high:=1.07;
 
 things work again. Sorry, I can't remember the reason why equations
 cause trouble in mplib. But I'm quite sure that this is only an
 incompatibility and not a bug.

see

http://archive.contextgarden.net/message/20091107.123912.3010813e.en.html

for details. I will do the same :)

 Best wishes,  Peter
 
 Am 02.03.2010 17:34, schrieb Troy Henderson:
 The following example produces expected output with MKII (texexec) but
 fails the compilation process with MKIV (context).

 \startuseMPgraphic{foo}
input graph;
path p;
gdata(data.d, $, augment.p($1,$2););
draw begingraph(4in,2.5in);
   gdraw p;
endgraph;
 \stopuseMPgraphic
 \starttext
\useMPgraphic{foo}
 \stoptext


 The data stored in data.d is as follows:
 0  0
 1  1
 2  4

 When compiling with MKIV, the following error occurs:

 !mplib  : mp terminal:
 (/opt/context-minimals/tex/texmf/metapost/base/graph.mp
 ! Redundant equation.
 to be read again
;
 l.143 Gmargin.low=-.07;
   % bbox fraction for default 
 ra...

 ! Redundant equation.
 to be read again
;
 l.144 Gmargin.high=1.07;
   % bbox fraction for default 
 ra...

 )

 !mplib  : mp error: unknown, no error, terminal or log messages
 !mplib  : mp terminal: [1]

 !mplib  : mp error: unknown, no error, terminal or log messages

 
 ___
 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] MetaPost bug? in MKIV

2010-03-02 Thread Troy Henderson
When using

\startMPinclusions
   input graph;
\stopMPinclusions

or not even including the MPinclusions at all (and thus not doing
`input graph;') seems to give the same result.  The log of what
happens during the compile process is attached.

Troy


log
Description: Binary data
___
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] Margin terminology -- badly documented, undocumented, or misdocumented

2010-03-02 Thread James Fisher
That makes sense.

The main thing confusing me on contextgarden is:

   if cutspace == 0pt then
  cutspace = backspace
   end

Which I would guess is meant to allow you to just specify backspace if you
want symmetrical margins; but what if we want a 0pt cutspace?

A minor other thing confusing me is the terminology; mainly 'cut' and
'back'.  Are these ConTeXt-specific terms or are they found elsewhere?
'Back' would make more sense to me as 'binding' or 'spine', and the edge
referred to as 'cut' is referred to in
Wikipediahttp://en.wikipedia.org/wiki/Book#Book_manufacturing_in_the_modern_worldas
the 'fore-edge'.


James

On Tue, Mar 2, 2010 at 11:03 AM, Hans Hagen pra...@wxs.nl wrote:

 On 25-2-2010 21:17, James Fisher wrote:

 Hi Hans,


 Thanks for the reply -- and sorry for the rather grumpy way in which I
 posed
 the question.  The problem for me was this mysterious width=middle,
 height=middle -- this is fairly undocumented at
 http://wiki.contextgarden.net/Layout .  There is a mention of
 width=middle, but it's just followed by some code, most of which seems
 to
 be irrelevant (if cutspace == 0pt then cutspace = backspace; end), and
 there is no mention of height=middle.  I would be more than willing to
 document this myself, but what is it that width=middle actually *does*?
 And what does middle actually *mean* -- the middle of *what*?


 just the space between back- and cutspace

 (there's also fit, which takes edges into account as they play a role in
 interactive documents)

 Hans


 -
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 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] METAPOST's superellipse with superness0.5 does not give a superellipse

2010-03-02 Thread James Fisher
Thanks, Rory.  In hind-sight I guess my presumptions look pretty silly.  The
reason I'm making mistakes like this is that I can't find any introductory
text along the lines of 'TeX for programmers'; i.e. people coming from your
typical modern imperative languages, who will (after looking at TeX code and
concluding that it *is* a programming language) expect things like
variables, flow control, classes, and the kind of and syntax of library
documentation that comes with these languages.  Perhaps the texts I've seen
should have included some content taken from function vs.
macrohttp://www.google.co.uk/search?hl=ensource=hpq=macro%20vs%20functionmeta=aq=foq=discussions
elsewhere.

Best

James

On Mon, Mar 1, 2010 at 7:15 PM, Rory Molinari quo...@gmail.com wrote:

 For 2: I think Metafont makes more sense if you don't think of a macro
 as a function that does some work in its own context and returns a
 value, but as something that expands textually in place.  So there
 isn't any concept of return as there aren't separate stack frames to
 return from or to.

 So you could try something like this (completely untested, and I am a
 Metafont beginner.  This is from memory, so check the book for the
 right syntax, especially for the semicolons.)

 def myPath(args) =
  begingroup
save tr, tl, bl, br;
 pair tr, tl, bl, br;
 some equations involving tr, tl, bl, br, and the args;

a path expression;
  endgroup;
 enddef;

 path aPath;
 aPath := myPath(args);
 fill aPath;

 The construction

 begingroup
  statements;
  expression;
 endgroup;

 lets you do some work in statements, and then give an expression.
 The value of the group is the value of the expression.  The value
 isn't really returned; it just appears wherever a call to myPath
 appears.  Then the assignment to aPath is expanded by the interpreter
 as

 aPath := begingroup etc endgroup;

 Cheers,
 Rory

 On Mon, Mar 1, 2010 at 9:57 AM, James Fisher jameshfis...@gmail.com
 wrote:
  I've come up with a crude function that's doing more like what I want.  I
  have two problems with it:
 
  1. The most important: I need to differentiate the equations that
 generate a
  superellipse, in order to find the tangent at the defined vertices.  I
 have
  failed to do this and so use a crude arbitrary power function.
  2. Less important: what is the equivalent in METAFONT of the 'return'
  keyword?  I just want superellipse() to return the shape, rather than
 draw
  it.
 
  James
 
  def superellipse(expr r,t,l,b,s)=
pair tr, tl, bl, br;
tr = (s[xpart t,xpart r],s[ypart r,ypart t]);
tl = (s[xpart t,xpart l],s[ypart l,ypart t]);
bl = (s[xpart b,xpart l],s[ypart l,ypart b]);
br = (s[xpart b,xpart r],s[ypart r,ypart b]);
 
numeric theta;
 
 
if s  0.5:
  % Behave as in the normal superellipse function
  theta = 0;
else:
  % This is a crude mockup of the kind of function that is required
  % to generate shapes with s0.5 (apparently called astroids).
  % This satisfies:
  %
  %   s = 0.5,  theta = 0.5
  %   s = 0,theta = 90
  %
  % But to find the actual function,
  % we need to differentiate, at an endpoint,
  % the equation that would produce one quadrant of the shape.
 
  theta = 90 - (s*s*s*7.11378661);
fi
 
fill  r{dir(90+theta)} ... tr{t-r} ... {dir(180-theta)}t 
  t{dir(180+theta)} ... tl{l-t} ... {dir(270-theta)}l 
  l{dir(270+theta)} ... bl{b-l} ... {dir(-theta)}b 
  b{dir(theta)} ... br{r-b} ... {dir(90-theta)}r 
  cycle;
  enddef;
 
  beginfig(0);
superellipse(
  ( 100, 50  ),
  ( 50,  100 ),
  ( 0,   50  ),
  ( 50,  0   ),
  0.6
  );
  endfig;
 
  end;
 
 
  On Mon, Mar 1, 2010 at 4:20 PM, Rory Molinari quo...@gmail.com wrote:
 
  James's explanation appears to be right.
 
  On p 126 of the METAFONTbook Knuth says that the superness should be
  between 0.5 (when you get a diamond) and 1.0 (when you get a square).
 
  Exercise 14.6 asks the reader to Try superellimpse with superness
  values less than 0.5 or greater than 1.0; explain why you get weird
  shapes in such cases.  The answer is There are inflection points,
  because there are no bounding triangles for the '...' operations in
  the superellipse macro ... unless 0.5 \leq s \leq 1.
 
  Cheers,
  Rory
 
  On Mon, Mar 1, 2010 at 8:04 AM, James Fisher jameshfis...@gmail.com
  wrote:
   I should say that the vertices of the superellipse are calculated
   correctly.  The problem, it seems, is that for the vertices at right,
   top,
   left, and bottom, the angles of entry and exit need to be explicitly
   defined, rather than just relying on the '...' which coincidentally
   works
   for s=0.5.
  
   I should say at this point that I am no maths whiz.  But, sticking
 with
   the
   'right ... topright ... top' line, the angle calculation needs to
   satisfy,
   for the exit angle of the first vertex:
  
   For s=0, angle = 180 degrees (vector to 

Re: [NTG-context] Margin terminology -- badly documented, undocumented, or misdocumented

2010-03-02 Thread Wolfgang Schuster

Am 02.03.10 22:33, schrieb James Fisher:

That makes sense.

The main thing confusing me on contextgarden is:

   if cutspace == 0pt then
  cutspace = backspace
   end

Which I would guess is meant to allow you to just specify backspace if 
you want symmetrical margins; but what if we want a 0pt cutspace?

Then use absolute values for 'backspace' and 'width'.

Wolfgang

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

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


[NTG-context] Super- and sub-script in text mode, or, fonts in math mode

2010-03-02 Thread James Fisher
Hi,


A minor problem: I'm trying to place superscripted text in the text body --
things like '2^nd March'.  I can't see anything like 2{\sup nd}, so my only
known solution at the moment is math mode: $2^{nd}$.  Despite this not being
'math', I don't really have an aversion to it.  However, there's a problem
with it: the superscripted text appears in italic Computer Modern.  I'm
using Gentium Book Basic as my body font, using XeTeX.  The Gentium typeface
is used perfectly everywhere, including the '2' in '2^nd', with the
exception of the superscripted text.

So what solutions are to hand?  Is there either (1) super/sub commands in
text mode, or (2) a way of fixing this in math mode?

(Also, would this be a problem with ConTeXt or with XeTeX?)


James Fisher
___
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] Margin terminology -- badly documented, undocumented, or misdocumented

2010-03-02 Thread James Fisher
Fairy muff!


James

On Tue, Mar 2, 2010 at 9:42 PM, Wolfgang Schuster 
schuster.wolfg...@googlemail.com wrote:

 Am 02.03.10 22:33, schrieb James Fisher:

  That makes sense.

 The main thing confusing me on contextgarden is:

   if cutspace == 0pt then
  cutspace = backspace
   end

 Which I would guess is meant to allow you to just specify backspace if you
 want symmetrical margins; but what if we want a 0pt cutspace?

 Then use absolute values for 'backspace' and 'width'.

 Wolfgang



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

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

 ___

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

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


Re: [NTG-context] Super- and sub-script in text mode, or, fonts in math mode

2010-03-02 Thread Wolfgang Schuster

Am 02.03.10 22:58, schrieb James Fisher:

Hi,


A minor problem: I'm trying to place superscripted text in the text 
body -- things like '2^nd March'.  I can't see anything like 2{\sup 
nd}, so my only known solution at the moment is math mode: $2^{nd}$.  
Despite this not being 'math', I don't really have an aversion to it.  
However, there's a problem with it: the superscripted text appears in 
italic Computer Modern.  I'm using Gentium Book Basic as my body font, 
using XeTeX.  The Gentium typeface is used perfectly everywhere, 
including the '2' in '2^nd', with the exception of the superscripted text.


So what solutions are to hand?  Is there either (1) super/sub commands 
in text mode, or (2) a way of fixing this in math mode?


(Also, would this be a problem with ConTeXt or with XeTeX?)

a\high{x}b\low{x}c\highlow{x}{y}d\lowhigh{x}{y}

Wolfgang

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

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


[NTG-context] Blank page at end of chapter

2010-03-02 Thread Tom
I can't figure out how to turn off running headers on the blank pages that
are inserted into a document to make the first page of the next chapter
start on a right page. I'm probably overlooking something.

Tom Benjey
717-258-9733 voice
717-243-0074 fax
Twitter: @TomBenjey





___
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] Blank page at end of chapter

2010-03-02 Thread Wolfgang Schuster

Am 02.03.10 23:07, schrieb Tom:

I can't figure out how to turn off running headers on the blank pages that
are inserted into a document to make the first page of the next chapter
start on a right page. I'm probably overlooking something.
   

http://wiki.contextgarden.net/Titles#Truly_empty_pagebreak_before_chapters

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] MetaPost bug? in MKIV

2010-03-02 Thread Peter Rolf
Am 02.03.2010 21:02, schrieb Troy Henderson:
 When using
 
 \startMPinclusions
input graph;
 \stopMPinclusions
 
 or not even including the MPinclusions at all (and thus not doing
 `input graph;') seems to give the same result.  The log of what
 happens during the compile process is attached.

i tried your example (found graph.mp) and i got a bunch of errors
regarding wrong picture color model, redundant equations and unknown
transform components.

#color problem is probably here

def Gwithpc_(expr q) =
  withpen penpart q withcolor (redpart q, greenpart q, bluepart q)
enddef;

 Another difference is the way text is handled in mkiv. In particular,
color (withcolor) is not applied to metapost text. 

#redundant equations

use ':=' for constants, etc.

# unknown transform components
 (0,0,_tt_w_1,0,0,1)
! Transform components aren't all known.

is this a problem with textext()? looks very cryptic to me.

anyhow, in the current form graph.mp does not work with mplib.


Peter

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