Re: [NTG-context] wrong positioning of MP graphic in layer

2013-10-07 Thread luigi scarso
On Mon, Oct 7, 2013 at 10:04 PM, Pablo Rodríguez  wrote:

> On 10/07/2013 07:16 PM, luigi scarso wrote:
> > On Mon, Oct 7, 2013 at 5:56 PM, Pablo Rodríguez wrote:
> >  Dear list,
> >
> >  I have the following sample:
> >  [...]
>
> Many thanks for your reply, Luigi.
>
> I need to insist on this sample, because the layer doesn’t behave as such:
>
> \definelayer[wrongpositioned][x=5000cm, y=5000cm, state=start]
> \setuplayer[wrongpositioned]{\startMPcode draw
> (0mm,0mm)--(8mm,0mm)--(8mm,38mm)--(14mm,38mm) ; \stopMPcode}
> \setupbackgrounds[page][background={wrongpositioned}]
> \starttext
> \input knuth
> \stoptext
>
> x and y are outside the page in the layer definition (50 meters).
>
> It should be a stupid error, but I cannot say which one.
>
> It is a line that I need for my work.
>


I don't understand  what exactly you need, but I hope this can help you.

\showlayout
\showframe

\definelayer[wrongpositioned]

\setuplayer[wrongpositioned][x=\backspace, y=\dimexpr
\topspace+\headerheight\relax, state=start]

\setlayer[wrongpositioned]{\startMPcode
draw (0mm,0mm)--(TextWidth,0mm)--(TextWidth,TextHeight)--(0mm,TextHeight)
-- cycle withpen pencircle scaled 2 withcolor red;
drawarrow (0mm,0mm) -- (TextWidth,TextHeight) withpen pencircle scaled 2
withcolor blue;
drawarrow (0mm,TextHeight) -- (TextWidth,0mm) withpen pencircle scaled 2
withcolor black;
fill (0mm,0mm) -- (0mm,-FooterHeight) -- (TextWidth,-FooterHeight) --
(TextWidth,0mm) -- cycle withcolor blue;
\stopMPcode}

\setupbackgrounds[page][background={wrongpositioned}]

\starttext
\input knuth
\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] wrong positioning of MP graphic in layer

2013-10-07 Thread Hans Hagen

On 10/7/2013 10:04 PM, Pablo Rodríguez wrote:

On 10/07/2013 07:16 PM, luigi scarso wrote:

On Mon, Oct 7, 2013 at 5:56 PM, Pablo Rodríguez wrote:
  Dear list,

  I have the following sample:
  [...]


Many thanks for your reply, Luigi.

I need to insist on this sample, because the layer doesn’t behave as such:

\definelayer[wrongpositioned][x=5000cm, y=5000cm, state=start]
\setuplayer[wrongpositioned]{\startMPcode draw
(0mm,0mm)--(8mm,0mm)--(8mm,38mm)--(14mm,38mm) ; \stopMPcode}
\setupbackgrounds[page][background={wrongpositioned}]
\starttext
\input knuth
\stoptext

x and y are outside the page in the layer definition (50 meters).

It should be a stupid error, but I cannot say which one.

It is a line that I need for my work.


  Could anyone be so kind to explain me what location and corner mean in
  layers?

You can start from here
[...]


Many thanks for this excellent example. Playing with it is the best way
to learn.


you confuse \setuplayer with setlayer

-
  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] wrong positioning of MP graphic in layer

2013-10-07 Thread Pablo Rodríguez
On 10/07/2013 07:16 PM, luigi scarso wrote:
> On Mon, Oct 7, 2013 at 5:56 PM, Pablo Rodríguez wrote:
>  Dear list,
> 
>  I have the following sample:
>  [...]

Many thanks for your reply, Luigi.

I need to insist on this sample, because the layer doesn’t behave as such:

\definelayer[wrongpositioned][x=5000cm, y=5000cm, state=start]
\setuplayer[wrongpositioned]{\startMPcode draw
(0mm,0mm)--(8mm,0mm)--(8mm,38mm)--(14mm,38mm) ; \stopMPcode}
\setupbackgrounds[page][background={wrongpositioned}]
\starttext
\input knuth
\stoptext

x and y are outside the page in the layer definition (50 meters).

It should be a stupid error, but I cannot say which one.

It is a line that I need for my work.

>  Could anyone be so kind to explain me what location and corner mean in
>  layers?
>  
> You can start from here
> [...]

Many thanks for this excellent example. Playing with it is the best way
to learn.

Thanks again for your help,


Pablo
-- 
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] LuaTeX fonts script update error

2013-10-07 Thread Hans Hagen

On 10/7/2013 9:22 PM, mathew wrote:

Just installed the ConTeXt standalone, and the fonts script doesn't seem
to work:

% mtxrun --script fonts --list
.../context/tex/texmf-context/tex/context/base/font-trt.lua:11: attempt
to index field 'names' (a nil value)

Commenting out line 11 seems to make the script function.


the new order is:

dofile(resolvers.findfile("font-syn.lua","tex"))
dofile(resolvers.findfile("font-trt.lua","tex"))


