[NTG-context] Page numbering and first page

2008-08-05 Thread Eric DÉTREZ
Hello

Is it any way to get a different page numbering for the first page  
(and different heads and foots).
I used to do in plain tex with a test :
*
\newif\ifpageun

\ifnum\pageno=1 \pageuntrue \else \pageunfalse \fi

\footline={\ifpageun \hfil \global \pageunfalse
\else \numpage=\pageno \advance\numpage by \decale
  \ifodd\numpage\rm \the\nom \hfill --page  
\the\numpage--
  \else \rm --page \the\numpage--\hfill\the 
\nom
 \fi
\fi}
*
(names are french)
but maybe there is a simpler way in Context.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Lilypond module

2008-08-05 Thread Wolfgang Schuster
On Tue, Aug 5, 2008 at 12:00 AM, Olivier Guéry [EMAIL PROTECTED] wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Hello,

 It seem's that the lilypond module don't work.

 See this minimal exemple :

 \usemodule[lilypond]
 \setuplilypond[staffsize=30, fragment=yes, time=no, clef=no]
 \starttext
\lilypond{ \new RhythmicStaff {\time 3/4 c8 r4.. c8 r16} } \blank[1*big]
 \stoptext

 It failed with :

 (/usr/share/texmf/tex/context/third/lilypond/t-lilypond.tex
 loading: LilyPond module
 )
 utilityfile | not present
 systems: begin file test-lilypond at line 6
 ! You can't use `the character 1' after \the.
 \lily!figures -1

 \dosavebuffer [#1]-\ctxlua {buffers.save(#1
 )}
 \dodostartlilypond ...ilypond-\the \lily!figures ]
  \fi \ifeof 18 \expanded {\...
 l.8 ... RhythmicStaff {\time 3/4 c8 r4.. c8 r16} }
   \blank[1*big]


 My luatex is : This is LuaTeX, Version snapshot-0.28.0-2008071500
 My context : MtxRun | main context file:
 /usr/share/texmf/tex/context/base/context.tex
MtxRun | current version: 2008.07.31 16:30

 Any idears ?

Remove the \the before \lily!figures at line 259 in the module or use MkII.

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


Re: [NTG-context] \Word broken

2008-08-05 Thread Matthias Wächter
Hans,

Do you know how this can be fixed? Is the descripion descriptive enough?

Thanks,
- Matthias

On 7/30/2008 10:23 AM, Matthias Wächter wrote:
 On 7/29/2008 11:22 PM, Hans Hagen wrote:
 Matthias Wächter wrote:

 Hans, do you feel something about the issue?
 only if i get a test file and a description of expected behaviour
 
 Sure, here it is. removing the comment on the \word version works only in 
 MKIV, i.e. LuaTeX, but that’s not the issue anyway.
 
 \starttext
 
 assert \WORDS{oNe two} = ONE TWO (works in MKII + MKIV)
 
 %% \word is not defined in MKII, just in MKIV
 % assert \word{oNe two} = one two (works in MKIV)
 
 assert \Words{oNe two} = ONe Two (works in MKII + MKIV)
 
 assert \Word{oNe two} = ONe two (works in MKII, does not work in MKIV)
 
 \stoptext
 
 
 Thanks for taking care, Hans,
 - Matthias
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Using module:bib

2008-08-05 Thread Taco Hoekwater
Maurí­cio wrote:
 What does 'k=1' does?

It defines the key for crossreferencing via \cite.

Best wishes,
Taco

 Maurício
 
 What is wrong with my attempt to
 create a bibliography and a reference
 to it? (...)
 %-
 \enableregime[utf]
 \mainlanguage[pt]
 \usemodule[bib]

 \setuppublicationlist[]

 
 \startpublication[k=1,t=manual, a=Fung, y=1993, n=1]
   (...)
 
 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : https://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___

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

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


Re: [NTG-context] goto(box) and setuplist questions

2008-08-05 Thread Alan Stone
Thanks for these finishing touches Wolfgang.

