Re: [NTG-context] export

2010-09-23 Thread Henning Hraban Ramm

Am 2010-09-23 um 01:26 schrieb Vyatcheslav Yatskovsky:

Please tell an (really) unlucky person who didn't visited the  
conference (like me), what \setupbackeds[export=yes] should do at all?


You get the contents of your (well-structured) ConTeXt document as XML  
ouput, extension .export, intended for tagged PDF use (e.g. PDF/A),  
but of course usable for XML transformations.




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
___


[NTG-context] Context to MP

2010-09-23 Thread Procházka Lukáš

Hello,

I'd like to ask -

- where could I find a list of variables which (Con)TeX(t) defines to MetaPost 
scope?

When I browsed the Hans' presentations, I encountered PaperWidth, PaperHeight, Page etc. (see 
e.g. s-pre-22.tex). I didn't find them mentioned/explained in any manual (especially: in mpman.pdf, tab. 
5 on pg. 71, there is a list of MP internal variables).

So where I could find them with a short description?

Lukas


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

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


Re: [NTG-context] Context to MP

2010-09-23 Thread Wolfgang Schuster

Am 23.09.2010 um 09:40 schrieb Procházka Lukáš:

 Hello,
 
 I'd like to ask -
 
 - where could I find a list of variables which (Con)TeX(t) defines to 
 MetaPost scope?
 
 When I browsed the Hans' presentations, I encountered PaperWidth, 
 PaperHeight, Page etc. (see e.g. s-pre-22.tex). I didn't find them 
 mentioned/explained in any manual (especially: in mpman.pdf, tab. 5 on pg. 
 71, there is a list of MP internal variables).
 
 So where I could find them with a short description?

You can find them in the metafun manual: http://pragma-ade.com/show-man-7.htm

Wolfgang

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

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


[NTG-context] Lua:mplib

2010-09-23 Thread Procházka Lukáš

Hello,

I'm looking for some stuff about calling MP from ConTeXt Lua.

The only thing I found is a short reference at 
http://www.luatex.org/svn/trunk/manual/luatexref-t.pdf, but even when I read 
some basics (pages 79-83), I don't even know how to draw a line between two 
points.

So I'd like to find a tutorial or examples or a deeper reference about how to 
call MP via Lua from ConTeXt. - Any idea?

Cheers,

Lukas


___
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] Problem with --autopdf in current beta

2010-09-23 Thread Hans Hagen

On 23-9-2010 6:40, Lutz Haseloff wrote:

Hi Hans, Hi all,

with the last beta i get following error message:


mtxrun --autogenerate --script context --autopdf --pdf callunatest.tex

al/texmf-context/scripts/context/lua/mtx-context.lua:649: attempt
to call field 'setmethod' (a nil value)

Exit code: 1


I use the latest minimal under WinXP.


No clue .. it's in l-pdfview.lua and that one is loaded I suppose.

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

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


Re: [NTG-context] Context to MP

2010-09-23 Thread Jaroslav Hajtmar

Hello,
I do not know whether I have correctly understood the question, but what 
you write nothing to do with MP. Values paperwidth, paperheight etc ... 
ConTeXt determining the value of paper size (as well as the pagewidth, 
paperheight, etc stored values of height and všířce pages) and can be 
transmitted to MP.

Look for things related to page layout.

Jarda


Dne 23.9.2010 9:40, Procházka Lukáš napsal(a):

Hello,

I'd like to ask -

- where could I find a list of variables which (Con)TeX(t) defines to 
MetaPost scope?


When I browsed the Hans' presentations, I encountered PaperWidth, 
PaperHeight, Page etc. (see e.g. s-pre-22.tex). I didn't find 
them mentioned/explained in any manual (especially: in mpman.pdf, 
tab. 5 on pg. 71, there is a list of MP internal variables).


So where I could find them with a short description?

Lukas 


___
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] Problem with --autopdf in current beta

2010-09-23 Thread Lutz Haseloff
sorry for the noise, I had an extra l-pdfview.lua in my working directory :-(

2010/9/23 Hans Hagen pra...@wxs.nl:
 On 23-9-2010 6:40, Lutz Haseloff wrote:

 Hi Hans, Hi all,

 with the last beta i get following error message:

 mtxrun --autogenerate --script context --autopdf --pdf
 callunatest.tex

 al/texmf-context/scripts/context/lua/mtx-context.lua:649: attempt
 to call field 'setmethod' (a nil value)

 Exit code: 1

 I use the latest minimal under WinXP.

 No clue .. it's in l-pdfview.lua and that one is loaded I suppose.

 -
                                          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] Lua:mplib

2010-09-23 Thread Wolfgang Schuster

Am 23.09.2010 um 09:53 schrieb Procházka Lukáš:

 Hello,
 
 I'm looking for some stuff about calling MP from ConTeXt Lua.
 
 The only thing I found is a short reference at 
 http://www.luatex.org/svn/trunk/manual/luatexref-t.pdf, but even when I read 
 some basics (pages 79-83), I don't even know how to draw a line between two 
 points.
 
 So I'd like to find a tutorial or examples or a deeper reference about how to 
 call MP via Lua from ConTeXt. - Any idea?

You don’t have to think so complicated:

\starttext
\startluacode
context.startMPpage()
context(draw fullcircle scaled 2cm;)
context.stopMPpage
\stopluacode
\stoptext

See also http://pragma-ade.com/show-man-44.htm

Wolfgang

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

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


Re: [NTG-context] Context to MP

2010-09-23 Thread Alan BRASLAU
On Thursday 23 September 2010 09:40:36 Procházka Lukáš wrote:
 Hello,
 
 I'd like to ask -
 
 - where could I find a list of variables which (Con)TeX(t) defines to
 MetaPost scope?
 
 When I browsed the Hans' presentations, I encountered PaperWidth,
 PaperHeight, Page etc. (see e.g. s-pre-22.tex). I didn't find them
 mentioned/explained in any manual (especially: in mpman.pdf, tab. 5 on
 pg. 71, there is a list of MP internal variables).
 
 So where I could find them with a short description?
 

They appear to be defined in meta-pag.mkiv
(including the path PlainTextArea)

Alan

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

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


[NTG-context] \startnarrower and TABLEs

2010-09-23 Thread Patrick Gundlach
Hi,

my goal is to make a table that is as wide as the current \startnarrower ... 
\stopnarrower part (thanks to the answer to this question on 
tex.stackexchange.com:  http://tex.stackexchange.com/q/3381/243 )


--
\starttext
\startnarrower

\input tufte

\bTABLE[option=stretch]
\bTR \bTD 2 \eTD \bTD 3 \eTD \eTR
\bTR \bTD 2 \eTD \bTD 3 \eTD \eTR
\eTABLE

\stopnarrower


\stoptext
--

Can I make the table exactly as wide as the text?


Patrick

___
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] Lua:mplib

