Re: [NTG-context] some equivalent of latex beamer \itemuncover@1?

2011-02-20 Thread Wolfgang Schuster

Am 19.02.2011 um 21:57 schrieb Pau:

 Obviously I have to define Steps and I am using for my presentation pre-fuzzy
 
 How could I add Step to pre-fuzzy?
 
 I have looked into s-pre-61.tex to see whether I could get an idea (I
 apologise for my ignorance).

To use the step-machanism you can load the file “pre-stepwise”, e.g.

\usemodule[pre-stepwise]

\starttext

\StartSteps

\startitemize
\item one \FlushStep
\item two \FlushStep
\item three \FlushStep
\stopitemize

\StopSteps

\stoptext

is enough. To add the function to “pre-fuzzy” you can try

\usemodule[pre-fuzzy,pre-stepwise]

\starttext
...
\stoptext

Wolfgang

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

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


[NTG-context] metapost fill between outlines

2011-02-20 Thread Reviczky, Adam
Hi

Is it possible to fill out a space between two outlines?
As for an example, I'd like to draw two circles (same center, one bigger than 
the other) and fill out the difference.
Something like the letter O.

Here's a concrete example:
%%%
draw (6.949220,13.046900)..controls (9.539060,13.046900) and 
(10.023400,10.781200)..(10.023400,8.679690)
..controls (10.023400,5.335940) and 
(6.949220,0.00)..(3.234380,0.00)
..controls (0.890625,0.00) and 
(0.00,1.886720)..(0.00,3.828120)
..controls (0.00,8.492190) and 
(3.316410,13.046900)..(6.949220,13.046900)
--cycle;

draw (7.488280,12.293000)..controls (4.933590,12.293000) and 
(1.265620,6.226560)..(1.265620,2.531250)
..controls (1.265620,1.562500) and 
(1.695310,0.835938)..(2.722660,0.835938)
..controls (5.230470,0.835938) and 
(8.972660,7.035160)..(8.972660,10.296900)
..controls (8.972660,11.269500) and 
(8.703120,12.293000)..(7.488280,12.293000)
--cycle;
%%%

I want to fill out the space between these two draw lines.
Is this actually possible? The only reference to this I found was on wikipedia: 
Most notably, paths can have only one segment (so that regions are simply 
connected), (...) (http://en.wikipedia.org/wiki/MetaPost).
I thought I ask here before I put this aside.

As a workaround I fill out the bigger one with color black and the smaller one 
with color white, but I need to put this on different background colors, so the 
use of this is very limited.
How does it work with fonts (Metafont)? Who's filling that out, because thats 
also just based on outlines, right?

Thanks
Adam
___
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] [tex-live] simplefonts module of context fails to work in TL2010

2011-02-20 Thread Wolfgang Schuster

Am 17.02.2011 um 14:37 schrieb xiebin:

 After a fresh web installation, the simplefonts module fails to work.

There is a fixed version available, just update your installation.

Wolfgang


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

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


Re: [NTG-context] metapost fill between outlines

2011-02-20 Thread Hongwen Qiu

On 02/20/2011 04:25 PM, Reviczky, Adam wrote:

As a workaround I fill out the bigger one with color black and the smaller one 
with color white, but I need to put this on different background colors, so the 
use of this is very limited.

You can fill out the bigger one, than clips the smaller one.
And alternately, you can construct the path of the difference out of the 
two circles, and fill the constructed path.

___
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] cldf-int.mkiv loads wrong lua file

2011-02-20 Thread Wolfgang Schuster
Hi Hans,

- \registerctxluafile{mult-clm}{1.001}
+ \registerctxluafile{cldf-int}{1.001}

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] attachment attaches twice

2011-02-20 Thread Michail Vidiassov

Dear All,

to be precise, the attachment is attached once
(can be seen if one inspects the sample PDF files in uncompressed form with 
any text or binary editor - if you do not have Adobe Acrobat), but is 
listed twice by Adobe Reader.


  Sincerely, Michail




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

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


Re: [NTG-context] defined symbols - question/feature suggestion

2011-02-20 Thread Johannes Kuester
On 02/20/2011 12:40 AM, Hans Hagen wrote:
 On 20-2-2011 12:24, C. wrote:
 I see.
 So from your and all the other responses I take that matching math
 font for Minion is not available until
 (I) Minion Math supports ConTeXt (= commercial?!)
 (II) Somebody ports MnSymbol files to ConTeXt
 
 Isn't the minion math companion an opentype math font then? Open type
 math works out of the box. For type1's one needs to create a definition
 set (not that complex if tex default encoding is used).

The Minion Math fonts are OpenType fonts. The next release (March 2011,
hopefully) will include the OpenType MATH table. And ConTeXt support.
For ConTeXt I haven't tested yet what will work out of the box and what
will need additional support (e.g. to access additional characters
encoded in the PUA; to access the 4 weights and the optical sizes).

And yes, the fonts are commercial. But Minion itself is commercial as
well. Of course all support files (for ConTeXt, LaTeX, ...) are / will
be available for free.

Johannes


-- 
Johannes Kuester
typoma

mailto:j...@typoma.com
http://www.typoma.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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] some equivalent of latex beamer \itemuncover@1?

2011-02-20 Thread Pau
Dear Wolfgang,

thanks a lot for your clear and detailed example.

However I seem to be missing the pre-stepwise module and I do not understand why

I have followed step by step this

http://www.tug.org/texlive/acquire-netinstall.html

and everything has worked just fine. As a matter of fact

deukalion(pts/113)| texexec --check | grep source
TeXExec | context source date: 2010.05.24 13:05

Correct me if I am wrong, but isn't texlive supposed to give me a full
working recent version of all of context and its modules?

thanks for everything


On 20 February 2011 09:13, Wolfgang Schuster
schuster.wolfg...@googlemail.com wrote:

 Am 19.02.2011 um 21:57 schrieb Pau:

 Obviously I have to define Steps and I am using for my presentation pre-fuzzy

 How could I add Step to pre-fuzzy?

 I have looked into s-pre-61.tex to see whether I could get an idea (I
 apologise for my ignorance).

 To use the step-machanism you can load the file “pre-stepwise”, e.g.

 \usemodule[pre-stepwise]

 \starttext

 \StartSteps

 \startitemize
 \item one \FlushStep
 \item two \FlushStep
 \item three \FlushStep
 \stopitemize

 \StopSteps

 \stoptext

 is enough. To add the function to “pre-fuzzy” you can try

 \usemodule[pre-fuzzy,pre-stepwise]

 \starttext
 ...
 \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] some equivalent of latex beamer \itemuncover@1?

2011-02-20 Thread Wolfgang Schuster

Am 20.02.2011 um 12:13 schrieb Pau:

 Dear Wolfgang,
 
 thanks a lot for your clear and detailed example.
 
 However I seem to be missing the pre-stepwise module and I do not understand 
 why

You need the file “s-pre-60.tex” (or “s-pre-60.mkii|mkiv”), “pre-stepwise” is
just a synonym for this file.

 I have followed step by step this
 
 http://www.tug.org/texlive/acquire-netinstall.html
 
 and everything has worked just fine. As a matter of fact
 
 deukalion(pts/113)| texexec --check | grep source
 TeXExec | context source date: 2010.05.24 13:05
 
 Correct me if I am wrong, but isn't texlive supposed to give me a full
 working recent version of all of context and its modules?

Modules are updated but context itself will always stay the same version
till the next texlive version because mkiv needs always a certain luatex
version and mkii is frozen.

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] Learning LuaTeX : Invoice

2011-02-20 Thread Henning Hraban Ramm

Maybe similar to the spreadsheet question:
I'm trying to use Wolfgang's letter module for my invoices and would  
like to use Lua for the sums.

But I fail already at the beginning:

\startluacode
userdata = userdata or {}

userdata.invoice = userdata.invoice or { sum = 0 } -- global table for  
sums