I'm troubled by the following though...

- whatever the dimension (number and/or unit) I set for
\setupnarrower[left=1pt,right=1pt]
the left and right margin remain the same

- when setting for example
\setuplist[chapter][align=middle,distance=1em]
( or whatever else for distance ) it has no effect
upon the distance between the chapter number
and the chapter title

ConTeXt  ver: 2008.07.10 08:40 MKIV  fmt: 2008.7.10  int: english/english

Alan

On Tue, Aug 5, 2008 at 10:29 AM, Wolfgang Schuster 
[EMAIL PROTECTED] wrote:


 Slightly modfied:

 \setuppapersize[S6][S6]

 \setupbodyfont[14.4pt]

 \setuplayout
  [width=360pt,
   headerheight=7pt,
   footerheight=7pt,
   margin=0pt,
   backspace=25pt,
   topheight=7pt,
   bottomheight=7pt,
   rightedgedistance=20pt,
   rightedge=180pt]

 \setuplist[chapter,section][aligntitle=yes,criterium=all]
 \setuplist[chapter][align=middle]

 \setuphead[chapter][number=yes]
 \setuphead[section][number=no]

 \setupbackgrounds[text][rightedge][frame=on]

 \setupinteraction[
state=start,
menu=on,
page=yes]

 \setupnarrower[left=1pt,right=1pt]

 \defineinteractionmenu[myMenu][right]

 \startinteractionmenu[myMenu]
  \placecontent[
 criterium=all,
 alternative=b,
  style={\switchtobodyfont[small]\setupinterlinespace[line=2.4ex]},
 interaction=all,
 before={\blank[small]\startnarrower},
 after={\stopnarrower\blank[medium]},
 ]
 \stopinteractionmenu

 \setupinteractionmenu[myMenu][state=start]

 \setupinteractionmenu[right][distance=overlay]

 \starttext
\chapter{This Long Chapter Title}
\section{This Long Section Title A}
\input knuth
\section{This Long Section Title B}
\input zapf
 \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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] goto(box) and setuplist questions

2008-08-05 Thread Wolfgang Schuster
On Tue, Aug 5, 2008 at 1:07 PM, Alan Stone
[EMAIL PROTECTED] wrote:
 Thanks for these finishing touches Wolfgang.

 I'm troubled by the following though...

 - whatever the dimension (number and/or unit) I set for
 \setupnarrower[left=1pt,right=1pt]
 the left and right margin remain the same

Use \startnarrower[left,right].

 - when setting for example
 \setuplist[chapter][align=middle,distance=1em]
 ( or whatever else for distance ) it has no effect
 upon the distance between the chapter number
 and the chapter title

\setuplist[chapter][align=middle,distance=0pt,width=1em]

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


Re: [NTG-context] goto(box) and setuplist questions