-
  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] Repeat second-level registers within index

2013-10-07 Thread mathew
I'm wondering if the changes for second level index generation are the
reason why I'm now getting bogus duplicate first level index entries?

e.g.

e-mail addresses 3
e-mail addresses 4
e-mail addresses 4, 4
   4
   4
   4
e-mail addresses 3

and so on.

Clean install of ConTeXt standalone, about 30 minutes ago.


mathew
___
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] LuaTeX fonts script update error

2013-10-07 Thread mathew
Just installed the ConTeXt standalone, and the fonts script doesn't seem to
work:

% mtxrun --script fonts --list
.../context/tex/texmf-context/tex/context/base/font-trt.lua:11: attempt to
index field 'names' (a nil value)

Commenting out line 11 seems to make the script function.


mathew
___
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] Trouble with Cyrillic

2013-10-07 Thread Hans Hagen

On 10/7/2013 7:10 PM, Dmitry Tokarev wrote:


lozencondenced.lgf:
return {
 name = "lozencondenced",
 version = "1.00",
 comment = "Goodies that complement dingbats (funny names).",
 author = "Hans Hagen",
 copyright = "ConTeXt development team",
 remapping = {
 tounicode = true,
 unicodes = {
 ??   = ??,
.
.
.
 },
 },
}


it's a

name = unicode

list; another option is to load the font in fontforge and see if you can 
save it as proper unicode font


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] wrong positioning of MP graphic in layer

2013-10-07 Thread luigi scarso
On Mon, Oct 7, 2013 at 5:56 PM, Pablo Rodríguez  wrote:

> Dear list,
>
> I have the following sample:
>
> \definelayer[wrongpositioned][x=0mm, y=0mm, hoffset=0mm,
>  voffset=48mm, state=start]
> \setuplayer[wrongpositioned]{\startMPcode draw
>  (0mm,0mm)--(8mm,0mm)--(8mm,38mm)--(14mm,38mm) ; \stopMPcode}
> \setupbackgrounds[page][background={wrongpositioned}]
> \starttext
> \input knuth
> \stoptext
>
> No matter what x, y, hoffset, voffset, location or corner, the MP
> graphic is located where the page margins start.
>
> Sorry for the so basic question, but what is wrong there?
>
> Besides that, I don’t understand how positioning in layers work. I have
> read the wiki, but I don’t get it (geometry isn’t my strength).
>
> x, y, hoffset and voffset are fine. But location and corner are
> mysterious to me. Changing them gave me no clue of what they are.
>
> The four mentioned options set a point in the paper. The corner could be
> the point of the graphic or text that would be set in the previously
> defined point in the paper.
>
> Well, if this isn’t wrong, what can location be?
>
> Sorry, I know it‘s my lack of geometrical knowledge.
>
> Could anyone be so kind to explain me what location and corner mean in
> layers?
>
> Many thanks for your help,
>
>
You can start from here

\setuppapersize[A4][A3]
\setuplayout[location=middle]
\showframe %showlayout
\definelayer[Page]
\setuplayer[Page][width=\paperwidth,height=\paperheight]
\setlayer[Page]{\startMPcode
draw(0mm,0mm)--(PaperWidth,PaperHeight) withpen pencircle scaled 2pt
withcolor red;
draw(0mm,PaperHeight)--(PaperWidth,0mm) withpen pencircle scaled 2pt
withcolor blue;
\stopMPcode}
\setupbackgrounds[page][background={Page}]


\starttext
\input knuth
\stoptext


See also
http://wiki.contextgarden.net/Layers
-- 
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] Trouble with Cyrillic

2013-10-07 Thread Dmitry Tokarev
07.10.2013, 17:39, "Hans Hagen" :

>  On 10/7/2013 1:24 PM, Wolfgang Schuster wrote:
>>   Am 07.10.2013 um 13:18 schrieb Hans Hagen :
>>>   On 10/5/2013 12:23 PM, Dmitry Tokarev wrote:
   Please help me understand why with StoryRegular font Cyrillic is 
 displayed, and with lozencondensed - no. I attached log file and the fonts 
 used in the example.
   The content of pdf-file:
   test - тест.
   test - .

   Example:
   \definefont [Story][StoryRegular.otf]
   \definefont [LozenCondensed][lozencondensed.ttf]

   \starttext
   \Story test - тест.

   \LozenCondensed test - тест.
   \stoptext