function userdata.singlesum(hours, perhour)
amount = hours * perhour
userdata.invoice.sum = userdata.invoice.sum + amount
global.context(string.gsub(string.format(\%.2f, amount), %., ,))
return amount
end

\stopluacode

gives:

(virtual://viafile.1 unknown preamble key [the character )] unknown  
preamble key [the character )] unknown preamble key [the character )]

! LuaTeX error main ctx instance:1: '=' expected near 'eof'.

system   tex  error on line 11 in file invoice.tex: LuaTeX  
error  ...


 4 \startluacode
 5 userdata = userdata or {}
 6
 7 userdata.invoice = userdata.invoice or { sum = 0 }
 8
 9 function userdata.singlesum(hours, perhour)
10  amount = hours * perhour
11  userdata.invoice.sum = userdata.invoice.sum + amount
12 	global.context(string.gsub(string.format(\%.2f, amount),  
%., ,))

13  return amount
14 end


I can't see what's wrong!?

I tried local and usercode, but didn’t get further.


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

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

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


Re: [NTG-context] Learning LuaTeX : Invoice

2011-02-20 Thread Henning Hraban Ramm

Am 2011-02-20 um 12:55 schrieb Henning Hraban Ramm:


But I fail already at the beginning:

\startluacode


Sorry for the noise, the error was in the call, not in the definition.



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

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

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


Re: [NTG-context] Learning LuaTeX : Invoice

2011-02-20 Thread Wolfgang Schuster

Am 20.02.2011 um 12:55 schrieb Henning Hraban Ramm:

 Maybe similar to the spreadsheet question:
 I'm trying to use Wolfgang's letter module for my invoices and would like to 
 use Lua for the sums.
 But I fail already at the beginning:
 
 \startluacode
 userdata = userdata or {}
 
 userdata.invoice = userdata.invoice or { sum = 0 } -- global table for sums
 
 function userdata.singlesum(hours, perhour)
   amount = hours * perhour
   userdata.invoice.sum = userdata.invoice.sum + amount
   global.context(string.gsub(string.format(\%.2f, amount), %., ,))
   return amount
 end
 
 \stopluacode

\startluacode

userdata = userdata or {}

userdata.invoice = userdata.invoice or { sum = 0 } -- global table for sums

function userdata.singlesum(hours, perhour)
local amount = hours * perhour
userdata.invoice.sum = userdata.invoice.sum + amount
context(string.gsub(string.format(%.2f,amount),%.,,))
end

\stopluacode

\starttext
\ctxlua{userdata.singlesum(3,4)}
\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] Learning LuaTeX : Invoice

2011-02-20 Thread Henning Hraban Ramm

Am 2011-02-20 um 13:08 schrieb Wolfgang Schuster:


local amount = hours * perhour


Thank you - I guess you meant that local. I tried that, but since my  
error was in the call... anyway.


Please consider the following nearly-minimal example:

\starttext

\startluacode
userdata = userdata or {}

userdata.invoice = { sum = 0, hours = 0, perhour = 100 }

function userdata.numberformat(amount)
context(string.gsub(string.format(\%.2f, amount), %., ,))
end

function userdata.InvoiceLine(text, hours)
context.NC()
context(text)
context.NC()
userdata.numberformat(hours)
context(\\,h)
context.NC()
context.NC()
userdata.numberformat(hours * userdata.invoice.perhour)
context(\\,€)
context.NC()
context.NR()
	userdata.invoice.sum = userdata.invoice.sum + hours *  
userdata.invoice.perhour

userdata.invoice.hours = userdata.invoice.hours + hours
end

function userdata.InvoiceSumLine(text)
context.HL()
context.NC()
context(text)
context.NC()
userdata.numberformat(userdata.invoice.hours)
context(\\,h)
context.NC()
userdata.numberformat(userdata.invoice.perhour)
context(\\,€/h)
context.NC()
userdata.numberformat(userdata.invoice.sum)
context(\\,€)
context.NC()
context.NR()
end

\stopluacode

\starttabulate[|lw(8cm)|rg(,)w(2cm)|rg(,)w(2cm)|rg(,)w(3cm)|]
%\ctxlua{userdata.InvoiceLine(Play with \\LUATEX, 2.5)}
\ctxlua{userdata.InvoiceLine(Do some \\CONTEXT, 0.5)}
\ctxlua{userdata.InvoiceSumLine(Sum)}
\stoptabulate

\stoptext


That seems to work so far, but invoice.hours and invoice.sum are  
always doubled!

In my letter setup, it’s even quadrupled!
I guess my functions gets called several times, but how can I avoid  
that?



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

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

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


Re: [NTG-context] cldf-int.mkiv loads wrong lua file

2011-02-20 Thread Hans Hagen

On 20-2-2011 9:56, Wolfgang Schuster wrote:

Hi Hans,

- \registerctxluafile{mult-clm}{1.001}
+ \registerctxluafile{cldf-int}{1.001}


ah, yes, the very experimental code ... i'll fix it



-
  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] some equivalent of latex beamer \itemuncover@1?

2011-02-20 Thread Pau
Thanks to Wolfgang's (seemingly infinite amount of!!) patience, I have
managed to get this one running.

I have one question, though.

Has anybody been successful at running any other software than
acroread for pdf documents which require javascript functions such as
in this example?

This should probably go to a different thread but, since it is the
first time I run into this snag, it kind of makes sense to have it
stick to the Steps function problem I had

Thanks to everybody for your help, context and everything!

Pau

On 20 February 2011 00:07, Hans Hagen pra...@wxs.nl wrote:
 On 19-2-2011 9:57, Pau wrote:

 Hello Hans,

 thanks for your reply.

 This is

 Installed Packages
 Name        : texlive-context

 the minimals have some more

 -
                                          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] Learning LuaTeX : Invoice

2011-02-20 Thread Wolfgang Schuster

Am 20.02.2011 um 13:58 schrieb Henning Hraban Ramm:

 \starttabulate[|lw(8cm)|rg(,)w(2cm)|rg(,)w(2cm)|rg(,)w(3cm)|]
 %\ctxlua{userdata.InvoiceLine(Play with \\LUATEX, 2.5)}
 \ctxlua{userdata.InvoiceLine(Do some \\CONTEXT, 0.5)}
 \ctxlua{userdata.InvoiceSumLine(Sum)}
 \stoptabulate

\startluacode
context.starttabulate({|lw(8cm)|rg(,)w(2cm)|rg(,)w(2cm)|rg(,)w(3cm)|})
userdata.InvoiceLine(Do some \\CONTEXT, 0.5)
userdata.InvoiceSumLine(Sum)
context.stoptabulate()
\stopluacode

 That seems to work so far, but invoice.hours and invoice.sum are always 
 doubled!
 In my letter setup, it’s even quadrupled!
 I guess my functions gets called several times, but how can I avoid that?

The content of tabulate is processed twice to get the information for
“p” columns and you get therefore the wrong values in the last row.

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] Learning LuaTeX : Invoice

2011-02-20 Thread Henning Hraban Ramm

Am 2011-02-20 um 13:58 schrieb Henning Hraban Ramm:

That seems to work so far, but invoice.hours and invoice.sum are  
always doubled!

In my letter setup, it’s even quadrupled!
I guess my functions gets called several times, but how can I avoid  
that?


I found a better approach, but with the letter module involved, my  
RegisterItem is called twice!


\starttext
\usemodule[letter]

\startluacode
userdata = userdata or {}

userdata.invoice = { amount = 0, hours = 0, perhour = 100, items = {} }

function userdata.numberformat(amount)
context(string.gsub(string.format(\%.2f, amount), %., ,))
end

function userdata.InvoiceLine(text, hours)
context.NC()
context(text)
context.NC()
userdata.numberformat(hours)
context(\\,h)
context.NC()
context.NC()
userdata.numberformat(hours * userdata.invoice.perhour)
context(\\,€)
context.NC()
context.NR()
end