2008-08-05 Thread Wolfgang Schuster
On Mon, Aug 4, 2008 at 10:57 PM, Alan Stone
[EMAIL PROTECTED] wrote:
 I'm looking to have in the menu...

 - chapter title centered
 - section title left aligned
 - for long chapter/section titles split over more than 1line,
 vertical space between these chapter/section lines to be
 smaller
 - left and right margin of (x)pt

 \setuppapersize[S6][S6]

 \setupbodyfont[14.4pt]

 %\showframe

 \setuppagenumbering[alternative=singlesided]

 \setuplayout
   [width=360pt,
headerheight=7pt,
footerheight=7pt,
margin=0pt,
backspace=25pt,
topheight=7pt,
bottomheight=7pt,
rightedgedistance=20pt,
rightedge=180pt]

 \setuplist[chapter,section][
 criterium=all,
 aligntitle=yes,
 interaction=all]

 \setuphead[chapter][number=yes]
 \setuphead[section][number=no]

 \setupbackgrounds[text][rightedge][frame=on]

 \setupinteraction[
 state=start,
 menu=on,
 page=yes]

 \setupnarrower[left=1pt,right=1pt]
 %\setupnarrower[left=5pt,right=5pt]

 \defineinteractionmenu[myMenu][right]

 \startinteractionmenu[myMenu]
 \placecontent[
 criterium=all,
 alternative=b,
 %distance=2pt,% no effect
style=\tfx,  % \tfxx is too
 small to read
 %offset=5pt,% no effect
 %margin=5pt,  % only sets left
 margin
 %width=.9\rightedgewidth,  % chapter title gets whacked
 out of rightedge
 %maxwidth=.9\rightedgewidth,   % no effect
 interaction=all,
 before=\startnarrower, % sets a default left and
 right margin, i.e. independent
 after=\stopnarrower]% of left/right setting
 %before=,
 %after=]
 \stopinteractionmenu

 \setupinteractionmenu[myMenu][state=start]

 \setupinteractionmenu[right][
 %offset=5pt,% no effect
 %width=.9\rightedgewidth,   % no effect
 %maxwidth=.9\rightedgewidth,   % no effect
 %before=\startnarrower,  % no effect
 %after=\stopnarrower,% no effect
 distance=overlay]

 \starttext
 \chapter{This Long Chapter Title}
 \section{This Long Section Title A}
 \input knuth
 \section{This Long Section Title B}
 \input zapf
 \stoptext

Slightly modfied:

\setuppapersize[S6][S6]

\setupbodyfont[14.4pt]

\setuplayout
  [width=360pt,
   headerheight=7pt,
   footerheight=7pt,
   margin=0pt,
   backspace=25pt,
   topheight=7pt,
   bottomheight=7pt,
   rightedgedistance=20pt,
   rightedge=180pt]

\setuplist[chapter,section][aligntitle=yes,criterium=all]
\setuplist[chapter][align=middle]

\setuphead[chapter][number=yes]
\setuphead[section][number=no]

\setupbackgrounds[text][rightedge][frame=on]

\setupinteraction[
state=start,
menu=on,
page=yes]

\setupnarrower[left=1pt,right=1pt]

\defineinteractionmenu[myMenu][right]

\startinteractionmenu[myMenu]
  \placecontent[
 criterium=all,
 alternative=b,
 style={\switchtobodyfont[small]\setupinterlinespace[line=2.4ex]},
 interaction=all,
 before={\blank[small]\startnarrower},
 after={\stopnarrower\blank[medium]},
]
\stopinteractionmenu

\setupinteractionmenu[myMenu][state=start]

\setupinteractionmenu[right][distance=overlay]

\starttext
\chapter{This Long Chapter Title}
\section{This Long Section Title A}
\input knuth
\section{This Long Section Title B}
\input zapf
\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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Page numbering and first page

2008-08-05 Thread Wolfgang Schuster
On Tue, Aug 5, 2008 at 11:20 AM, Eric DÉTREZ [EMAIL PROTECTED] wrote:
 Hello

 Is it any way to get a different page numbering for the first page
 (and different heads and foots).
 I used to do in plain tex with a test :
 *
 \newif\ifpageun

 \ifnum\pageno=1 \pageuntrue \else \pageunfalse \fi

 \footline={\ifpageun \hfil \global \pageunfalse
\else \numpage=\pageno \advance\numpage by \decale
  \ifodd\numpage\rm \the\nom \hfill --page
 \the\numpage--
  \else \rm --page \the\numpage--\hfill\the
 \nom
 \fi
\fi}
 *
 (names are french)
 but maybe there is a simpler way in Context.

Adapt this:

\startsectionblockenvironment[frontpart]
\setuppagenumbering[location=footer]
\stopsectionblockenvironment

\startsectionblockenvironment[bodypart]
\setuppagenumbering[location=header]
\stopsectionblockenvironment

\starttext

\startfrontmatter
\input tufte
\stopfrontmatter

\startbodymatter
\dorecurse{12}{\input knuth\par}
\stopbodymatter

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


[NTG-context] OTF features

2008-08-05 Thread Willi Egger
Dear OTF-users,


Is there a simple way to get to know the features wich a given OTF has?