>>>   maybe the font has no cyrillic
>>   It has but it uses a custom encoding and not unicode.
>>
>>   \starttext
>>
>>   \startfont[file:lozencondensed.ttf]
>>  \dostepwiserecurse{33}{273}{1}{#1:~\char#1\relax\space}
>>   \stopfont
>>
>>   \stoptext
>  so someone has to make a file like dingbats.lfg ... or, as the font is
>  not that pretty anyway, use another font instead
>
>  Hans

Hans, Wolfgang thank you very much for reply. Unfortunately I have to use this 
file to technical documentation, so I will try to find a work around.
As I see, this font uses the encoding win-1251: 
http://en.wikipedia.org/wiki/Windows-1251
There are several mismatched characters, but they don't belong to Russian 
language. Please help me make the correctly contents of lgf-file. As Hans has 
advised I took the dingbats.lfg as a basis. How, for example remap symbol 192 
from font to unicode 0x0410?

lozencondenced.lgf:
return {
name = "lozencondenced",
version = "1.00",
comment = "Goodies that complement dingbats (funny names).",
author = "Hans Hagen",
copyright = "ConTeXt development team",
remapping = {
tounicode = true,
unicodes = {
??   = ??,
.
.
.
},
},
}

The part of code that I use to define the font in my project (In the original, 
there is also defined Lozen-Bold, Lozen-Italic and Lozen-Bold-Italic):
\starttypescript [sans] [lozen]
\definefontsynonym [Lozen-Roman] [name:lozencondensed] 
[features=default]
\stoptypescript

\starttypescript [sans] [lozen] [name]
\definefontsynonym [Sans] [Lozen-Roman] [features=default]
\stoptypescript

\starttypescript [Lozen]
\definetypeface [Lozen] [ss] [sans] [lozen] [default] 
\stoptypescript

Where the lozencondenced.lgf should be located and how should I use it to 
define a font?

Dmitry
___
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] wrong positioning of MP graphic in layer

2013-10-07 Thread Pablo Rodríguez
Dear list,

I have the following sample:

\definelayer[wrongpositioned][x=0mm, y=0mm, hoffset=0mm,
 voffset=48mm, state=start]
\setuplayer[wrongpositioned]{\startMPcode draw
 (0mm,0mm)--(8mm,0mm)--(8mm,38mm)--(14mm,38mm) ; \stopMPcode}
\setupbackgrounds[page][background={wrongpositioned}]
\starttext
\input knuth
\stoptext

No matter what x, y, hoffset, voffset, location or corner, the MP
graphic is located where the page margins start.

Sorry for the so basic question, but what is wrong there?

Besides that, I don’t understand how positioning in layers work. I have
read the wiki, but I don’t get it (geometry isn’t my strength).

x, y, hoffset and voffset are fine. But location and corner are
mysterious to me. Changing them gave me no clue of what they are.

The four mentioned options set a point in the paper. The corner could be
the point of the graphic or text that would be set in the previously
defined point in the paper.

Well, if this isn’t wrong, what can location be?

Sorry, I know it‘s my lack of geometrical knowledge.

Could anyone be so kind to explain me what location and corner mean in
layers?

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Mathdesign GD with simplefonts

2013-10-07 Thread Magnus J
Thanks, nice scale. How about the arcs and the text between them?

Regards,

Magnus


On Mon, Oct 7, 2013 at 11:57 AM, Alan BRASLAU  wrote:

> On Mon, 7 Oct 2013 09:06:37 +0200
> Magnus J  wrote:
>
> > 2. I would like to use the \followtokens macro from within metapost. How
> > can this be achieved? Specifically, I trying to draw a rainbow-like
> figure
> > with text "between" the colors.
>
> I am not sure what you mean by a rainbow-like figure. However, for
> rainbow-like colors, I use the following MP code, based on the standard
> resistance color code scheme. The function rainbow(f) returns a rainbow
> spectrum color based on the fraction f running from 0 to 1.
>
> % standard resistance color code: rainbow sequence
> color resistance_color[] ;  string resistance_name[] ;
> resistance_color0 = (0,0,0) ;   resistance_name0 = "black"
> ;
> resistance_color1 = (165/255,42/255,42/255) ;   resistance_name1 = "brown"
> ;
> resistance_color2 = (1,0,0) ;   resistance_name2 = "red" ;
> resistance_color3 = (1,165/255,0) ; resistance_name3 =
> "orange" ;
> resistance_color4 = (1,1,0) ;   resistance_name4 =
> "yellow" ;
> resistance_color5 = (0,1,0) ;   resistance_name5 = "green"
> ;
> resistance_color6 = (0,0,1) ;   resistance_name6 = "blue" ;
> resistance_color7 = (148/255,0,211/255) ;   resistance_name7 =
> "darkviolet" ;
> resistance_color8 = (190/255,190/255,190/255) ; resistance_name8 = "gray" ;
> resistance_color9 = (1,1,1) ;   resistance_name9 = "white"
> ;
>
> def rainbow(expr f) =
> hide(numeric n_ ; n_ = (abs(5f) mod 5) + 2 ;)
> (n_-floor(n_))[resistance_color[floor n_],resistance_color[ceiling n_]]
> enddef ;
>
>
> Alan
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] Breaks in TOC

2013-10-07 Thread Marco Patzer
On 2013–10–07 "H. Özoguz" wrote:

> How to get only a normal break

  \crlf

Marco


signature.asc
Description: Digital signature
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] Breaks in TOC

2013-10-07 Thread H. Özoguz

http://www.ntg.nl/pipermail/ntg-context/2013/072485.html

Wolfgang


Thanks Wolfgang, so I guess the key I was looking for is "list". But see 
what happens here:


\starttext
\completecontent
\startsection[
title={Eine sehr, sehr lange Überschrift, die auf jeden Fall
irgendeine Art von Formatierung benötigt.},
list={Eine sehr, sehr lange Überschrift,\\die auf jeden Fall irgendeine 
Art von Formatierung benötigt.}

]

\startsection[
title={Eine sehr, sehr lange Überschrift, die auf jeden Fall
irgendeine Art von Formatierung benötigt.},
list={Eine sehr, sehr lange Überschrift,\par die auf jeden Fall 
irgendeine Art von Formatierung benötigt.}

]
\stoptext

The first try with "\\" has no effect. And the second with "\par" 
justifies the first line, which is not intended. How to get only a 
normal break, without new aligning of the first line?


Huseyin
___
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] Trouble with Cyrillic

2013-10-07 Thread Hans Hagen

On 10/7/2013 1:24 PM, Wolfgang Schuster wrote:


Am 07.10.2013 um 13:18 schrieb Hans Hagen :


On 10/5/2013 12:23 PM, Dmitry Tokarev wrote:

Please help me understand why with StoryRegular font Cyrillic is displayed, and 
with lozencondensed - no. I attached log file and the fonts used in the example.
The content of pdf-file:
test - тест.
test - .

Example:
\definefont [Story][StoryRegular.otf]
\definefont [LozenCondensed][lozencondensed.ttf]

\starttext
\Story test - тест.

\LozenCondensed test - тест.
\stoptext


maybe the font has no cyrillic


It has but it uses a custom encoding and not unicode.

\starttext

\startfont[file:lozencondensed.ttf]
   \dostepwiserecurse{33}{273}{1}{#1:~\char#1\relax\space}
\stopfont

\stoptext


so someone has to make a file like dingbats.lfg ... or, as the font is 
not that pretty anyway, use another font instead


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] Trouble with Cyrillic

2013-10-07 Thread Wolfgang Schuster

Am 07.10.2013 um 13:18 schrieb Hans Hagen :

> On 10/5/2013 12:23 PM, Dmitry Tokarev wrote:
>> Please help me understand why with StoryRegular font Cyrillic is displayed, 
>> and with lozencondensed - no. I attached log file and the fonts used in the 
>> example.
>> The content of pdf-file:
>> test - тест.
>> test - .
>> 
>> Example:
>> \definefont [Story][StoryRegular.otf]
>> \definefont [LozenCondensed][lozencondensed.ttf]
>> 
>> \starttext
>> \Story test - тест.
>> 
>> \LozenCondensed test - тест.
>> \stoptext
> 
> maybe the font has no cyrillic

It has but it uses a custom encoding and not unicode.

\starttext

\startfont[file:lozencondensed.ttf]
  \dostepwiserecurse{33}{273}{1}{#1:~\char#1\relax\space}
\stopfont

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

[NTG-context] buglet in latin modern

2013-10-07 Thread Hans Hagen

Hi,

There is a buglet in lm mono 12pt:

\starttext % 6 and 9 wrong in 12pt
\def\TestMe#1{\setbox0\hbox{#1}\dontleavehmode\expanded{\box0: 
\the\wd0}\par}

\definedfont[lmmono8-regular]
\processcommalist[1,2,3,4,5,6,7,8,9,0,{,}]\TestMe
\definedfont[lmmono10-regular]
\processcommalist[1,2,3,4,5,6,7,8,9,0,{,}]\TestMe
\definedfont[lmmono12-regular]
\processcommalist[1,2,3,4,5,6,7,8,9,0,{,}]\TestMe
\stoptext

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] Integral subscript leads to “Undefined control sequence”

2013-10-07 Thread luigi scarso
On Mon, Oct 7, 2013 at 1:17 PM, Hans Hagen  wrote:

> On 10/7/2013 12:24 PM, Marco Patzer wrote:
>
>> On 2013–10–07 luigi scarso wrote:
>>
>>  I think a space is needed as in
>>> $\int _a^b f(x) dx$
>>>
>>
>> Well, that might be a workaround. But it's still a bug.
>>
>>%% works
>>\math{\int^b_a}
>>
>> whereas
>>
>>%% fails
>>\math{\int_a^b}
>>
>> Furthermore, it used to work for ages using \int_x or \int_{xyz}.
>>
>
> there is a \protect missing at the end of typo-tal.mkiv
>
>
yes,  adding \protect it's ok .


-- 
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] Trouble with Cyrillic

2013-10-07 Thread Hans Hagen

On 10/5/2013 12:23 PM, Dmitry Tokarev wrote:

Please help me understand why with StoryRegular font Cyrillic is displayed, and 
with lozencondensed - no. I attached log file and the fonts used in the example.
The content of pdf-file:
test - тест.
test - .

Example:
\definefont [Story][StoryRegular.otf]
\definefont [LozenCondensed][lozencondensed.ttf]

\starttext
\Story test - тест.

\LozenCondensed test - тест.
\stoptext


maybe the font has no cyrillic




-
  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] Integral subscript leads to “Undefined control sequence”