function userdata.InvoiceSumLine(text)
context.HL()
context.NC()
context(text)
context.NC()
userdata.numberformat(userdata.invoice.hours)
context(\\,h)
context.NC()
context(à )
userdata.numberformat(userdata.invoice.perhour)
context(\\,€/h)
context.NC()
userdata.numberformat(userdata.invoice.amount)
context(\\,€)
context.NC()
context.NR()
end

function userdata.RegisterItem(text, hours)
for no, item in ipairs(userdata.invoice.items) do
		-- we need to check for double registering due to some call logic of  
ConTeXt and the letter module

if item.text == text then
--return -- commented to show double calling
end
end
table.insert(userdata.invoice.items, {text=text, hours=hours})
end

function userdata.Invoice()
local amountsum, hoursum = 0,0
	context(\\starttabulate[|lw(8cm)|rg(,)w(2cm)|rg(,)w(2cm)| 
rg(,)w(3cm)|])

for no, item in ipairs(userdata.invoice.items) do
userdata.InvoiceLine(item.text, item.hours)
hoursum = hoursum + item.hours
amountsum = amountsum + item.hours * userdata.invoice.perhour
end
userdata.invoice.hours = hoursum
userdata.invoice.amount = amountsum
userdata.InvoiceSumLine(Sum)
context.stoptabulate()
end

\stopluacode

\startletter[subject={INVOICE}]

\startluacode

userdata.RegisterItem(Do some \\CONTEXT , 0.5)
userdata.RegisterItem(Do some \\LUATEX , 1.5)

userdata.Invoice()

\stopluacode

\stopletter

\stoptext



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

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

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


Re: [NTG-context] Learning LuaTeX : Invoice

2011-02-20 Thread Wolfgang Schuster

Am 20.02.2011 um 14:29 schrieb Henning Hraban Ramm:

 I found a better approach, but with the letter module involved, my 
 RegisterItem is called twice!

The letter modules does trialtypesetting of the content to get the content
of the \cc, \encl and \ps commands. To prevent that certain commands and
environments are preprocessed you can wrap them in

\iftrialtypesetting \else
...
\fi

or

\unless\iftrialtypesetting
...
\fi

@Hans: Is it possible to write the above like this

\startnotmode[trialtypesetting]
...
\stopnotmode

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] Learning LuaTeX : Invoice

2011-02-20 Thread Henning Hraban Ramm


Am 2011-02-20 um 14:41 schrieb Wolfgang Schuster:



Am 20.02.2011 um 14:29 schrieb Henning Hraban Ramm:

I found a better approach, but with the letter module involved, my  
RegisterItem is called twice!


The letter modules does trialtypesetting of the content to get the  
content
of the \cc, \encl and \ps commands. To prevent that certain commands  
and

environments are preprocessed you can wrap them in

\iftrialtypesetting \else
...
\fi

or

\unless\iftrialtypesetting
...
\fi



Thank you, but how does that map to Lua? I couldn't find  
trialtypesetting in the LuaTeX manual.

I tried
if context.trialtypesetting() then return end
but get only undefined control sequence.


context.iftrialtypesetting()
do
return
end
context.fi()

can't work, of course (Incomplete \iffalse)

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

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

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


Re: [NTG-context] Learning LuaTeX : Invoice

2011-02-20 Thread Hans Hagen

On 20-2-2011 2:41, Wolfgang Schuster wrote:


Am 20.02.2011 um 14:29 schrieb Henning Hraban Ramm:


I found a better approach, but with the letter module involved, my 
RegisterItem is called twice!


The letter modules does trialtypesetting of the content to get the content
of the \cc, \encl and \ps commands. To prevent that certain commands and
environments are preprocessed you can wrap them in

\iftrialtypesetting \else

\fi

or

\unless\iftrialtypesetting

\fi

@Hans: Is it possible to write the above like this

\startnotmode[trialtypesetting]

\stopnotmode


it's a system mode, so

\startnotmode[*trialtypesetting] ...

and in lua

if tex.systemmodes.trialtypesetting then ...

but, you need to use \settrialtypesetting (see syst-aux.mkiv) as there 
is more than the \if now (too late to get rid of the if)


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] Learning LuaTeX : Invoice

2011-02-20 Thread Hans Hagen

On 20-2-2011 3:49, Henning Hraban Ramm wrote:


trialtypesetting in the LuaTeX manual.


things like this are not part of luatex but of context so you need the 
cld manual (or wait till more documentation shows up, or ask ..)



context.iftrialtypesetting()
do
return
end
context.fi()

can't work, of course (Incomplete \iffalse)


please not that kind of horrible misuse of the context.* namespace
as you don't want to end up with expandafter's at that end

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] some equivalent of latex beamer \itemuncover@1?

2011-02-20 Thread Mojca Miklavec
On Fri, Feb 18, 2011 at 21:35, Pau wrote:
 Hello,

 I am trying to implement a similar effect to latex beamer's

 \begin{itemize}
 \itemuncover@1
 \itemuncover@2
 \itemuncover@3-
 \end{itemize}

 What'd be the equivalent/similar/better of that in ConTeXt?

Apart from JavaScript-based mechanism somebody used to write t-rsteps
module long time ago:
http://modules.contextgarden.net/t-rsteps
which creates multiple slides instead of using JavaScript (the same
way as Beamer does, but is probably more primitive).

It worked nicely (I used it several times), but I haven't tested it
recently, so I'm not sure if it still works fine with recent ConTeXt
versions.

It would be great if \StartSteps, \FlushStep, ... written by Hans
would also optionally support creating multiple slides for viewers
other than Acrobat.

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

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


Re: [NTG-context] Learning LuaTeX : Invoice

2011-02-20 Thread Henning Hraban Ramm

Am 2011-02-20 um 16:09 schrieb Hans Hagen:


it's a system mode, so

\startnotmode[*trialtypesetting] ...

and in lua

if tex.systemmodes.trialtypesetting then ...

but, you need to use \settrialtypesetting (see syst-aux.mkiv) as  
there is more than the \if now (too late to get rid of the if)


You mean, Wolfgang must set it in his module? I guess he did.

At least this works as expected:

function userdata.RegisterItem(text, hours)
if tex.systemmodes.trialtypesetting then return end
table.insert(userdata.invoice.items, {text=text, hours=hours})
end

Thank you!


Am 2011-02-20 um 16:12 schrieb Hans Hagen:


On 20-2-2011 3:49, Henning Hraban Ramm wrote:


trialtypesetting in the LuaTeX manual.


things like this are not part of luatex but of context so you need  
the cld manual (or wait till more documentation shows up, or ask ..)


Ah, I guess the CLD manual was what I was looking for all the time ;-)

I suggest you mention tex.systemmodes.trialtypesetting in section 3.3.  
trial typesetting - the return true approach didn't help in my  
case (or I didn't understand it).



I'll wikify my invoice sample soon. LuaTeX docs in the wiki are a bit  
scattered ATM... (e.g. Lua, LuaTeX, CLD and MkIV all explain LuaTeX  
basics)



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

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

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


Re: [NTG-context] MnSymbol in ConText

2011-02-20 Thread Florian Wobbe
 Is there any way to use MnSymbol in context?
 
 It is, but somebody needs to write support for it. Both for MKII and MKIV.

The problem is, that luatex refuses to load any of the MnSymbol*.otf font files 
available from CTAN with an error message. I don't know what is broken with the 
fonts.

Should you just be interested in the symbols you can fix the otf font with 
fontforge by reencoding and saving it to a unicode font again. Glyphs with 
undefined unicode value will be assigned to unicode slots starting from 0xF.

Then you can do this:

\definefontsynonym [MnSymbol12U] [name:MnSymbol12Uni]
\starttext
\definedfont [MnSymbol12U at 16pt] ABC XYZ \char25B7 \char2660 \char2720 
\char10391 \char10393 \char10335
\stoptext

To print a table with glyphs and unicode values do:

\usemodule[fnt-10]
\starttext
\ShowCompleteFont{name:MnSymbol12Uni}{11pt}{1} % MnSymbol12Uni.otf
\stoptext

I used the following fontforge script to re-generate the font:

#begin fontforge script

#usage: fontforge -script fontBMP2Full.ff MnSymbol12.otf

Open($1);

F1 = $fontname+Uni # fontname
F2 =  # familyname
F3 = $fullname+Uni # fullname
F4 =  # weight
F5 =  # copyright
F6 =  # fontversion

#SetFontNames(fontname[,family[,fullname[,weight[,copyright-notice[,fontversion])
#Sets various postscript names associated with a font. If a name is omitted (or 
is the
#empty string) it will not be changed. 
SetFontNames(F1,F2,F3,F4,F5,F6)

Reencode(unicode);
Generate($fontname+.otf);
Quit(0);

#end fontforge script

Florian

___
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] MnSymbol in ConText