Happy TeXing!

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

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


Re: [NTG-context] MPpage and single PDFs

2008-08-05 Thread Oliver Buerschaper
 This is what I'd do with ConTeXt … wicked trick, by the way ;-) But
 how to do that with LaTeX? I know it's somewhat off topic …

 From what I heard on the MacTeX list this can be done using LaTeX's  
pdfpages package …

Just in case someone might find this helpful.

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

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


Re: [NTG-context] MPpage and single PDFs

2008-08-05 Thread Wolfgang Schuster
On Mon, Aug 4, 2008 at 8:48 PM, Aditya Mahajan [EMAIL PROTECTED] wrote:
 On Mon, 4 Aug 2008, Hans Hagen wrote:

 Oliver Buerschaper wrote:

 Dear wizards,

 I was wondering whether there's a way to have ConTeXt spill out each

 \startMPpage
 …
 \stopMPpage

 it encounters as a separate PDF file … by default all MPpages seem to
 be collected into a single PDF file. Which is nice as long as this
 file is postprocessed by another ConTeXt document … however, I need to
 extract the individual figures from within LaTeX. So if anyone happens
 to know how to instruct LaTeX's graphicx package to do just that this
 would be a lovely alternative :-)

 just keep them in one file and access the images by page, so .. include
 page 4 from file bla.pdf

 IIRC, graphicx package in LaTeX can do that, so it should not be a problem.
 Otherwise, you can use pdftk and burst the pdf into separate pages.

You could use ConTeXt

  texexec --split filename

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


Re: [NTG-context] OTF features

2008-08-05 Thread Olivier Guéry
2008/8/5 Willi Egger [EMAIL PROTECTED]:
 Dear OTF-users,


 Is there a simple way to get to know the features wich a given OTF has?