2010-09-23 Thread Philipp Gesang
On 2010-09-23 09:53:38, Procházka Lukáš wrote:
 So I'd like to find a tutorial or examples or a deeper
 reference about how to call MP via Lua from ConTeXt. - Any idea?

Hi Lukáš,

this doesn't seem to be implemented yet, cf. this post:
http://archive.contextgarden.net/message/20100805.225554.4212c0c8.en.html
for now, as Wolfgang suggested, the “building strings and passing
them to context.MPdrawing()” method works acceptably if you
define yourself some wrapper functions.

But maybe Hans already has some prototype for a Metapost-Context
interface in his drawer …

Regards, Philipp

-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments


pgpwfYS42ilRD.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] Lua:mplib

2010-09-23 Thread luigi scarso
2010/9/23 Procházka Lukáš l...@pontex.cz:
 So I'd like to find a tutorial or examples or a deeper reference about how
 to call MP via Lua from ConTeXt. - Any idea?
As usual
browse the sources  search for mplib -- they are not so complicated to read

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

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


Re: [NTG-context] \startnarrower and TABLEs

2010-09-23 Thread Wolfgang Schuster

Am 23.09.2010 um 10:14 schrieb Patrick Gundlach:

 Hi,
 
 my goal is to make a table that is as wide as the current \startnarrower ... 
 \stopnarrower part (thanks to the answer to this question on 
 tex.stackexchange.com:  http://tex.stackexchange.com/q/3381/243 )
 
 
 --
 \starttext
 \startnarrower
 
 \input tufte

\startlinecorrection \dontleavehmode
\bTABLE[option=stretch,textwidth=\localhsize]

 \bTABLE[option=stretch]
 \bTR \bTD 2 \eTD \bTD 3 \eTD \eTR
 \bTR \bTD 2 \eTD \bTD 3 \eTD \eTR
 \eTABLE

\stoplinecorrection

 \stopnarrower
 
 \stoptext
 --
 
 Can I make the table exactly as wide as the text?

Use the “textwidth” key but keep in mind with the linecorrection you can
use split tables, for tables which use indent from \startnarrower and
split across pages you can use tabulate.

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] Lua:mplib

2010-09-23 Thread Procházka Lukáš

Thanks for the answers to all...

It seems that I'm trying to do similar things as someone else was trying before 
-

- use of context.MPdrawing() looks best at the moment. Maybe it will become 
deprecated as soon as Lua involves MP.

Best,

Lukas


On Thu, 23 Sep 2010 10:20:23 +0200, Philipp Gesang 
pges...@ix.urz.uni-heidelberg.de wrote:


On 2010-09-23 09:53:38, Procházka Lukáš wrote:

So I'd like to find a tutorial or examples or a deeper
reference about how to call MP via Lua from ConTeXt. - Any idea?


Hi Lukáš,

this doesn't seem to be implemented yet, cf. this post:
http://archive.contextgarden.net/message/20100805.225554.4212c0c8.en.html
for now, as Wolfgang suggested, the “building strings and passing
them to context.MPdrawing()” method works acceptably if you
define yourself some wrapper functions.

But maybe Hans already has some prototype for a Metapost-Context
interface in his drawer …

Regards, Philipp





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

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


Re: [NTG-context] Context to MP

2010-09-23 Thread Procházka Lukáš

Thanks Wolfgang, I got it. Cheers, Lukas


On Thu, 23 Sep 2010 09:50:20 +0200, Wolfgang Schuster 
schuster.wolfg...@googlemail.com wrote:



Am 23.09.2010 um 09:40 schrieb Procházka Lukáš:


Hello,

I'd like to ask -

- where could I find a list of variables which (Con)TeX(t) defines to MetaPost 
scope?

When I browsed the Hans' presentations, I encountered PaperWidth, PaperHeight, Page etc. (see 
e.g. s-pre-22.tex). I didn't find them mentioned/explained in any manual (especially: in mpman.pdf, tab. 
5 on pg. 71, there is a list of MP internal variables).

So where I could find them with a short description?


You can find them in the metafun manual: http://pragma-ade.com/show-man-7.htm

Wolfgang



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

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


Re: [NTG-context] \startnarrower and TABLEs

2010-09-23 Thread Patrick Gundlach
Hello Wolfgang,



 Use the “textwidth” key but keep in mind with the linecorrection you can
 use split tables, for tables which use indent from \startnarrower and
 split across pages you can use tabulate.

I am afraid I don't get the full meaning of your answer. When I use tabulate, I 
have exactly the same problem as I have with TABLEs:

-
\starttext
\startnarrower

\input tufte

\starttabulate[|l|l|]
\HL
\NC format  \NC meaning \NC\NR
\HL
\NC c   \NC centered\NC\NR
\NC l   \NC left aligned\NC\NR
\NC r   \NC right aligned   \NC\NR
\NC w(1cm)  \NC one line, fixed width   \NC\NR
\NC p(2cm)  \NC paragraph, lines broken to fixed width  \NC\NR
\NC cg(.)   \NC align on a character\NC\NR
\HL
\stoptabulate
\stopnarrower


\stoptext
-

(and I couldn't find a key from setuptabulate that changes the width of the 
table)

Patrick

___
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] \startnarrower and TABLEs

2010-09-23 Thread Wolfgang Schuster

Am 23.09.2010 um 10:48 schrieb Patrick Gundlach:

 Hello Wolfgang,
 
 
 
 Use the “textwidth” key but keep in mind with the linecorrection you can
 use split tables, for tables which use indent from \startnarrower and
 split across pages you can use tabulate.
 
 I am afraid I don't get the full meaning of your answer. When I use tabulate, 
 I have exactly the same problem as I have with TABLEs:

Sorry but i don’t know what you mean, in my example the tabulate has the same
width as the text in the narrower environment.

\starttext

\input knuth

\startnarrower

\input knuth

\starttabulate[|p|p|]
\NC \input ward \NC \input zapf \NC\NR
\stoptabulate

\stopnarrower

\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] \startnarrower and TABLEs

2010-09-23 Thread Patrick Gundlach
Hello Wolfgang,

 Sorry but i don’t know what you mean, in my example the tabulate has the same
 width as the text in the narrower environment.

Insert an \HL and you'll see that this a bit strange.

 
 \starttext
 
 \input knuth
 
 \startnarrower
 
 \input knuth
 
 \starttabulate[|p|p|]

\HL

 \NC \input ward \NC \input zapf \NC\NR
 \stoptabulate
 
 \stopnarrower
 
 \stoptext

Patrick

___
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] \startnarrower and TABLEs

2010-09-23 Thread Wolfgang Schuster

Am 23.09.2010 um 11:00 schrieb Patrick Gundlach:

 Hello Wolfgang,
 
 Sorry but i don’t know what you mean, in my example the tabulate has the same
 width as the text in the narrower environment.
 
 Insert an \HL and you'll see that this a bit strange.

You can use \HR, it has more spacing before and after the line
but it works correct in narrower text and itemize.

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] Lua:mplib

