Re: [NTG-context] processaction inside MP graphic

2010-05-13 Thread Taco Hoekwater

Vianney le Clément wrote:

Hello,

I'm having some trouble with a macro using \processaction inside a
metapost graphic. Here is a minimal example.

\def\Shape#1%
  {\processaction[#1]
 [square=unitsquare,
  circle=unitcircle]}
\starttext
\startuseMPgraphic{test}
fill \Shape{square} scaled 1cm;
\stopuseMPgraphic
\useMPgraphic{test}
\stoptext

It stops with the error Use of \p!compareprocessaction doesn't match
its definition.


Like many of the more complex commands, \processaction does not
expand totally. If you are using mkiv, you could define \Shape
like this:

\def\Shape#1%
  {\directlua{
 local known = {square = 'unitsquare', circle = 'unitcircle' }
 tex.sprint(known[#1] or 'unitsquare')}}

I don't know of a simple solution for mkii.

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


Re: [NTG-context] [NTG Context] Storm (Lido) font support seems to be broken in newer versions of MKII

2010-05-13 Thread Jan Pohanka
Dne Wed, 12 May 2010 20:36:38 +0200 Mojca Miklavec  
mojca.miklavec.li...@gmail.com napsal(a):



2010/5/4 Jan Pohanka xhpoha...@gmail.com:
Minimal example is here and support files are attached. Original  
support can

be downloaded here: http://modules.contextgarden.net/stormfontsupport

$$ 2 \times 2 $$ % error


Dear Jan,

About the first problem that you are reporting:

I don't understand what the st in t-math-sto.tex does.
  \definemathsymbol[times] [bin] [st] [0E]


The line \let\stfam\mcfam \let\hexstfam\hexmcfam should map the st math  
family to the mc family, maybe this is not working anymore. I have tried  
\definefamilysynonym [default] [st] [mc] but with no succes.


Jan



That is: I'm not sure if the st font is defined somewhere or not.
(This is the first time that I see this.)

The character is present in sldr6s.tfm at slot 0x0E. The font is defined  
as

  \definefontsynonym [MathStorm][Lido-Math-Storm]
  \definefontsynonym [Lido-Math-Storm]  [sldr6s]   
[encoding=st3]
but I'm not sure how this maps to (or why it is supposed to map to)  
[st].


Once this is resolved (once somebody explains me how the mapping is
supposed to work), the problem with incorrect font will probably be
solved simultaneously.

(Boldmath is something that I never really understood when or why it
works or doesn't work.)

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
___



--
Tato zpráva byla vytvořena převratným poštovním klientem Opery:  
http://www.opera.com/mail/

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

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


[NTG-context] Numbers in \definesynonyms

2010-05-13 Thread Otared Kavian
Dear all,

When defining abbreviations through \definesynonyms, if the abbreviation 
contains a digit then it seems that the built-in macro is not recognized: in 
the example below the command \EEG is recognized, whereas \M2 or \Y2K are not. 
Is there a way around this difficulty? Or should one use a definition like
\definesynonyms[abbreviation][abbreviations][\inshort][\infull]
and then use everywhere \inshort{Y2K}?

Many thanks in advance, with my best regards: OK

 begin example-abbr.tex
\definesynonyms[abbreviation][abbreviations][\infull]

\starttext

\abbreviation{EEG} {Electroencephalogram}
\abbreviation{ERP} {Event-Related Potentials}
\abbreviation{M2}{Master 2nd year}
\abbreviation{Y2K}{Year 2000}

Test inshort working: \EEG, \ERP, 

Test not working \M2, \Y2K

Test infull: \infull{EEG}, \infull{ERP}, \infull{M2}

\completelistofabbreviations

\stoptext
 end example-abbr.tex
___
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] processaction inside MP graphic

2010-05-13 Thread Vianney le Clément
On Thu, May 13, 2010 at 09:30, Taco Hoekwater t...@elvenkind.com wrote:
 Like many of the more complex commands, \processaction does not
 expand totally. If you are using mkiv, you could define \Shape
 like this:

 \def\Shape#1%
  {\directlua{
     local known = {square = 'unitsquare', circle = 'unitcircle' }
     tex.sprint(known[#1] or 'unitsquare')}}

Thanks Taco. That does the trick provided you enclose #1 with quotes:

\def\Shape#1%
 {\directlua{
local known = {square = 'unitsquare', circle = 'unitcircle' }
tex.sprint(known['#1'] or 'unitsquare')}}

Another, maybe uglier but plain TeX, solution I've come up with is
defining auxiliary macros:

\def\ShapeSSSsquare{unitsquare}
\def\ShapeSSScircle{unitcircle}
\def\Shape#1{\csname ShapeSSS#1\endcsname}

But of course, this does not handle unknown options (though that could
be added).

I'll add this to the wiki.

Vianney
___
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] Storm (Lido) font support seems to be broken in newer versions of MKII

2010-05-13 Thread Hans Hagen

On 13-5-2010 9:40, Jan Pohanka wrote:

Dne Wed, 12 May 2010 20:36:38 +0200 Mojca Miklavec
mojca.miklavec.li...@gmail.com napsal(a):


2010/5/4 Jan Pohanka xhpoha...@gmail.com:

Minimal example is here and support files are attached. Original
support can
be downloaded here: http://modules.contextgarden.net/stormfontsupport

$$ 2 \times 2 $$ % error


Dear Jan,

About the first problem that you are reporting:

I don't understand what the st in t-math-sto.tex does.
\definemathsymbol [times] [bin] [st] [0E]


The line \let\stfam\mcfam \let\hexstfam\hexmcfam should map the st math
family to the mc family, maybe this is not working anymore. I have tried
\definefamilysynonym [default] [st] [mc] but with no succes.


does \definemathsymbol [times] [bin] [mc] [0E] work?

btw, in mkiv that will never work as we now only use two families, there 
one needs to make a lfg file as with the other type1 math fonts


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] processaction inside MP graphic

2010-05-13 Thread luigi scarso
2010/5/13 Vianney le Clément vleclem...@gmail.com:
 On Thu, May 13, 2010 at 09:30, Taco Hoekwater t...@elvenkind.com wrote:
 Like many of the more complex commands, \processaction does not
 expand totally. If you are using mkiv, you could define \Shape
 like this:

 \def\Shape#1%
  {\directlua{
     local known = {square = 'unitsquare', circle = 'unitcircle' }
     tex.sprint(known[#1] or 'unitsquare')}}

 Thanks Taco. That does the trick provided you enclose #1 with quotes:

 \def\Shape#1%
  {\directlua{
    local known = {square = 'unitsquare', circle = 'unitcircle' }
    tex.sprint(known['#1'] or 'unitsquare')}}

 Another, maybe uglier but plain TeX, solution I've come up with is
 defining auxiliary macros:

 \def\ShapeSSSsquare{unitsquare}
 \def\ShapeSSScircle{unitcircle}
 \def\Shape#1{\csname ShapeSSS#1\endcsname}

 But of course, this does not handle unknown options (though that could
 be added).

 I'll add this to the wiki.

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


Also

\getparameters[Shape][square={unitsquare },
 circle={unitcircle }]
\starttext

\startuseMPgraphic{test}
fill \Shapesquare  scaled 1cm;
\stopuseMPgraphic
\useMPgraphic{test}
\stoptext

%%

\setevalue{square}{unitsquare}
\setevalue{circle}{unitcircle}

\starttext

\startuseMPgraphic{test}
fill \getvalue{square} scaled 1cm;
\stopuseMPgraphic
\useMPgraphic{test}
\stoptext


-- 
luigi
___
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] processaction inside MP graphic

2010-05-13 Thread Hans Hagen

On 13-5-2010 11:13, luigi scarso wrote:


\setevalue{square}{unitsquare}
\setevalue{circle}{unitcircle}

\starttext

\startuseMPgraphic{test}
fill \getvalue{square} scaled 1cm;
\stopuseMPgraphic
\useMPgraphic{test}
\stoptext


or

 \setevalue{mynamespace:square}{unitsquare}
 \setevalue{mynamespace:circle}{unitcircle}

 \starttext

 \startuseMPgraphic{test}
 fill \executeifdefined{mynamespace:square}{diamond} scaled 1cm;
 \stopuseMPgraphic
 \useMPgraphic{test}
 \stoptext


-
  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] [NTG Context] Storm (Lido) font support seems to be broken in newer versions of MKII

2010-05-13 Thread Jan Pohanka

Dne Thu, 13 May 2010 10:59:14 +0200 Hans Hagen pra...@wxs.nl napsal(a):


On 13-5-2010 9:40, Jan Pohanka wrote:

Dne Wed, 12 May 2010 20:36:38 +0200 Mojca Miklavec
mojca.miklavec.li...@gmail.com napsal(a):


2010/5/4 Jan Pohanka xhpoha...@gmail.com:

Minimal example is here and support files are attached. Original
support can
be downloaded here: http://modules.contextgarden.net/stormfontsupport

$$ 2 \times 2 $$ % error


Dear Jan,

About the first problem that you are reporting:

I don't understand what the st in t-math-sto.tex does.
\definemathsymbol [times] [bin] [st] [0E]


The line \let\stfam\mcfam \let\hexstfam\hexmcfam should map the st math
family to the mc family, maybe this is not working anymore. I have tried
\definefamilysynonym [default] [st] [mc] but with no succes.


does \definemathsymbol [times] [bin] [mc] [0E] work?


No, it does not.

btw, in mkiv that will never work as we now only use two families, there  
one needs to make a lfg file as with the other type1 math fonts




I know that mkiv could be better in this, but I'd like to have mkii  
working too. (Using of miktex (no lua) is one of the reasons).



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
-



--
Tato zpráva byla vytvořena převratným poštovním klientem Opery:  
http://www.opera.com/mail/

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

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


Re: [NTG-context] [NTG Context] Storm (Lido) font support seems to be broken in newer versions of MKII

2010-05-13 Thread Jan Pohanka
I also uploaded the corresponding files including the free Lido font here  
for testing.

http://neuron.feld.cvut.cz/LidoType1.zip

Jan

Dne Thu, 13 May 2010 10:59:14 +0200 Hans Hagen pra...@wxs.nl napsal(a):


On 13-5-2010 9:40, Jan Pohanka wrote:

Dne Wed, 12 May 2010 20:36:38 +0200 Mojca Miklavec
mojca.miklavec.li...@gmail.com napsal(a):


2010/5/4 Jan Pohanka xhpoha...@gmail.com:

Minimal example is here and support files are attached. Original
support can
be downloaded here: http://modules.contextgarden.net/stormfontsupport

$$ 2 \times 2 $$ % error


Dear Jan,

About the first problem that you are reporting:

I don't understand what the st in t-math-sto.tex does.
\definemathsymbol [times] [bin] [st] [0E]


The line \let\stfam\mcfam \let\hexstfam\hexmcfam should map the st math
family to the mc family, maybe this is not working anymore. I have tried
\definefamilysynonym [default] [st] [mc] but with no succes.


does \definemathsymbol [times] [bin] [mc] [0E] work?

btw, in mkiv that will never work as we now only use two families, there  
one needs to make a lfg file as with the other type1 math fonts


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
-



--
Tato zpráva byla vytvořena převratným poštovním klientem Opery:  
http://www.opera.com/mail/

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

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


Re: [NTG-context] Context 2010.05.08 - 3D annotations

2010-05-13 Thread Michail Vidiassov

Dear All,


This current context is meant for texlive 2010, but there is a little
time before the final freeze of the texlive repository, so there will
be a bugfix update in a week or so.

If you have pending urgent bugs (especially in mkii) this would be an
excellent time to report them.


is it worth trying to fix 3D annotations now?
I have a patch I have posted here (3D annotations thread),
but it is both a fix for errors (like == used instead of = )
and a work-around for missing base features (bitmap preview done
by hand while, it seems, the authors dalayed the question till 
something is implemented in luatex/ConTeXt the right way)

 - so it may not classify exactly as just a bugfix.

  Sincerely, Michail
___
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] processaction inside MP graphic

2010-05-13 Thread Vianney le Clément
 \getparameters[Shape][square={unitsquare },
                     circle={unitcircle }]
 \starttext

 \startuseMPgraphic{test}
 fill \Shapesquare  scaled 1cm;
 \stopuseMPgraphic
 \useMPgraphic{test}
 \stoptext

This one's very nice. Thanks.

Vianney
___
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] processaction inside MP graphic

2010-05-13 Thread luigi scarso
2010/5/13 Vianney le Clément vleclem...@gmail.com:
 \getparameters[Shape][square={unitsquare },
                     circle={unitcircle }]
 \starttext

 \startuseMPgraphic{test}
 fill \Shapesquare  scaled 1cm;
 \stopuseMPgraphic
 \useMPgraphic{test}
 \stoptext

 This one's very nice. Thanks.
becareful at the spaces at the end, ie
\getparameters[Shape][square={unitsquare},
circle={unitcircle}]

doesn't work.

-- 
luigi
___
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] processaction inside MP graphic

2010-05-13 Thread Vianney le Clément
 becareful at the spaces at the end, ie
 \getparameters[Shape][square={unitsquare},
                    circle={unitcircle}]

 doesn't work.

That's logical, because \Shapesquare eats the spaces following it. In
my case, I define my macros like

\getparameters[Shape:]
  [square=unitsquare,
   circle=unitcircle]
\def\Shape#1{\csname Shape:#1\endcsname}

and then use \Shape{square}, so it doesn't have the problem. But
thanks for pointing that out.

Vianney
___
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 2010.05.08 - 3D annotations

2010-05-13 Thread Hans Hagen

On 13-5-2010 12:16, Michail Vidiassov wrote:

Dear All,


This current context is meant for texlive 2010, but there is a little
time before the final freeze of the texlive repository, so there will
be a bugfix update in a week or so.

If you have pending urgent bugs (especially in mkii) this would be an
excellent time to report them.


is it worth trying to fix 3D annotations now?
I have a patch I have posted here (3D annotations thread),
but it is both a fix for errors (like == used instead of = )
and a work-around for missing base features (bitmap preview done
by hand while, it seems, the authors dalayed the question till
something is implemented in luatex/ConTeXt the right way)
- so it may not classify exactly as just a bugfix.


some things were fixed, so best first check against the latest beta and 
then summarize the problems


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] Numbers in \definesynonyms

2010-05-13 Thread Hans Hagen

On 13-5-2010 10:42, Otared Kavian wrote:

Dear all,

When defining abbreviations through \definesynonyms, if the abbreviation 
contains a digit then it seems that the built-in macro is not recognized: in 
the example below the command \EEG is recognized, whereas \M2 or \Y2K are not.
Is there a way around this difficulty? Or should one use a definition like
\definesynonyms[abbreviation][abbreviations][\inshort][\infull]
and then use everywhere \inshort{Y2K}?

Many thanks in advance, with my best regards: OK

 begin example-abbr.tex
\definesynonyms[abbreviation][abbreviations][\infull]

\starttext

\abbreviation{EEG} {Electroencephalogram}
\abbreviation{ERP} {Event-Related Potentials}
\abbreviation{M2}{Master 2nd year}
\abbreviation{Y2K}{Year 2000}


\abbreviation[MTWO][M2]{Master 2nd year}


\MTWO


Test inshort working: \EEG, \ERP,

Test not working \M2, \Y2K

Test infull: \infull{EEG}, \infull{ERP}, \infull{M2}

\completelistofabbreviations

\stoptext
 end example-abbr.tex
___
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
___



--

-
  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 2010.05.08 - 3D annotations

2010-05-13 Thread Michail Vidiassov

Dear Hans,

On Thu, 13 May 2010, Hans Hagen wrote:


On 13-5-2010 12:16, Michail Vidiassov wrote:



is it worth trying to fix 3D annotations now?
I have a patch I have posted here (3D annotations thread),
but it is both a fix for errors (like == used instead of = )
and a work-around for missing base features (bitmap preview done
by hand while, it seems, the authors dalayed the question till
something is implemented in luatex/ConTeXt the right way)
- so it may not classify exactly as just a bugfix.


some things were fixed, so best first check against the latest beta and then 
summarize the problems


first  - it does not work due to typos like

local name = viewname
local name = pdfunicode((view.name ~=  and name) or unknown view)

- likely someone started to write code, but dropped the idea and never tested

Or

local subtype, subdata = U3D, io.readdata(foundname) or 
if find(subdata,^PRC) then
subtype == PRC
elseif find(subdata,^U3D) then
subtype == U3D
elseif file.extname(foundname) == prc then
subtype == PRC
end

it seems == is used instead of =, io.readdata instead of file.readdata - 
again, some one wrote the code but had no time to read the result


Second, more important - no preview image is created.


patch and test case attached


Sincerely, Michail


testprc.tgz
Description: Binary data
--- lpdf-u3d.lua.org2010-03-26 18:24:44.0 +0300
+++ lpdf-u3d.lua2010-04-14 14:24:28.0 +0400
@@ -17,6 +17,7 @@
 local cos, sin, sqrt, pi, atan2, abs = math.cos, math.sin, math.sqrt, math.pi, 
math.atan2, math.abs
 
 local pdfconstant   = lpdf.constant
+local pdfnumber = lpdf.number
 local pdfboolean= lpdf.boolean
 local pdfunicode= lpdf.unicode
 local pdfdictionary = lpdf.dictionary
@@ -62,8 +63,7 @@
 
 local function make3dview(view)
 
-local name = viewname
-local name = pdfunicode((view.name ~=  and name) or unknown view)
+local name = pdfunicode((view.name ~=  and view.name) or unknown view)
 
 local viewdict = pdfdictionary {
Type = pdfconstant(3DView),
@@ -311,9 +311,6 @@
 for i=1,#nodes do
 local node = checkedkey(nodes,i,table)
 if node then
-local position = checkedkey(node,position,table)
-position = position and #position == 12 and pdfarray(position)
-if position then
 nodelist[#nodelist+1] = pdfdictionary {
 Type = pdfconstant(3DNode),
 N= node.name or (node_ .. i), -- pdfunicode ?
@@ -325,13 +322,18 @@
 },
 M= position,
 }
+local position = checkedkey(node,position,table)
+position = position and #position == 12 and pdfarray(position)
+if position then
+nodelist[#nodelist].M = position
 end
 end
   end
-  viewdict.NR = true
   viewdict.NA = nodelist
end
 
+viewdict.NR = true
+
return viewdict
 
 end
@@ -349,19 +351,19 @@
 
 local activationdict = pdfdictionary {
TB = pdfboolean(param.toolbar,true),
-   NP = pdfboolean(param.tree,true),
+   NP = pdfboolean(param.tree,false),
 }
 
 local stream = streams[label]
 if not stream then
 
-local subtype, subdata = U3D, io.readdata(foundname) or 
+local subtype, subdata = U3D, file.readdata(foundname) or 
 if find(subdata,^PRC) then
-subtype == PRC
+subtype = PRC
 elseif find(subdata,^U3D) then
-subtype == U3D
+subtype = U3D
 elseif file.extname(foundname) == prc then
-subtype == PRC
+subtype = PRC
 end
 
 local attr = pdfdictionary {
@@ -423,12 +425,35 @@
 local ref = stored_pr[tag]
 if not ref then
 --  weird, has to be a /Form and not an /Image so we need a wrap = 
true key
---  local figure = img.immediatewrite { filename = preview, width = 
width, height = height }
-local figure = img.immediatewrite { stream = .5 .75 .75 rg 0 0 20 
10 re f, bbox = {0,0,20,10 } }
+local figure = img.immediatewrite { filename = preview, width = 
width, height = height }
+--  local figure = img.immediatewrite { stream = .5 .75 .75 rg 0 0 20 
10 re f, bbox = {0,0,20,10 } }
 ref = figure.objnum
 stored_pr[tag] = ref
 end
-annot.AP = ref and pdfdictionary { N = pdfreference(ref) }
+if ref then
+local pw   = pdfdictionary {
+Type  = pdfconstant(XObject),
+Subtype   = pdfconstant(Form),
+FormType  = pdfnumber(1),
+BBox  = pdfarray { pdfnumber(0), pdfnumber(0), 
pdfnumber(factor*width), pdfnumber(factor*height) },
+Matrix 

Re: [NTG-context] [NTG Context] Storm (Lido) font support seems to be broken in newer versions of MKII

2010-05-13 Thread Mojca Miklavec
2010/5/13 Jan Pohanka wrote:
 Dne Wed, 12 May 2010 20:36:38 +0200 Mojca Miklavec napsal(a):
 2010/5/4 Jan Pohanka xhpoha...@gmail.com:

 Minimal example is here and support files are attached. Original support
 can
 be downloaded here: http://modules.contextgarden.net/stormfontsupport

 $$ 2 \times 2 $$ % error

 Dear Jan,

 About the first problem that you are reporting:

 I don't understand what the st in t-math-sto.tex does.
  \definemathsymbol    [times] [bin] [st] [0E]

 The line \let\stfam\mcfam \let\hexstfam\hexmcfam should map the st math
 family to the mc family, maybe this is not working anymore. I have tried
 \definefamilysynonym [default] [st] [mc] but with no succes.

(A note to Hans: the question was about MKII. One would need to
rewrite the whole typescript for MKIV, sure, but the first step might
be to fix the almost-working MKII.)

OK, I see. Replacing with ma/mc doesn't really have any effect. I
won't pretend that I understand the math typescripts in details, but
at least the following works. I'm not sure how exactly the last two
arguments of
\definetypeface [Lido] [mm] [math] [lido] [...] [...]
work, but maybe something really subtle has changed in the meantime
that nobody has noticed.

\useencoding[st1]

\startmathcollection[storm]
  \definemathsymbol [times] [bin] [ma] [0E]
\stopmathcollection

\starttypescript [math] [lido] [all]
  \definefontsynonym [Lido-Math-Letters][sldr8t]%  [encoding=st1]
  \definefontsynonym [Lido-Math-Letters-Italic] [sldri8t]% [encoding=st1]
  \definefontsynonym [ComputerModernMath-Symbols]   [cmsy10]
  \definefontsynonym [ComputerModernMath-Extension] [cmex10]
  \definefontsynonym [Lido-Math-Storm]  [sldr6s]%  [encoding=st1]
  \usemathcollection[storm]
  \loadmapfile[slido.map]
\stoptypescript

\starttypescript [math] [lido] [name]
  \definefontsynonym [MathRoman][Lido-Math-Letters]
  \definefontsynonym [MathItalic]   [Lido-Math-Letters-Italic]
  \definefontsynonym [MathSymbol]   [ComputerModernMath-Symbols]
  \definefontsynonym [MathExtension][ComputerModernMath-Extension]
  \definefontsynonym [MathAlpha][Lido-Math-Storm]
\stoptypescript

\starttypescript [math] [lido] [name]
  \usemathcollection[storm]
\stoptypescript

\starttypescript [Lido] [st1]
  % \definetypeface [Lido] [rm] [serif] [lido] [default]
[encoding=\typescripttwo]
  % \definetypeface [Lido] [mm] [math] [lido] [storm]  %
[encoding=\typescripttwo]
  \definetypeface [Lido] [mm] [math] [lido] [default]
[encoding=default]  % [encoding=\typescripttwo]
\stoptypescript

\usetypescript[Lido][st1]
\setupbodyfont[Lido,12pt]

\starttext

$ a + b + c = d \times 2$

\stoptext

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] [NTG Context] Storm (Lido) font support seems to be broken in newer versions of MKII

2010-05-13 Thread Hans Hagen

On 13-5-2010 2:53, Mojca Miklavec wrote:


(A note to Hans: the question was about MKII. One would need to
rewrite the whole typescript for MKIV, sure, but the first step might
be to fix the almost-working MKII.)


mostly stripping ... no encodings any more


\usetypescript[Lido][st1]
\setupbodyfont[Lido,12pt]


probably something with the filtering ... i don't remember drastic 
changes, but one never knows


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] does expandaparameters work

2010-05-13 Thread Wolfgang Schuster

Am 12.05.10 19:29, schrieb Erik Margraf:

Hello,
I use \expandparameters in a macro definition.
--
\expandparameters\setupbackgrounds[page][background={\currentvalue,#1}]
--
This works in MkII (texexec), but doesn't work in MkIV (context).

If I define all layers in a single declaration, the results with MkII 
and MkIV

are identical.

Should this work? Or do I have to add something for MkIV?


\unprotected\def\xdo...@e@parameters#1]%
  {\let\dosetnvalue\setsomevalue
   \let\setsomevalue\dosetevalue
   \let\p!doassign\p!e!doassign
   \let\setsomevalue\dosetevalue
   \xprocesscommaitem#1,],\...@relax@
   \let\p!doassign\p!n!doassign
   \let\setsomevalue\dosetnvalue
   \let\xdogetparameters\xdo...@n@parameters
   \let\currentvalue\empty}

\starttext

\getparameters[my][text=Hello]

\mytext

\expandparameters \getparameters[my][text=\currentvalue\space World!]

\mytext

\stoptext

Wolfgang

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

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


Re: [NTG-context] 10+ reasons why I still use MKII

2010-05-13 Thread Mojca Miklavec
[reshufling the order a bit]

First of all - I forgot to express my positive surprise - all the
horizontal breaks including hyphenation are *exactly the same* in MKII
and MKIV all over the document, even though MKII and MKIV are using
different fonts. Which is really nice.

\startyoumayignorethis
The only thing that really bothers me are so much different vertical
differences which show up in almost every document I ever write. MKIV
consistently takes more vertical space, so no matter what document I
try to recompile, it always ends up with more pages (and some weird
page breaks) when processing it with MKIV.

Yes, I know. The two are incompatible. Yes, I know. Different fonts
are being used. Yes, I know. Different algorithms/aproaches to break
pages. But it would be soo nice if the most basic documents with
LM fonts could turn out at least approximately the same. Horizontal
breaking works perfectly (it's identical). It's only vertical spacing
that's a tiny bit problematic and makes every recompiled document a
bit messy.

It might be nice to look a bit closer to the topic, like in the
example that I pointed out. There are some weirdnesses left, like the
equations that starts at least a line lower in MKIV when there's no
real reason for such a behaviour.
\stopyoumayignorethis

 \definedescription
   [latexdesc]
 [headstyle={\ss\bf},style=normal,align=left,location=hanging,width=fit,margin=0cm]

 just omit the align=left (was not handled in mkii)

Honestly, I have no idea why I had it there, but I guess that I was
copy-pasting from wiki. So I didn't even notice that that option had
no effect at all.

 also, commands starting with \latex behave unpredictable in mkiv due to
 luigis compatibility mode

That was the best comment in the thread. Thanks for making me a day :)

 \usetypescript[iwona]
 \setupbodyfont[iwona]
 \starttext
 $a+b$
 \stoptext

 hmm runs ok here ... but as i removed some old iwona stuff from type-otf

Thanks. In the new beta warnings are gone indeed. (I'll check the
changes later.)

 2.) Recently discussed on the mailing list - stopper has no influence in
 MKIV:

 \setupcaptions[stopper={:}]
 \starttext
 \placefigure{title}{\framed{bla}}
 \stoptext

 subtle difference:

 \setupcaptions[numberstopper={:}]
 \starttext
 \placefigure{title}{\framed{bla}}
 \stoptext

 all stopper, separator etc things are now more explicit as we have more
 control

Thanks a lot. (Just wandering - should stopper be a synonym for
numberstopper in MKIV then or is stopper also used somewhere else?)

 4.)
 A slightly more basic example:

 \enableregime[utf-8]
 \starttext
 \startbuffer[gnu]
 \startMPcode
 draw \sometxt{čšž};
 \stopMPcode
 \stopbuffer
 čšž
 \getbuffer[gnu]
 \stoptext

 hm, i get a pdf file with

 čšž čšž

 so what happens at your end?

Did you try to run that with MKII? MKIV works fine (I know that the
title was a bit misleading). I get the characters from font that are
equal to the second byte of UTF-8 representation of input character.

 5.)
 weird indeed, must be something basis as
 $$11\normalreqno{!!}$$

 also has it .. taco just confirmed that it must be something in luatex
 itself

Thanks. I'm sorry that I didn't simplify that one (I just took a
random equation out of a document since it looked nicer).

 6.) I know that \NR is not the most appropriate way to go into next
 row, but the following gives considerably different results in MKII
 and MKIV:

 \starttable[|l|]
 \NC \type{a} \NC\NR
 \NC \type{a} \NC\NR
 \NC \type{a} \NC\NR
 \stoptable

 probably because \type has no strut in mkiv ... maybe it should have

I don't know.

 9.) Note the big difference of when the formula starts vertically on page:

 \starttext
 \startformula
 a+b
 \stopformula
 \stoptext

 interesting, i need to look into that

Thanks :)

 11.) Missing bibliography entries:

 \usemodule[bib]
 % this line spoils the show
 \setuppublications[alternative=num]

 \setuppublicationlayout[webpage]{%
        \inserttitle{\bgroup\it }{\egroup. }{}%
        \inserturl{}{}{}%
 }

 \startpublication
        [k=FAIR,t=webpage,u=http://www.gsi.de/fair/]
        \biburl{http://www.gsi.de/fair/}
        \title{FAIR -- Facility for Antiproton and Ion Research}
 \stoppublication

 \starttext
 \cite[FAIR]\par
 \placepublications
 \stoptext

 magic to me, but we can look into bib mess stuff later

What can I do?

 3.) Bibliography citations give different result with the same setup
 (different numbers and different spacing in \placepublication - might
 be also worth testing with grid typesetting as I wasn't able to set up
 the alignment properly in MKII last time when I have tried). I'm not
 sure which one is right, but there's probably no reason to produce
 different results.

 \usemodule
        [bib]
 \setuppublications
        [alternative=num,
         criterium=all,
         sorttype=cite]

 \starttext
 

Re: [NTG-context] 10+ reasons why I still use MKII

2010-05-13 Thread luigi scarso
On Thu, May 13, 2010 at 3:42 PM, Mojca Miklavec
mojca.miklavec.li...@gmail.com wrote:
 also, commands starting with \latex behave unpredictable in mkiv due to
 luigis compatibility mode

 That was the best comment in the thread. Thanks for making me a day :)

hm, I'm pretty sure to don't know what is luigis compatibility mode here .


-- 
luigi
___
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] 10+ reasons why I still use MKII