You can use otfinfo -f under linux (don't know under other OS).

Olivier.


-- 
[Message tapé sur un clavier Bépo : http://www.clavier-dvorak.org ]
http://nemolivier.blogspot.com
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] OTF features

2008-08-05 Thread Hans Hagen

Willi Egger wrote:

Dear OTF-users,


Is there a simple way to get to know the features wich a given OTF has?


ok, there is one now ... (attached file goes to scripts/context/lua

mtxrun --script font --list zapfinoextra.*four  --info
MtxRun |
MtxRun | fontname: zapfinoextralt-four
MtxRun | fullname: ZapfinoExtraLT-Four
MtxRun | filename: zapfinoextralt-four.otf
MtxRun |
MtxRun | feature :  - latn rom
MtxRun | feature : aalt - latn dflt
MtxRun | feature : case - latn afk  nld  rom  trk  dflt
MtxRun | feature : crcy - latn afk  nld  rom  trk  dflt
MtxRun | feature : dlig - latn afk  nld  rom  trk  dflt
MtxRun | feature : dnom - latn afk  nld  rom  trk  dflt
MtxRun | feature : dpng - latn afk  nld  rom  trk  dflt
MtxRun | feature : frac - latn afk  nld  rom  trk  dflt
MtxRun | feature : liga - latn afk  nld  rom  trk  dflt
MtxRun | feature : locl - latn afk  nld  rom  trk  dflt
MtxRun | feature : numr - latn afk  nld  rom  trk  dflt
MtxRun | feature : ordn - latn afk  nld  rom  trk  dflt
MtxRun | feature : ornm - latn dflt
MtxRun | feature : sups - latn afk  nld  rom  trk  dflt
MtxRun |


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
if not modules then modules = { } end modules ['mtx-fonts'] = {
version   = 1.001,
comment   = companion to mtxrun.lua,
author= Hans Hagen, PRAGMA-ADE, Hasselt NL,
copyright = PRAGMA ADE / ConTeXt Development Team,
license   = see context related readme files
}

dofile(input.find_file(font-syn.lua))

scripts   = scripts   or { }
scripts.fonts = scripts.fonts or { }

function scripts.fonts.reload(verbose)
fonts.names.load(true,verbose)
end

local function showfeatures(v,n,f,s)
local filename = input.find_file(f,type) or 
if filename ~=  then
local ff = fontforge.open(filename)
if ff then
local data = fontforge.to_table(ff)
fontforge.close(ff)
local features = { }
local function collect(what)
if data[what] then
for _, d in ipairs(data[what]) do
if d.features then
for _, df in ipairs(d.features) do
features[df.tag] = features[df.tag] or { }
for _, ds in ipairs(df.scripts) do
features[df.tag][ds.script] = 
features[df.tag][ds.script] or { }
for _, lang in ipairs(ds.langs) do
features[df.tag][ds.script][lang] = true
end
end
end
end
end
end
end
collect('gsub')
collect('gpos')
input.verbose = true
input.report()
input.report(fontname: %s,v)
input.report(fullname: %s,n)
input.report(filename: %s,f)
input.report()
for _, f in ipairs(table.sortedkeys(features)) do
local ff = features[f]
for _, s in ipairs(table.sortedkeys(ff)) do
local ss = ff[s]
input.report(feature : %s - %s 
%s,f,s,(table.concat(table.sortedkeys(ss),  )):lower())
end
end
input.report()
end
end
end

function scripts.fonts.list(pattern,reload,all,info)
if reload then
input.report(fontnames, reloading font database)
end
local t = fonts.names.list(pattern,reload)
if reload then
input.report(fontnames, done\n\n)
end
if t then
local s, w = table.sortedkeys(t), { 0, 0, 0 }
local function action(f)
for k,v in pairs(s) do
if all or v == t[v][2]:lower() then
local type, name, file, sub = unpack(t[v])
f(v,name,file,sub)
end
end
end
action(function(v,n,f,s)
if #v  w[1] then w[1] = #v end
if #n  w[2] then w[2] = #n end
if #f  w[3] then w[3] = #f end
end)
action(function(v,n,f,s)
if s then s = (sub) else s =  end
if info then
showfeatures(v,n,f,s)
else
local str = string.format(%s  %s  %s %s,v:padd(w[1], 
),n:padd(w[2], ),f:padd(w[3], ), s)
print(str:strip())
end
end)
end
end

function scripts.fonts.save(name,sub)
local function save(savename,fontblob)
if fontblob then
savename = 

Re: [NTG-context] OTF features

2008-08-05 Thread Willi Egger
Hans, thanks! That is great.

Willi
On Aug 5, 2008, at 3:44 PM, Hans Hagen wrote:

 Willi Egger wrote:
 Dear OTF-users,
 Is there a simple way to get to know the features wich a given OTF  
 has?

 ok, there is one now ... (attached file goes to scripts/context/lua

 mtxrun --script font --list zapfinoextra.*four  --info
 MtxRun |
 MtxRun | fontname: zapfinoextralt-four
 MtxRun | fullname: ZapfinoExtraLT-Four
 MtxRun | filename: zapfinoextralt-four.otf
 MtxRun |
 MtxRun | feature :  - latn rom
 MtxRun | feature : aalt - latn dflt
 MtxRun | feature : case - latn afk  nld  rom  trk  dflt
 MtxRun | feature : crcy - latn afk  nld  rom  trk  dflt
 MtxRun | feature : dlig - latn afk  nld  rom  trk  dflt
 MtxRun | feature : dnom - latn afk  nld  rom  trk  dflt
 MtxRun | feature : dpng - latn afk  nld  rom  trk  dflt
 MtxRun | feature : frac - latn afk  nld  rom  trk  dflt
 MtxRun | feature : liga - latn afk  nld  rom  trk  dflt
 MtxRun | feature : locl - latn afk  nld  rom  trk  dflt
 MtxRun | feature : numr - latn afk  nld  rom  trk  dflt
 MtxRun | feature : ordn - latn afk  nld  rom  trk  dflt
 MtxRun | feature : ornm - latn dflt
 MtxRun | feature : sups - latn afk  nld  rom  trk  dflt
 MtxRun |


 -
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
  | www.pragma-pod.nl
 -
 if not modules then modules = { } end modules ['mtx-fonts'] = {
 version   = 1.001,
 comment   = companion to mtxrun.lua,
 author= Hans Hagen, PRAGMA-ADE, Hasselt NL,
 copyright = PRAGMA ADE / ConTeXt Development Team,
 license   = see context related readme files
 }

 dofile(input.find_file(font-syn.lua))

 scripts   = scripts   or { }
 scripts.fonts = scripts.fonts or { }

 function scripts.fonts.reload(verbose)
 fonts.names.load(true,verbose)
 end

 local function showfeatures(v,n,f,s)
 local filename = input.find_file(f,type) or 
 if filename ~=  then
 local ff = fontforge.open(filename)
 if ff then
 local data = fontforge.to_table(ff)
 fontforge.close(ff)
 local features = { }
 local function collect(what)
 if data[what] then
 for _, d in ipairs(data[what]) do
 if d.features then
 for _, df in ipairs(d.features) do
 features[df.tag] = features[df.tag]  
 or { }
 for _, ds in ipairs(df.scripts) do
 features[df.tag][ds.script] =  
 features[df.tag][ds.script] or { }
 for _, lang in ipairs(ds.langs) do
 features[df.tag][ds.script] 
 [lang] = true
 end
 end
 end
 end
 end
 end
 end
 collect('gsub')
 collect('gpos')
 input.verbose = true
 input.report()
 input.report(fontname: %s,v)
 input.report(fullname: %s,n)
 input.report(filename: %s,f)
 input.report()
 for _, f in ipairs(table.sortedkeys(features)) do
 local ff = features[f]
 for _, s in ipairs(table.sortedkeys(ff)) do
 local ss = ff[s]
 input.report(feature : %s - %s %s,f,s, 
 (table.concat(table.sortedkeys(ss),  )):lower())
 end
 end
 input.report()
 end
 end
 end

 function scripts.fonts.list(pattern,reload,all,info)
 if reload then
 input.report(fontnames, reloading font database)
 end
 local t = fonts.names.list(pattern,reload)
 if reload then
 input.report(fontnames, done\n\n)
 end
 if t then
 local s, w = table.sortedkeys(t), { 0, 0, 0 }
 local function action(f)
 for k,v in pairs(s) do
 if all or v == t[v][2]:lower() then
 local type, name, file, sub = unpack(t[v])
 f(v,name,file,sub)
 end
 end
 end
 action(function(v,n,f,s)
 if #v  w[1] then w[1] = #v end
 if #n  w[2] then w[2] = #n end
 if #f  w[3] then w[3] = #f end
 end)
 action(function(v,n,f,s)
 if s then s = (sub) else s =  end
 if info then
 showfeatures(v,n,f,s)
 else
 local str = string.format(%s  %s  %s %s,v:padd(w 
 [1], ),n:padd(w[2], ),f:padd(w[3], ), 

Re: [NTG-context] \Word broken

2008-08-05 Thread Hans Hagen
Matthias Wächter wrote:

 Do you know how this can be fixed? Is the descripion descriptive enough?

will be fixed in the next release (tomorrow we plan to do a formal release)

Hans

-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
  | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] \Word broken

2008-08-05 Thread Matthias Wächter
On 8/5/2008 6:37 PM, Hans Hagen wrote:
 Matthias Wächter wrote:
 
 Do you know how this can be fixed? Is the descripion descriptive enough?
 
 will be fixed in the next release (tomorrow we plan to do a formal release)

Thanks! I am looking forward to the change as I am curious what’s the proper 
way of doing it.

Keep up the good work,
- Matthias
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] \Word broken

2008-08-05 Thread Hans Hagen
Matthias Wächter wrote:
 On 8/5/2008 6:37 PM, Hans Hagen wrote:
 Matthias Wächter wrote:

 Do you know how this can be fixed? Is the descripion descriptive enough?
 will be fixed in the next release (tomorrow we plan to do a formal release)
 
 Thanks! I am looking forward to the change as I am curious what’s the proper 
 way of doing it.

you mean in lua code?

Hans


-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
  | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] \Word broken

2008-08-05 Thread Matthias Wächter
On 8/5/2008 6:48 PM, Hans Hagen wrote:
 Matthias Wächter wrote:
 On 8/5/2008 6:37 PM, Hans Hagen wrote:
 Matthias Wächter wrote:

 Do you know how this can be fixed? Is the descripion descriptive enough?
 will be fixed in the next release (tomorrow we plan to do a formal release)
 Thanks! I am looking forward to the change as I am curious what’s the proper 
 way of doing it.
 
 you mean in lua code?

Yeah. While I survived a journey into changing some ConTeXt (MKII) 
functionality recently and found everything clear (texbook is your friend), I 
am really puzzled about attribute handling in Lua. But it’s just a couple of 
lines I have investigated, maybe I’ll be a wizz as soon I roll things up from 
bottom to top … ;-)

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

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


Re: [NTG-context] Lilypond module

2008-08-05 Thread Olivier Guéry
2008/8/5 Wolfgang Schuster [EMAIL PROTECTED]:
 On Tue, Aug 5, 2008 at 12:00 AM, Olivier Guéry [EMAIL PROTECTED] wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Hello,

 It seem's that the lilypond module don't work.

 See this minimal exemple :

 \usemodule[lilypond]
 \setuplilypond[staffsize=30, fragment=yes, time=no, clef=no]
 \starttext
\lilypond{ \new RhythmicStaff {\time 3/4 c8 r4.. c8 r16} } \blank[1*big]
 \stoptext

 It failed with :

 (/usr/share/texmf/tex/context/third/lilypond/t-lilypond.tex
 loading: LilyPond module
 )
 utilityfile | not present
 systems: begin file test-lilypond at line 6
 ! You can't use `the character 1' after \the.
 \lily!figures -1

 \dosavebuffer [#1]-\ctxlua {buffers.save(#1
 )}
 \dodostartlilypond ...ilypond-\the \lily!figures ]
  \fi \ifeof 18 \expanded 
 {\...
 l.8 ... RhythmicStaff {\time 3/4 c8 r4.. c8 r16} }
   \blank[1*big]


 My luatex is : This is LuaTeX, Version snapshot-0.28.0-2008071500
 My context : MtxRun | main context file:
 /usr/share/texmf/tex/context/base/context.tex