2011-02-20 Thread Khaled Hosny
On Sun, Feb 20, 2011 at 08:30:53PM +0100, Florian Wobbe wrote:
  Is there any way to use MnSymbol in context?
  
  It is, but somebody needs to write support for it. Both for MKII and MKIV.
 
 The problem is, that luatex refuses to load any of the MnSymbol*.otf
 font files available from CTAN with an error message. I don't know
 what is broken with the fonts.

Reporting the errors would help finding what is wrong.

Regards,
 Khaled

-- 
 Khaled Hosny
 Egyptian
___
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] attachment attaches twice

2011-02-20 Thread Reviczky, Adam
 to be precise, the attachment is attached once
 (can be seen if one inspects the sample PDF files in uncompressed form with 
 any text or binary editor - if you do not have Adobe Acrobat), but is 
 listed twice by Adobe Reader.
Thanks, but the question is still why the beta produces this while it is fine 
with the current.

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

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


Re: [NTG-context] metapost fill between outlines

2011-02-20 Thread Reviczky, Adam
 You can fill out the bigger one, than clips the smaller one.
Can you give me an example with the clip? I can't get it work in a way I want 
to have it.
I've found another thread here: 
http://www.tug.org/pipermail/metapost/2006-September/000650.html
But I fail to see the conclusion there too.

 And alternately, you can construct the path of the difference out of the 
 two circles, and fill the constructed path.
As for the path of the difference, how do you mean that? Example?

Adam
___
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] MnSymbol in ConText

2011-02-20 Thread Florian Wobbe


--
Florian Wobbe
Alfred Wegener Institute for Polar and Marine Research
Division of Geosciences, Section of Geophysics
Postfach 120161
27515 Bremerhaven

On Feb 20, 2011, at 20:38 , Khaled Hosny wrote:

 On Sun, Feb 20, 2011 at 08:30:53PM +0100, Florian Wobbe wrote:
 Is there any way to use MnSymbol in context?
 
 It is, but somebody needs to write support for it. Both for MKII and MKIV.
 
 The problem is, that luatex refuses to load any of the MnSymbol*.otf
 font files available from CTAN with an error message. I don't know
 what is broken with the fonts.
 
 Reporting the errors would help finding what is wrong.

Hi Khaled,

luatax says:
 )texmf/fonts/opentype/public/mnsymbol/MnSymbol12.otf
!LuaTeX error (file texmf/fonts/opentype/public/mnsymbol/MnSymbol12.otf): 
Invalid character.

Florian

___
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] Learning LuaTeX : Invoice

2011-02-20 Thread Philipp Gesang
Hi Hraban!

On 2011-02-20 20:16:03, Henning Hraban Ramm wrote:
 … /
 I'll wikify my invoice sample soon. LuaTeX docs in the wiki are a
 bit scattered ATM... (e.g. Lua, LuaTeX, CLD and MkIV all explain
 LuaTeX basics)

“Lua” is intended to be some kind of portal for all topics
related to Lua programming in Luatex. As opposed to “Luatex”
which should have a focus on typesetting-specific stuff, new
primitives and everything else revolutionary that Luatex offers.
“CLD” is *very* specific and basically just a demonstration for
what a wiki reader might expect in the manual. “MkIV” seems
outdated but I have no idea what content should go there. (Btw.
there’s also a page “programming in luatex”…)

Personally I would prefer that the distinction between the
categories typesetting and Lua scripting be emphasized, e.g. that
info on using the token, node or tex libs goes into the former
(or the Luatex wiki…) whereas Lua-based approaches to stuff that
used to be hacked in Tex macros would go into the latter. Does
this make sense?

Anyways, looking forward to see your invoice code

Philipp


 Greetlings from Lake Constance!
 Hraban
 ---
 http://www.fiee.net/texnique/
 http://wiki.contextgarden.net
 https://www.cacert.org (I'm an assurer)
 
 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___


pgpSgDZohoSwG.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] Learning LuaTeX : Invoice

2011-02-20 Thread Wolfgang Schuster

Am 20.02.2011 um 21:20 schrieb Philipp Gesang:

 Anyways, looking forward to see your invoice code

It would be more interesting to have something like luacalc [1] available
in context. As it is only another kind of table one could insert the data
with a syntax like this

\startspreadsheet
  \startrow
\startcell 3 \stopcell
\startcell 5 \stopcell
\startcell = A1 + A3 \stopcell
  \stoprow
\stopspreadsheet

and the final result is printed with a natural table.

[1] http://luacalc.sourceforge.net/

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] Switchting between betas

2011-02-20 Thread Michael Goerz
Hi everyone,

I've been using ConTeXt (MKIV) through TeXLive 2010 until now, but
wanted to try to use the Minimals installation. The installation went
fine, but the latest beta version was not able to compile my document
(I'll be posting about that separately).

What I'm confused about is this: Does only the beta-version have
MkIV/LuaTeX support? It seems that I cannot make the MKIV format if I
install one of the dated versions:

goerz@ophelia:~/context ./first-setup.sh --context=2010.07.30
[ ... ]
goerz@ophelia:~/context mtxrun --selfupdate

MTXrun | forcing cache reload
MTXrun | resolvers: loading configuration file
'/Users/goerz/context/tex/texmf/web2c/texmfcnf.lua'
MTXrun | resolvers
MTXrun | resolvers
MTXrun | resolvers
MTXrun | the resolver databases are not present or outdated
MTXrun | resolvers: to be replaced old script
/Users/goerz/context/tex/texmf-osx-64/bin/mtxrun
MTXrun | resolvers: using suffix based filetype 'lua'
MTXrun | resolvers: unable to locate new script

Is there a way of getting a version of minimals that has MKIV and is
equivalent to the TeXLive 2010 installation, so that I can compile my
document?

More generally, is there a way to switch to the beta version of a
specific date? Considering that new betas might break the compilation
of existing documents, there would have to be a way for me to tell
people compile this document with version  -- even if it's just a
specific revision number. Otherwise, there wouldn't be any reproducible
way of compiling documents.

Thanks,
Michael Goerz
___
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] Compilation problem with latest beta

2011-02-20 Thread Michael Goerz
Hi everyone,

I was compiling a document with the version of ConTeXt that comes with
TeXLive 2010, and now tried to compile it the latest beta of the
Minimals installation. The compilations fails with the following error:

[...]

pagesflushing realpage 6, userpage 1
pagesflushing realpage 7, userpage 1
)
system   end file vol_vii_3/frontmatter at line 14
pagesflushing realpage 8, userpage 1
! Missing control sequence inserted.

system   tex  error on line 11 in file
vol_vii_3/vol_vii_3.tex: Missing control sequence inserted ...

 1 %\overfullrule5\points % show overfull boxes
 2 \startproduct vol_vii_3/vol_vii_3
 3 \project project
 4
 5 \enablemode[doublesided]
 6
 7 %\showframe % show the layout boxes on each page
 8
 9 \startfrontmatter