2010-05-13 Thread Hans Hagen

On 13-5-2010 3:42, Mojca Miklavec wrote:


\startyoumayignorethis
The only thing that really bothers me are so much different vertical
differences which show up in almost every document I ever write. MKIV
consistently takes more vertical space, so no matter what document I
try to recompile, it always ends up with more pages (and some weird
page breaks) when processing it with MKIV.


\startcantresistmode

the lineheight relates to the ex height and as in mkiv we don't have the 
tfm limitations (those 16 values of ht dp) we have slightly different 
spacing


\stopcantresistmode


Yes, I know. The two are incompatible. Yes, I know. Different fonts
are being used. Yes, I know. Different algorithms/aproaches to break
pages. But it would be soo nice if the most basic documents with
LM fonts could turn out at least approximately the same. Horizontal
breaking works perfectly (it's identical). It's only vertical spacing
that's a tiny bit problematic and makes every recompiled document a
bit messy.


\startchallengingmode

well, you can try to figure out what 2.8ex in mkii and mkiv is and then 
have your own defaults for mkiv


\stopchallengingmode


It might be nice to look a bit closer to the topic, like in the
example that I pointed out. There are some weirdnesses left, like the
equations that starts at least a line lower in MKIV when there's no
real reason for such a behaviour.


\startexplanation
TeX tries hard to inject a baselineskip and also an empty hlist so that 
one always gets that line. In MkII I compensated for that hard to beat 
automatism. In MkIV this does not happen. We figured out that when we 
add a \noindent before $$ that we don't get this side effect so that now 
happens in the latest beta.

\stopexplanation


\stopyoumayignorethis



Thanks a lot. (Just wandering - should stopper be a synonym for
numberstopper in MKIV then or is stopper also used somewhere else?)


the more synonyme the more documentation


Did you try to run that with MKII? MKIV works fine (I know that the
title was a bit misleading). I get the characters from font that are
equal to the second byte of UTF-8 representation of input character.


you probably need to enable utf8 in the mp environment then


Thanks. I'm sorry that I didn't simplify that one (I just took a
random equation out of a document since it looked nicer).


random thesis ... interesting


9.) Note the big difference of when the formula starts vertically on page:

\starttext
\startformula
a+b
\stopformula
\stoptext


interesting, i need to look into that


Thanks :)


same problem as previous


What can I do?


make a complete test as small as possible


Does anyone else have an idea of whether \cite[a,b,c] should generate
[1,2,3] or [1-3]? I have an article at hand that has [1], [2], [3]
instead to be honest. I'm not sure, but [1-3] somehow doesn't appear
right to me. I have a feeling that each bib item needs to be cited
separately, but I may be wrong.


collapsing has always been there afaik

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] 10+ reasons why I still use MKII

2010-05-13 Thread Khaled Hosny
On Thu, May 13, 2010 at 04:16:12PM +0200, Hans Hagen wrote:
 On 13-5-2010 3:42, Mojca Miklavec wrote:
 
 \startyoumayignorethis
 The only thing that really bothers me are so much different vertical
 differences which show up in almost every document I ever write. MKIV
 consistently takes more vertical space, so no matter what document I
 try to recompile, it always ends up with more pages (and some weird
 page breaks) when processing it with MKIV.
 
 \startcantresistmode
 
 the lineheight relates to the ex height and as in mkiv we don't have
 the tfm limitations (those 16 values of ht dp) we have slightly
 different spacing

Something I find very annoying is variable interline spacing, if I've,
for example, a line with some Arabic words vocalized I get some times
too much white space above it that it almost looks like an empty line.
It makes the page look like crap. Is there a way to force fixed
interline spacing?