2013-10-07 Thread Hans Hagen

On 10/7/2013 12:24 PM, Marco Patzer wrote:

On 2013–10–07 luigi scarso wrote:


I think a space is needed as in
$\int _a^b f(x) dx$


Well, that might be a workaround. But it's still a bug.

   %% works
   \math{\int^b_a}

whereas

   %% fails
   \math{\int_a^b}

Furthermore, it used to work for ages using \int_x or \int_{xyz}.


there is a \protect missing at the end of typo-tal.mkiv

-
  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] Integral subscript leads to “Undefined control sequence”

2013-10-07 Thread Aditya Mahajan


On Oct 7, 2013, at 6:05 AM, luigi scarso  wrote:

> 
> 
> 
> On Mon, Oct 7, 2013 at 11:50 AM, Marco Patzer  wrote:
> Hi,
> 
> the current beta doesn't like integral subscripts any more:
> 
> \starttext
>   \math{\int_a}
> \stoptext
> 
> 
>  
> I think a space is needed as in  
> \startformula
>  \int _a^b f(x) dx \quad
>  \iint _a^b f(x) dx \quad
>  \iiint _a^b f(x) dx \quad
> \stopformula
> 
> $\int _a^b f(x) dx$
> 
> 
> But there are some examples in 
> pack-rul.mkiv
> that use \int_01
> 
> so I don't know if it's a bug.
> -- 
> 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
> ___
___
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] passvariable(); path problem

2013-10-07 Thread Peter Rolf
Am 07.10.2013 11:47, schrieb luigi scarso:
> 
> 
> 
> On Mon, Oct 7, 2013 at 10:48 AM, Peter Rolf  > wrote:
> 
> Am 06.10.2013 17:06, schrieb Hans Hagen:
> > On 10/6/2013 3:05 PM, Peter Rolf wrote:
> >
> >> Thanks for the explanation. I think I have understood the scheme
> (but I
> >> might be wrong, because this doesn't help me with my example).
> >>
> >> Where is the starting point['20 20'] in the returned example
> path? Same
> >> is true for the first control point ['20 190.34']. Either I'm missing
> >> something, or the returned path data is incomplete.
> >
> > you get just the value of the path variable in your mp code, not a
> ps or
> > whatever representation and in mp a path has just points so the
> starting
> > point is the x y of the first point
> >
> 
> I tested several examples and the only time that the starting point was
> part of the returned path was, when the path only consists of one point.
> In all other cases it was missing.
> 
> This is a bit contrary to my definition of a (complete) path. Anyhow,
> thanks for the pointer :-)
> 
> 
> in mp-mlib.mpiv should be :
> vardef mfun_path_to_string(expr p) =
> mfun_point_to_string(p,0) for i=1 upto length(p) : & " " &
> mfun_point_to_string(p,i) endfor
> enddef ;
> 
> 
> (You can fix it and rebuild the format. To understand the output, is
> better to know that mfun_point_to_string is
> 
>  vardef mfun_point_to_string(expr p,i) =
> decimal xpart (point   i of p) & " " &
> decimal ypart (point   i of p) & " " &
> decimal xpart (precontrol  i of p) & " " &
> decimal ypart (precontrol  i of p) & " " &
> decimal xpart (postcontrol i of p) & " " &
> decimal ypart (postcontrol i of p)
> enddef ;
> 
> )
> 
> 
> -- 
> luigi

@Luigi: thanks for the fix!

@Hans: quickanddirty sounds promising (bbox is needed anyway) :-D

___
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] Integral subscript leads to “Undefined control sequence”

2013-10-07 Thread Marco Patzer
On 2013–10–07 luigi scarso wrote:

> I think a space is needed as in
> $\int _a^b f(x) dx$

Well, that might be a workaround. But it's still a bug.

  %% works
  \math{\int^b_a}

whereas

  %% fails
  \math{\int_a^b}

Furthermore, it used to work for ages using \int_x or \int_{xyz}.

Marco


signature.asc
Description: Digital signature
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] nested mp

2013-10-07 Thread Hans Hagen

Hi,

This should work ok now in the current beta.

\starttext

\startuniqueMPgraphic{mytest}
fill OverlayBox withcolor green ;
draw textext("nested") xsized 8cm shifted center OverlayBox 
withcolor blue ;

draw fullcircle scaled bbwidth(OverlayBox) withcolor red ;
\stopuniqueMPgraphic

\defineoverlay[mytest][\uniqueMPgraphic{mytest}]

\startMPpage[offset=1pt]
fill fullcircle scaled 10cm withcolor red ;
draw textext("\framed[background=mytest]{bla}") ;
draw textext("test 1.1") xsized 8cm rotated  45 withcolor white/2 ;
draw textext("test 1.2") xsized 4cm rotated -45 withcolor white/4 ;
\stopMPpage