2010-09-23 Thread Hans Hagen

On 23-9-2010 10:35, Procházka Lukáš wrote:

Thanks for the answers to all...

It seems that I'm trying to do similar things as someone else was trying
before -

- use of context.MPdrawing() looks best at the moment. Maybe it will
become deprecated as soon as Lua involves MP.


it is unlikely to become deprecated

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] \startnarrower and TABLEs

2010-09-23 Thread Patrick Gundlach


 You can use \HR, it has more spacing before and after the line
 but it works correct in narrower text and itemize.


Sorry for the stupid question, but how do I use \HR?

\starttabulate[|p|p|]
\HR
\NC \input ward \NC \input zapf \NC\NR
\HR
\stoptabulate


gives me a misplaced noalign.

Patrick

___
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] \startnarrower and TABLEs

2010-09-23 Thread Wolfgang Schuster

Am 23.09.2010 um 11:27 schrieb Patrick Gundlach:

 You can use \HR, it has more spacing before and after the line
 but it works correct in narrower text and itemize.
 
 
 Sorry for the stupid question, but how do I use \HR?
 
 \starttabulate[|p|p|]
 \HR
 \NC \input ward \NC \input zapf \NC\NR
 \HR
 \stoptabulate
 
 
 gives me a misplaced noalign.

Make a bug report, your example works with mkii but fails with mkiv.

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] A rose by any other name ....

2010-09-23 Thread Wolfgang Schuster

Am 16.09.2010 um 00:34 schrieb Aditya Mahajan:

 Hi,
 
 Is it possible to change the name of the font as it appears in the pdf file?
 
 More specifically, I am using Termes font, but I want that the document 
 properties to show the name of the font as Times. Is that possible? Is doing 
 so a violation of the font license?

Taco showed at the conference a way to modify the values of a font and i think 
you can use this.

A easier solution is to use the real Times fonts instead of the TeX Gyre 
version, Times New Roman is available as part of the basic web fonts and AFAIR 
many linux distros provide a mechanism to download them.

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] [OT] ghostscript 9.00

2010-09-23 Thread luigi scarso
http://ghostscript.com/releases/

Not so OT, btw: it's interesting for its support of Color Management.
-- 
luigi
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Lettrines in MkIV

2010-09-23 Thread Philipp Gesang
On 2010-09-21 21:47:35, Hans Hagen wrote:
 On 21-9-2010 8:39, Philipp Gesang wrote:
 
 * Can be circumvented via “\dontleavehmode”.

 Alan ran into this at the ctx conference and it is under investigation.

Hi,

in case this helps with debugging: you can’t work around the
issue by means of “\dontleavehmode” if you set up the paragraph 
auto-indentation to “yes,medium”:

8···
\setupindenting[yes,medium] % comment this out and it works again
\usemodule[lettrine]
\starttext

\chapter{Some Section}
\startparagraph
\dontleavehmode\lettrine{D}{on Knuth asserts:}
\input knuth
\stopparagraph

\stoptext
8···

This results, again, in the glue node error.

Philipp


-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments


pgpNSJ6p4mvQP.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] [OT] ghostscript 9.00

2010-09-23 Thread luigi scarso
On Thu, Sep 23, 2010 at 1:57 PM, luigi scarso luigi.sca...@gmail.com wrote:
 http://ghostscript.com/releases/

 Not so OT, btw: it's interesting for its support of Color Management.
It fails on mk.pdf


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

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


Re: [NTG-context] export

2010-09-23 Thread Vyatcheslav Yatskovsky

Please tell an (really) unlucky person who didn't visited the
conference (like me), what \setupbackeds[export=yes] should do at all?


You get the contents of your (well-structured) ConTeXt document as XML
ouput, extension .export, intended for tagged PDF use (e.g. PDF/A),
but of course usable for XML transformations.


Thank you, Hraban! Wikified, please check at
http://wiki.contextgarden.net/Reference/en/setupbackeds

--
Best Regards,
Vyatcheslav Yatskovsky
___
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] export

2010-09-23 Thread Cedric Mauclair
Hi,

There is a typo in the link: it should be setupbackends and not
setupbackeds. The command is fine though.

Regards.

-- Cédric



On Thu, Sep 23, 2010 at 15:00, Vyatcheslav Yatskovsky
yatskov...@gmail.com wrote:
 Please tell an (really) unlucky person who didn't visited the
 conference (like me), what \setupbackeds[export=yes] should do at all?

 You get the contents of your (well-structured) ConTeXt document as XML
 ouput, extension .export, intended for tagged PDF use (e.g. PDF/A),
 but of course usable for XML transformations.

 Thank you, Hraban! Wikified, please check at
 http://wiki.contextgarden.net/Reference/en/setupbackeds

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

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

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

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


Re: [NTG-context] Lettrines in MkIV

2010-09-23 Thread Hans Hagen

On 23-9-2010 2:32, Philipp Gesang wrote:

On 2010-09-2121:47:35, Hans Hagen wrote:

On 21-9-2010 8:39, Philipp Gesang wrote:


* Can be circumvented via “\dontleavehmode”.



Alan ran into this at the ctx conference and it is under investigation.


Hi,

in case this helps with debugging: you can’t work around the
issue by means of “\dontleavehmode” if you set up the paragraph
auto-indentation to “yes,medium”:

8···
\setupindenting[yes,medium] % comment this out and it works again
\usemodule[lettrine]
\starttext

\chapter{Some Section}
\startparagraph
\dontleavehmode\lettrine{D}{on Knuth asserts:}
\input knuth
\stopparagraph

\stoptext
8···

This results, again, in the glue node error.


we know and we will take a look at it next week (as it takes some time 
to nail down node allocation bugs)


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] export

2010-09-23 Thread Jelle Huisman

On 22/09/10 06:45, Hans Hagen wrote:


\setupbackeds[export=yes]

You will also get a file called jobname.export which represents the
document in xml format. You can postprocess such an export to for
instance html. It's still somewhat experimental but also fun.



Hi Hans,

Thanks! this is a useful step in the direction of ctx2odt support. Are 
you planning to provide (basic) (x)html export too? (I'm thinking about 
this workflow: write in ctx - make pdf/make html - open html in 
OpenOffice - save as odt/doc.)


Jelle
___
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] export

2010-09-23 Thread Hans Hagen

On 23-9-2010 3:55, Jelle Huisman wrote:

On 22/09/10 06:45, Hans Hagen wrote:


\setupbackeds[export=yes]

You will also get a file called jobname.export which represents the
document in xml format. You can postprocess such an export to for
instance html. It's still somewhat experimental but also fun.



Hi Hans,

Thanks! this is a useful step in the direction of ctx2odt support. Are
you planning to provide (basic) (x)html export too? (I'm thinking about
this workflow: write in ctx - make pdf/make html - open html in
OpenOffice - save as odt/doc.)