-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer
___
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] How to achieve transparency?

2010-05-13 Thread Marco
Hi,

I wonder how transparency works in ConTeXt. I expect in the following
example the text to be transparent. That's not the case.

\definecolor   [myI]  [r=1, g=.9, b=.7, a=.8]
\definecolor   [myII] [r=0, g=.9, b=0,  a=.8]
\setupbodyfont [sans, 36pt]
\def\t{Test}
\starttext
\bf
\hbox{\color [myI] {\hbox to 0pt{\t}}
  \color [myII] {\t}}
\stoptext

Thanks in advance
Marco


___
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] Multiple pleas for help (long)

2010-05-13 Thread Wolfgang Schuster

Am 10.05.10 02:28, schrieb Scott Steele:
Thanks so much for the help! Pleas 1, 2, 5, and 6 are completely 
solved. (In particular, Mojca, the fix for accents is fantastic!) I 
wasn't able to get \Frowny to work any better with the advice 
provided, but I found that when I scaled it down, it stopped knocking 
the text off the grid, and I have a hard time telling the difference 
in size between the old and new.


% New (works) :
\useexternalfigure[frowny][Frowny][factor=7,type=pdf]
\def\Frowny{\hbox{\externalfigure[frowny]}}
\useexternalfigure[smiley][Smiley][factor=7,type=pdf]
\def\Smiley{\hbox{\externalfigure[smiley]}}
\useexternalfigure[slashy][Slashy][factor=7,type=pdf]
\def\Slashy{\hbox{\externalfigure[slashy]}}


\def\Slashy{\dontleavehmode\smash[h]{\externalfigure[slashy]}}

the height of the picture is now ignored

I'm currently working on the Table of Contents formatting. I'm trying 
to format it as follows:


\define[3]\SectionListEntry
  {\noindent
   \simplealignedbox{left}  {2cm}{#2}%
   \simplealignedbox{middle}{5mm}{·}%
\simplealignedbox{right} {3cm}{#3}}

\setuplist
  [section]
  [alternative=command,
   command=\SectionListEntry]

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] 10+ reasons why I still use MKII

2010-05-13 Thread Hans Hagen

On 13-5-2010 4:32, Khaled Hosny wrote:

On Thu, May 13, 2010 at 04:16:12PM +0200, Hans Hagen wrote:

On 13-5-2010 3:42, Mojca Miklavec wrote:


\startyoumayignorethis
The only thing that really bothers me are so much different vertical
differences which show up in almost every document I ever write. MKIV
consistently takes more vertical space, so no matter what document I
try to recompile, it always ends up with more pages (and some weird
page breaks) when processing it with MKIV.


\startcantresistmode

the lineheight relates to the ex height and as in mkiv we don't have
the tfm limitations (those 16 values of ht dp) we have slightly
different spacing


Something I find very annoying is variable interline spacing, if I've,
for example, a line with some Arabic words vocalized I get some times
too much white space above it that it almost looks like an empty line.
It makes the page look like crap. Is there a way to force fixed
interline spacing?


turn turn grid on .. but even then, we need some nice heuristic for 
determing the right ht/dp ratio for arabic (can be set up)


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] How to achieve transparency?

2010-05-13 Thread Hans Hagen

On 13-5-2010 4:25, Marco wrote:

Hi,

I wonder how transparency works in ConTeXt. I expect in the following
example the text to be transparent. That's not the case.

\definecolor   [myI]  [r=1, g=.9, b=.7, a=.8]
\definecolor   [myII] [r=0, g=.9, b=0,  a=.8]


t=.5, a=1 (a is the method)


\setupbodyfont [sans, 36pt]
\def\t{Test}
\starttext
\bf
\hbox{\color [myI] {\hbox to 0pt{\t}}
   \color [myII] {\t}}
\stoptext

Thanks in advance
Marco


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



--

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


[NTG-context] Math symbols missing

2010-05-13 Thread gummybears
Hi

The following math symbols are missing,

0x222B normal integral \int
0x222C double integral \iint
0x222D triple integral \iiint
0x222E contour integral \oint
0x222F surface integral \oiint
0x2230 volume integral \oiiint

I also need the space-time integral \nt (4 i's)

Kind regards

PS Using latest stable context (MK-IV)
___
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] Storm (Lido) font support seems to be broken in newer versions of MKII

2010-05-13 Thread Honza Pohanka

What does [mr] [mc] [ma] in mathcollection stands for?

Jan


Dne Thu, 13 May 2010 15:09:02 +0200 Hans Hagen pra...@wxs.nl napsal(a):


On 13-5-2010 2:53, Mojca Miklavec wrote:


(A note to Hans: the question was about MKII. One would need to
rewrite the whole typescript for MKIV, sure, but the first step might
be to fix the almost-working MKII.)


mostly stripping ... no encodings any more


\usetypescript[Lido][st1]
\setupbodyfont[Lido,12pt]


probably something with the filtering ... i don't remember drastic  
changes, but one never knows


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
___



--
Tato zpráva byla vytvořena převratným poštovním klientem Opery:  
http://www.opera.com/mail/

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

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


[NTG-context] Bug in latest context (MK-IV) ?

2010-05-13 Thread gummybears
Hi,

Running the following test with the latest context (MK-IV 2010.05.13 12:15)
gives the following error.
Compiled fine with version MK-IV 2010.04.29 22:30 (side note : integral
symbols still not displaying correctly)

I was just wondering, is there a ConText test suite which I can use to test
the stability of a version ?
It is difficult to determine between versions, what is working. I have some
small test files
myself, but they only serve as a minimal test to see if I can at least run
them without getting errors.

! Missing $$ inserted.
to be read again
   \Ustopdisplaymath
\stopdisplaymath ...opinnermath \Ustopdisplaymath
  \par \afterdisplayspace
\p...
\dostopformula ...eter \c!alternative \v!formula }
  \nonoindentation
\checknex...
l.24 \stopformula

Test file
\starttext
$\int_{a}^{b}   $
$\iint_{a}^{b}  $
$\iiint_{a}^{b} $
$\oint_{a}^{b}  $
$\oiint_{a}^{b} $
$\oiiint_{a}^{b}$
\startformula[-]
\startalign
\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
\blank
This file has been typeset on \currentdate{}  at \currenttime,  with
\doifmodeelse{mkiv}
{mkiv,
LuaTeX version \the\luatexversion,
LuaTeX revision \luatexrevision,
(LuaTeX date stamp \luatexdatestamp),
using the command: \par
\type{context mathtest.tex}\par}
{mkii,
using the command: \par
\type{texexec mathtest.tex}\par}
\blank
ConTeXt version \contextversion.
\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] 10+ reasons why I still use MKII

2010-05-13 Thread Khaled Hosny
On Thu, May 13, 2010 at 05:00:01PM +0200, Hans Hagen wrote:
 On 13-5-2010 4:32, Khaled Hosny wrote:
 On Thu, May 13, 2010 at 04:16:12PM +0200, Hans Hagen wrote:
 On 13-5-2010 3:42, Mojca Miklavec wrote:
 
 \startyoumayignorethis
 The only thing that really bothers me are so much different vertical
 differences which show up in almost every document I ever write. MKIV
 consistently takes more vertical space, so no matter what document I
 try to recompile, it always ends up with more pages (and some weird
 page breaks) when processing it with MKIV.
 
 \startcantresistmode
 
 the lineheight relates to the ex height and as in mkiv we don't have
 the tfm limitations (those 16 values of ht dp) we have slightly
 different spacing
 
 Something I find very annoying is variable interline spacing, if I've,
 for example, a line with some Arabic words vocalized I get some times
 too much white space above it that it almost looks like an empty line.
 It makes the page look like crap. Is there a way to force fixed
 interline spacing?
 
 turn turn grid on .. but even then, we need some nice heuristic for
 determing the right ht/dp ratio for arabic (can be set up)

I recall trying grid a while ago but it didn't work, looks like I have
to set \setuplayout[grid=force].

Regards,
 Khaled

-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer
___
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] How to achieve transparency?

2010-05-13 Thread Marco
  I wonder how transparency works in ConTeXt. I expect in the
  following example the text to be transparent. That's not the case.
 
  \definecolor   [myI]  [r=1, g=.9, b=.7, a=.8]
  \definecolor   [myII] [r=0, g=.9, b=0,  a=.8]
 
 t=.5, a=1 (a is the method)
Oh! I assumed »a« stands for »alpha«. Thanks, Hans. Works as expected
now.

Marco


___
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] Storm (Lido) font support seems to be broken in newer versions of MKII

2010-05-13 Thread Aditya Mahajan

On Thu, 13 May 2010, Honza Pohanka wrote:


What does [mr] [mc] [ma] in mathcollection stands for?


This is what I remember

mr = Math Roman

ma, mb, mc, md, me = Extra math families.

The actual corresponance between ma etc and the fonts are set in a 
typescript. For example,


\starttypescript [math] [collection] [size]
 \definebodyfont [size] [mm] [ma = Font sa 1]
\stoptypescript

here collection is something like default, ams, etc, which is the 4th 
argument of \definetypescript.


\definetypescript[name] [math] [mm] [collection] [encoding]

size is something like 10pt, etc. It can also be a list.

Font is the name of the font that ma should stand for.

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] does expandaparameters work

2010-05-13 Thread Erik Margraf
Thanks!! Works perfectly for me. Is this a patch for syst-aux.mkiv?

2010/5/13 Wolfgang Schuster schuster.wolfg...@googlemail.com

 Am 12.05.10 19:29, schrieb Erik Margraf:

  Hello,
 I use \expandparameters in a macro definition.
 --
 \expandparameters\setupbackgrounds[page][background={\currentvalue,#1}]
 --
 This works in MkII (texexec), but doesn't work in MkIV (context).

 If I define all layers in a single declaration, the results with MkII and
 MkIV
 are identical.

 Should this work? Or do I have to add something for MkIV?


 \unprotected\def\xdo...@e@parameters#1]%
  {\let\dosetnvalue\setsomevalue
   \let\setsomevalue\dosetevalue
   \let\p!doassign\p!e!doassign
   \let\setsomevalue\dosetevalue
   \xprocesscommaitem#1,],\...@relax@
   \let\p!doassign\p!n!doassign
   \let\setsomevalue\dosetnvalue
   \let\xdogetparameters\xdo...@n@parameters
   \let\currentvalue\empty}

 \starttext

 \getparameters[my][text=Hello]

 \mytext

 \expandparameters \getparameters[my][text=\currentvalue\space World!]

 \mytext

 \stoptext

 Wolfgang


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

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


Re: [NTG-context] 10+ reasons why I still use MKII

2010-05-13 Thread Mojca Miklavec
Dear Hans,

(I'll answer the rest later)

 Did you try to run that with MKII? MKIV works fine (I know that the
 title was a bit misleading). I get the characters from font that are
 equal to the second byte of UTF-8 representation of input character.

 you probably need to enable utf8 in the mp environment then

But it has always worked perfectly until recently. And it's not really
mp environment. I suspect that the text gets typeset with TeX, not
with metapost, so metapost enviroment should not really count.

I have a version of ConTeXt that dates back to
2009.11.24 10:13
and in that one it still works properly. In version
2010.02.26 10:57
it is broken.

 Thanks. I'm sorry that I didn't simplify that one (I just took a
 random equation out of a document since it looked nicer).

 random thesis ... interesting

You know ... you have written a devoted \startsimplethesis for me,
don't you remember :)
Random images and equations were included there as well, I just
extended macros a bit to adapt the result to the expertise of each
jury member last september :)

 What can I do?

 make a complete test as small as possible

It doesn't get much simpler than the following:

\usemodule[bib]
% this line spoils the show
\setuppublications[alternative=num]
\setuppublicationlayout[webpage]{\inserturl{}{}{}}
\startpublication[k=pragma,t=webpage]
\biburl{http://www.pragma-ade.com}
\stoppublication

\starttext
\cite[pragma]\par\placepublications
\stoptext

Defining new publication types doesn't seem to be compatible with
alternative=num in MKIV.

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
___


[NTG-context] wikipedians: kind request

2010-05-13 Thread Mojca Miklavec
Dear Wikipedians,

If any other member of the list is an experienced Wikepedian, you are
kindly asked to put your vote here (without exposing too much that you
come from ConTeXt community):

http://www.xkcd.com/739/

Sorry, not on the link above but on the two below:

http://en.wikipedia.org/wiki/Wikipedia:Articles_for_deletion/Hans_Hagen
http://en.wikipedia.org/wiki/Wikipedia:Articles_for_deletion/Taco_Hoekwater

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] wikipedians: kind request

2010-05-13 Thread Mojca Miklavec
Or, yet better - since there are probably many publishers on the list
- is anyone ready to publish some biography of ConTeXt developers in
some reliable independent source? :) :) :)

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
___


