Re: [NTG-context] command for a MP graphic

2013-05-07 Thread Roland Thiers


Le 8 mai 13 à 06:56, Wolfgang Schuster a écrit :



Am 07.05.2013 um 22:28 schrieb Roland Thiers  
:


Thank you very much for this precision, Wolfgang. I tried with two  
variables and it works with this

syntax :

\startuniqueMPgraphic{polygoneregulier}
numeric u ; u:=\MPvar{unite}*cm ;
numeric n ; n:=\MPvar{sides};
rest of the code
\stopuniqueMPgraphic

\define[2]\polyreg
{\setupMPvariables[polygoneregulier][unite,sides]
\uniqueMPgraphic{polygoneregulier}{sides=#1,unite=#2}}


You can define the command as

\define[2]\polyreg
 {\setupMPvariables[polygoneregular][sides=#1,unite=#2]%
  \uniqueMPgraphic{polygoneregular}}

where the variables are set with the \settupMPvariables command or as

\define[2]\polyreg
 {\uniqueMPgraphic{polygoneregular}{sides=#1,unite=#2}}

where the variables are set in the optional argument for  
\uniqueMPgraphic.



\starttext
%\uniqueMPgraphic{polygoneregulier}{unite=2,sides=4}
\polyreg{6}{0.5}
\stoptext

I did not find any détails on \MPvar et \setupMPvariables on the  
wiki, however


Both commands are mentioned in the metafun [1] manual.

[1] http://www.pragma-ade.nl/show-man-7.htm

Wolfgang
Thank you Wolfgang for the correction of the syntax. I bought the  
Metafun manual and began to work with it.

Great !
Roland


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


[NTG-context] Problems with arabic font "Amiri"

2013-05-07 Thread H. Özoguz

Hello,

I tried to type with the arabic font "Amiri" by K. Hosny. You can 
download it here: http://sourceforge.net/projects/amiri/


In this download-page you find a nice example of the font, setting the 
sura "Al-Fatiha" (first section of the Holy Qur'an). I tried to regain 
this example with ConTeXt, but failed.

Here is my try:

\definefont[amiri][file:amiri-regular.ttf*arabic at 17pt]
\define[1]\Arab{\amiri#1}
\starttext
\Arab{بِسْمِ اللَّـهِ الرَّ‌حْمَـٰنِ الرَّ‌حِيمِ}
\stoptext

But that doesn't compile here. I get this error:

! LuaTeX error 
.../context/tex/texmf-context/tex/context/base/font-otp.lua:163: invalid 
value (nil) at index 2 in table for 'concat'


stack traceback:

[C]: in function 'concat'

.../context/tex/texmf-context/tex/context/base/font-otp.lua:163: in 
function 'pack_indexed'


.../context/tex/texmf-context/tex/context/base/font-otp.lua:328: in 
function 'enhancer'


.../context/tex/texmf-context/tex/context/base/font-otf.lua:258: in 
function 'enhance'


.../context/tex/texmf-context/tex/context/base/font-otf.lua:462: in 
function 'load'


.../context/tex/texmf-context/tex/context/base/font-otf.lua:1946: in 
function 'otftotfm'


.../context/tex/texmf-context/tex/context/base/font-otf.lua:1973: in 
function <.../context/tex/texmf-context/tex/context/base/font-otf.lua:1972>


(...tail calls...)

.../context/tex/texmf-context/tex/context/base/font-def.lua:298: in 
function 'loadfont'


.../context/tex/texmf-context/tex/context/base/font-ctx.lua:469: in 
function 'loadfont'


.../context/tex/texmf-context/tex/context/base/font-def.lua:412: in 
function 'read'


.../context/tex/texmf-context/tex/context/base/font-ctx.lua:965: in 
function 'definefont_two'


[string "\directlua "]:1: in main chunk.


system > tex > error on line 5 in file Namenlos-1.tex: LuaTeX error ...

+++

1 \definefont[amiri][file:amiri-regular.ttf*arabic at 17pt]

2 \define[1]\Arab{\amiri#1}

3

4 \starttext

5 >> \Arab{بِسْمِ اللَّـهِ الرَّ‌حْمَـٰنِ الرَّ‌حِيمِ}

6 \stoptext

7

8

9

10

11

12

13

14

15



\ctxcommand #1->\directlua {commands.#1}

\font_helpers_low_level_define ..._designsize " )}

\edef \somefontspec {at \n...

\font_basics_define_font_without_parameters ...ic

\csname \v_font_identifier...

\Arab #1->\amiri

#1

l.5 ...��حْمَـٰنِ الرَّ‌حِيمِ}

?

+++

What is the problem here?

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] Arabic typesetting, one more

2013-05-07 Thread H. Özoguz

\usemodule[fnt-20,art-01]

\starttext

\def\sample{اللهِ\quad اللَّـهِ}

\setvariables
[otftracker]
[font=name:traditionalarabicnormal,
 size=24pt,
 features=arabic,
 direction=-1,
 title=Feature Check,
 sample=\sample]

\page

\setvariables
[otftracker]
[font=arabtype,
 size=24pt,
 features=arabic,
 direction=-1,
 title=Feature Check,
 sample=\sample]

\stoptext


Yes, again, kassra is set too low, in both fonts. But with 
traditionalarabic it is worse than with arabtype. What could be a way to 
fix this?


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] command for a MP graphic

2013-05-07 Thread Wolfgang Schuster

Am 07.05.2013 um 22:28 schrieb Roland Thiers :

> Thank you very much for this precision, Wolfgang. I tried with two variables 
> and it works with this
> syntax :
> 
> \startuniqueMPgraphic{polygoneregulier}
> numeric u ; u:=\MPvar{unite}*cm ;
> numeric n ; n:=\MPvar{sides};
> rest of the code
> \stopuniqueMPgraphic
> 
> \define[2]\polyreg
>  {\setupMPvariables[polygoneregulier][unite,sides]
> \uniqueMPgraphic{polygoneregulier}{sides=#1,unite=#2}}

You can define the command as

\define[2]\polyreg
  {\setupMPvariables[polygoneregular][sides=#1,unite=#2]%
   \uniqueMPgraphic{polygoneregular}}

where the variables are set with the \settupMPvariables command or as

\define[2]\polyreg
  {\uniqueMPgraphic{polygoneregular}{sides=#1,unite=#2}}

where the variables are set in the optional argument for \uniqueMPgraphic.

> \starttext
> %\uniqueMPgraphic{polygoneregulier}{unite=2,sides=4}
> \polyreg{6}{0.5}
> \stoptext
> 
> I did not find any détails on \MPvar et \setupMPvariables on the wiki, however

Both commands are mentioned in the metafun [1] manual.

[1] http://www.pragma-ade.nl/show-man-7.htm

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] LuaJitTeX, \texenginename, and \texengineversion

2013-05-07 Thread Kip Warner
Hey Luigi,

I find the \texenginename and \texengineversion useful for retrieving
the backend name and version. They work fine when using the vanilla
LuaTeX backend. However, when using LuaJitTeX, the aforementioned
macros still seem to retrieve LuaTeX specific information and not
LuaJitTeX - unless I'm doing something wrong. I was careful to ensure I
passed --engine=luajittex to context as well.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
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] Issue with 2013.04.30 00:31

2013-05-07 Thread Kip Warner
On Tue, 2013-05-07 at 10:46 +0200, Hans Hagen wrote:
> i'm not aware of a "tr" command so it's some kind of side effect i guess

Hey Hans. I managed to sort this out by adding a space between the
command and its parameter in my environment file.

> no, more with an unexpandable or undefined command being used which then 
> ends up \likethis which confuses lua as \l is no escape (change between 
> lua 5.1 and 5.2)

Yes, I managed to solve this by removing an escaped pound sign ('\#' ->
'') in one of my BibTeX references. If I wanted to keep the pound sign,
what is the proper way to escape it in my BibTeX database?

Thanks Hans.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
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] Issue with 2013.04.30 00:31

2013-05-07 Thread Kip Warner
On Tue, 2013-05-07 at 10:57 +0200, luigi scarso wrote:
> tr is a unix command that translate or delete characters: for some
> reason
> is executed
> from his tex  source.
> A similar effect can be done with
> \starttext
> \ctxlua{os.execute('tr --')}
> \stoptext

Hey Luigi. Yes, I managed to solve this problem with an additional
space between the tr command and its parameter as a macro in my
environment file. Thanks a lot for your help.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
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] extra line after switchtobodyfont

2013-05-07 Thread Hans Hagen

On 5/7/2013 10:11 PM, Hans Hagen wrote:

On 5/4/2013 6:59 PM, Wolfgang Schuster wrote:


Am 04.05.2013 um 09:21 schrieb Aditya Mahajan :


On 2013-05-03, at 7:36 PM, "Meer, H. van der" 
wrote:


Seems finally solved (sigh). I cleaned out all files loading
typescripts on the fly.
- typescript macros ending in ] at the end of a line have now ]% at
the end of the line
- empty lines have been removed for clarity
- all files now have \endinput at the end.

The files changed fit in a 54KB zip and I can send them if
Hans/Wolfgang/.. wants to incorporate them in the next beta.


I haven't followed this thread in detail, but an alternative is to
redefine \starttypescript etc. to use a different catcode regime so
that new lines and spaces are ignores (similar to
\starttexdefinition, etc)



A better method is to ignore the endlinechar when typescript files are
loaded.

\newcount\savedendlinechar

\starttext

Line 1\crlf
\savedendlinechar\endlinechar \endlinechar\minusone
\switchtobodyfont[pagella]
\endlinechar\savedendlinechar
Line 2

\stoptext


in fact, that should happen automatically but maybe i messed up something


(1) i adapted \loadfoundtypescriptfile (order of things, more robust)
(2) i adapted type-imp-pagella (had series of two defs per line which 
introduced the spaces)



-
  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] Update value of \headerheight based on header content

2013-05-07 Thread Adam Khan
The code for my headers is of the form:

\setupheadertexts[{\inframed[frame=off,width=\textwidth,location=depth,align={right,broad,nothyphenated},tolerance=verytolerant]{Author\\Title\\\tab{\getmarking[chapternumber]}
\getmarking[chapter] \wordright{\pagenumber}}}]

As you might imagine, the name of every chapter is not the same length.  I
would like to update the value of \headerheight for each component (each
component of my project contains exactly one chapter.) based on the header
contents that are produced for it.  In LaTeX, for example, I do something
similar with the following code:

\settototalheight{\headheight}{\parbox{\textwidth}{Author\\Title\\\nameref{chaptername}}

Any ideas?

Sincerely yours,
Adam Khan
___
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] command for a MP graphic

2013-05-07 Thread Roland Thiers

≥
Le 7 mai 13 à 13:05, Wolfgang Schuster a écrit :



Am 07.05.2013 um 09:51 schrieb Marco Patzer :


On 2013–05–07 Roland Thiers wrote:


Hi,
I did this code to get a regular polygon with metafun, it works but
I would like to have an user command  like  \define or \def
to be able to choose the number of sides, n. I don't know how to do
that ...


Here's one way to do it:

\startuniqueMPgraphic{polygoneregulier}{sides}
drawoptions (withpen pencircle scaled 2pt);
numeric u ; u:=1*cm ;
numeric n ; n:=\MPvar{sides};
pair a[];
a[0]:=(0,3u);
path polygone[] ;
for i=1 upto n :
a[i]:=a[0] rotatedaround(origin,i*360/n) ;
polygone[i]:=a[i-1]--a[i];
draw polygone[i]; endfor;
draw fullcircle scaled 6u withcolor blue;
\stopuniqueMPgraphic

%% \polyreg{}
\define[1]\polyreg
{\setupMPvariables[polygoneregulier][sides=#1]%%
 \uniqueMPgraphic{polygoneregulier}}



\define[1]\polyreg
 {\uniqueMPgraphic{polygoneregulier}{sides=#1}}

Wolfgang
Thank you very much for this precision, Wolfgang. I tried with two  
variables and it works with this

syntax :

\startuniqueMPgraphic{polygoneregulier}
 numeric u ; u:=\MPvar{unite}*cm ;
 numeric n ; n:=\MPvar{sides};
rest of the code
\stopuniqueMPgraphic

 \define[2]\polyreg
  {\setupMPvariables[polygoneregulier][unite,sides]
\uniqueMPgraphic{polygoneregulier}{sides=#1,unite=#2}}

\starttext
%\uniqueMPgraphic{polygoneregulier}{unite=2,sides=4}
\polyreg{6}{0.5}
\stoptext

I did not find any détails on \MPvar et \setupMPvariables on the wiki,  
however

Roland



___
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] extra line after switchtobodyfont

2013-05-07 Thread Hans Hagen

On 5/4/2013 6:59 PM, Wolfgang Schuster wrote:


Am 04.05.2013 um 09:21 schrieb Aditya Mahajan :


On 2013-05-03, at 7:36 PM, "Meer, H. van der"  wrote:


Seems finally solved (sigh). I cleaned out all files loading typescripts on the 
fly.
- typescript macros ending in ] at the end of a line have now ]% at the end of 
the line
- empty lines have been removed for clarity
- all files now have \endinput at the end.

The files changed fit in a 54KB zip and I can send them if Hans/Wolfgang/.. 
wants to incorporate them in the next beta.


I haven't followed this thread in detail, but an alternative is to redefine 
\starttypescript etc. to use a different catcode regime so that new lines and 
spaces are ignores (similar to \starttexdefinition, etc)



A better method is to ignore the endlinechar when typescript files are loaded.

\newcount\savedendlinechar

\starttext

Line 1\crlf
\savedendlinechar\endlinechar \endlinechar\minusone
\switchtobodyfont[pagella]
\endlinechar\savedendlinechar
Line 2

\stoptext


in fact, that should happen automatically but maybe i messed up something

-
  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] Arabic typesetting, one more

2013-05-07 Thread Hans Hagen

On 5/7/2013 8:10 PM, "H. Özoguz" wrote:

i only followed this topic on a distance so first we need an example
that clearly shows a problem

I described an example here:
http://www.ntg.nl/pipermail/ntg-context/2013/073025.html

as a code, and with a pdf in attachment. Maybe it is not clear what I
mean?: The "slash" is set too low, and this only in ConTeXt. Is the
example good enough?


my guess is that the bottom mark is not dealt with in the font (as 
arabtype also has it too low i.e. there is no mark applied) .. is this 
valid arabic input?


\usemodule[fnt-20,art-01]

\starttext

\def\sample{اللهِ\quad اللَّـهِ}

\setvariables
  [otftracker]
  [font=name:traditionalarabicnormal,
   size=24pt,
   features=arabic,
   direction=-1,
   title=Feature Check,
   sample=\sample]

\page

\setvariables
  [otftracker]
  [font=arabtype,
   size=24pt,
   features=arabic,
   direction=-1,
   title=Feature Check,
   sample=\sample]

\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] makeing xml-node

2013-05-07 Thread Meer, H. van der
Alas, this does not solve the problem, iff I am following your suggestion 
correctly.

I did
\xmlloadbuffer{thebuffer}{\xmlatt{#1}{buffer}}
\xmlfilter{thebuffer}{*/context()}
\useMPgraphic..

This works for a buffer content enclosed in any node:
\startbuffer[ychannel]
  <= cannot be omitted
\startuseMPgraphic{}{}
..
\stopuseMPgraphic
  <= cannot be omitted
\stopbuffer

But it does not work when the content is not enclosed in a node, which is my 
input case:
\startbuffer[ychannel]
\startuseMPgraphic{}{}
..
\stopuseMPgraphic
\stopbuffer
Now the xml is judged invalid by running it.

In the case of a file there is a circumvention through directlua. There I can 
os.execute a chain of commands: echo "" >tmp;cat file >>tmp;echo "" 
>>tmp and then \xmlprocessfile the tmp. A bit of a kludge, I am ready to admit, 
but working. But I don't see how to do this with buffers.

Hans van der Meer



On 7 May 2013, at 7:39 PM, Hans Hagen mailto:pra...@wxs.nl>> 
wrote:

On 5/7/2013 5:30 PM, Meer, H. van der wrote:
With \xmlload{myroot}{file} I can load an xml file and the execute on its nodes.
However what to do if the file is not of the form file-contents?
In that case it would help if I could contruct a node with with some actions 
like:
\input{fileconytents and then operate with xml commands on that 
 node.

Can this be accomplished?

you can just filter the node ..

\xmlfilter{#myroot}{/some/element .

___
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] Loading Charis SIL

2013-05-07 Thread Wolfgang Schuster

Am 07.05.2013 um 20:37 schrieb Willi Egger :

> Hi all,
> 
> I was busy to make a typescript file and load Charis SIL.
> 
> I have no clue why I get the following error:
> 
> fonts   > defining > forced type 'otf' of 'CharisSIL-R' not found
> 
> Although it is stated in the typescript, that CharisSIL is a ttf font I get 
> the error on otf-font


You can install the typescript package from the modules section and use the 
font with:

\setupbodyfont[charissil]

\starttext

\starttitle[title=Charis SIL test]
\input knuth
\stoptitle

\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] font-age vs. font-agl

2013-05-07 Thread Hans Hagen

On 5/7/2013 1:47 PM, Philipp Gesang wrote:

Hi all,

the glyph list is a bit of a conundrum.

Context (font-enc.lua) will build its glyph list from
font-agl.lua and char-def.lua. Luatex-Fonts reads a file named
font-age.lua, which is, however, some 500 character definitions
short of the canonical Glyph List from Adobe’s resources [1].  On
the other hand, font-age contains these definitions

   table={
 ["SF1"]=9484, ["SF2"]=9492, ["SF3"]=9488,
 ["SF4"]=9496, ["SF5"]=9532, ["SF6"]=9516,
 ["SF7"]=9524, ["SF8"]=9500, ["SF9"]=9508,
 ["afii208"]=8213,
   }

which Adobe denotes padded as

 SF01;250C
 SF02;2514
 SF03;2510
 SF04;2518
 SF05;253C
 SF06;252C
 SF07;2534
 SF08;251C
 SF09;2524
 afii00208;2015

I’m not sure what to make of these differences and how they came
to pass except for some older posts in the list archive [2]. So
I’m asking for practical reasons:

   Are the differences of any significance?
   Can I use either list or should I stick with font-age?


only

twentyhangzhou  5344

was missing in char-def

the rest of the delta with the adobe list are synonyms

i've added the delta to font-age (makes it bigger but the list is not 
that critical anyway, mostly a fallback)




Thanks for any advice
Philipp


[1] http://partners.adobe.com/public/developer/en/opentype/glyphlist.txt
[2] http://www.ntg.nl/pipermail/ntg-context/2008/031575.html
 http://www.ntg.nl/pipermail/ntg-context/2008/029067.html



___
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] Loading Charis SIL

2013-05-07 Thread Willi Egger
Hi all,

I was busy to make a typescript file and load Charis SIL.

I have no clue why I get the following error:

fonts   > defining > forced type 'otf' of 'CharisSIL-R' not found

Although it is stated in the typescript, that CharisSIL is a ttf font I get the 
error on otf-font


Kind regards

Willi

Typescriptfile:

\starttypescript [serif][charissil][name]
 \definefontsynonym [CharisSIL-Regular]  [file:CharisSIL-R.ttf] 
[features=default]
\stoptypescript

\starttypescript [serif][charissil][name]
 \setups[font:fallback:serif]
 \definefontsynonym [Serif]  [CharisSIL-Regular]
\stoptypescript

\starttypescript [CharisSIL]
\definetypeface[\typescriptone][rm][serif][charissil] [default]
\stoptypescript



Testfile:

\usetypescriptfile[type-charis-SIL]
\usetypescript[CharisSIL]
\setupbodyfont[CharisSIL,rm,12pt]

\startbuffer[A]
\input knuth
\blank[2*line]
\stopbuffer

\starttext

\starttitle[title=Charis SIL test]

\getbuffer[A]

\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] Arabic typesetting, one more

2013-05-07 Thread H. Özoguz

i only followed this topic on a distance so first we need an example
that clearly shows a problem
I described an example here: 
http://www.ntg.nl/pipermail/ntg-context/2013/073025.html


as a code, and with a pdf in attachment. Maybe it is not clear what I 
mean?: The "slash" is set too low, and this only in ConTeXt. Is the 
example good enough?



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] font-age vs. font-agl

2013-05-07 Thread Hans Hagen

On 5/7/2013 2:07 PM, Philipp Gesang wrote:

·



Am 07.05.2013 um 13:47 schrieb Philipp Gesang 
:


Hi all,

the glyph list is a bit of a conundrum.

Context (font-enc.lua) will build its glyph list from
font-agl.lua and char-def.lua. Luatex-Fonts reads a file named
font-age.lua, which is, however, some 500 character definitions
short of the canonical Glyph List from Adobe’s resources [1].  On
the other hand, font-age contains these definitions

  table={
["SF1"]=9484, ["SF2"]=9492, ["SF3"]=9488,
["SF4"]=9496, ["SF5"]=9532, ["SF6"]=9516,
["SF7"]=9524, ["SF8"]=9500, ["SF9"]=9508,
["afii208"]=8213,
  }

which Adobe denotes padded as

SF01;250C
SF02;2514
SF03;2510
SF04;2518
SF05;253C
SF06;252C
SF07;2534
SF08;251C
SF09;2524
afii00208;2015

I’m not sure what to make of these differences and how they came
to pass except for some older posts in the list archive [2]. So
I’m asking for practical reasons:

  Are the differences of any significance?


The first list uses decimal numbers while adobes list uses
hexadecimal numbers.


I was asking about the names: “SF1” vs. “SF01”;
“afii208” vs. “afii00208”. The values are identical.


probably names i ran into at some point

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] inclusion of tex code in xml context

2013-05-07 Thread Hans Hagen

On 5/7/2013 2:18 PM, Meer, H. van der wrote:

I have some difficulties understanding the intake of ConTeXt-code in an XML 
processing environment.
The setup is as follows.

\startbuffer[buffername]
\startuseMPgraphic{graphicname}{}
...
\stopuseMPgraphic
\stopbuffer

Processing inside xmlsetup:

\startxmlsetups xmlcommon:mpgraphic
   Here I want to read the buffer and then call it up with
   \useMPgraphic{graphicname}{}
\stopxmlsetups

This works if I pack the graphic definition in the buffer inside a  
node and call
   \xmlprocessbuffer{tex}{\xmlatt{#1}{buffer}}{}
where  is a ConTeXt processing setup.

This actuallty works, but has the drawback of putting the ConTeXt code inside  
thereby makeing it difficult to reuse the definition of the graphic in a non XML-context. I thus want 
to get rid of the  enclosure.

I tried things like
   \xmlloadbuffer{tex}{\xmlatt{#1}{buffer}}
   \xmlsetup{tex}{xmlcommon:tex}<== the tex processing xmlsetups
But this does not work. Because the graphic in this case is not found by 
\useMPgraphic.
Clearly I am misunderstanding some of the intricacies of the xmlloading macros 
and probably the solution is quite simple. But I cannot find the right way to 
do it.
Any help would be appreciated.


you can look for \xmlcontext and \xmlflushcontext

-
  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] makeing xml-node

2013-05-07 Thread Hans Hagen

On 5/7/2013 5:30 PM, Meer, H. van der wrote:

With \xmlload{myroot}{file} I can load an xml file and the execute on its nodes.
However what to do if the file is not of the form file-contents?
In that case it would help if I could contruct a node with with some actions 
like:
\input{fileconytents and then operate with xml commands on that 
 node.

Can this be accomplished?


you can just filter the node ..

\xmlfilter{#myroot}{/some/element .

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] Arabic typesetting, one more

2013-05-07 Thread Hans Hagen

On 5/7/2013 1:32 PM, "H. Özoguz" wrote:

mistyping in last one, corrected:

If this behavior of context setting the kassra (slash) too low is not
easily understandable or fixable, do
anyone knows a font, where this not happens with the symbol "allah" and
kassra in context? I thought in this mailer were some arabic typers... ?


i only followed this topic on a distance so first we need an example 
that clearly shows a 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
___


[NTG-context] makeing xml-node

2013-05-07 Thread Meer, H. van der
With \xmlload{myroot}{file} I can load an xml file and the execute on its nodes.
However what to do if the file is not of the form file-contents?
In that case it would help if I could contruct a node with with some actions 
like:
\input{fileconytents and then operate with xml commands on that 
 node.

Can this be accomplished?

Hans van der Meer



___
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] Bracets in tables

2013-05-07 Thread Wolfgang Schuster

Am 07.05.2013 um 14:33 schrieb Thomas A. Schmitz :

> On 05/07/2013 12:48 AM, MANUEL GONZALEZ SUAREZ wrote:
>> Hello everyone
>> How can I draw a vertical bracet that spans multiple cells in a table?
> 
> Search is your friend:
> 
> http://www.ntg.nl/pipermail/ntg-context/2010/049601.html


Part of the code is now in the source but it has to be loaded first.

\useMPlibrary[fen]

\starttext

\bTABLE[frame=off,loffset=1ex,roffset=1ex,align=lohi]
   \bTR
 \bTD[background=rightbrace] Text\\Text \eTD
 \bTD Text \eTD
   \eTR
\eTABLE

\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] Bracets in tables

2013-05-07 Thread Thomas A. Schmitz

On 05/07/2013 12:48 AM, MANUEL GONZALEZ SUAREZ wrote:

Hello everyone
How can I draw a vertical bracet that spans multiple cells in a table?


Search is your friend:

http://www.ntg.nl/pipermail/ntg-context/2010/049601.html

Thomas
___
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] inclusion of tex code in xml context

2013-05-07 Thread Meer, H. van der
I have some difficulties understanding the intake of ConTeXt-code in an XML 
processing environment.
The setup is as follows.

\startbuffer[buffername]
\startuseMPgraphic{graphicname}{}
..
\stopuseMPgraphic
\stopbuffer

Processing inside xmlsetup:

\startxmlsetups xmlcommon:mpgraphic
  Here I want to read the buffer and then call it up with
  \useMPgraphic{graphicname}{}
\stopxmlsetups

This works if I pack the graphic definition in the buffer inside a  
node and call
  \xmlprocessbuffer{tex}{\xmlatt{#1}{buffer}}{}
where  is a ConTeXt processing setup.

This actuallty works, but has the drawback of putting the ConTeXt code inside 
 thereby makeing it difficult to reuse the definition of the graphic 
in a non XML-context. I thus want to get rid of the  enclosure.

I tried things like
  \xmlloadbuffer{tex}{\xmlatt{#1}{buffer}}
  \xmlsetup{tex}{xmlcommon:tex}<== the tex processing xmlsetups
But this does not work. Because the graphic in this case is not found by 
\useMPgraphic.
Clearly I am misunderstanding some of the intricacies of the xmlloading macros 
and probably the solution is quite simple. But I cannot find the right way to 
do it.
Any help would be appreciated.

Hans van der Meer



___
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] font-age vs. font-agl

2013-05-07 Thread Philipp Gesang
·

> 
> Am 07.05.2013 um 13:47 schrieb Philipp Gesang 
> :
> 
> > Hi all,
> > 
> > the glyph list is a bit of a conundrum.
> > 
> > Context (font-enc.lua) will build its glyph list from
> > font-agl.lua and char-def.lua. Luatex-Fonts reads a file named
> > font-age.lua, which is, however, some 500 character definitions
> > short of the canonical Glyph List from Adobe’s resources [1].  On
> > the other hand, font-age contains these definitions
> > 
> >  table={
> >["SF1"]=9484, ["SF2"]=9492, ["SF3"]=9488,
> >["SF4"]=9496, ["SF5"]=9532, ["SF6"]=9516,
> >["SF7"]=9524, ["SF8"]=9500, ["SF9"]=9508,
> >["afii208"]=8213,
> >  }
> > 
> > which Adobe denotes padded as
> > 
> >SF01;250C
> >SF02;2514
> >SF03;2510
> >SF04;2518
> >SF05;253C
> >SF06;252C
> >SF07;2534
> >SF08;251C
> >SF09;2524
> >afii00208;2015
> > 
> > I’m not sure what to make of these differences and how they came
> > to pass except for some older posts in the list archive [2]. So
> > I’m asking for practical reasons:
> > 
> >  Are the differences of any significance?
> 
> The first list uses decimal numbers while adobes list uses
> hexadecimal numbers.

I was asking about the names: “SF1” vs. “SF01”;
“afii208” vs. “afii00208”. The values are identical.

Philipp



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

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

Re: [NTG-context] font-age vs. font-agl

2013-05-07 Thread Wolfgang Schuster

Am 07.05.2013 um 13:47 schrieb Philipp Gesang 
:

> Hi all,
> 
> the glyph list is a bit of a conundrum.
> 
> Context (font-enc.lua) will build its glyph list from
> font-agl.lua and char-def.lua. Luatex-Fonts reads a file named
> font-age.lua, which is, however, some 500 character definitions
> short of the canonical Glyph List from Adobe’s resources [1].  On
> the other hand, font-age contains these definitions
> 
>  table={
>["SF1"]=9484, ["SF2"]=9492, ["SF3"]=9488,
>["SF4"]=9496, ["SF5"]=9532, ["SF6"]=9516,
>["SF7"]=9524, ["SF8"]=9500, ["SF9"]=9508,
>["afii208"]=8213,
>  }
> 
> which Adobe denotes padded as
> 
>SF01;250C
>SF02;2514
>SF03;2510
>SF04;2518
>SF05;253C
>SF06;252C
>SF07;2534
>SF08;251C
>SF09;2524
>afii00208;2015
> 
> I’m not sure what to make of these differences and how they came
> to pass except for some older posts in the list archive [2]. So
> I’m asking for practical reasons:
> 
>  Are the differences of any significance?

The first list uses decimal numbers while adobes list uses hexadecimal numbers.

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] font-age vs. font-agl

2013-05-07 Thread Philipp Gesang
Hi all,

the glyph list is a bit of a conundrum.

Context (font-enc.lua) will build its glyph list from
font-agl.lua and char-def.lua. Luatex-Fonts reads a file named
font-age.lua, which is, however, some 500 character definitions
short of the canonical Glyph List from Adobe’s resources [1].  On
the other hand, font-age contains these definitions

  table={
["SF1"]=9484, ["SF2"]=9492, ["SF3"]=9488,
["SF4"]=9496, ["SF5"]=9532, ["SF6"]=9516,
["SF7"]=9524, ["SF8"]=9500, ["SF9"]=9508,
["afii208"]=8213,
  }

which Adobe denotes padded as

SF01;250C
SF02;2514
SF03;2510
SF04;2518
SF05;253C
SF06;252C
SF07;2534
SF08;251C
SF09;2524
afii00208;2015

I’m not sure what to make of these differences and how they came
to pass except for some older posts in the list archive [2]. So
I’m asking for practical reasons:

  Are the differences of any significance?
  Can I use either list or should I stick with font-age?

Thanks for any advice
Philipp


[1] http://partners.adobe.com/public/developer/en/opentype/glyphlist.txt
[2] http://www.ntg.nl/pipermail/ntg-context/2008/031575.html
http://www.ntg.nl/pipermail/ntg-context/2008/029067.html


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

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

Re: [NTG-context] Arabic typesetting, one more

2013-05-07 Thread H. Özoguz

mistyping in last one, corrected:

If this behavior of context setting the kassra (slash) too low is not easily 
understandable or fixable, do
anyone knows a font, where this not happens with the symbol "allah" and
kassra in context? I thought in this mailer were some arabic typers... ?

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] Arabic typesetting, one more

2013-05-07 Thread H. Özoguz
If this behavior of context setting the kassra (slash) too low, do 
anyone knows a font, where this not happens with the symbol "allah" and 
kassra in context? I thought in this mailer were some arabic typers... ?


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] command for a MP graphic

2013-05-07 Thread Wolfgang Schuster

Am 07.05.2013 um 09:51 schrieb Marco Patzer :

> On 2013–05–07 Roland Thiers wrote:
> 
>> Hi,
>> I did this code to get a regular polygon with metafun, it works but
>> I would like to have an user command  like  \define or \def
>> to be able to choose the number of sides, n. I don't know how to do
>> that ...
> 
> Here's one way to do it:
> 
> \startuniqueMPgraphic{polygoneregulier}{sides}
>  drawoptions (withpen pencircle scaled 2pt);
>  numeric u ; u:=1*cm ;
>  numeric n ; n:=\MPvar{sides};
>  pair a[];
>  a[0]:=(0,3u);
>  path polygone[] ;
>  for i=1 upto n :
>  a[i]:=a[0] rotatedaround(origin,i*360/n) ;
>  polygone[i]:=a[i-1]--a[i];
>  draw polygone[i]; endfor;
>  draw fullcircle scaled 6u withcolor blue;
> \stopuniqueMPgraphic
> 
> %% \polyreg{}
> \define[1]\polyreg
>  {\setupMPvariables[polygoneregulier][sides=#1]%%
>   \uniqueMPgraphic{polygoneregulier}}


\define[1]\polyreg
  {\uniqueMPgraphic{polygoneregulier}{sides=#1}}

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] parameters to \startxmlsetups

2013-05-07 Thread Hans Hagen

On 5/7/2013 12:18 PM, Meer, H. van der wrote:

\startxmlsetups takes one (implicit) parameter #1, the current node.
The setup can be called with \setup{node}{command}.

My question: Can there be another parameter transferred to the \startxmlsetups 
from the \setup call?


no


What I would like to do is having a variant \startxmlsetups and corresponding 
\setup with three parameters {#1}{#2}{#3}. Then argument #3 will allow me to 
transfer extraneous information to the \startxmlsetups. So one can avoid 
transferring information through (global) defines, which makes code less 
general and not very transparant.


best wrap it in a macro then

-
  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] command for a MP graphic

2013-05-07 Thread Roland Thiers


Le 7 mai 13 à 09:51, Marco Patzer a écrit :


\startuniqueMPgraphic{polygoneregulier}{sides}
 drawoptions (withpen pencircle scaled 2pt);
 numeric u ; u:=1*cm ;
 numeric n ; n:=\MPvar{sides};
 pair a[];
 a[0]:=(0,3u);
 path polygone[] ;
 for i=1 upto n :
 a[i]:=a[0] rotatedaround(origin,i*360/n) ;
 polygone[i]:=a[i-1]--a[i];
 draw polygone[i]; endfor;
 draw fullcircle scaled 6u withcolor blue;
\stopuniqueMPgraphic

%% \polyreg{}
\define[1]\polyreg
 {\setupMPvariables[polygoneregulier][sides=#1]%%
  \uniqueMPgraphic{polygoneregulier}}

\starttext
 \dontleavehmode
 \dorecurse{9}{\polyreg\recurselevel\space}
\stoptext


Thanks a lot Marco ! I have to think carefully on your way : I don't  
understand

all these commands yet.
Roland

___
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] Can't use \type{\} in a footnote

2013-05-07 Thread Wolfgang Schuster

Am 07.05.2013 um 12:35 schrieb Tim Li :

> Thanks, Huseyin. My codes in context is reasonable, so I want to know why 
> this is wrong.

Catcodes can’t be changed in footnotes which is necessary to make \ a normal 
character for the \type command. For TeX command you can use \tex{mycommand} 
which adds a \ at the begin of the argument.

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] Layer for all pages and for specific pages

2013-05-07 Thread Wolfgang Schuster

Am 07.05.2013 um 07:49 schrieb H. Özoguz :

>> You can avoid this when you put everything in a single table. You should 
>> also avoid
>> to use brackets as delimiters for text, use normal braced arguments why can 
>> be
>> grouped without problems.
>> 
>> \startsetups[arde]
>>   \setupTABLE[c][1][rightframe=on]
>> \stopsetups
>> 
>> \def\startarde
>>   {\bTABLE[frame=off,width=.5\textwidth,setups=arde,split=yes]}
>> 
>> \def\stoparde
>>   {\eTABLE}
>> 
>> \define[2]\arde
>>   {\bTR
>>  \bTD#1\eTD
>>  \bTD#2\eTD
>>\eTR}
>> 
>> \setuptolerance[tolerant,stretch]
>> 
>> \starttext
>> \startarde
>> \arde{\input knuth }{\input knuth }
>> \arde{\input knuth }{\input knuth }
>> \stoparde
>> \stoptext
>> 
>> Wolfgang
> 
> That does not work in my case, where in the right column a r2l-text (arabic) 
> is set. See this example:
> 
> \startsetups[arde]
>  \setupTABLE[c][1][rightframe=on]
> \stopsetups
> \def\startarde
>  {\bTABLE[frame=off,width=.5\textwidth,setups=arde,split=yes]}
> \def\stoparde
>  {\eTABLE}
> \define[2]\arde
>  {\bTR
> \bTD#1\eTD
> \bTD#2\eTD
>   \eTR}
> \setuptolerance[tolerant,stretch]
> \starttext

\startarde

> \arde{\input knuth }{\setupalign[r2l] Eigentlich steht hier etwas Arabisches.}

\stoparde

> \stoptext
> 
> The two texts are just written one after another, no table, no columns.

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] Can't use \type{\} in a footnote

2013-05-07 Thread Tim Li
Thanks, Huseyin. My codes in context is reasonable, so I want to know why this 
is wrong.

Tim


> Date: Tue, 7 May 2013 09:13:58 +0200
> From: h.oezo...@mmnetz.de
> To: ntg-context@ntg.nl
> Subject: Re: [NTG-context] Can't use \type{\} in a footnote
> 
> You could use this:
> 
> \starttext
> aa\footnote{I can get a backslash\textbackslash in footnote!}
> \stoptext
> 
> 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
> ___
  ___
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] parameters to \startxmlsetups

2013-05-07 Thread Meer, H. van der
\startxmlsetups takes one (implicit) parameter #1, the current node.
The setup can be called with \setup{node}{command}.

My question: Can there be another parameter transferred to the \startxmlsetups 
from the \setup call? 

What I would like to do is having a variant \startxmlsetups and corresponding 
\setup with three parameters {#1}{#2}{#3}. Then argument #3 will allow me to 
transfer extraneous information to the \startxmlsetups. So one can avoid 
transferring information through (global) defines, which makes code less 
general and not very transparant.

Hans van der Meer



___
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] Issue with 2013.04.30 00:31

2013-05-07 Thread luigi scarso
On Tue, May 7, 2013 at 10:46 AM, Hans Hagen  wrote:

> On 5/6/2013 8:36 AM, Kip Warner wrote:
>
>> Hey list,
>>
>> I am experiencing two issues in compiling my document. The first is a
>> non-fatal warning during compilation of my book:
>>
>>  ...
>>  (/usr/share/texmf/tex/context/**base/s-abr-02.tex
>>  resolvers   > modules > 'abr-01' is loaded
>>  (/usr/share/texmf/tex/context/**base/s-abr-01.tex))tr: invalid
>>  option -- '
>>  '
>>  Try 'tr --help' for more information.
>>
>>  publications> wrote a new auxiliary file \jobname.aux
>>  This is BibTeX, Version 0.99d (TeX Live 2012/Debian)
>>  The top-level auxiliary file: Handbook.aux
>>  The style file: cont-au.bst
>>  Database file #1: References/References.bib
>>  (/usr/share/texmf/tex/context/**bib/bibl-apa.tex)
>>  ...
>>
>
> i'm not aware of a "tr" command so it's some kind of side effect i guess
>
>
tr is a unix command that translate or delete characters: for some reason
is executed
from his tex  source.
A similar effect can be done with
\starttext
\ctxlua{os.execute('tr --')}
\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] Issue with 2013.04.30 00:31

2013-05-07 Thread Hans Hagen

On 5/6/2013 8:36 AM, Kip Warner wrote:

Hey list,

I am experiencing two issues in compiling my document. The first is a
non-fatal warning during compilation of my book:

 ...
 (/usr/share/texmf/tex/context/base/s-abr-02.tex
 resolvers   > modules > 'abr-01' is loaded
 (/usr/share/texmf/tex/context/base/s-abr-01.tex))tr: invalid
 option -- '
 '
 Try 'tr --help' for more information.

 publications> wrote a new auxiliary file \jobname.aux
 This is BibTeX, Version 0.99d (TeX Live 2012/Debian)
 The top-level auxiliary file: Handbook.aux
 The style file: cont-au.bst
 Database file #1: References/References.bib
 (/usr/share/texmf/tex/context/bib/bibl-apa.tex)
 ...


i'm not aware of a "tr" command so it's some kind of side effect i guess


The second issue is a fatal error:

 ...
 references  > unknown reference '[Leitmotifs][Resources For
 Everyone]'
 pages   > flushing realpage 9, userpage 9, subpage 2
 ! LuaTeX error [string "\directlua "]:1: invalid escape sequence
 near '\#'.
 \ctxcommand #1^^@-\directlua {commands.#1}

 \bibgotoURL #1#2\-\useURL [#1][#2][][#1]
 \from [#1]
  ...ded {\bibgotoURL {\@@pb@title }{\@@pb@biburl }}
   .\egroup
 \space
 \firstoftwoarguments #1#2o-#1

 \@@pv:l:misc ...{\bgroup \it }{.\egroup \space }{}
   \insertpubname
 {}{. }{}\in...
 \dotypesetapublication ...ative {\bibgetvart {#1}}

 \removeunwantedspaces \egr...
 ...
 l.37 ...olumn to sort demand by vote.}][occupy_poll]
This should
 not discourag...
 E
 ? You want to edit file Leitmotifs/Leitmotifs.tex at line 1
 ...

I don't know what the error means, but I think it is probably not being
raised in the latter file since line one is merely a comment. But
perhaps this is due to something in my environment file?


no, more with an unexpandable or undefined command being used which then 
ends up \likethis which confuses lua as \l is no escape (change between 
lua 5.1 and 5.2)





I am using ConTeXt 2013.04.30 00:31, LuaTeX beta-0.77.0-2013042719 (TeX
Live 2013/dev/Debian)(rev 4635), and LuajitTeX version
beta-0.77.0-2013042721  (TeX Live 2013/dev/Debian)(rev 39).

Regards,

PS I am not a subscriber. Kindly cc me.



___
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] fontsize drawing in metapost

2013-05-07 Thread Meer, H. van der
Thanks. This is exactly what is needed. I feel myself somewhat silly, because I 
did try \scale, but with the wrong parameter setup; nothing happened then, of 
course. Now I know to do it right!

Hans van der Meer



On 7 May 2013, at 9:35 AM, Marco Patzer 
 wrote:

> On 2013–05–07 Meer, H. van der wrote:
> 
>> Perhaps a better and possibly more elegant way seems the following
>> route. When I turn Metapost figures into external pdf-files, these
>> can be placed with \useexternalfigure and the scaled as a whole,
>> drawing and text alike. My question is: can this be done without
>> resorting to an external pdf? That is, can I pick up the result of
>> \useMPgraphic somewhere, then put this in \useexternalfigure and
>> apply everything possible there to the figure.
> 
> You could use \scale :
> 
> \startuseMPgraphic{foo}
>  fill unitcircle scaled 1cm;
>  label("Foo", origin);
> \stopuseMPgraphic
> 
> \starttext
>\useMPgraphic{foo}
>  \scale[width=3cm]{\useMPgraphic{foo}}
>  \scale[width=3cm,height=5cm] {\useMPgraphic{foo}}
>  \scale[scale=2500]   {\useMPgraphic{foo}}
> \stoptext
> 
> 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
> ___

___
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] xml attribute trickery possible?

2013-05-07 Thread Hans Hagen

On 5/6/2013 1:53 PM, Meer, H. van der wrote:


In the xml setup one may call a command on the current node like:

\startxmlsetups xam:define:get
   \xmlcommand{#1}{}{xmlcommon:whatever}
\stopxmlsetups

The current node will have attributes and these can be used in the execution of 
the command xmlcommon:whatever.
The question is the following: I would like to change/addto the attributes on 
the current node, for example to supply missing defaults. Is this possible and 
if yes, how to?


there is no helper for this (one can make one using lua); acting on 
different values of attributes is often done with the value mapper macros


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] command for a MP graphic

2013-05-07 Thread Marco Patzer
On 2013–05–07 Roland Thiers wrote:

> Hi,
> I did this code to get a regular polygon with metafun, it works but
> I would like to have an user command  like  \define or \def
> to be able to choose the number of sides, n. I don't know how to do
> that ...

Here's one way to do it:

\startuniqueMPgraphic{polygoneregulier}{sides}
  drawoptions (withpen pencircle scaled 2pt);
  numeric u ; u:=1*cm ;
  numeric n ; n:=\MPvar{sides};
  pair a[];
  a[0]:=(0,3u);
  path polygone[] ;
  for i=1 upto n :
  a[i]:=a[0] rotatedaround(origin,i*360/n) ;
  polygone[i]:=a[i-1]--a[i];
  draw polygone[i]; endfor;
  draw fullcircle scaled 6u withcolor blue;
\stopuniqueMPgraphic

%% \polyreg{}
\define[1]\polyreg
  {\setupMPvariables[polygoneregulier][sides=#1]%%
   \uniqueMPgraphic{polygoneregulier}}

\starttext
  \dontleavehmode
  \dorecurse{9}{\polyreg\recurselevel\space}
\stoptext

You can extent this to be able to use key-value syntax or default
values if you like.

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] fontsize drawing in metapost

2013-05-07 Thread Marco Patzer
On 2013–05–07 Meer, H. van der wrote:

> Perhaps a better and possibly more elegant way seems the following
> route. When I turn Metapost figures into external pdf-files, these
> can be placed with \useexternalfigure and the scaled as a whole,
> drawing and text alike. My question is: can this be done without
> resorting to an external pdf? That is, can I pick up the result of
> \useMPgraphic somewhere, then put this in \useexternalfigure and
> apply everything possible there to the figure.

You could use \scale :

\startuseMPgraphic{foo}
  fill unitcircle scaled 1cm;
  label("Foo", origin);
\stopuseMPgraphic

\starttext
\useMPgraphic{foo}
  \scale[width=3cm]{\useMPgraphic{foo}}
  \scale[width=3cm,height=5cm] {\useMPgraphic{foo}}
  \scale[scale=2500]   {\useMPgraphic{foo}}
\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
___

[NTG-context] command for a MP graphic

2013-05-07 Thread Roland Thiers

Hi,
I did this code to get a regular polygon with metafun, it works but I  
would like to have an user command  like  \define or \def
to be able to choose the number of sides, n. I don't know how to do  
that ...


\startbuffer[largeurdeslignes]
drawoptions (withpen pencircle scaled 2pt);
\stopbuffer

\startbuffer[polygoneregulier]
numeric u ; u:=1*cm ;
numeric n ; n:=7 ;
pair a[];
a[0]:=(0,3u);
path polygone[] ;
for i=1 upto n :
a[i]:=a[0] rotatedaround(origin,i*360/n) ;
polygone[i]:=a[i-1]--a[i];
draw polygone[i]; endfor;
\stopbuffer

\startbuffer[cercleunite]
draw fullcircle scaled 6u withcolor blue;
\stopbuffer

\define 
\polyreg 
{\processMPbuffer[largeurdeslignes,polygoneregulier,cercleunite]}

\starttext
\polyreg
\stoptext

Thanks, Roland Thiers
___
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] Can't use \type{\} in a footnote

2013-05-07 Thread H. Özoguz

You could use this:

\starttext
aa\footnote{I can get a backslash\textbackslash in footnote!}
\stoptext

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
___