\startMPpage[offset=1pt]
fill fullcircle scaled 10cm withcolor red ;
draw textext("\framed[background=mytest]{bla bla}") ;
draw textext("test 2.1") xsized 8cm rotated  45 withcolor 
white/1  ;
draw textext("test 2.2") xsized 4cm rotated -45 withcolor 
white/2  ;
draw textext("test 2.1") xsized 6cm rotated -30 withcolor 
white/3  ;
draw textext("test 2.2") xsized 4cm rotated  30 withcolor 
white/4  ;

\stopMPpage

\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] Integral subscript leads to “Undefined control sequence”

2013-10-07 Thread luigi scarso
On Mon, Oct 7, 2013 at 11:50 AM, Marco Patzer  wrote:

> Hi,
>
> the current beta doesn't like integral subscripts any more:
>
> \starttext
>   \math{\int_a}
> \stoptext
>



I think a space is needed as in
\startformula
 \int _a^b f(x) dx \quad
 \iint _a^b f(x) dx \quad
 \iiint _a^b f(x) dx \quad
\stopformula

$\int _a^b f(x) dx$


But there are some examples in
pack-rul.mkiv
that use \int_01

so I don't know if it's a bug.
-- 
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] \definetype[xxx][linebreaks=yes, breakpoints=name]

2013-10-07 Thread Hans Hagen

On 10/7/2013 10:30 AM, Peter Münster wrote:

On Mon, Oct 07 2013, Hans Hagen wrote:


If not, here my feature request: something like
\definetype[xxx][linebreaks=yes, breakpoints=compound]


this should be redefined:

\unexpanded\def\specialstretchedspace{\hskip.5\interwordspace\s!plus.125\interwordspace\relax}


Hi Hans,

Unfortunately it does not work:

--8<---cut here---start->8---
\unprotect
\unexpanded\def\specialstretchedspace{\hskip.5\interwordspace\s!plus.125\interwordspace\relax}
\protect
\definetype[whatever][lines=yes, space=stretch]
\setbreakpoints[compound]
\starttext
\hsize4cm
\whatever{fasdfjkl-fjsdkal-jskla-fjksdla-fjksdl-afjksdla}
fasdfjkl-fjsdkal-jskla-fjksdla-fjksdl-afjksdla
\stoptext
--8<---cut here---end--->8---

What am I doing wrong please?


I uploaded a bit more robust variant:

\starttext

\setuplayout[width=4cm] \showframe

\setupalign[stretch,verytolerant]

\definetype[whatever][lines=hyphenated,space=stretch]

A quote from ward: \expanded{\whatever{\cldloadfile{ward}}} That's it.

\definetype[whatever][lines=normal,space=stretch]

A quote from ward: \expanded{\whatever{\cldloadfile{ward}}} That's it.

\stoptext

Should work ok.

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] passvariable(); path problem

2013-10-07 Thread Hans Hagen

On 10/7/2013 11:47 AM, luigi scarso wrote:


(You can fix it and rebuild the format. To understand the output, is
better to know that mfun_point_to_string is


no need to rebuild the format (at least not currently) as mp loads runtime

the next beta will have (the somewhat useless) helper:

\starttext

\startluacode

local result = metapost.quickanddirty("metafun",[[ draw fullcircle 
scaled 1cm ;]])


context("% t",result.bbox)
context.par()
context("% t",result.code)
context.par()

\stopluacode

\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] Mathdesign GD with simplefonts

2013-10-07 Thread Alan BRASLAU
On Mon, 7 Oct 2013 09:06:37 +0200
Magnus J  wrote:

> 2. I would like to use the \followtokens macro from within metapost. How
> can this be achieved? Specifically, I trying to draw a rainbow-like figure
> with text "between" the colors.

I am not sure what you mean by a rainbow-like figure. However, for rainbow-like 
colors, I use the following MP code, based on the standard resistance color 
code scheme. The function rainbow(f) returns a rainbow spectrum color based on 
the fraction f running from 0 to 1.

% standard resistance color code: rainbow sequence
color resistance_color[] ;  string resistance_name[] ;
resistance_color0 = (0,0,0) ;   resistance_name0 = "black" ;
resistance_color1 = (165/255,42/255,42/255) ;   resistance_name1 = "brown" ;
resistance_color2 = (1,0,0) ;   resistance_name2 = "red" ;
resistance_color3 = (1,165/255,0) ; resistance_name3 = "orange" ;
resistance_color4 = (1,1,0) ;   resistance_name4 = "yellow" ;
resistance_color5 = (0,1,0) ;   resistance_name5 = "green" ;
resistance_color6 = (0,0,1) ;   resistance_name6 = "blue" ;
resistance_color7 = (148/255,0,211/255) ;   resistance_name7 = "darkviolet" 
;
resistance_color8 = (190/255,190/255,190/255) ; resistance_name8 = "gray" ;
resistance_color9 = (1,1,1) ;   resistance_name9 = "white" ;

def rainbow(expr f) =
hide(numeric n_ ; n_ = (abs(5f) mod 5) + 2 ;)
(n_-floor(n_))[resistance_color[floor n_],resistance_color[ceiling n_]]
enddef ;


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

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


[NTG-context] Integral subscript leads to “Undefined control sequence”

2013-10-07 Thread Marco Patzer
Hi,