As xhtml is just xml converted to other tags, I suppose that at some day 
there will be additional converters. I would only come up with one in 
the perspective of a project as I have no need for it.


Hans

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

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


Re: [NTG-context] A rose by any other name ....

2010-09-23 Thread Aditya Mahajan

On Thu, 23 Sep 2010, Wolfgang Schuster wrote:



Am 16.09.2010 um 00:34 schrieb Aditya Mahajan:


Hi,

Is it possible to change the name of the font as it appears in the pdf file?

More specifically, I am using Termes font, but I want that the document 
properties to show the name of the font as Times. Is that possible? Is doing so 
a violation of the font license?


Taco showed at the conference a way to modify the values of a font and i think 
you can use this.


Are the reference slides or code available. I could not find any in the 
context meeting slides.


A easier solution is to use the real Times fonts instead of the TeX Gyre 
version, Times New Roman is available as part of the basic web fonts and 
AFAIR many linux distros provide a mechanism to download them.


Of course. I don't know why this did not occur to me.

(but ... TNR is not real Times but no one cares for that)

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

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


Re: [NTG-context] export

2010-09-23 Thread Aditya Mahajan

On Thu, 23 Sep 2010, Hans Hagen wrote:


On 23-9-2010 3:55, Jelle Huisman wrote:

On 22/09/10 06:45, Hans Hagen wrote:


\setupbackeds[export=yes]

You will also get a file called jobname.export which represents the
document in xml format. You can postprocess such an export to for
instance html. It's still somewhat experimental but also fun.



Hi Hans,

Thanks! this is a useful step in the direction of ctx2odt support. Are
you planning to provide (basic) (x)html export too? (I'm thinking about
this workflow: write in ctx - make pdf/make html - open html in
OpenOffice - save as odt/doc.)


As xhtml is just xml converted to other tags, I suppose that at some day 
there will be additional converters. I would only come up with one in the 
perspective of a project as I have no need for it.


There cannot be a universal one-to-one mapping between context generate 
xml and xhtml. For example, in a book, I may want \chapter to map to h1 
while in an article, I may want \section to map to h1. Nonetheless, 
having a specialized xml to xhtml converter should not be too difficult 
(using the verbose XSLT transformations). Targetting html5 is another 
option.


On the otherhand, a ConTeXt module that can read context generated xml 
will be nice... then the context xml can be the target input form for an 
automated tool trying to generate context source.


Aditya

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

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


Re: [NTG-context] export

2010-09-23 Thread Hans Hagen

On 23-9-2010 5:01, Aditya Mahajan wrote:

On Thu, 23 Sep 2010, Hans Hagen wrote:


On 23-9-2010 3:55, Jelle Huisman wrote:

On 22/09/10 06:45, Hans Hagen wrote:


\setupbackeds[export=yes]

You will also get a file called jobname.export which represents the
document in xml format. You can postprocess such an export to for
instance html. It's still somewhat experimental but also fun.



Hi Hans,

Thanks! this is a useful step in the direction of ctx2odt support. Are
you planning to provide (basic) (x)html export too? (I'm thinking about
this workflow: write in ctx - make pdf/make html - open html in
OpenOffice - save as odt/doc.)


As xhtml is just xml converted to other tags, I suppose that at some
day there will be additional converters. I would only come up with one
in the perspective of a project as I have no need for it.


There cannot be a universal one-to-one mapping between context generate
xml and xhtml. For example, in a book, I may want \chapter to map to
h1 while in an article, I may want \section to map to h1.
Nonetheless, having a specialized xml to xhtml converter should not be
too difficult (using the verbose XSLT transformations). Targetting html5
is another option.


indeed


On the otherhand, a ConTeXt module that can read context generated xml
will be nice... then the context xml can be the target input form for an
automated tool trying to generate context source.


it's on my list to make such a roundtrip style

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] export

2010-09-23 Thread Jelle Huisman

On 23/09/10 11:12, Hans Hagen wrote:


As xhtml is just xml converted to other tags, I suppose that at some
day there will be additional converters. I would only come up with one
in the perspective of a project as I have no need for it.


There cannot be a universal one-to-one mapping between context generate
xml and xhtml. For example, in a book, I may want \chapter to map to
h1 while in an article, I may want \section to map to h1.
Nonetheless, having a specialized xml to xhtml converter should not be
too difficult (using the verbose XSLT transformations). Targetting html5
is another option.


indeed


Sounds like it's time to learn some xslt ;-)

Jelle
___
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] Lettrines in MkIV

2010-09-23 Thread Alan BRASLAU
On Thursday 23 September 2010 15:49:07 Hans Hagen wrote:
 
 we know and we will take a look at it next week (as it takes some time
 to nail down node allocation bugs)
 

As Hans indicated, he is aware of the problem with the lettrine module
and will fix it. In the meantime, you can get by using simply:

%\usemodule [lettrine]
% broken, so let's fake it:
\def\lettrine#1#2{{\tfc #1}#2}

Of course, this is no good for production, but it is a simple
solution if you are working on drafts.

Alan

P.S. Those who were at Brejlov will remember that a
solution is something that is all mixed-up!
___
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] A rose by any other name ....

2010-09-23 Thread Khaled Hosny
On Thu, Sep 23, 2010 at 10:51:58AM -0400, Aditya Mahajan wrote:
 On Thu, 23 Sep 2010, Wolfgang Schuster wrote:
 
 
 Am 16.09.2010 um 00:34 schrieb Aditya Mahajan:
 
 Hi,
 
 Is it possible to change the name of the font as it appears in the pdf file?
 
 More specifically, I am using Termes font, but I want that the document 
 properties to show the name of the font as Times. Is that possible? Is 
 doing so a violation of the font license?
 
 Taco showed at the conference a way to modify the values of a font and i 
 think you can use this.
 
 Are the reference slides or code available. I could not find any in
 the context meeting slides.
 
 A easier solution is to use the real Times fonts instead of the
 TeX Gyre version, Times New Roman is available as part of the
 basic web fonts and AFAIR many linux distros provide a mechanism
 to download them.
 
 Of course. I don't know why this did not occur to me.
 
 (but ... TNR is not real Times but no one cares for that)

Actually it is the real times, but Linotype registered the name Times
Roman in USA before Monotype (the designers of the font) and Monotype
had to use Times New Roman instead.

Regards,
 Khaled

-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] A rose by any other name ....

2010-09-23 Thread William Adams
On Sep 23, 2010, at 10:51 AM, Aditya Mahajan wrote:

 (but ... TNR is not real Times but no one cares for that)

Actually, it is the original.

See Walter Tracy's wonderful book _Letters of Credit_ for one view of the 
details, and a follow-up article published in the APHA journal for the balance 
of the story.

William

-- 
William Adams
senior graphic designer
Fry Communications
Sphinx of black quartz, judge my vow.

___
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] Lettrines in MkIV

2010-09-23 Thread Aditya Mahajan