10 \setupheadertexts[{}][{}][{}][{}]
11 
12 \setuppagenumbering[state=stop]
13
14 \component vol_vii_3/frontmatter
15
16 \page[yes, odd]
17
18 { % ToC
19 \IJDEvol{Summer 2011}{Volume VII.3}
20 \FMTitle{Contents}
21 \blank[big]

inserted text
\inaccessible
to be read again
   {
\currentconvertfont ...tchtobodyfont [14pt]\edef {

smallcaps}\attribute \zero...
\dosetfontattribute ...me #1#2\@EA \endcsname \fi
  \empty
\dosetlistattributes ...bute \fontattributehash #1
  \fi \ifx
\colorattributeha...
argument ...setlistattributes \c!style \c!color
  \!!widthb \hsize
\doifelse...
...
l.23 \page
  [left]
?

I have absolutely no clue what the error message is trying to tell me,
or how to go about making the document compile. Does anyone have any
suggestions?

Thanks,
Michael Goerz
___
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] Compilation problem with latest beta

2011-02-20 Thread Khaled Hosny
On Sun, Feb 20, 2011 at 09:44:21PM +0100, Michael Goerz wrote:
  1 %\overfullrule5\points % show overfull boxes
  2 \startproduct vol_vii_3/vol_vii_3
  3 \project project
  4
  5 \enablemode[doublesided]
  6
  7 %\showframe % show the layout boxes on each page
  8
  9 \startfrontmatter
 10 \setupheadertexts[{}][{}][{}][{}]
 11 
 12 \setuppagenumbering[state=stop]
 13
 14 \component vol_vii_3/frontmatter
 15
 16 \page[yes, odd]
 17
 18 { % ToC
 19 \IJDEvol{Summer 2011}{Volume VII.3}
 20 \FMTitle{Contents}
 21 \blank[big]

OT: I like the new error messages context, much more readable than the
cryptic default, is that a luatex-specific thing or can be done for
other engines?

Regards,
 Khaled

-- 
 Khaled Hosny
 Egyptian
___
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] Compilation problem with latest beta

2011-02-20 Thread Wolfgang Schuster

Am 20.02.2011 um 21:44 schrieb Michael Goerz:

 Hi everyone,
 
 I was compiling a document with the version of ConTeXt that comes with
 TeXLive 2010, and now tried to compile it the latest beta of the
 Minimals installation. The compilations fails with the following error:

The problem should be somewhere here:

18 { % ToC
19 \IJDEvol{Summer 2011}{Volume VII.3}
20 \FMTitle{Contents}
21 \blank[big]
 
 I have absolutely no clue what the error message is trying to tell me,
 or how to go about making the document compile. Does anyone have any
 suggestions?

Can you comment the part where you insert the table of contents
in your document, something fails here but it’s not able to tell
what from your example.

Can you make a minimal example or send me the files off list.

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] Compilation problem with latest beta

2011-02-20 Thread Michael Goerz
On Sun, Feb 20, 2011 at 10:08 PM, Wolfgang Schuster
schuster.wolfg...@googlemail.com wrote:
 Am 20.02.2011 um 21:44 schrieb Michael Goerz:
 Hi everyone,
 I was compiling a document with the version of ConTeXt that comes with
 TeXLive 2010, and now tried to compile it the latest beta of the
 Minimals installation. The compilations fails with the following error:

 The problem should be somewhere here:

    18     { % ToC
    19         \IJDEvol{Summer 2011}{Volume VII.3}
    20         \FMTitle{Contents}
    21         \blank[big]

 I have absolutely no clue what the error message is trying to tell me,
 or how to go about making the document compile. Does anyone have any
 suggestions?

 Can you comment the part where you insert the table of contents
 in your document, something fails here but it’s not able to tell
 what from your example.
Indeed, it has something to do with the Table of Contents. The
\placecontent is already enough to produce the error, but only in
combination with the definitions in my env.tex file. If I don't place
the TOC, or don't load my env settings, the documents compiles.

 Can you make a minimal example or send me the files off list.
I've attached the files for a minimal example:
.
|-- env.tex
|-- project.tex
`-- vol_vii_3
`-- vol_vii_3.tex

Thanks,
Michael


env.tex
Description: TeX document


project.tex
Description: TeX document


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


Re: [NTG-context] Compilation problem with latest beta

2011-02-20 Thread Wolfgang Schuster

Am 20.02.2011 um 22:52 schrieb Michael Goerz:

 On Sun, Feb 20, 2011 at 10:08 PM, Wolfgang Schuster
 Can you comment the part where you insert the table of contents
 in your document, something fails here but it’s not able to tell
 what from your example.
 Indeed, it has something to do with the Table of Contents. The
 \placecontent is already enough to produce the error, but only in
 combination with the definitions in my env.tex file. If I don't place
 the TOC, or don't load my env settings, the documents compiles.

Change these defintions from \def to \unexpanded\def

% Font Features Macros
\def\orn{\setfontfeature{ornaments}}
\def\itsw{\setfontfeature{swash}\it}
\def\sw{\setfontfeature{swash}}
\def\smcp{\setfontfeature{smallcaps}}
\def\lnfigures{\setfontfeature{lining}}
\def\tabfigures{\addfontfeaturetofont{tabular}}
\def\lntabfigures{\setfontfeature{tabular}}

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] Compilation problem with latest beta

2011-02-20 Thread Hans Hagen

On 20-2-2011 9:51, Khaled Hosny wrote:

On Sun, Feb 20, 2011 at 09:44:21PM +0100, Michael Goerz wrote:

  1 %\overfullrule5\points % show overfull boxes
  2 \startproduct vol_vii_3/vol_vii_3
  3 \project project
  4
  5 \enablemode[doublesided]
  6
  7 %\showframe % show the layout boxes on each page
  8
  9 \startfrontmatter
 10 \setupheadertexts[{}][{}][{}][{}]
 11
 12 \setuppagenumbering[state=stop]
 13
 14 \component vol_vii_3/frontmatter
 15
 16 \page[yes, odd]
 17
 18 { % ToC
 19 \IJDEvol{Summer 2011}{Volume VII.3}
 20 \FMTitle{Contents}
 21 \blank[big]


OT: I like the new error messages context, much more readable than the
cryptic default, is that a luatex-specific thing or can be done for
other engines?


It's not luatex specific but context specific (and more an experiment, 
as I also want proper line numbers for lua code but a patch for getting 
that info is on the agenda).


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] Compilation problem with latest beta

2011-02-20 Thread Khaled Hosny
On Sun, Feb 20, 2011 at 11:04:38PM +0100, Hans Hagen wrote:
 On 20-2-2011 9:51, Khaled Hosny wrote:
 On Sun, Feb 20, 2011 at 09:44:21PM +0100, Michael Goerz wrote:
   1 %\overfullrule5\points % show overfull boxes
   2 \startproduct vol_vii_3/vol_vii_3
   3 \project project
   4
   5 \enablemode[doublesided]
   6
   7 %\showframe % show the layout boxes on each page
   8
   9 \startfrontmatter
  10 \setupheadertexts[{}][{}][{}][{}]
  11
  12 \setuppagenumbering[state=stop]
  13
  14 \component vol_vii_3/frontmatter
  15
  16 \page[yes, odd]
  17
  18 { % ToC
  19 \IJDEvol{Summer 2011}{Volume VII.3}
  20 \FMTitle{Contents}
  21 \blank[big]
 
 OT: I like the new error messages context, much more readable than the
 cryptic default, is that a luatex-specific thing or can be done for
 other engines?
 
 It's not luatex specific but context specific (and more an
 experiment, as I also want proper line numbers for lua code but a
 patch for getting that info is on the agenda).

It is cool nevertheless :)