[NTG-context] Ampersand in Metapost

2010-05-13 Thread Marco
Hi,

I have a problem producing an ampersand in metapost. In ConTeXt it works as
expected. Have a look at the following example.

\starttext
\ % OK
\startMPcode
label(textext(\),origin); % produces error
\stopMPcode
\stoptext

The compile time error message is as follows:
  ! Misplaced alignment tab character .
  l.1 \MPLIBsettext{1}{


Marco


___
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] wikipedians: kind request

2010-05-13 Thread Martin Schröder
2010/5/13 Mojca Miklavec mojca.miklavec.li...@gmail.com:
 If any other member of the list is an experienced Wikepedian, you are
 kindly asked to put your vote here (without exposing too much that you
 come from ConTeXt community):

cough/
http://en.wikipedia.org/wiki/Wikipedia:CANVAS
http://en.wikipedia.org/wiki/Template:Notaballot

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] wikipedians: kind request

2010-05-13 Thread Martin Schröder
2010/5/13 Mojca Miklavec mojca.miklavec.li...@gmail.com:
 Or, yet better - since there are probably many publishers on the list
 - is anyone ready to publish some biography of ConTeXt developers in
 some reliable independent source? :) :) :)

THAT would help; e.g. an article in ACM Queue :-)

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] 10+ reasons why I still use MKII

2010-05-13 Thread Idris Samawi Hamid ادريس سماوي ح امد



On Thu, 13 May 2010 10:00:01 -0500, Hans Hagen pra...@wxs.nl wrote:


On 13-5-2010 4:32, Khaled Hosny wrote:

On Thu, May 13, 2010 at 04:16:12PM +0200, Hans Hagen wrote:

On 13-5-2010 3:42, Mojca Miklavec wrote:


\startyoumayignorethis
The only thing that really bothers me are so much different vertical
differences which show up in almost every document I ever write. MKIV
consistently takes more vertical space, so no matter what document I
try to recompile, it always ends up with more pages (and some weird
page breaks) when processing it with MKIV.


\startcantresistmode

the lineheight relates to the ex height and as in mkiv we don't have
the tfm limitations (those 16 values of ht dp) we have slightly
different spacing


Something I find very annoying is variable interline spacing, if I've,
for example, a line with some Arabic words vocalized I get some times
too much white space above it that it almost looks like an empty line.
It makes the page look like crap. Is there a way to force fixed
interline spacing?


Can you give an example?

turn turn grid on .. but even then, we need some nice heuristic for  
determing the right ht/dp ratio for arabic (can be set up)


I have some nice texts that illustrate a standard balance, but I'd like to  
see what Khaled has in mind exactly before I comment further...


Peace
Idris
--
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shi`i Studies
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

___
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] wikipedians: kind request

2010-05-13 Thread Henning Hraban Ramm


Am 2010-05-13 um 21:27 schrieb Mojca Miklavec:


Or, yet better - since there are probably many publishers on the list
- is anyone ready to publish some biography of ConTeXt developers in
some reliable independent source? :) :) :)


Oh, it would have been fit for the latest issue of our Unitarian  
church magazine about chaos and order. But someone should have  
submitted the article in time...

;-)


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] 10+ reasons why I still use MKII

2010-05-13 Thread Khaled Hosny
On Thu, May 13, 2010 at 01:46:28PM -0500, Idris Samawi Hamid ادريس  سماوي حامد 
wrote:
 
 
 On Thu, 13 May 2010 10:00:01 -0500, Hans Hagen pra...@wxs.nl wrote:
 
 On 13-5-2010 4:32, Khaled Hosny wrote:
 On Thu, May 13, 2010 at 04:16:12PM +0200, Hans Hagen wrote:
 On 13-5-2010 3:42, Mojca Miklavec wrote:
 
 \startyoumayignorethis
 The only thing that really bothers me are so much different vertical
 differences which show up in almost every document I ever write. MKIV
 consistently takes more vertical space, so no matter what document I
 try to recompile, it always ends up with more pages (and some weird
 page breaks) when processing it with MKIV.
 
 \startcantresistmode
 
 the lineheight relates to the ex height and as in mkiv we don't have
 the tfm limitations (those 16 values of ht dp) we have slightly
 different spacing
 
 Something I find very annoying is variable interline spacing, if I've,
 for example, a line with some Arabic words vocalized I get some times
 too much white space above it that it almost looks like an empty line.
 It makes the page look like crap. Is there a way to force fixed
 interline spacing?
 
 Can you give an example?
 
 turn turn grid on .. but even then, we need some nice heuristic
 for determing the right ht/dp ratio for arabic (can be set up)
 
 I have some nice texts that illustrate a standard balance, but I'd
 like to see what Khaled has in mind exactly before I comment
 further...

Nothing special, I always expect interline space to be fixed, I don't
know if TeX always make interline spacing variable, but this wasn't an
issue with English text. However, with Arabic, Tashkil marks seems to
always cause a noticeable extra whitespace above the line.
See the uneven distribution of vertical whitespace in this example (it
can be even worse than this in reality):

\usemodule[simplefonts]
\setmainfont[Arabic Typesetting][features=arabic]

\starttext
\pardir TRT\textdir TRT
\dorecurse{10}{\dorecurse{20}{نص عربي } نَصُّ مُشكَّل \dorecurse{20}{نص عربي}}
\stoptext

Regards,
 Khaled

-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer
___
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] wikipedians: kind request

2010-05-13 Thread Idris Samawi Hamid ادريس سماوي ح امد



On Thu, 13 May 2010 14:19:52 -0500, Mojca Miklavec  
mojca.miklavec.li...@gmail.com wrote:



http://en.wikipedia.org/wiki/Wikipedia:Articles_for_deletion/Hans_Hagen
http://en.wikipedia.org/wiki/Wikipedia:Articles_for_deletion/Taco_Hoekwater


Don't these people have a life at all? What a bunch of puny trolls

Idris
--
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shi`i Studies
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

___
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] Storm (Lido) font support seems to be broken in newer versions of MKII

2010-05-13 Thread Hans Hagen

On 13-5-2010 5:13, Honza Pohanka wrote:

What does [mr] [mc] [ma] in mathcollection stands for?


families

mr == math roman : reserved for roman
..
ma == math symbols a : normally ams a set
mb == math symbols b : normally ams b set
mc == math symbols c : free
md == math symbols d : free



-
  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] 10+ reasons why I still use MKII

2010-05-13 Thread Hans Hagen

On 13-5-2010 10:06, Khaled Hosny wrote:


Nothing special, I always expect interline space to be fixed, I don't
know if TeX always make interline spacing variable, but this wasn't an
issue with English text. However, with Arabic, Tashkil marks seems to
always cause a noticeable extra whitespace above the line.
See the uneven distribution of vertical whitespace in this example (it
can be even worse than this in reality):


for arabic you really need to set the interline space (idris might have 
more input on this)


- it has more height than depth
- vowels add to the height of the line
- tex adds some interline space when lines touch


\usemodule[simplefonts]
\setmainfont[Arabic Typesetting][features=arabic]

\starttext
\pardir TRT\textdir TRT
\dorecurse{10}{\dorecurse{20}{نص عربي } نَصُّ مُشكَّل \dorecurse{20}{نص عربي}}
\stoptext

Regards,
  Khaled




--

-
  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] 10+ reasons why I still use MKII

2010-05-13 Thread Idris Samawi Hamid ادريس سماوي ح امد



On Thu, 13 May 2010 15:06:09 -0500, Khaled Hosny khaledho...@eglug.org
wrote:


Something I find very annoying is variable interline spacing, if I've,
for example, a line with some Arabic words vocalized I get some times
too much white space above it that it almost looks like an empty line.
It makes the page look like crap. Is there a way to force fixed
interline spacing?

Can you give an example?

turn turn grid on .. but even then, we need some nice heuristic
for determing the right ht/dp ratio for arabic (can be set up)

I have some nice texts that illustrate a standard balance, but I'd
like to see what Khaled has in mind exactly before I comment
further...

Nothing special, I always expect interline space to be fixed, I don't
know if TeX always make interline spacing variable, but this wasn't an
issue with English text. However, with Arabic, Tashkil marks seems to
always cause a noticeable extra whitespace above the line.
See the uneven distribution of vertical whitespace in this example (it
can be even worse than this in reality):
\usemodule[simplefonts]
\setmainfont[Arabic Typesetting][features=arabic]
\starttext
\pardir TRT\textdir TRT
\dorecurse{10}{\dorecurse{20}{نص عربي } نَصُّ مُشكَّل \dorecurse{20}{نص  
عربي}}

\stoptext


I used to find this annoying years ago but today I look at it as a good
feature. In your \definebodyfontenvironment you just have to define a good
interlinespace. Presumably the one picked up from the font by luatex is
not high enough.

In my journal, I used to use \struttedbox's (or something similarly named)
to suppress this when mixing english and arabic...