On Thu, 23 Sep 2010, Alan BRASLAU wrote:


On Thursday 23 September 2010 15:49:07 Hans Hagen wrote:


we know and we will take a look at it next week (as it takes some time
to nail down node allocation bugs)



As Hans indicated, he is aware of the problem with the lettrine module
and will fix it. In the meantime, you can get by using simply:

%\usemodule [lettrine]
% broken, so let's fake it:
\def\lettrine#1#2{{\tfc #1}#2}

Of course, this is no good for production, but it is a simple
solution if you are working on drafts.


Isn't it better to use initials? This is what one of setups has

\definehead[initialtitle][title]

\setuphead[initialtitle]
  [after=\placeinitial]

\definefontsynonym[initial][name:fontin]

\setupinitial
  [   state=start,
  n=3,
   distance=-.1pc,
  ]

And then I can simply use

\initialtitle {Don Knuth said}

\input knuth

Aditya

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

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


Re: [NTG-context] A rose by any other name ....

2010-09-23 Thread Aditya Mahajan

On Thu, 23 Sep 2010, William Adams wrote:


On Sep 23, 2010, at 10:51 AM, Aditya Mahajan wrote:


(but ... TNR is not real Times but no one cares for that)


Actually, it is the original.

See Walter Tracy's wonderful book _Letters of Credit_ for one view of the 
details, and a follow-up article published in the APHA journal for the balance 
of the story.


William and Khaled, thanks. I did not know this. Most interesting.

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

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


Re: [NTG-context] Lettrines in MkIV

2010-09-23 Thread Alan BRASLAU
On Thursday 23 September 2010 18:24:05 Aditya Mahajan wrote:
 On Thu, 23 Sep 2010, Alan BRASLAU wrote:
  On Thursday 23 September 2010 15:49:07 Hans Hagen wrote:
  we know and we will take a look at it next week (as it takes some time
  to nail down node allocation bugs)
  
  As Hans indicated, he is aware of the problem with the lettrine module
  and will fix it. In the meantime, you can get by using simply:
  
  %\usemodule [lettrine]
  % broken, so let's fake it:
  \def\lettrine#1#2{{\tfc #1}#2}
  
  Of course, this is no good for production, but it is a simple
  solution if you are working on drafts.
 
 Isn't it better to use initials? This is what one of setups has
 
 \definehead[initialtitle][title]
 
 \setuphead[initialtitle]
[after=\placeinitial]
 
 \definefontsynonym[initial][name:fontin]
 
 \setupinitial
[   state=start,
n=3,
 distance=-.1pc,
]
 
 And then I can simply use
 
 \initialtitle {Don Knuth said}
 
 \input knuth
 
 Aditya

I don't think that it is the same thing, but I do not understand
your example. Did you try running it? 

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

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


[NTG-context] Wikifying: footnotes in margin - two questions

2010-09-23 Thread Elias Oltmanns
Hi all,

when Hans introduced the criterium option to \setupnote in recent betas
of MkIV, he asked me to wikify the problem of typesetting footnotes in
the margin in order to demonstrate the usage of that option. There are,
however, two questions I'd like to settle first. For one thing, the new
algorithm is still error prone as I can provide examples where it fails.
What is the preferred way to point out such a problem (in the wiki or
whereever), so it will be delt with eventually? Secondly, can someone
please explain to me why the example below produces so strikingly
different results when processed with MkII or MkIV? In particular, I'd
like to know why the footnote numbers are placed differently and, unless
this is due to a bug, how to mimic the MkII behaviour in MkIV.

Thanks in advance,

Elias


\setuplayout[backspace=6cm,width=middle,rightmarginwidth=4cm,
  rightmargindistance=5mm]

\doifelse{MKIV}{\contextmark}{
  \setupnote[footnote][location=text,criterium=page,
before=,rule=off]}{
  \setupnote[footnote][factor=0,before=,rule=off,
width=\rightmarginwidth]}

\setuptexttexts[margin][][
  \vbox to \textheight {\vfill\placenotes[footnote]}]

\starttext

\showframe

\dorecurse{12}{A little more test\footnote{Note the alignment of
consecutive lines.} text in order to achieve a certain filling of
  the page. }

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


[NTG-context] Info about creating modules for beginners.

2010-09-23 Thread Jaroslav Hajtmar

Hello, masters ...
I would like create my first context mkiv module.
Can someone please steer me what the first study and where to find some 
good advice for beginners?
Appropriate would be also a simple module, which was easy to read and 
find out how to do everything correctly.


Thanx Jaroslav


___
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] Lettrines in MkIV

2010-09-23 Thread Aditya Mahajan

On Thu, 23 Sep 2010, Alan BRASLAU wrote:


On Thursday 23 September 2010 18:24:05 Aditya Mahajan wrote:

On Thu, 23 Sep 2010, Alan BRASLAU wrote:

On Thursday 23 September 2010 15:49:07 Hans Hagen wrote:

we know and we will take a look at it next week (as it takes some time
to nail down node allocation bugs)


As Hans indicated, he is aware of the problem with the lettrine module
and will fix it. In the meantime, you can get by using simply:

%\usemodule [lettrine]
% broken, so let's fake it:
\def\lettrine#1#2{{\tfc #1}#2}

Of course, this is no good for production, but it is a simple
solution if you are working on drafts.


Isn't it better to use initials? This is what one of setups has

\definehead[initialtitle][title]

\setuphead[initialtitle]
   [after=\placeinitial]

\definefontsynonym[initial][name:fontin]

\setupinitial
   [   state=start,
   n=3,
distance=-.1pc,
   ]

And then I can simply use

\initialtitle {Don Knuth said}

\input knuth

Aditya


I don't think that it is the same thing, but I do not understand
your example. Did you try running it?


Sorry... \placeinitial gobbles \input but here is a standalone 
example:


\setupinitial
  [   state=start,
  n=3,
   distance=-.1pc,
  ]

\starttext

\placeinitial This is what Knuth said: \input knuth

\stoptext


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

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


Re: [NTG-context] Lettrines in MkIV

2010-09-23 Thread Alan BRASLAU
On Thursday 23 September 2010 18:46:00 you wrote:
 
 Sorry... \placeinitial gobbles \input but here is a standalone
 example:
 
 \setupinitial
[   state=start,
n=3,
 distance=-.1pc,
]
 
 \starttext
 
 \placeinitial This is what Knuth said: \input knuth
 
 \stoptext
 

I didn't know about initial...

%D \macros
%D   {setupinitial,placeinitial,checkinitial}
%D
%D {\em To be documented.}

Indeed!


Nice, I would like to use something like this,
even setting it up to be automatic at the beginning
of chapters, for example.

But it does not quite work as lettrines.
In a silly language such as French, the following fails:

\placeinitial L'objet de cette commande\dots

as one needs:

\lettrine{L'}{objet} de cette commande\dots

Other heuristics might apply in different cases.

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

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


Re: [NTG-context] export

2010-09-23 Thread Peter Münster
On Thu, Sep 23 2010, Cedric Mauclair wrote:
 
 There is a typo in the link: it should be setupbackends and not
 setupbackeds. The command is fine though.

All right, yet another redirect:
http://wiki.contextgarden.net/Reference/en/setupbackends ;))

Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/


___
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] Lettrines in MkIV

2010-09-23 Thread Aditya Mahajan

On Thu, 23 Sep 2010, Alan BRASLAU wrote:


On Thursday 23 September 2010 18:46:00 you wrote:


Sorry... \placeinitial gobbles \input but here is a standalone
example:

\setupinitial
   [   state=start,
   n=3,
distance=-.1pc,
   ]

\starttext

\placeinitial This is what Knuth said: \input knuth

\stoptext



I didn't know about initial...

%D \macros
%D   {setupinitial,placeinitial,checkinitial}
%D
%D {\em To be documented.}

Indeed!


So you do not consider the source itself as the documentation :)


Nice, I would like to use something like this,
even setting it up to be automatic at the beginning
of chapters, for example.


The example that I showed earlier did that. Essentially, just use

\setuphead[chapter][after=\placeinitial]


But it does not quite work as lettrines.


Indeed. Otherwise, there would no need for a separate module. Actually, it 
will be nice if the functionality of lettrine can be merged with 
\placeintial.



In a silly language such as French, the following fails:

\placeinitial L'objet de cette commande\dots

as one needs:

\lettrine{L'}{objet} de cette commande\dots

Other heuristics might apply in different cases.


And there are sentences starting with quotations, etc.

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

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


Re: [NTG-context] Lettrines in MkIV

2010-09-23 Thread Philipp Gesang
On 2010-09-23 12:24:05, Aditya Mahajan wrote:
 On Thu, 23 Sep 2010, Alan BRASLAU wrote:
 
 On Thursday 23 September 2010 15:49:07 Hans Hagen wrote:
 
 we know and we will take a look at it next week (as it takes some time
 to nail down node allocation bugs)
 
 
 As Hans indicated, he is aware of the problem with the lettrine module
 and will fix it. In the meantime, you can get by using simply:
 
 %\usemodule [lettrine]
 % broken, so let's fake it:
 \def\lettrine#1#2{{\tfc #1}#2}
 
 Of course, this is no good for production, but it is a simple
 solution if you are working on drafts.
 
 Isn't it better to use initials? This is what one of setups has
 
 \definehead[initialtitle][title]
 
 \setuphead[initialtitle]
   [after=\placeinitial]
 
 \definefontsynonym[initial][name:fontin]
 
 \setupinitial
   [   state=start,
   n=3,
distance=-.1pc,
   ]
 
 And then I can simply use
 
 \initialtitle {Don Knuth said}
 
 \input knuth

Dear Alan, Aditya, and everybody else,

thanks for your efforts, but I’m afraid that you were being
mislead about my intentions.

I am (probably mis-)using the lettrine module in order to fake the
Knuthian \danger and \ddanger macros in auto-generated context
code. One of the main goals is, other than pure convenience on my
part, that understanding of the resulting code requires only
knowledge of high-level context macros, not of high-level tex
wizardry. Of course I could start with texbook, p. 419, and try
to adapt it to context (seems to be non-trivial), but even if I
should succeed, the effort necessary to understand what’s going
on is huge compared to when using a well-known and
well-documented module.

That’s why I rather do without autoindentation, as it concerns
only the layout of the manual, not the code itself.

@Aditya, I couldn’t get your code to work, neither in mkii nor in
mkiv. Anyways, I wasn’t aware of \setup/placeinitial before so I
learned something new today.

Philipp


-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments


pgp8e2TkCS6Ce.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] Lettrines in MkIV

2010-09-23 Thread Alan BRASLAU
On Thursday 23 September 2010 19:38:46 Aditya Mahajan wrote:
  
  %D \macros
  %D   {setupinitial,placeinitial,checkinitial}
  %D
  %D {\em To be documented.}
  
  Indeed!
 
 So you do not consider the source itself as the documentation :)
 

Copied verbatum!

I (still) read documentation better than source code,
although I am learning how to read \TeX macros and now
even lua functions. I am also supposed to work on
*writing* the documentation!

  But it does not quite work as lettrines.
 
 Indeed. Otherwise, there would no need for a separate module. Actually, it
 will be nice if the functionality of lettrine can be merged with
 \placeintial.

Would be very nice. Do you have good ideas about how to better parse
the beginning of text? One needs to be clever.

  \lettrine{L'}{objet} de cette commande\dots
  
  Other heuristics might apply in different cases.
 
 And there are sentences starting with quotations, etc.

As in:

\quote{The rain in Spain...}

Maybe others on the mailing list can suggest many particular cases.

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

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


Re: [NTG-context] export

2010-09-23 Thread Steffen Wolfrum

Am 23.09.2010 um 17:12 schrieb Hans Hagen:

 On 23-9-2010 5:01, Aditya Mahajan wrote:
 On Thu, 23 Sep 2010, Hans Hagen wrote:
 
 On 23-9-2010 3:55, Jelle Huisman wrote:
 On 22/09/10 06:45, Hans Hagen wrote:
 
 \setupbackeds[export=yes]
 
 You will also get a file called jobname.export which represents the
 document in xml format. You can postprocess such an export to for
 instance html. It's still somewhat experimental but also fun.
 
 
 Hi Hans,
 
 Thanks! this is a useful step in the direction of ctx2odt support. Are
 you planning to provide (basic) (x)html export too? (I'm thinking about
 this workflow: write in ctx - make pdf/make html - open html in
 OpenOffice - save as odt/doc.)
 
 As xhtml is just xml converted to other tags, I suppose that at some
 day there will be additional converters. I would only come up with one
 in the perspective of a project as I have no need for it.
 
 There cannot be a universal one-to-one mapping between context generate
 xml and xhtml. For example, in a book, I may want \chapter to map to
 h1 while in an article, I may want \section to map to h1.
 Nonetheless, having a specialized xml to xhtml converter should not be
 too difficult (using the verbose XSLT transformations). Targetting html5
 is another option.
 
 indeed
 
 On the otherhand, a ConTeXt module that can read context generated xml
 will be nice... then the context xml can be the target input form for an
 automated tool trying to generate context source.
 
 it's on my list to make such a roundtrip style



=:o)


st.
___
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] Info about creating modules for beginners.

2010-09-23 Thread Hans Hagen

On 23-9-2010 6:35, Jaroslav Hajtmar wrote:

Hello, masters ...
I would like create my first context mkiv module.
Can someone please steer me what the first study and where to find some
good advice for beginners?
Appropriate would be also a simple module, which was easy to read and
find out how to do everything correctly.


just take a look at wolfgang's ... they use the latest mkiv abstractions 
(module namespaces etc, something that Wolfgang, Aditya and I are 
working on).


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] Info about creating modules for beginners.