-- 
 Khaled Hosny
 Egyptian
___
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] Switchting between betas

2011-02-20 Thread Hans Hagen

On 20-2-2011 9:37, Michael Goerz wrote:


More generally, is there a way to switch to the beta version of a
specific date? Considering that new betas might break the compilation
of existing documents, there would have to be a way for me to tell
people compile this document with version  -- even if it's just a
specific revision number. Otherwise, there wouldn't be any reproducible
way of compiling documents.


you can have trees like

/context-1/...
/context-2/...
/context-3/...

and initialize them on demand or run with

mtxrun --tree=/context-2 --script context  .

-
  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] attachment attaches twice - more research

2011-02-20 Thread Michail Vidiassov

Dear Developers,

On Sun, 20 Feb 2011, Michail Vidiassov wrote:


to be precise, the attachment is attached once
but is listed twice by Adobe Reader.


PDF spec states
--
An embedded file stream shall be included in a PDF document in one of the 
following ways:
•	Any file specification dictionary in the document may have an EF 
entry that specifies an embedded file stream. The stream data shall still 
be associated with a location in the file system. In particular, this 
method shall be used for file attachment annotations (see 12.5.6.15, File 
Attachment Annotations), which associate the embedded file with a location 
on a page in the document.
•	Embedded file streams may be associated with the document as a 
whole through the EmbeddedFiles entry (PDF 1.4) in the PDF document’s name 
dictionary (see 7.7.4, Name Dictionary). The associated name tree shall 
map name strings to file specifications that refer to embedded file streams 
through their EF entries.

--

while code in lpdf-wid.lua sends everything to EmbeddedFiles - including 
files associated with a location on a page in the document as in the 
examples in the originator's post.


For example http://www.microtype.com/showcase/EmbedFiles.pdf
has it done correctly, EmbeddedFiles refers only to that embedded files 
that are not linked to particular icons on pages.


 Sincerely, Michail

PS. did not experiment with patching lpdf-wid.lua myself yet...___
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] Learning LuaTeX : Invoice

2011-02-20 Thread Hans Hagen

On 20-2-2011 9:28, Wolfgang Schuster wrote:


Am 20.02.2011 um 21:20 schrieb Philipp Gesang:


Anyways, looking forward to see your invoice code


It would be more interesting to have something like luacalc [1] available
in context. As it is only another kind of table one could insert the data
with a syntax like this

\startspreadsheet
   \startrow
 \startcell 3 \stopcell
 \startcell 5 \stopcell
 \startcell = A1 + A3 \stopcell
   \stoprow
\stopspreadsheet

and the final result is printed with a natural table.


See attached file.

For this to work ok we need a reset hook into TABLE but it shows the 
principle.


I think that we should stick close to lua so it's mostly a matter of tex 
interfacing. I can even imagine named sheets so that results can be 
recalled later on.


A nice distraction from more complex coding as this is rather simple so 
I'll think a bit about it.


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
% an experiment, no module yet

\startluacode
local byte, format = string.byte, string.format

spreadsheets = { }

local mt = {
__index = function(t,k)
local v = { }
setmetatable(v,mt)
t[k] = v
return v
end,
}

function spreadsheets.reset()
spreadsheets.data = { }
setmetatable(spreadsheets.data,mt)
end

spreadsheets.reset()

-- I'll make a nice lpeg

local offset = byte(A) - 1

local function execute(r,c,str)
str = string.gsub(str,([A-Z]),function(s)
return format(spreadsheets.data[%s],byte(s)-offset)
end)
-- todo: error checking + report
local result = loadstring(return .. str)
result = result and result() or 0
spreadsheets.data[c][r] = result
return result
end

function spreadsheets.set(r,c,str)
execute(r,c,str)
end

function spreadsheets.get(r,c,str)
local result = execute(r,c,str)
if result then
context(result)
end
end
\stopluacode

\def\resetspreadsheet{\ctxlua{spreadsheets.reset()}}
\def\setspreadsheet#1{\ctxlua{spreadsheets.set(\number\tblrow+1,\number\tblcol,#1)}}
\def\getspreadsheet#1{\ctxlua{spreadsheets.get(\number\tblrow+1,\number\tblcol,#1)}}

% we need an everyTABLE

\let\set\setspreadsheet
\let\get\getspreadsheet

\starttext

\bTABLE[align=middle]
   \bTR
 \bTD \get{100} \eTD \bTD test \set{30} \eTD
   \eTR
   \bTR
 \bTD \get{20} \eTD \bTD \get{4+3} \eTD
   \eTR
   \bTR
 \bTD \get{A[1] + A[2]} \eTD
 \bTD \get{B[1] + B[2]} \eTD
   \eTR
   \bTR
 \bTD[nx=2] \bf \get{A[3] + B[3]} \eTD
   \eTR
\eTABLE

\def\startspreadsheet#1\stopspreadsheet
  {\resetspreadsheet
   \bTABLE#1\eTABLE}

\def\startrow#1\stoprow
  {\bTR#1\eTR}

\def\startcell#1\stopcell
  {\bTD\get{#1}\eTD}

\startspreadsheet
   \startrow
 \startcell 3 \stopcell
 \startcell 5 \stopcell
 \startcell A[1] + B[1] \stopcell
   \stoprow
\stopspreadsheet

\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] some equivalent of latex beamer \itemuncover@1?

2011-02-20 Thread Hans Hagen

On 20-2-2011 7:58, Mojca Miklavec wrote:

On Fri, Feb 18, 2011 at 21:35, Pau wrote:

Hello,

I am trying to implement a similar effect to latex beamer's

\begin{itemize}
\itemuncover@1
\itemuncover@2
\itemuncover@3-
\end{itemize}

What'd be the equivalent/similar/better of that in ConTeXt?


Apart from JavaScript-based mechanism somebody used to write t-rsteps
module long time ago:
 http://modules.contextgarden.net/t-rsteps
which creates multiple slides instead of using JavaScript (the same
way as Beamer does, but is probably more primitive).

It worked nicely (I used it several times), but I haven't tested it
recently, so I'm not sure if it still works fine with recent ConTeXt
versions.

It would be great if \StartSteps, \FlushStep, ... written by Hans
would also optionally support creating multiple slides for viewers
other than Acrobat.


Not in the short term, i might give it a try some day but I hate 
mechanisms that interfere with others in unpredictable ways as do such 
multiple page solutions (references, spacing etc) unless one sticks to 
predictable structure and wants to patch core macros for this kind of 
stuff which is not what I like. Also, I've never seen anyone do a 
presentation with another viewer.


Hans

(who wonders why no one adds simple javascript support to the other pdf 
viewers, a reasonable subset would do)


-
  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] attachment attaches twice - more research

2011-02-20 Thread Hans Hagen

On 20-2-2011 11:21, Michail Vidiassov wrote:

Dear Developers,

On Sun, 20 Feb 2011, Michail Vidiassov wrote:


to be precise, the attachment is attached once
but is listed twice by Adobe Reader.


PDF spec states
--
An embedded file stream shall be included in a PDF document in one of
the following ways:
• Any file specification dictionary in the document may have an EF entry
that specifies an embedded file stream. The stream data shall still be
associated with a location in the file system. In particular, this
method shall be used for file attachment annotations (see 12.5.6.15,
File Attachment Annotations), which associate the embedded file with a
location on a page in the document.
• Embedded file streams may be associated with the document as a whole
through the EmbeddedFiles entry (PDF 1.4) in the PDF document’s name
dictionary (see 7.7.4, Name Dictionary). The associated name tree
shall map name strings to file specifications that refer to embedded
file streams through their EF entries.
--

while code in lpdf-wid.lua sends everything to EmbeddedFiles - including
files associated with a location on a page in the document as in the
examples in the originator's post.


i'll patch lpdf-wid but somehow I get the impression that it's more a 
viewer issue (the list shown seems to be a merge of filename as well as 
symbolic names while a clever list builder should look at the referred 
objects) ... but maybe no one else usesvdifferent symbolic names (we had 
similar issues with fields in the past and even now advanced field 
support is somewhat bugged one or the other way, depending on the viewer 
version, esp chained ones)


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] Compilation problem with latest beta

2011-02-20 Thread Michael Goerz
On Sun, Feb 20, 2011 at 10:59 PM, Wolfgang Schuster
schuster.wolfg...@googlemail.com wrote:

 Am 20.02.2011 um 22:52 schrieb Michael Goerz:

 On Sun, Feb 20, 2011 at 10:08 PM, Wolfgang Schuster
 Can you comment the part where you insert the table of contents
 in your document, something fails here but it’s not able to tell
 what from your example.
 Indeed, it has something to do with the Table of Contents. The
 \placecontent is already enough to produce the error, but only in
 combination with the definitions in my env.tex file. If I don't place
 the TOC, or don't load my env settings, the documents compiles.

 Change these defintions from \def to \unexpanded\def

 % Font Features Macros
 \def\orn{\setfontfeature{ornaments}}
 \def\itsw{\setfontfeature{swash}\it}
 \def\sw{\setfontfeature{swash}}
 \def\smcp{\setfontfeature{smallcaps}}
 \def\lnfigures{\setfontfeature{lining}}
 \def\tabfigures{\addfontfeaturetofont{tabular}}
 \def\lntabfigures{\setfontfeature{tabular}}
Indeed, that works perfectly.

However, there's another problem now, going beyond my minimal example.
The following macro that I have in env.tex no longer works in the
latest beta:
\def\TocAuthors#1{\writebetweenlist[chapter]{\Lower(1cm){\bf #1}}{}}

It seems that the \Lower macro is no longer available. Is there a
suitable replacement?

To reproduce this in the minimal example, I've added a file
vol_vii_3/articles with the following content:

\startcomponent bla
\product vol_vii_3/vol_vii_3
\project project

\TocAuthors{Me}
\chapter{Some Title}
bla

and added it in vol_vii_3.tex:

[...]
\startbodymatter
\part{bla}
\component vol_vii_3/articles/bla
[...]

Thanks,
Michael Goerz
___
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] a bug in the scrp-cjk.lua