Professionally mixed latin-arabic texts often adjust the interline
spacing, especially when arabic is introduced into latin paragraphs. This
is almost unavoidable since making arabic-script readable and matchable to
latin involves a larger relative size for aesthetic optics.

Sometimes forcing will look nice, but even then one probably has to add a
bit of interlinespace to the latin font to get the right balance. That is,
a latin document that uses a LOT of interparagraph arabic will want a bit
extra interlinespace to begin with, so that forcing will generally give
good results.

Best wishes
Idris


--
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shi`i Studies
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

___
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] wikipedians: kind request

2010-05-13 Thread Khaled Hosny
On Thu, May 13, 2010 at 09:19:52PM +0200, Mojca Miklavec wrote:
 Dear Wikipedians,
 
 If any other member of the list is an experienced Wikepedian, you are
 kindly asked to put your vote here (without exposing too much that you
 come from ConTeXt community):
 
 http://www.xkcd.com/739/
 
 Sorry, not on the link above but on the two below:
 
 http://en.wikipedia.org/wiki/Wikipedia:Articles_for_deletion/Hans_Hagen
 http://en.wikipedia.org/wiki/Wikipedia:Articles_for_deletion/Taco_Hoekwater

Well, I don't see the point of putting much effort into this, wikipedia
have long mutated into a bureaucratic monster controlled by people who
would trust blog posts as reliable independent sources, I just gave
up arguing with such people.


-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer
___
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] How to achieve transparency?

2010-05-13 Thread Hans Hagen

On 13-5-2010 7:13, Marco wrote:

I wonder how transparency works in ConTeXt. I expect in the
following example the text to be transparent. That's not the case.

\definecolor   [myI]  [r=1, g=.9, b=.7, a=.8]
\definecolor   [myII] [r=0, g=.9, b=0,  a=.8]


t=.5, a=1 (a is the method)

Oh! I assumed »a« stands for »alpha«. Thanks, Hans. Works as expected
now.


r = red channel
g = green channel
b = blue channel

c = cyan channel
m = magenta channel
y = yellow channel
k = black channel

h = hue or hexadecimal
s = saturation
v = value (or so)

h = hex (i'll add x for hex as well)

a = alternative
t = transparency factor

s = gray value

p = spotcolor percentage
e = spotcolorname

name 1 = duotone 1
name 2 = duotone 2

that's about it

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] Ampersand in Metapost

2010-05-13 Thread Hans Hagen

On 13-5-2010 9:18, Marco wrote:

Hi,

I have a problem producing an ampersand in metapost. In ConTeXt it works as
expected. Have a look at the following example.

\starttext
\  % OK
\startMPcode
label(textext(\),origin); % produces error
\stopMPcode
\stoptext

The compile time error message is as follows:
   ! Misplaced alignment tab character.
   l.1 \MPLIBsettext{1}{


\letterpercent


-
  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] 10+ reasons why I still use MKII

2010-05-13 Thread Hans Hagen

On 13-5-2010 9:31, Idris Samawi Hamid ادريس  سماوي حامد wrote:


Sometimes forcing will look nice, but even then one probably has to add a
bit of interlinespace to the latin font to get the right balance. That is,
a latin document that uses a LOT of interparagraph arabic will want a bit
extra interlinespace to begin with, so that forcing will generally give
good results.


you can set up grid snapping according to several strategies (will be 
documented when okay)


- snap to lineht/dp
- add strutht/dp
- find minimum noflines needed, round up/down (dp and/or ht)

it's not only a mixed latin-arabic problem, lines with large math also 
have this problem


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] 10+ reasons why I still use MKII

2010-05-13 Thread Hans Hagen

On 13-5-2010 7:08, Khaled Hosny wrote:

On Thu, May 13, 2010 at 05:00:01PM +0200, Hans Hagen wrote:

On 13-5-2010 4:32, Khaled Hosny wrote:

On Thu, May 13, 2010 at 04:16:12PM +0200, Hans Hagen wrote:

On 13-5-2010 3:42, Mojca Miklavec wrote:


\startyoumayignorethis
The only thing that really bothers me are so much different vertical
differences which show up in almost every document I ever write. MKIV
consistently takes more vertical space, so no matter what document I
try to recompile, it always ends up with more pages (and some weird
page breaks) when processing it with MKIV.


\startcantresistmode

the lineheight relates to the ex height and as in mkiv we don't have
the tfm limitations (those 16 values of ht dp) we have slightly
different spacing


Something I find very annoying is variable interline spacing, if I've,
for example, a line with some Arabic words vocalized I get some times
too much white space above it that it almost looks like an empty line.
It makes the page look like crap. Is there a way to force fixed
interline spacing?


turn turn grid on .. but even then, we need some nice heuristic for
determing the right ht/dp ratio for arabic (can be set up)


I recall trying grid a while ago but it didn't work, looks like I have
to set \setuplayout[grid=force].


for sure there are bugs as it needs much testing but we have predefined 
grid setups:


% none don't enlarge
% halfline enlarge by halfline/halfline
% line enlarge by line/line
% strutenlarge by ht/dp (default)
% firstalign to top line
% last align to bottom line
% mindepth round depth down
% maxdepth round depth up
% minheightround height down
% maxheightround height up
% localuse local interline space
% shift:-3tp   vertical shift within box

\definegridsnapping[normal]   [maxheight,maxdepth,strut]
\definegridsnapping[standard] [maxheight,maxdepth,strut]
\definegridsnapping[yes]  [maxheight,maxdepth,strut]

\definegridsnapping[strict]   [\v!maxdepth:0.8,maxheight:0.8,strut]
\definegridsnapping[tolerant] [\v!maxdepth:1.2,maxheight:1.2,strut]

\definegridsnapping[top]  [minheight,maxdepth,strut]
\definegridsnapping[bottom]   [maxheight,mindepth,strut]
\definegridsnapping[both] [minheight,mindepth,strut]

\definegridsnapping[broad][maxheight,maxdepth,strut,0.8]
\definegridsnapping[fit]  [maxheight,maxdepth,strut,1.2]

\definegridsnapping[first][first]
\definegridsnapping[last] [last]
\definegridsnapping[high] [minheight,maxdepth,none]
\definegridsnapping[low]  [maxheight,mindepth,none]
\definegridsnapping[line] [line]
\definegridsnapping[strut][strut]

\definegridsnapping[max]  [maxdepth,maxheight,strut]
\definegridsnapping[min]  [mindepth,minheight,strut]

eventually an structural elements will have a grid key

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] Bug in latest context (MK-IV) ?

2010-05-13 Thread Hans Hagen

On 13-5-2010 6:09, gummybears wrote:

Hi,

Running the following test with the latest context (MK-IV 2010.05.13 12:15)
gives the following error.
Compiled fine with version MK-IV 2010.04.29 22:30 (side note : integral
symbols still not displaying correctly)

I was just wondering, is there a ConText test suite which I can use to test
the stability of a version ?
It is difficult to determine between versions, what is working. I have some
small test files
myself, but they only serve as a minimal test to see if I can at least run
them without getting errors.


we're working on that


! Missing $$ inserted.
to be read again
\Ustopdisplaymath
\stopdisplaymath ...opinnermath \Ustopdisplaymath
   \par \afterdisplayspace
\p...
\dostopformula ...eter \c!alternative \v!formula }
   \nonoindentation
\checknex...
l.24 \stopformula


strange ... for the moment use:

\def\startdisplaymath
  {\bgroup
   \par
   \informulatrue
   \beforedisplayspace
   \par
   \ifvmode
  \prevdepth-\maxdimen % texbook pagina 79-80
   \fi
   \noindent % else funny hlist with funny baselineskip
   $$% \Ustartdisplaymath
   \setdisplaydimensions
  %\setpredisplaysize
   \startinnermath}

\def\stopdisplaymath
  {\stopinnermath
   $$% \Ustopdisplaymath
   \par
   \afterdisplayspace
   \par
   \egroup}

taco and i need to check why the \Uprimitive approach does not work


btw, it looks like we need to fix the double and triple integrals


-
  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] 10+ reasons why I still use MKII

2010-05-13 Thread Khaled Hosny
On Thu, May 13, 2010 at 10:25:06PM +0200, Hans Hagen wrote:
 On 13-5-2010 10:06, Khaled Hosny wrote:
 
 Nothing special, I always expect interline space to be fixed, I don't
 know if TeX always make interline spacing variable, but this wasn't an
 issue with English text. However, with Arabic, Tashkil marks seems to
 always cause a noticeable extra whitespace above the line.
 See the uneven distribution of vertical whitespace in this example (it
 can be even worse than this in reality):
 
 for arabic you really need to set the interline space (idris might
 have more input on this)
 
 - it has more height than depth

Not always عٍ or فيٍ is as deep as high is أً.

 - vowels add to the height of the line
 - tex adds some interline space when lines touch

-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer
___
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] 10+ reasons why I still use MKII

2010-05-13 Thread Hans Hagen

On 13-5-2010 11:26, Khaled Hosny wrote:

On Thu, May 13, 2010 at 10:25:06PM +0200, Hans Hagen wrote:

On 13-5-2010 10:06, Khaled Hosny wrote:


Nothing special, I always expect interline space to be fixed, I don't
know if TeX always make interline spacing variable, but this wasn't an
issue with English text. However, with Arabic, Tashkil marks seems to
always cause a noticeable extra whitespace above the line.
See the uneven distribution of vertical whitespace in this example (it
can be even worse than this in reality):


for arabic you really need to set the interline space (idris might
have more input on this)

- it has more height than depth


Not always عٍ or فيٍ is as deep as high is أً.


so for say 12pt arabic we should use 8pt ht and 8pt depth?

-
  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] Ampersand in Metapost

2010-05-13 Thread Mojca Miklavec
On Thu, May 13, 2010 at 22:58, Hans Hagen wrote:
 On 13-5-2010 9:18, Marco wrote:

 I have a problem producing an ampersand in metapost. In ConTeXt it works
 as expected. Have a look at the following example.

 \starttext
 \  % OK
 \startMPcode
 label(textext(\),origin); % produces error
 \stopMPcode
 \stoptext

 The compile time error message is as follows:
   ! Misplaced alignment tab character.
   l.1 \MPLIBsettext{1}{

 \letterpercent

Or maybe \letterampersand if you want to get the desired glyph :)

Alternatively you could try to use
label(\sometxt{\},origin);

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] 10+ reasons why I still use MKII

2010-05-13 Thread Hans Hagen

On 13-5-2010 8:34, Mojca Miklavec wrote:

Dear Hans,

(I'll answer the rest later)


Did you try to run that with MKII? MKIV works fine (I know that the
title was a bit misleading). I get the characters from font that are
equal to the second byte of UTF-8 representation of input character.


you probably need to enable utf8 in the mp environment then


But it has always worked perfectly until recently. And it's not really
mp environment. I suspect that the text gets typeset with TeX, not
with metapost, so metapost enviroment should not really count.

I have a version of ConTeXt that dates back to
 2009.11.24 10:13
and in that one it still works properly. In version
 2010.02.26 10:57
it is broken.


hm, let's move this off list then ... (just make very small for sure 
failing tests that i then can add to the test suite)



You know ... you have written a devoted \startsimplethesis for me,
don't you remember :)
Random images and equations were included there as well, I just
extended macros a bit to adapt the result to the expertise of each
jury member last september :)


surely i remember and i'm working on a more advanced version for your 
upcoming thesis, with automatic bibliographic references and so, but 
i'll only finish it when you will use mkiv



What can I do?


make a complete test as small as possible


It doesn't get much simpler than the following:

\usemodule[bib]
% this line spoils the show


% this example spoils my weekend


\setuppublications[alternative=num]
\setuppublicationlayout[webpage]{\inserturl{}{}{}}
\startpublication[k=pragma,t=webpage]
\biburl{http://www.pragma-ade.com}
\stoppublication

\starttext
\cite[pragma]\par\placepublications
\stoptext


hm, you set it to num and get a num only? i'll have to check what happens

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] How to achieve transparency?

2010-05-13 Thread Marco
On Thu, 13 May 2010 22:57:50 +0200, Hans Hagen pra...@wxs.nl wrote:

 On 13-5-2010 7:13, Marco wrote:
  I wonder how transparency works in ConTeXt. I expect in the
  following example the text to be transparent. That's not the case.
 
  \definecolor   [myI]  [r=1, g=.9, b=.7, a=.8]
  \definecolor   [myII] [r=0, g=.9, b=0,  a=.8]
 
  t=.5, a=1 (a is the method)
  Oh! I assumed »a« stands for »alpha«. Thanks, Hans. Works as
  expected now.
 
 r = red channel
 g = green channel
 b = blue channel
 
 c = cyan channel
 m = magenta channel
 y = yellow channel
 k = black channel
 
 h = hue or hexadecimal
 s = saturation
 v = value (or so)
 
 h = hex (i'll add x for hex as well)
 
 a = alternative
 t = transparency factor
 
 s = gray value
 
 p = spotcolor percentage
 e = spotcolorname
 
 name 1 = duotone 1
 name 2 = duotone 2
 
 that's about it
 
 Hans
Thanks for the explanation.

Marco


___
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] Ampersand in Metapost

2010-05-13 Thread Marco
On Thu, 13 May 2010 22:58:46 +0200, Hans Hagen pra...@wxs.nl wrote:

 On 13-5-2010 9:18, Marco wrote:
  Hi,
 
  I have a problem producing an ampersand in metapost. In ConTeXt it
  works as expected. Have a look at the following example.
 
  \starttext
  \  % OK
  \startMPcode
  label(textext(\),origin); % produces error
  \stopMPcode
  \stoptext
 
  The compile time error message is as follows:
 ! Misplaced alignment tab character.
 l.1 \MPLIBsettext{1}{
 
 \letterpercent
Doesn't work. I suppose you mean \letterampersand. If I change \ into
\letterampersand I get exactly the same error as \ produces (BTW:
\letterpercent also produces an error, but a different one).

I discovered that the ugly \char`\ works as a workaround (or is this
the final solution?).
 