2010-09-23 Thread Steffen Wolfrum

Am 23.09.2010 um 22:32 schrieb Hans Hagen:

 On 23-9-2010 6:35, Jaroslav Hajtmar wrote:
 Hello, masters ...
 I would like create my first context mkiv module.
 Can someone please steer me what the first study and where to find some
 good advice for beginners?
 Appropriate would be also a simple module, which was easy to read and
 find out how to do everything correctly.
 
 just take a look at wolfgang's ... they use the latest mkiv abstractions 
 (module namespaces etc, something that Wolfgang, Aditya and I are working on).


btw: modules are used to be stored eg. in 
~/context/tex/texmf-local/tex/context/third/ folder.

is is also possible to keep/find them not in texfm tree but in a projects 
folder? 
or do I have to use for this purpose environment files?


steffen

___
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] Info about creating modules for beginners.

2010-09-23 Thread Wolfgang Schuster

Am 23.09.2010 um 22:32 schrieb Hans Hagen:

 On 23-9-2010 6:35, Jaroslav Hajtmar wrote:
 Hello, masters ...
 I would like create my first context mkiv module.
 Can someone please steer me what the first study and where to find some
 good advice for beginners?
 Appropriate would be also a simple module, which was easy to read and
 find out how to do everything correctly.
 
 just take a look at wolfgang's ... they use the latest mkiv abstractions 
 (module namespaces etc, something that Wolfgang, Aditya and I are working on).

fancybreak [1] is at the moment the only module with all these things but the 
other will follow

[1] http://bitbucket.org/wolfs/fancybreak/src/tip/files/

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] Info about creating modules for beginners.

2010-09-23 Thread Wolfgang Schuster

Am 23.09.2010 um 22:42 schrieb Steffen Wolfrum:

 btw: modules are used to be stored eg. in 
 ~/context/tex/texmf-local/tex/context/third/ folder.
 
 is is also possible to keep/find them not in texfm tree but in a projects 
 folder? 
 or do I have to use for this purpose environment files?

You can put modules in your project folder and these are always loaded before 
the files in the tex tree.

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] Info about creating modules for beginners.

2010-09-23 Thread Steffen Wolfrum

Am 23.09.2010 um 22:47 schrieb Wolfgang Schuster:

 
 Am 23.09.2010 um 22:42 schrieb Steffen Wolfrum:
 
 btw: modules are used to be stored eg. in 
 ~/context/tex/texmf-local/tex/context/third/ folder.
 
 is is also possible to keep/find them not in texfm tree but in a projects 
 folder? 
 or do I have to use for this purpose environment files?
 
 You can put modules in your project folder and these are always loaded before 
 the files in the tex tree.


Sounds good, but ...

For example I have in a project's folder a project_test file with these line:

\environment Style_Test
\usemodule[p-my-test]

Both files (Style_Test.tex and p-my-test.tex are stored next to 
project_test.tex in the project's folder).
The environment file is found without problems ... even when I change the 
file's name between two runs.

The module is never found.

What is missing?

Steffen


___
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] Info about creating modules for beginners.

2010-09-23 Thread Hans Hagen

On 23-9-2010 11:08, Steffen Wolfrum wrote:


Am 23.09.2010 um 22:47 schrieb Wolfgang Schuster:



Am 23.09.2010 um 22:42 schrieb Steffen Wolfrum:


btw: modules are used to be stored eg. in 
~/context/tex/texmf-local/tex/context/third/ folder.

is is also possible to keep/find them not in texfm tree but in a projects 
folder?
or do I have to use for this purpose environment files?


You can put modules in your project folder and these are always loaded before 
the files in the tex tree.



Sounds good, but ...

For example I have in a project's folder a project_test file with these line:

\environment Style_Test
\usemodule[p-my-test]

Both files (Style_Test.tex and p-my-test.tex are stored next to 
project_test.tex in the project's folder).
The environment file is found without problems ... even when I change the 
file's name between two runs.

The module is never found.


\usemodule[p][my-test]

-
  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] Info about creating modules for beginners.

2010-09-23 Thread Wolfgang Schuster

Am 23.09.2010 um 23:08 schrieb Steffen Wolfrum:

 btw: modules are used to be stored eg. in 
 ~/context/tex/texmf-local/tex/context/third/ folder.
 
 is is also possible to keep/find them not in texfm tree but in a projects 
 folder? 
 or do I have to use for this purpose environment files?
 
 You can put modules in your project folder and these are always loaded 
 before the files in the tex tree.
 
 
 Sounds good, but ...
 
 For example I have in a project's folder a project_test file with these line:
 
 \environment Style_Test
 \usemodule[p-my-test]
 
 Both files (Style_Test.tex and p-my-test.tex are stored next to 
 project_test.tex in the project's folder).
 The environment file is found without problems ... even when I change the 
 file's name between two runs.
 
 The module is never found.
 
 What is missing?

Can you give more information or a example, you don’t mention which file you 
process and what’s loaded in them.

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] Info about creating modules for beginners.

2010-09-23 Thread Aditya Mahajan

On Thu, 23 Sep 2010, Steffen Wolfrum wrote:



Am 23.09.2010 um 22:47 schrieb Wolfgang Schuster:



Am 23.09.2010 um 22:42 schrieb Steffen Wolfrum:


btw: modules are used to be stored eg. in 
~/context/tex/texmf-local/tex/context/third/ folder.

is is also possible to keep/find them not in texfm tree but in a projects 
folder?
or do I have to use for this purpose environment files?


You can put modules in your project folder and these are always loaded before 
the files in the tex tree.



Sounds good, but ...

For example I have in a project's folder a project_test file with these line:

\environment Style_Test
\usemodule[p-my-test]