2011-02-20 Thread 李延瑞
Hi Hans,

The 'get_attribute' function is not be replaced with 'has_attribute'
in the second 'process' function of 'hanzi' section in the
scrp-cjk.lua.

-- 
Best regards,

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

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


Re: [NTG-context] metapost fill between outlines

2011-02-20 Thread Hongwen Qiu

On 02/21/2011 03:52 AM, Reviczky, Adam wrote:

As for the path of the difference, how do you mean that? Example?

\startMPpage
path p ;
p := fullcircle scaled 1cm ;
path q ;
q := fullcircle scaled .5cm ;
path r ;
r := p -- reverse q -- cycle ;
drawarrow r withcolor green ;
fill r withcolor red ;
\stopMPpage

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

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


Re: [NTG-context] metapost fill between outlines

2011-02-20 Thread Reviczky, Adam
 \startMPpage
 path p ;
 p := fullcircle scaled 1cm ;
 path q ;
 q := fullcircle scaled .5cm ;
 path r ;
 r := p -- reverse q -- cycle ;
 drawarrow r withcolor green ;
 fill r withcolor red ;
 \stopMPpage
 
 This works here.
Based on this I can now cut out the smaller one from a fullcircle, but it still 
fails with two paths having controls (or maybe because of something else).

Here are the examples:
%%%
\starttext
\framed[background=color,backgroundcolor=red,height=fit,width=fit]{
\startMPcode
path p[];
p1 := fullcircle scaled 2cm;

p2 := (7.488280,12.293000)..controls (4.933590,12.293000) and 
(1.265620,6.226560)..(1.265620,2.531250)..controls (1.265620,1.562500) and 
(1.695310,0.835938)..(2.722660,0.835938)..controls (5.230470,0.835938) and 
(8.972660,7.035160)..(8.972660,10.296900)..controls (8.972660,11.269500) and 
(8.703120,12.293000)..(7.488280,12.293000)--cycle;

p3 := p1 -- reverse p2 -- cycle;
fill p3 withcolor black;
\stopMPcode
}
\stoptext
%%%
This works.

%%%
\starttext
\framed[background=color,backgroundcolor=red,height=fit,width=fit]{
\startMPcode
path p[];
p1 := (6.949220,13.046900)..controls (9.539060,13.046900) and 
(10.023400,10.781200)..(10.023400,8.679690)..controls (10.023400,5.335940) and 
(6.949220,0.00)..(3.234380,0.00)..controls (0.890625,0.00) and 
(0.00,1.886720)..(0.00,3.828120)..controls (0.00,8.492190) and 
(3.316410,13.046900)..(6.949220,13.046900) --cycle;

p2 := (7.488280,12.293000)..controls (4.933590,12.293000) and 
(1.265620,6.226560)..(1.265620,2.531250)..controls (1.265620,1.562500) and 
(1.695310,0.835938)..(2.722660,0.835938)..controls (5.230470,0.835938) and 
(8.972660,7.035160)..(8.972660,10.296900)..controls (8.972660,11.269500) and 
(8.703120,12.293000)..(7.488280,12.293000)--cycle;

p3 := p1 -- reverse p2 -- cycle;
fill p3 withcolor black;
\stopMPcode
}
\stoptext
%%%
This doesn't work.
(It fails already if p1 := (0,0)..(0,20)..(20,20)..cycle; or similar.)
Any hints?

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

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


Re: [NTG-context] metapost fill between outlines

2011-02-20 Thread Hongwen Qiu

On 02/21/2011 01:12 PM, Reviczky, Adam wrote:

\starttext
\framed[background=color,backgroundcolor=red,height=fit,width=fit]{
\startMPcode
path p[];
p1 := (6.949220,13.046900)..controls (9.539060,13.046900) and 
(10.023400,10.781200)..(10.023400,8.679690)..controls (10.023400,5.335940) and 
(6.949220,0.00)..(3.234380,0.00)..controls (0.890625,0.00) and 
(0.00,1.886720)..(0.00,3.828120)..controls (0.00,8.492190) and 
(3.316410,13.046900)..(6.949220,13.046900) --cycle;

p2 := (7.488280,12.293000)..controls (4.933590,12.293000) and 
(1.265620,6.226560)..(1.265620,2.531250)..controls (1.265620,1.562500) and 
(1.695310,0.835938)..(2.722660,0.835938)..controls (5.230470,0.835938) and 
(8.972660,7.035160)..(8.972660,10.296900)..controls (8.972660,11.269500) and 
(8.703120,12.293000)..(7.488280,12.293000)--cycle;

p3 := p1 -- reverse p2 -- cycle;
fill p3 withcolor black;
\stopMPcode
}
\stoptext
%%%
This doesn't work.

\starttext
\framed[background=color,backgroundcolor=red,height=fit,width=fit]{
\startMPcode
path p[];
p1 := (6.949220,13.046900)..controls (9.539060,13.046900) and 
(10.023400,10.781200)..(10.023400,8.679690)..controls 
(10.023400,5.335940) and 
(6.949220,0.00)..(3.234380,0.00)..controls (0.890625,0.00) 
and (0.00,1.886720)..(0.00,3.828120)..controls 
(0.00,8.492190) and (3.316410,13.046900)..(6.949220,13.046900) --cycle;


p2 := (7.488280,12.293000)..controls (4.933590,12.293000) and 
(1.265620,6.226560)..(1.265620,2.531250)..controls (1.265620,1.562500) 
and (1.695310,0.835938)..(2.722660,0.835938)..controls 
(5.230470,0.835938) and 
(8.972660,7.035160)..(8.972660,10.296900)..controls (8.972660,11.269500) 
and (8.703120,12.293000)..(7.488280,12.293000)--cycle;


drawarrow p1 withcolor green ;
drawarrow p2 withcolor blue ;
p3 := p1 -- p2 -- cycle;
fill p3 withcolor black;
\stopMPcode
}
\stoptext