the current beta doesn't like integral subscripts any more:

\starttext
  \math{\int_a}
\stoptext

Marco


signature.asc
Description: Digital signature
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] passvariable(); path problem

2013-10-07 Thread luigi scarso
On Mon, Oct 7, 2013 at 10:48 AM, Peter Rolf  wrote:

> Am 06.10.2013 17:06, schrieb Hans Hagen:
> > On 10/6/2013 3:05 PM, Peter Rolf wrote:
> >
> >> Thanks for the explanation. I think I have understood the scheme (but I
> >> might be wrong, because this doesn't help me with my example).
> >>
> >> Where is the starting point['20 20'] in the returned example path? Same
> >> is true for the first control point ['20 190.34']. Either I'm missing
> >> something, or the returned path data is incomplete.
> >
> > you get just the value of the path variable in your mp code, not a ps or
> > whatever representation and in mp a path has just points so the starting
> > point is the x y of the first point
> >
>
> I tested several examples and the only time that the starting point was
> part of the returned path was, when the path only consists of one point.
> In all other cases it was missing.
>
> This is a bit contrary to my definition of a (complete) path. Anyhow,
> thanks for the pointer :-)
>
>
in mp-mlib.mpiv should be :
vardef mfun_path_to_string(expr p) =
mfun_point_to_string(p,0) for i=1 upto length(p) : & " " &
mfun_point_to_string(p,i) endfor
enddef ;


(You can fix it and rebuild the format. To understand the output, is better
to know that mfun_point_to_string is

 vardef mfun_point_to_string(expr p,i) =
decimal xpart (point   i of p) & " " &
decimal ypart (point   i of p) & " " &
decimal xpart (precontrol  i of p) & " " &
decimal ypart (precontrol  i of p) & " " &
decimal xpart (postcontrol i of p) & " " &
decimal ypart (postcontrol i of p)
enddef ;

)


-- 
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] Breaks in TOC

2013-10-07 Thread Wolfgang Schuster

Am 07.10.2013 um 10:51 schrieb H. Özoguz :

> Thanks to your kindely help, Nr. 2 is solved easily, but Nr. 1 is still open. 
> Is it clear, what I intend to do, or totally unclear? :)
> 
> The question is simply to break a title in the TOC, without breaking it in 
> the text. Or more generally: How to change the title in the TOC (maybe a 
> complete other title, as in the text, like it is possible for the header by 
> the key "marking"). (No matter, if that makes sense, or not).

http://www.ntg.nl/pipermail/ntg-context/2013/072485.html

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] TEXpage produces wrong bounding box with rotated images

2013-10-07 Thread Marco Patzer
On 2013–10–07 Hans Hagen wrote:

> On 10/6/2013 9:15 PM, Marco Patzer wrote:
> >Hi,
> >
> >when rotation is used, the TEXpage bounding box is incorrect. Angles
> >multiples of 90° are correct, however. It looks like a bug. Example:
> >
> >\setupexternalfigures [location=default]
> >\starttext
> >   \startTEXpage
> > \externalfigure [hacker] [orientation=44]
> >   \stopTEXpage
> >   \startTEXpage
> > \externalfigure [hacker] [orientation=46]
> >   \stopTEXpage
> >\stoptext
> 
> fixed (hopefully)

Seems to work here. Thanks for the fix.

Marco


signature.asc
Description: Digital signature
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] Breaks in TOC

2013-10-07 Thread H. Özoguz
Thanks to your kindely help, Nr. 2 is solved easily, but Nr. 1 is still 
open. Is it clear, what I intend to do, or totally unclear? :)


The question is simply to break a title in the TOC, without breaking it 
in the text. Or more generally: How to change the title in the TOC 
(maybe a complete other title, as in the text, like it is possible for 
the header by the key "marking"). (No matter, if that makes sense, or not).


Thanks.
Huseyin
___
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] passvariable(); path problem

2013-10-07 Thread Peter Rolf
Am 06.10.2013 17:06, schrieb Hans Hagen:
> On 10/6/2013 3:05 PM, Peter Rolf wrote:
> 
>> Thanks for the explanation. I think I have understood the scheme (but I
>> might be wrong, because this doesn't help me with my example).
>>
>> Where is the starting point['20 20'] in the returned example path? Same
>> is true for the first control point ['20 190.34']. Either I'm missing
>> something, or the returned path data is incomplete.
> 
> you get just the value of the path variable in your mp code, not a ps or
> whatever representation and in mp a path has just points so the starting
> point is the x y of the first point
>

I tested several examples and the only time that the starting point was
part of the returned path was, when the path only consists of one point.
In all other cases it was missing.

This is a bit contrary to my definition of a (complete) path. Anyhow,
thanks for the pointer :-)

Peter

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

___
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] \definetype[xxx][linebreaks=yes, breakpoints=name]

2013-10-07 Thread Peter Münster
On Mon, Oct 07 2013, Hans Hagen wrote:

>> If not, here my feature request: something like
>> \definetype[xxx][linebreaks=yes, breakpoints=compound]
>
> this should be redefined:
>
> \unexpanded\def\specialstretchedspace{\hskip.5\interwordspace\s!plus.125\interwordspace\relax}

Hi Hans,

Unfortunately it does not work:

--8<---cut here---start->8---
\unprotect
\unexpanded\def\specialstretchedspace{\hskip.5\interwordspace\s!plus.125\interwordspace\relax}
\protect
\definetype[whatever][lines=yes, space=stretch]
\setbreakpoints[compound]
\starttext
\hsize4cm
\whatever{fasdfjkl-fjsdkal-jskla-fjksdla-fjksdl-afjksdla}
fasdfjkl-fjsdkal-jskla-fjksdla-fjksdl-afjksdla
\stoptext
--8<---cut here---end--->8---

What am I doing wrong please?

-- 
   Peter
___
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] \definetype[xxx][linebreaks=yes, breakpoints=name]

2013-10-07 Thread Hans Hagen

On 10/7/2013 1:09 AM, Peter Münster wrote:

Hi,

Is it already possible to define a new \type{} command that allows
linebreaks and perhaps also a breakpoint set?

If not, here my feature request: something like
\definetype[xxx][linebreaks=yes, breakpoints=compound]


this should be redefined:

\unexpanded\def\specialstretchedspace{\hskip.5\interwordspace\s!plus.125\interwordspace\relax}

(used \interwordstretch which is zero)

-
  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] \definetype[xxx][linebreaks=yes, breakpoints=name]

2013-10-07 Thread Hans Hagen

On 10/7/2013 1:09 AM, Peter Münster wrote:

Hi,

Is it already possible to define a new \type{} command that allows
linebreaks and perhaps also a breakpoint set?

If not, here my feature request: something like
\definetype[xxx][linebreaks=yes, breakpoints=compound]


\definetype[whatever][lines=yes,space=stretch]

--

-
  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] scope and grouping in flowchart

2013-10-07 Thread Hans Hagen

On 10/6/2013 4:46 PM, Peter Münster wrote:

Hi,

Why is the \getvariable not in the same grouping level as the
\setvariables here:

--8<---cut here---start->8---
\usemodule[chart]
\startFLOWchart[test]
   \startFLOWcell
 \setvariables[test][test=test]
 \text{\getvariable{test}{test}} % no text!
   \stopFLOWcell
\stopFLOWchart
\starttext
\FLOWchart[test]
\stoptext
--8<---cut here---end--->8---

Workaround: \setgvariables[test][test=test]

TIA for any explanation,


in a first pass things are collected and that happens grouped, so in a 
next pass, when these things are used, the setvariables is not seen at all


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] TEXpage produces wrong bounding box with rotated images

2013-10-07 Thread Hans Hagen

On 10/6/2013 9:15 PM, Marco Patzer wrote:

Hi,

when rotation is used, the TEXpage bounding box is incorrect. Angles
multiples of 90° are correct, however. It looks like a bug. Example:

\setupexternalfigures [location=default]
\starttext
   \startTEXpage
 \externalfigure [hacker] [orientation=44]
   \stopTEXpage
   \startTEXpage
 \externalfigure [hacker] [orientation=46]
   \stopTEXpage
\stoptext


fixed (hopefully)

-
  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] Mathdesign GD with simplefonts

2013-10-07 Thread Magnus J
Hello list,

Long term (silent) on-and-off user with two issues that require some
support:

1. How can I use the Mathdesign GD math font in ConTeXt? I use simplefonts
to load Adobe Garamond Pro, but mathdesigngd (name as reported by mtxrun
fonts script) is somehow not found. At this time I fallback to ugly
solutions with \text in math mode. And yes, I know about
type-imp-mathdesign.mkiv, but obviously I'm not qualified enough to get it
right.

Minimal (not) working example:

  \usemodule[simplefonts]

  \setmainfont[Adobe Garamond Pro]
  \setmathfont[mathdesigngd]

  \starttext
I want \m{x^2+y^2=z^2} in my text, and $\alpha\beta\gamma$ too.
  \stoptext

2. I would like to use the \followtokens macro from within metapost. How
can this be achieved? Specifically, I trying to draw a rainbow-like figure
with text "between" the colors.

Regards,

Magnus
___
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] Questions regarding the placement of figures

2013-10-07 Thread Flavien Lambert
Dear all, I would like to wrap text around two figures. I tried to use both
placefigure and starthangaround without achieving what I wanted. So I moved
towards you to get some explanations on the behavior of the commands.

I have two figures and one paragraph. If possible, I would like to place
one figure on the top left and the other on the bottom right, the text
moving smoothly in between, something like (o is figure, x text)

o 
o 
xx
xx
xx
 o
 o

or even better

xx
o 
o 
xx
xx
xx
 o
 o
xx
xx

I can, of course, slice the text in two pieces and use either placefigure
or hangaround but, then, there's a vertical space  between the two
paragraphs.
Related to the subject, is there way to impose a few lines before a figure
with hangaround like the second layout example?

Thanks a lot,
Flavien.
___
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
___