MtxRun | current version: 2008.07.31 16:30

 Any idears ?

 Remove the \the before \lily!figures at line 259 in the module or use MkII.

Thank's. No more error during the compilation, but no image. Look at the pdf !

Olivier.


test-lilypond.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] \Word broken

2008-08-05 Thread Hans Hagen
Matthias Wächter wrote:
 On 8/5/2008 6:48 PM, Hans Hagen wrote:
 Matthias Wächter wrote:
 On 8/5/2008 6:37 PM, Hans Hagen wrote:
 Matthias Wächter wrote:

 Do you know how this can be fixed? Is the descripion descriptive enough?
 will be fixed in the next release (tomorrow we plan to do a formal release)
 Thanks! I am looking forward to the change as I am curious what’s the 
 proper way of doing it.
 you mean in lua code?
 
 Yeah. While I survived a journey into changing some ConTeXt (MKII) 
 functionality recently and found everything clear (texbook is your friend), I 
 am really puzzled about attribute handling in Lua. But it’s just a couple of 
 lines I have investigated, maybe I’ll be a wizz as soon I roll things up from 
 bottom to top … ;-)

attributes are just a property of nodes, and characters in the input 
become nodes

in this case there is a specific attribute for casing with a value that 
tells to do Words

the tricky thing here is that when i process Word, i need to erase 
following casing attributes

at some time in the future, context mkiv will provide a mechanism for 
user attributes

(attribute processing can take place at several moments by intercepting 
the node list)

Hans


-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
  | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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