Maybe you can know why now, from the above code. The direction of the 
path is important.

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

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


Re: [NTG-context] metapost fill between outlines

2011-02-20 Thread Reviczky, Adam
 Maybe you can know why now, from the above code. The direction of the 
 path is important.
I get it now, thanks for your help!
___
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] attachment attaches twice - please, do not fix by trimming

2011-02-20 Thread Michail Vidiassov

Dear Hans,

On Mon, 21 Feb 2011, Hans Hagen wrote:


to be precise, the attachment is attached once
but is listed twice by Adobe Reader.


code in lpdf-wid.lua sends everything to EmbeddedFiles - including
files associated with a location on a page in the document 


i'll patch lpdf-wid


it'd be nice to not only fix icon-linked attachments (current 
functionality), but to also allow to create document-level attachments

not linked to icons - not that I see any particular use for that just now,
but since functionality is already there (but misused) it'd be a pity to 
just drop it.


  Sincerely, Michail


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

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


Re: [NTG-context] metapost fill between outlines

2011-02-20 Thread Reviczky, Adam
So with this method, I can cut out some fillings of letters in a logo,
but for this example it draws a small line through the letter:

%%%
\starttext
\framed[background=color,backgroundcolor=red,height=fit,width=fit]{
\startMPcode
path db[],df[],dc[];

drawoptions (withcolor (0.00,0.329412,0.560784));
db1 := (86.812500,0.519531)--(92.457001,0.519531)--(92.457001,32.386700)
--(86.812500,32.386700)--(86.812500,19.679701)--(86.722702,19.679701)
..controls (85.390602,21.589800) and 
(82.816399,22.718800)..(79.929703,22.718800)
..controls (73.976601,22.718800) and 
(69.800797,17.253901)..(69.800797,11.617200)
..controls (69.800797,4.683590) and 
(73.664101,0.00)..(79.484398,0.00)
..controls (82.949203,0.00) and 
(85.257797,1.820310)..(86.722702,3.640620)
--(86.812500,3.640620)--cycle;

df1 := (81.437500,19.246099)..controls (84.992203,19.246099) and 
(86.812500,15.734400)..(86.812500,11.964800)
..controls (86.812500,7.625000) and 
(85.128899,3.464840)..(81.171898,3.464840)
..controls (77.753899,3.464840) and 
(76.062500,7.542970)..(76.062500,11.746100)
..controls (76.062500,15.953100) and 
(77.621101,19.246099)..(81.437500,19.246099)
--cycle;

draw db1; draw df1;
dc1 := db1 -- df1 -- cycle;
fill dc1;
\stopMPcode
}
\stoptext
%%%

Can this be solved somehow?

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

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


Re: [NTG-context] metapost fill between outlines

2011-02-20 Thread Hongwen Qiu

On 02/21/2011 02:41 PM, Reviczky, Adam wrote:

but for this example it draws a small line through the letter:

\starttext
\framed[background=color,backgroundcolor=red,height=fit,width=fit]{
\startMPcode
path db[],df[],dc[];

drawoptions (withcolor (0.00,0.329412,0.560784));
db1 := (86.812500,0.519531)--(92.457001,0.519531)--(92.457001,32.386700)
--(86.812500,32.386700)--(86.812500,19.679701)--(86.722702,19.679701)
..controls (85.390602,21.589800) and 
(82.816399,22.718800)..(79.929703,22.718800)
..controls (73.976601,22.718800) and 
(69.800797,17.253901)..(69.800797,11.617200)
..controls (69.800797,4.683590) and 
(73.664101,0.00)..(79.484398,0.00)
..controls (82.949203,0.00) and 
(85.257797,1.820310)..(86.722702,3.640620)

--(86.812500,3.640620)--cycle;

df1 := (81.437500,19.246099)..controls (84.992203,19.246099) and 
(86.812500,15.734400)..(86.812500,11.964800)
..controls (86.812500,7.625000) and 
(85.128899,3.464840)..(81.171898,3.464840)
..controls (77.753899,3.464840) and 
(76.062500,7.542970)..(76.062500,11.746100)
..controls (76.062500,15.953100) and 
(77.621101,19.246099)..(81.437500,19.246099)

--cycle;

dc1 := db1 -- df1 -- cycle;
fill dc1;
drawdot (86.812500,0.519531) withcolor blue withpen pencircle scaled 2pt;
drawdot (81.437500, 19.246099) withcolor green withpen pencircle scaled 2pt;
drawarrow db1 withcolor green; drawarrow df1 withcolor blue;
drawarrow dc1 withcolor white;
\stopMPcode
}
\stoptext

The above code is just intend to tell you that you can change the way 
you construct db1 and df1 to achieve your desired results. The actual 
changes necessary to this example are not given.

___
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] some equivalent of latex beamer \itemuncover@1?

2011-02-20 Thread Thomas A. Schmitz

On Feb 21, 2011, at 12:57 AM, Hans Hagen wrote:

 Not in the short term, i might give it a try some day but I hate mechanisms 
 that interfere with others in unpredictable ways as do such multiple page 
 solutions (references, spacing etc) unless one sticks to predictable 
 structure and wants to patch core macros for this kind of stuff which is not 
 what I like. Also, I've never seen anyone do a presentation with another 
 viewer.
 
 Hans
 
 (who wonders why no one adds simple javascript support to the other pdf 
 viewers, a reasonable subset would do)

I do presentations with evince, okular, or Apple's Preview when I'm on OS X. I 
avoid Adobe Reader as much as I can because it's incredibly bloated (more so at 
every new version), insists on taking over my operating system (almost 
impossible to keep it from checking for updates, helpfully repairing 
components and features that I have explicitly disabled), still doesn't 
autorefresh, and has uglier font rendering, especially in linux. So I don't 
like javascript solutions at all. 

For the problem at hand, maybe I'm naive, but here's my thoughts: would it be 
very hard to implement an alternative with layers? All we need for stepwise 
stuff to work would be 
- reset userpagenumber to current value
- collect everything on slide in layer X, add layer X + 1 on top of this.

Or is this too simplistic? 

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
___


Re: [NTG-context] Switchting between betas

2011-02-20 Thread Cedric Mauclair
On Sun, Feb 20, 2011 at 23:07, Hans Hagen pra...@wxs.nl wrote:
 On 20-2-2011 9:37, Michael Goerz wrote:

 More generally, is there a way to switch to the beta version of a
 specific date? Considering that new betas might break the compilation
 of existing documents, there would have to be a way for me to tell
 people compile this document with version  -- even if it's just a
 specific revision number. Otherwise, there wouldn't be any reproducible
 way of compiling documents.

 you can have trees like

 /context-1/...
 /context-2/...
 /context-3/...

 and initialize them on demand or run with

 mtxrun --tree=/context-2 --script context  .

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


Nice! I believe one has to take care of its PATH on his own or does
the context script takes care of that too?

Regards.

-- Cédric
___
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] some equivalent of latex beamer \itemuncover@1?

2011-02-20 Thread Taco Hoekwater

On 02/21/2011 12:57 AM, Hans Hagen wrote:


It would be great if \StartSteps, \FlushStep, ... written by Hans
would also optionally support creating multiple slides for viewers
other than Acrobat.


Not in the short term, i might give it a try some day but I hate
mechanisms that interfere with others in unpredictable ways as do such
multiple page solutions (references, spacing etc) unless one sticks to
predictable structure and wants to patch core macros for this kind of
stuff which is not what I like. Also, I've never seen anyone do a
presentation with another viewer.


Ehm ... isn't that what s-pre-50 does already?

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

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