Thanks for your help.
Marco


___
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] Ampersand in Metapost

2010-05-13 Thread Mojca Miklavec
On Thu, May 13, 2010 at 23:45, Marco net...@lavabit.com wrote:
 On Thu, 13 May 2010 22:58:46 +0200, Hans Hagen pra...@wxs.nl wrote:
 On 13-5-2010 9:18, Marco wrote:
  Hi,
 
  I have a problem producing an ampersand in metapost. In ConTeXt it
  works as expected. Have a look at the following example.
 
  \starttext
  \  % OK
  \startMPcode
  label(textext(\),origin); % produces error
  \stopMPcode
  \stoptext
 
  The compile time error message is as follows:
     ! Misplaced alignment tab character.
     l.1 \MPLIBsettext{1}{

 \letterpercent
 Doesn't work. I suppose you mean \letterampersand. If I change \ into
 \letterampersand I get exactly the same error as \ produces (BTW:
 \letterpercent also produces an error, but a different one).

So:
- label(textext(\letterbackslash\letterampersand),origin);
- label(textext(\letterbackslash\),origin);

This is because the commands are interpreted with TeX before they are
written to mpgraph.mp. The \letterampersand or \ generates the
character  alone: you need to preceed it with backslash, so that
metapost finally knows what to do.

Mojca

PS: I would say: better use \sometxt which is far more reliable unless
you have to use textext to do string manipulation.
___
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] \showmathcharacters doesn't work (MacTex 2009)

2010-05-13 Thread Riobard
Hi, 

I want to produce a list of math characters for reference. Followed the wiki 
page it's supposed to be a simple call to \showcharacters. But the following 
tex file 

\starttext
\showmathcharacters
\stoptext


produces an empty table. \showcharacters doesn't work either. Any idea why? 
___
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] index sorting and formatting mixed up

2010-05-13 Thread Michael Saunders
\setupregister[index][bd][pagestyle=bold]
\starttext
\index{bc}\index{be}
This is a \index[bd::]{test}test.
\page
This is a less important \index{test}test.
\page
\placeindex
\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] Ampersand in Metapost

2010-05-13 Thread Aditya Mahajan

On Fri, 14 May 2010, Mojca Miklavec wrote:


On Thu, May 13, 2010 at 23:45, Marco net...@lavabit.com wrote:

On Thu, 13 May 2010 22:58:46 +0200, Hans Hagen pra...@wxs.nl wrote:

On 13-5-2010 9:18, Marco wrote:
 Hi,

 I have a problem producing an ampersand in metapost. In ConTeXt it
 works as expected. Have a look at the following example.

 \starttext
 \  % OK
 \startMPcode
 label(textext(\),origin); % produces error
 \stopMPcode
 \stoptext

 The compile time error message is as follows:
    ! Misplaced alignment tab character.
    l.1 \MPLIBsettext{1}{

\letterpercent

Doesn't work. I suppose you mean \letterampersand. If I change \ into
\letterampersand I get exactly the same error as \ produces (BTW:
\letterpercent also produces an error, but a different one).


So:
- label(textext(\letterbackslash\letterampersand),origin);
- label(textext(\letterbackslash\),origin);

This is because the commands are interpreted with TeX before they are
written to mpgraph.mp. The \letterampersand or \ generates the
character  alone: you need to preceed it with backslash, so that
metapost finally knows what to do.


So, should all the \letter... commands (basically anything generated from 
char-def.lua) be unexpandable?


You can also try \noexpand\letterampersand

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 2010.05.08 - 3D annotations

2010-05-13 Thread Michail Vidiassov

Dear Hans,

On Thu, 13 May 2010, Hans Hagen wrote:

well, i'm that someone but indeed i didn't test it (as i have no test files 
on my system anyway) .. are those tests you sent free? i.e. can i add them to 
the testbed?



patch and test case attached


patched roughly that way ... new beta on the website


Already?
MTXrun | current version: 2010.05.13 12:15
has old version of lpdf-u3d.lua

Tests are free (made by me in free Asymptote tool).
BTW, there were u3d test files sent to you some time ago
(their names can be seen in back-u3d.mkiv).
I'll try to put them together with back-u3d.mkiv into a usable test case.

One more 3D related questoin - support for attaching files to PDF.
It seems that instead of embedding 3D annotation into main PDF file
sometimes it is better to attach to it a separate file with just
an annotation in it and have a picture that will launch that file when 
clicked on. It is done in LaTeX via attachfile2 package, like

as in http://www.iaas.msu.ru/tmp/u3d/m117_old.pdf at page 194
Is it posiible to have something like it in ConTeXt?

   Sincerely, Michail

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