Both files (Style_Test.tex and p-my-test.tex are stored next to 
project_test.tex in the project's folder).
The environment file is found without problems ... even when I change the 
file's name between two runs.

The module is never found.

What is missing?


Module lookups do not search in the parent or grand parent directories.

One alternative is to always run files from the top project folder:

   context dir/dir/file

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

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


Re: [NTG-context] Info about creating modules for beginners.

2010-09-23 Thread Aditya Mahajan

On Thu, 23 Sep 2010, Wolfgang Schuster wrote:


Can you give more information or a example, you don’t mention which file you 
process and what’s loaded in them.


Consider a simple setup:

root-dir/
 p-module.tex
 env-file.tex
 project-file.tex
 subdir/
component-file1.tex
component-file2.tex


Suppose the component-file1 file says

   \environment env-file

while component-file2 says

   \usemodule[p][module]

If I run everything from the root directory, then both component1 and 
component2 compile fine. On the other hand if I run everything from the 
subdir, then component1 compiles fine, but component2 will fail to load 
the module.


Basically, module search does not look in parent directories.

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

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


Re: [NTG-context] Info about creating modules for beginners.

2010-09-23 Thread Steffen Wolfrum

Am 23.09.2010 um 23:17 schrieb Aditya Mahajan:

 On Thu, 23 Sep 2010, Steffen Wolfrum wrote:
 
 
 Am 23.09.2010 um 22:47 schrieb Wolfgang Schuster:
 
 
 Am 23.09.2010 um 22:42 schrieb Steffen Wolfrum:
 
 btw: modules are used to be stored eg. in 
 ~/context/tex/texmf-local/tex/context/third/ folder.
 
 is is also possible to keep/find them not in texfm tree but in a projects 
 folder?
 or do I have to use for this purpose environment files?
 
 You can put modules in your project folder and these are always loaded 
 before the files in the tex tree.
 
 
 Sounds good, but ...
 
 For example I have in a project's folder a project_test file with these line:
 
 \environment Style_Test
 \usemodule[p-my-test]
 
 Both files (Style_Test.tex and p-my-test.tex are stored next to 
 project_test.tex in the project's folder).
 The environment file is found without problems ... even when I change the 
 file's name between two runs.
 
 The module is never found.
 
 What is missing?
 
 Module lookups do not search in the parent or grand parent directories.



I rather suspected that.

Steffen
___
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] Info about creating modules for beginners.

2010-09-23 Thread Steffen Wolfrum

Am 23.09.2010 um 23:15 schrieb Wolfgang Schuster:

 
 Am 23.09.2010 um 23:08 schrieb Steffen Wolfrum:
 
 btw: modules are used to be stored eg. in 
 ~/context/tex/texmf-local/tex/context/third/ folder.
 
 is is also possible to keep/find them not in texfm tree but in a projects 
 folder? 
 or do I have to use for this purpose environment files?
 
 You can put modules in your project folder and these are always loaded 
 before the files in the tex tree.
 
 
 Sounds good, but ...
 
 For example I have in a project's folder a project_test file with these line:
 
 \environment Style_Test
 \usemodule[p-my-test]
 
 Both files (Style_Test.tex and p-my-test.tex are stored next to 
 project_test.tex in the project's folder).
 The environment file is found without problems ... even when I change the 
 file's name between two runs.
 
 The module is never found.
 
 What is missing?
 
 Can you give more information or a example, you don’t mention which file you 
 process and what’s loaded in them.



It's like this (mapping context's recommended project structure):

project-dir/
p-module.tex
env-file.tex
project-file.tex
product-file.tex
subdir/
   component-file1.tex
   component-file2.tex

The project-file file says
  \environment Style_Test
  \usemodule[p][module]

Now I run from the subdir eg. component-file1.tex:
  the environment was loaded
  the module was not.


Steffen
___
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] Info about creating modules for beginners.

2010-09-23 Thread Jaroslav Hajtmar

Hello,
Thanks very much everyone for your advice, I am certainly now a better 
starting position ...

I will try to learn something ...

Maybe it sounds silly but at the very beginning I was surprised by the 
type of construction:


\def\ld{ld}
\def\ls{ls}

Where do I read about it more?

You have not  it easy with me, right? :-)
But luckily I learn fairly quickly :-)...

One more thanx - I appreciate your willingness...
Jarda

Dne 23.9.2010 23:30, Steffen Wolfrum napsal(a):

Am 23.09.2010 um 23:15 schrieb Wolfgang Schuster:

   

Am 23.09.2010 um 23:08 schrieb Steffen Wolfrum:

 

btw: modules are used to be stored eg. in 
~/context/tex/texmf-local/tex/context/third/ folder.

is is also possible to keep/find them not in texfm tree but in a projects 
folder?
or do I have to use for this purpose environment files?
   

You can put modules in your project folder and these are always loaded before 
the files in the tex tree.
 


Sounds good, but ...

For example I have in a project's folder a project_test file with these line:

\environment Style_Test
\usemodule[p-my-test]

Both files (Style_Test.tex and p-my-test.tex are stored next to 
project_test.tex in the project's folder).
The environment file is found without problems ... even when I change the 
file's name between two runs.

The module is never found.

What is missing?
   

Can you give more information or a example, you don’t mention which file you 
process and what’s loaded in them.
 



It's like this (mapping context's recommended project structure):

project-dir/
 p-module.tex
 env-file.tex
 project-file.tex
 product-file.tex
 subdir/
component-file1.tex
component-file2.tex

The project-file file says
   \environment Style_Test
   \usemodule[p][module]

Now I run from the subdir eg. component-file1.tex:
   the environment was loaded
   the module was not.


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

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

   


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

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


Re: [NTG-context] Info about creating modules for beginners.

2010-09-23 Thread Wolfgang Schuster

Am 23.09.2010 um 23:21 schrieb Aditya Mahajan:

 Basically, module search does not look in parent directories.

But you can use a construct like

\doifmodeelse{component}
  {\usemodule[module]}
  {\usemodule[../module]}

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] Info about creating modules for beginners.

2010-09-23 Thread Aditya Mahajan

On Thu, 23 Sep 2010, Wolfgang Schuster wrote:



Am 23.09.2010 um 23:21 schrieb Aditya Mahajan:


Basically, module search does not look in parent directories.


But you can use a construct like

\doifmodeelse{component}
 {\usemodule[module]}
 {\usemodule[../module]}


And if you are two directories deep for some components and one dir deep 
for others.


\environment \component etc use a heirarchical search. I think that 
\usemodule should also use that.


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

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


Re: [NTG-context] Info about creating modules for beginners.

2010-09-23 Thread Wolfgang Schuster

Am 23.09.2010 um 23:36 schrieb Jaroslav Hajtmar:

 Hello,
 Thanks very much everyone for your advice, I am certainly now a better 
 starting position ...
 I will try to learn something ...
 
 Maybe it sounds silly but at the very beginning I was surprised by the type 
 of construction:
 
 \def\ld{ld}
 \def\ls{ls}
 
 Where do I read about it more?

These are namespaces but you don't need these constructs anymore in mkiv 
because there is now a \definenamespace command which takes care of this.

You need a namespace when you use a setup command with key-value-pairs to have 
unique names for the keys.

BTW: The two letter namespaces are reserved for Hams and me but you’re free to 
use longer ones (we should collect them on a page at the wiki).

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] Info about creating modules for beginners.

2010-09-23 Thread Wolfgang Schuster

Am 23.09.2010 um 23:42 schrieb Aditya Mahajan:

 On Thu, 23 Sep 2010, Wolfgang Schuster wrote:
 
 
 Am 23.09.2010 um 23:21 schrieb Aditya Mahajan:
 
 Basically, module search does not look in parent directories.
 
 But you can use a construct like
 
 \doifmodeelse{component}
 {\usemodule[module]}
 {\usemodule[../module]}
 
 And if you are two directories deep for some components and one dir deep for 
 others.
 
 \environment \component etc use a heirarchical search. I think that 
 \usemodule should also use that.

And what’s with pictures, \setupexternalfigure[directory=...] has the same 
problem as \usemodule?

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
___