Re: [NTG-context] [t-vim] Line numbers

2011-02-23 Thread Marco
On 2011-02-22 Aditya Mahajan adit...@umich.edu wrote:

 Check the latest dev version of t-vim.
 https://github.com/adityam/filter/blob/dev/t-vim.tex

Brilliant. Works like a charm.

I stumbled over one thing: When set directory=tmp the temporary files are sent
to the tmp directory except the md5 hashes of external file code, these are
put in the working dir. Example:

%%% t.tex %%%

\usemodule [vim]
\definevimtyping [CON] [
 syntax=context,
  directory=tmp,
]

\starttext
\typeCONfile {t.tex}
\startCON
% empty
\stopCON
\stoptext

%

Is it possible to convince the context script to remove the temporary stuff
when called with the --purgeall option?

Thanks for your work.

Regards
Marco


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

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


Re: [NTG-context] attachment attaches twice - more research

2011-02-23 Thread Michail Vidiassov

Dear Hans,

On Mon, 21 Feb 2011, Hans Hagen wrote:

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)


to say the truth I do not understand what are you talking about :(
The issues I have in mind - separating global attachments and attachments 
linked to icons on pages, additional descriptions for attached files -

are addressed in the attached patches.
I am not sure about using attachment lebel as T key, that is indended for 
following:
The text label that shall be displayed in the title bar of the annotation’s 
pop-up window when open and active. This entry shall identify the user who 
added the annotation.

and shows as the upper line when mouse pointer is above attachment icon.
Did not try to have file size and time information added to file stream -
but it'd be nice to have.

Sincerely, Michail
PS. Patches show what I want done, not how it is to be done.
Just hope that my lua may be more clear than my English.--- back-ini.lua.org2011-02-16 01:53:17.0 +0300
+++ back-ini.lua2011-02-23 09:17:50.0 +0300
@@ -67,6 +67,7 @@
 registercomment= nothing,
 
 embedfile  = nothing,
+globattachfile = nothing,
 attachfile = nothing,
 attachmentid   = nothing,
 
--- scrn-int.mkiv.org   2011-01-31 13:26:23.0 +0300
+++ scrn-int.mkiv   2011-02-23 12:34:22.0 +0300
@@ -405,6 +405,25 @@
 % % \setupattachments[\c!symbol={symbol-normal,symbol-down}]
 %
 % \starttext \attachment[whatever] \stoptext
+%
+% \globattachment[test.tex]
+% \globattachment[description][test.tex]
+% \globattachment[description][newname.tex][test.tex]
+
+\def\globattachment
+  {\dotripleempty\doglobattachment}
+
+\def\doglobattachment[#1][#2][#3]% description newfilename filename
+  {\ifthirdargument
+ \dodoglobattachment{#1}{#2}{#3}%
+   \else\ifsecondargument
+ \dodoglobattachment{#1}{}{#2}%
+   \else
+ \dodoglobattachment{}{}{#1}%
+   \fi\fi}
+
+\def\dodoglobattachment#1#2#3% description newfilename filename
+  
{\ctxlua{backends.codeinjections.globattachfile{description=#1,newname=#2,filename=#3}}}
 
 \def\useattachment
   {\doquadrupleempty\douseattachment}
--- lpdf-wid.lua.org2011-02-08 22:41:44.0 +0300
+++ lpdf-wid.lua2011-02-23 12:27:53.0 +0300
@@ -160,14 +160,14 @@
 
 --
 
-local nofattachments, attachments, filestreams = 0, { }, { }
+local nofattachments, attachments, filestreams, globfilestreams = 0, { }, { }, 
{ }
 
 -- todo: hash and embed once
 
 local function flushembeddedfiles()
-if next(filestreams) then
+if next(globfilestreams) then
 local e = pdfarray()
-for name, reference in next, filestreams do
+for name, reference in next, globfilestreams do
 if reference then
 e[#e+1] = pdfstring(name)
 e[#e+1] = reference -- already a reference
@@ -181,7 +181,7 @@
 
 lpdf.registerdocumentfinalizer(flushembeddedfiles,embeddedfiles)
 
-function codeinjections.embedfile(filename)
+function codeinjections.embedfile(filename,newname,description)
 local r = filestreams[filename]
 if r == false then
 return nil
@@ -201,12 +201,28 @@
 UF   = pdfstring(newname or basename),
 EF   = pdfdictionary { F = pdfreference(f) },
 }
+if description then
+d[Desc] = pdfstring(description)
+end
 local r = pdfreference(pdfflushobject(d))
 filestreams[filename] = r
 return r
 end
 end
 
+function codeinjections.globattachfile(specification)
+local filename = specification.filename
+if not filename or filename ==  then
+-- todo: message
+return
+end
+local description = specification.description or 
+local newname = specification.newname or 
+if description ==  then description = nil end
+if newname ==  then newname = nil end
+globfilestreams[filename] = 
codeinjections.embedfile(filename,newname,description)
+end
+
 function codeinjections.attachfile(specification)
 local attachment = interactions.attachments.attachment(specification.label)
 if not attachment then
@@ -239,6 +255,7 @@
 AP   = appearance,
 OC   = analyzelayer(specification.layer),
 C= 
pdfcolorspec(specification.colormodel,specification.colorvalue),
+T= pdfstring(label),
 }
 -- as soon as we can ask for the dimensions of an xform we can
 -- use them here
___
If 

Re: [NTG-context] attachment attaches twice - more research

2011-02-23 Thread Hans Hagen

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


to say the truth I do not understand what are you talking about :(


Attachments have some history in pdf and each version was slightly 
different. The same is true for widgets. Some of that has to do with 
security issues, some with the fact that acrobat editing interfaces 
always lag behind new features, etc. I gave up on advanced stuff when I 
noticed that custom visualizations had changed again. I'll have look at 
it but not this week (away for a few days). I also need to it with Luigi 
as he often has torture tests laying around. We also need to keep the 
a/x standards in mind.


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

2011-02-23 Thread C.
Ok, that explains why context is literally ignoring the font. But will the
described procedure allow the usage like in the attached example? It's done
with latex and the minion package. Looks beautiful to me (except maybe some
small scaling issues with the big '(' ) Sorry for the crappy screenshot, the
64k-Limit blocked attaching the one page 200k PDF.

As a side note: Is mathdesign available for context? I remember reading
about it somewhere, but the third-party module site has nothing listed.
Also: the 64K-Limit is a pain in the ass. Had to try 4 times to get it out
:(
attachment: MnSymbol.png___
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] increase space on the left of pages included using \copypages

2011-02-23 Thread Curiouslearn
Anyone? If it cannot be done, I would appreciate if someone can say that. I

Thanks you.

On Tue, Feb 22, 2011 at 9:16 AM, Curiouslearn curiousle...@gmail.com wrote:
 Can someone please help me with this? I suppose I have not received an
 answer because there is no minimal example. I thought it would be
 straightforward for someone in the forum without seeing an example.

 Anyhow I have attached a pdf file (includethis.pdf) and a tex file in
 which I am trying to include pages from the pdf file. I want to
 increase the left side margin on the pages on which included file is
 present.

 Thank you in advance.

 On Mon, Feb 21, 2011 at 10:58 AM, Curiouslearn curiousle...@gmail.com wrote:
 Hello,

 I am trying to use the \copypages command to include a pdf file,
 say file3pages.pdf with three pages in my context
 document. First, I issued the command:

    \copypages[file3pages.pdf]

 The pages from file3pages.pdf are too close to the left
 margin. There is not enough white space on the left whereas,
 there is a lot of space on the right of the included pages. So, I tried

    \hskip 0.5in \copypages[file3pages.pdf]

 This creates appropriate space on the left of the included pages,
 but only for the first page of file3pages.pdf. The second and
 third pages of file3pages.pdf are the same as before (too close
 to the left margin).

 How can I apply \hskip 0.5in to each of the pages included from the
 file3pages.pdf.
 Can someone please suggest if there is a better way to
 increase the space on the left. Please note that the included
 pages do not respect the margins I have set for the document.

 Thanks a lot.


___
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] increase space on the left of pages included using \copypages

2011-02-23 Thread Hans Hagen

On 23-2-2011 12:11, Curiouslearn wrote:

Anyone? If it cannot be done, I would appreciate if someone can say that. I


i have no time now, but you can always do

\startTEXpage
\hskip1cm\externalfigure[...][page=1]
\stopTEXpage

-
  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] increase space on the left of pages included using \copypages

2011-02-23 Thread Curiouslearn
Thanks very much Hans. I suppose I will have to issue the command for
each page separately then (with possibly a loop). I was wondering if
there was an option in \copypages or some other command that applied
to each page of the PDF file. But having heard from you, now I know
there isn't. Thanks again. Context is really awesome.



On Wed, Feb 23, 2011 at 6:21 AM, Hans Hagen pra...@wxs.nl wrote:
 On 23-2-2011 12:11, Curiouslearn wrote:

 Anyone? If it cannot be done, I would appreciate if someone can say that.
 I

 i have no time now, but you can always do

 \startTEXpage
 \hskip1cm\externalfigure[...][page=1]
 \stopTEXpage

 -
                                          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] increase space on the left of pages included using \copypages

2011-02-23 Thread Thomas A. Schmitz
Curiouslearn (if you're older than 13 years, I'd appreciate a real name), 
it's not easy to see what you want to do. The included pages, like the document 
where you want to include them, are letter size. If you simply include them, 
they will take the entire width. The small margin left and big margin right are 
already in you includethis.pdf. If you want more margin left, all you can do is 
scale the image. Or adjust the papersize of the file you want to include. But 
if you want to have some special effect (like pushing part of your included 
image off the page), you'll have to use something like \externalfigure, as Hans 
suggested. Btw, if you know the number of pages you want to include, it's 
relatively trivial to write a simple loop, both in mkii (with \dorecurse and 
\recurselevel) or with a lua loop. 

Thomas

On Feb 23, 2011, at 12:11 PM, Curiouslearn wrote:

 Anyone? If it cannot be done, I would appreciate if someone can say that. I
 
 Thanks you.
 
 On Tue, Feb 22, 2011 at 9:16 AM, Curiouslearn curiousle...@gmail.com wrote:
 Can someone please help me with this? I suppose I have not received an
 answer because there is no minimal example. I thought it would be
 straightforward for someone in the forum without seeing an example.
 
 Anyhow I have attached a pdf file (includethis.pdf) and a tex file in
 which I am trying to include pages from the pdf file. I want to
 increase the left side margin on the pages on which included file is
 present.
 
 Thank you in advance.
 
 On Mon, Feb 21, 2011 at 10:58 AM, Curiouslearn curiousle...@gmail.com 
 wrote:
 Hello,
 
 I am trying to use the \copypages command to include a pdf file,
 say file3pages.pdf with three pages in my context
 document. First, I issued the command:
 
\copypages[file3pages.pdf]
 
 The pages from file3pages.pdf are too close to the left
 margin. There is not enough white space on the left whereas,
 there is a lot of space on the right of the included pages. So, I tried
 
\hskip 0.5in \copypages[file3pages.pdf]
 
 This creates appropriate space on the left of the included pages,
 but only for the first page of file3pages.pdf. The second and
 third pages of file3pages.pdf are the same as before (too close
 to the left margin).
 
 How can I apply \hskip 0.5in to each of the pages included from the
 file3pages.pdf.
 Can someone please suggest if there is a better way to
 increase the space on the left. Please note that the included
 pages do not respect the margins I have set for the document.
 
 Thanks a lot.
 

___
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-23 Thread Wolfgang Schuster

Am 23.02.2011 um 11:59 schrieb C.:

 Ok, that explains why context is literally ignoring the font. But will the
 described procedure allow the usage like in the attached example? It's done
 with latex and the minion package. Looks beautiful to me (except maybe some
 small scaling issues with the big '(' ) Sorry for the crappy screenshot, the
 64k-Limit blocked attaching the one page 200k PDF.

You can use Dropbox are any other service to provide large files.

 As a side note: Is mathdesign available for context? I remember reading
 about it somewhere, but the third-party module site has nothing listed.

I made a package [1] with all necessary font files a while ago but it’s
Mojcas job to include them in the minimals. The typescripts are already
part of context.

[1] http://d.pr/CC5aF

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 - more research

2011-02-23 Thread Michail Vidiassov

Dear Hans,

On Wed, 23 Feb 2011, Hans Hagen wrote:


Attachments have some history in pdf and each version was slightly different.


as far as I understand ConTeXt now can not link file attachment to 
arbitrary picture, just to some predefined icons. Am I right?

Is it going  to change? Soon? There are comments in the code about
lack of measurement support for XForm - is that the issue and what
that issue is?
I have already met that complaints in 3D Annotations support code.
BTW, I am interested in FileAttachment  Annotations as a way to
work with 3D models. With LaTeX the main PDF file may contain a 2D picture,
that can be displayed in any PDF viewer, but if you click on it in Adobe 
viewer attached PDF file opens with 3D model in it. That attached file may 
be produced by some third-party tool, since often such tools output not 
just 3D model fit for including in PDF, but a one-page PDF with the 3D 
model, complex JavaScript to control it (for example to animate it) and 
some intarctive text related to the model.


 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] \stretched in chapter titles in MKII

2011-02-23 Thread Tom
I can actually use this for books that don't have chapter titles because I
like how it appears with a font like Iwona-light.

Tom Benjey
717-258-9733 voice
717-243-0074 fax
blog: www.TomBenjey.com




-Original Message-
From: ntg-context-boun...@ntg.nl [mailto:ntg-context-boun...@ntg.nl] On
Behalf Of Wolfgang Schuster
Sent: Tuesday, February 22, 2011 5:15 PM
To: mailing list for ConTeXt users
Subject: Re: [NTG-context] \stretched in chapter titles in MKII


Am 22.02.2011 um 14:42 schrieb Tom:

 I'm sorry for being so thick but this code errors out when I run it under
 TexLive 2010 MKIV. The problem seems to be in the processing of
textcommand,
 so I commented it out. The error went away and the \ChapterNumberCommand
 seemed to execute correctly. However, I want to stretch the title as well
as
 the chapter number, so that is not a solution. I couldn't find
documentation
 for \structuretitle and \structurenumber and am completely lost.

Use the ConTeXt minimals or use a more pleasant layout for your headers,
the stretched titles don't look very nice.

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

___

___
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] Setting starting chapter number

2011-02-23 Thread Tom
Thanks, Wolfgang. That did the trick.

Tom Benjey
717-258-9733 voice
717-243-0074 fax
blog: www.TomBenjey.com



From: ntg-context-boun...@ntg.nl [mailto:ntg-context-boun...@ntg.nl] On
Behalf Of Wolfgang Schuster
Sent: Wednesday, February 23, 2011 2:17 AM
To: mailing list for ConTeXt users
Subject: Re: [NTG-context] Setting starting chapter number


Am 23.02.2011 um 05:34 schrieb Tom:


I have the need to start a document on a chapter number greater than 1 but
cannot find the command that sets the starting chapter number. I assume that
such a command exists and have probably overlooked the right one.

http://wiki.contextgarden.net/Reference/en/setupheadnumber

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] increase space on the left of pages included using \copypages

2011-02-23 Thread Curiouslearn
Hi Thomas,

I am preparing notes for my lectures and I would like to include some
online news articles (such as NY times) that I save as PDF,  in my
notes (these notes are for me). When I save these online articles as
pdf, I often get a small left margin and big right margin (just as in
includethis.pdf; I deliberately made it similar to these news
articles).

I will try to do this using lua loop. I should learn it. I am learning
so many new things currently that I have not had a chance to learn
Lua.

I was wondering if Aditya's filter module could be used to use Python
instead of Lua, but I suppose I should ask that as a new question.

Thanks for your help.

Bharat


On Wed, Feb 23, 2011 at 6:33 AM, Thomas A. Schmitz
thomas.schm...@uni-bonn.de wrote:
 Curiouslearn (if you're older than 13 years, I'd appreciate a real name), 
 it's not easy to see what you want to do. The included pages, like the 
 document where you want to include them, are letter size. If you simply 
 include them, they will take the entire width. The small margin left and big 
 margin right are already in you includethis.pdf. If you want more margin 
 left, all you can do is scale the image. Or adjust the papersize of the file 
 you want to include. But if you want to have some special effect (like 
 pushing part of your included image off the page), you'll have to use 
 something like \externalfigure, as Hans suggested. Btw, if you know the 
 number of pages you want to include, it's relatively trivial to write a 
 simple loop, both in mkii (with \dorecurse and \recurselevel) or with a lua 
 loop.

 Thomas

 On Feb 23, 2011, at 12:11 PM, Curiouslearn wrote:

 Anyone? If it cannot be done, I would appreciate if someone can say that. I

 Thanks you.

 On Tue, Feb 22, 2011 at 9:16 AM, Curiouslearn curiousle...@gmail.com wrote:
 Can someone please help me with this? I suppose I have not received an
 answer because there is no minimal example. I thought it would be
 straightforward for someone in the forum without seeing an example.

 Anyhow I have attached a pdf file (includethis.pdf) and a tex file in
 which I am trying to include pages from the pdf file. I want to
 increase the left side margin on the pages on which included file is
 present.

 Thank you in advance.

 On Mon, Feb 21, 2011 at 10:58 AM, Curiouslearn curiousle...@gmail.com 
 wrote:
 Hello,

 I am trying to use the \copypages command to include a pdf file,
 say file3pages.pdf with three pages in my context
 document. First, I issued the command:

    \copypages[file3pages.pdf]

 The pages from file3pages.pdf are too close to the left
 margin. There is not enough white space on the left whereas,
 there is a lot of space on the right of the included pages. So, I tried

    \hskip 0.5in \copypages[file3pages.pdf]

 This creates appropriate space on the left of the included pages,
 but only for the first page of file3pages.pdf. The second and
 third pages of file3pages.pdf are the same as before (too close
 to the left margin).

 How can I apply \hskip 0.5in to each of the pages included from the
 file3pages.pdf.
 Can someone please suggest if there is a better way to
 increase the space on the left. Please note that the included
 pages do not respect the margins I have set for the document.

 Thanks a lot.


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

2011-02-23 Thread C.


 -Ursprüngliche Nachricht-
 Von: Wolfgang Schuster [mailto:schuster.wolfg...@googlemail.com]
 Gesendet: Mittwoch, 23. Februar 2011 12:38
 An: mailing list for ConTeXt users
 Cc: Mojca Miklavec
 Betreff: Re: [NTG-context] MnSymbol in ConText
 
 
 Am 23.02.2011 um 11:59 schrieb C.:
 
  Ok, that explains why context is literally ignoring the font. But will
  the described procedure allow the usage like in the attached example?
  It's done with latex and the minion package. Looks beautiful to me
  (except maybe some small scaling issues with the big '(' ) Sorry for
  the crappy screenshot, the 64k-Limit blocked attaching the one page
200k
 PDF.
 
 You can use Dropbox are any other service to provide large files.

True, that's a workaround. But those who read the archive may find expired
links.

  As a side note: Is mathdesign available for context? I remember
  reading about it somewhere, but the third-party module site has nothing
 listed.
 
 I made a package [1] with all necessary font files a while ago but it’s
Mojcas
 job to include them in the minimals. The typescripts are already part of
 context.
 
 [1] http://d.pr/CC5aF
 

Thank you very much.
I installed the URW-Garamond manually from CTAN and now it's working. Some
minor troubles like too much italic (brackets and numbers in math mode are
italic O_o) but it's a start. 

___
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] increase space on the left of pages included using \copypages

2011-02-23 Thread Thomas A. Schmitz

On Feb 23, 2011, at 1:41 PM, Curiouslearn wrote:

 I will try to do this using lua loop. I should learn it. I am learning
 so many new things currently that I have not had a chance to learn
 Lua.
 
lua is not all that different from other languages such as python or perl; once 
you've grasped the concept of one syntax, you should be able to learn others 
and write lua code pretty soon.

 I was wondering if Aditya's filter module could be used to use Python
 instead of Lua, but I suppose I should ask that as a new question.

Aditya's filter module is for highlighting code, it will not run python code 
within luatex. I think Luigi once played with a module that allowed embedding 
python within luatex 
(http://wiki.contextgarden.net/User:Luigi.scarso#Luatex_hosts_python and 
http://wiki.contextgarden.net/User:Luigi.scarso/luatex_lunatic), but I think he 
has since given up on this project.

As for the lua loop, maybe this can be helpful (this is how I create 
offprints of my scanned articles):

\startluacode
  for i = 1,21 do
  tex.sprint('\\hskip1cm\\externalfigure[includethis][page=' .. i .. 
',height=\\textheight]')
  end
\stopluacode

tex.sprint() passes its argument to the typesetting engine, '..' concatenates 
the lua variable 'i' into this code. Od course, this is mkiv only.

That should get you started.

Best

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] increase space on the left of pages included using \copypages

2011-02-23 Thread luigi scarso
On Wed, Feb 23, 2011 at 3:10 PM, Thomas A. Schmitz
thomas.schm...@uni-bonn.de wrote:

 On Feb 23, 2011, at 1:41 PM, Curiouslearn wrote:

 I will try to do this using lua loop. I should learn it. I am learning
 so many new things currently that I have not had a chance to learn
 Lua.

 lua is not all that different from other languages such as python or perl; 
 once you've grasped the concept of one syntax, you should be able to learn 
 others and write lua code pretty soon.

 I was wondering if Aditya's filter module could be used to use Python
 instead of Lua, but I suppose I should ask that as a new question.

 Aditya's filter module is for highlighting code, it will not run python code 
 within luatex.
hm, no
http://modules.contextgarden.net/filter
Short description:  A module to run external programs on the contents
of start-stop evironment

I think Luigi once played with a module that allowed embedding python within 
luatex (http://wiki.contextgarden.net/User:Luigi.scarso#Luatex_hosts_python 
and http://wiki.contextgarden.net/User:Luigi.scarso/luatex_lunatic), but I 
think he has since given up on this project.
Yes, it's too much old and messy code.
Let's say that it's something to do, sooner or later (more later than sooner) .

-- 
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] including pdf

2011-02-23 Thread Tom
I have a somewhat related question in that I am creating a document that
will be used as an appendix to other documents. So, I can control the
various aspects of the PDF that is created and use \copypages. What I want
to do is number the pages A-1, etc. (or B-1, etc. depending on which
appendix it will be placed). That will avoid coordinating page numbers with
those in the documents to which it will be appended. What I can't figure out
how to do is to prefix the pagenumber with A- (or B-). It is probably a
simple matter but I can't figure out how to do it.

Tom Benjey
717-258-9733 voice
717-243-0074 fax
blog: www.TomBenjey.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] [t-vim] Line numbers

2011-02-23 Thread Aditya Mahajan

On Wed, 23 Feb 2011, Marco wrote:


I stumbled over one thing: When set directory=tmp the temporary files are sent
to the tmp directory except the md5 hashes of external file code, these are
put in the working dir.


The md5 hashes are in the same directory as the file. So, in case you are 
including a file from the current directory, the md5 hash will also be 
there. So, the easiest solution is to move (or perhaps simlink) the file 
to the temporary directory. Then you can include the file tmp/t.tex and 
the md5 hash will be created in the tmp directory.



Is it possible to convince the context script to remove the temporary stuff
when called with the --purgeall option?


I will look into that. I guess that the easiest way out is that, instead 
of using .vimout extension, I use .tmp extension. Then, all the temporary 
files will be removed by --purgeall.


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] increase space on the left of pages included using \copypages

2011-02-23 Thread Aditya Mahajan

On Wed, 23 Feb 2011, Curiouslearn wrote:


I will try to do this using lua loop. I should learn it. I am learning
so many new things currently that I have not had a chance to learn
Lua.

I was wondering if Aditya's filter module could be used to use Python
instead of Lua, but I suppose I should ask that as a new question.


It is easy to do this in TeX, so no need to go to lua (or python).

Call

\getfiguredimensions[filename]

Then you can use

\noffigurepages
\figurenaturalwidth 
\figurenaturalheight


to place each page of the figure. Something like:

\getfiguredimensions[filename]
\dorecurse{\noffigurepages} 
{\externalfigure[figurename][page=\recurselevel]}


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] increase space on the left of pages included using \copypages

2011-02-23 Thread Andreas Harder

Am 23.02.2011 um 16:27 schrieb Aditya Mahajan:

 On Wed, 23 Feb 2011, Curiouslearn wrote:
 
 I will try to do this using lua loop. I should learn it. I am learning
 so many new things currently that I have not had a chance to learn
 Lua.
 
 I was wondering if Aditya's filter module could be used to use Python
 instead of Lua, but I suppose I should ask that as a new question.
 
 It is easy to do this in TeX, so no need to go to lua (or python).
 
 Call
 
 \getfiguredimensions[filename]

It seems that this is broken with the newest beta – at least for me. Can 
someone confirm?

Greeting
Andreas

___
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] [t-vim] Line numbers

2011-02-23 Thread Marco
On 2011-02-23 Aditya Mahajan adit...@umich.edu wrote:

 The md5 hashes are in the same directory as the file. So, in case you are 
 including a file from the current directory, the md5 hash will also be 
 there.

So it's on purpose. I wasn't sure about that.

 So, the easiest solution is to move (or perhaps simlink) the file 
 to the temporary directory. Then you can include the file tmp/t.tex and 
 the md5 hash will be created in the tmp directory.

It will probably work, but is not a nice solution in my opinion. It looks
strange that the document includes files from the tmp directory. From a tmp
directory I expect to be able to delete the content without any effects.

Anyway, I don't really care, since I usually don't delete the temporary files.

  Is it possible to convince the context script to remove the temporary
  stuff when called with the --purgeall option?
 
 I will look into that. I guess that the easiest way out is that, instead 
 of using .vimout extension, I use .tmp extension. Then, all the temporary 
 files will be removed by --purgeall.

I don't think so. AFAIK --purgeall only deletes .tmp files with the basename
as the document itself.

I think it would make sense to convince --purgeall to be more grabby and to
remove all .tmp files in the working dir + all files in the »directory« dir
(here tmp). But I'm not sure about possible displeasing side effects, though.


Regards
Marco


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

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


Re: [NTG-context] increase space on the left of pages included using \copypages

2011-02-23 Thread Curiouslearn
Thanks to all. This time around I will use the lua route since I know
the number of pages and it seems more natural to me...I will
understand what it is doing even if I look at the thing after one
month.

Bharat

On Wed, Feb 23, 2011 at 10:27 AM, Aditya Mahajan adit...@umich.edu wrote:
 On Wed, 23 Feb 2011, Curiouslearn wrote:

 I will try to do this using lua loop. I should learn it. I am learning
 so many new things currently that I have not had a chance to learn
 Lua.

 I was wondering if Aditya's filter module could be used to use Python
 instead of Lua, but I suppose I should ask that as a new question.

 It is easy to do this in TeX, so no need to go to lua (or python).

 Call

 \getfiguredimensions[filename]

 Then you can use

 \noffigurepages
 \figurenaturalwidth \figurenaturalheight

 to place each page of the figure. Something like:

 \getfiguredimensions[filename]
 \dorecurse{\noffigurepages}
 {\externalfigure[figurename][page=\recurselevel]}

 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
 ___

___
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] \em around \placefigure (bug?)

2011-02-23 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

the \em statement being placed as the first command of a paragraph to flow 
around a \placefigure seems to SCRATCH the figure instead of to flow around 
(bug?). See the minimal example:

---

\starttext
  \placefigure
[left,none]
{}
{ \startMPcode
draw (0,0)--(6cm,6cm);
  \stopMPcode
}

  01234656789 01234656789 01234656789 01234656789 01234656789 01234656789 
01234656789

  {\em 01234656789} 01234656789 01234656789 01234656789 01234656789 01234656789 
01234656789

  01234656789 {\em 01234656789} 01234656789 01234656789 01234656789 01234656789 
01234656789

  \input tufte
\stoptext

---

Best regards

Lukas


--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

t-Hang3.mkiv
Description: Binary data


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

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


Re: [NTG-context] increase space on the left of pages included using \copypages

2011-02-23 Thread Marco
On 2011-02-23 Andreas Harder ahar...@uni-koblenz.de wrote:

  \getfiguredimensions[filename]
 
 It seems that this is broken with the newest beta – at least for me. Can
 someone confirm?

Confirmed on solaris x86
LuaTeX   ver: beta-0.65.0-2010121317
ConTeXt  ver: 2011.02.18 17:17 and
ConTeXt  ver: 2011.02.20 20:34


Marco


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

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


Re: [NTG-context] [t-vim] Line numbers

2011-02-23 Thread Aditya Mahajan

On Wed, 23 Feb 2011, Marco wrote:


So, the easiest solution is to move (or perhaps simlink) the file
to the temporary directory. Then you can include the file tmp/t.tex and
the md5 hash will be created in the tmp directory.


It will probably work, but is not a nice solution in my opinion. It looks
strange that the document includes files from the tmp directory. From a tmp
directory I expect to be able to delete the content without any effects.


I do not make that assumption in t-vim. Currently there is no way to 
specify the output directory to mtxrun --ifchanged. So, the only way that 
I can implement this feature is to either manually copy the input file, or 
manually copy the md5 file. I do not think that either of these options is 
worth the trouble.



Is it possible to convince the context script to remove the temporary
stuff when called with the --purgeall option?


I will look into that. I guess that the easiest way out is that, instead
of using .vimout extension, I use .tmp extension. Then, all the temporary
files will be removed by --purgeall.


I don't think so. AFAIK --purgeall only deletes .tmp files with the basename
as the document itself.

I think it would make sense to convince --purgeall to be more grabby and to
remove all .tmp files in the working dir + all files in the »directory« dir
(here tmp). But I'm not sure about possible displeasing side effects, though.


I am not sure what you want. Do you want

context --purge filename

to remove all the temp files that t-vim creates, or do you want

context --purgeall

to delete all the files created by t-vim that reside in the current 
directory?


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] Latest betas break tikz matrix

2011-02-23 Thread Mathieu Boespflug
Hi Aditya,

 Could be due to the change in catcode of . Try adding \donknuthmode.

It doesn't make any difference if I put the \donknuthmode just before
\starttikzpicture. But If I put it before the \usemodule[tikz], then I
get another error:

Package pgfbasematrix: Error! Single ampersand used with wrong catcode.
! Missing number, treated as zero.

system   tex  error on line 12 in file testcontext.tex:
Missing number, treated as zero ...

 2 \usemodule[tikz]
 3 \usetikzlibrary{matrix}
 4
 5 \starttext
 6 \tikzstyle{description}=[fill=white,inner sep=2pt]
 7 \starttikzpicture
 8 \matrix(m)[matrix of math nodes,
 9   row sep=3em, column sep=3em,
10   text height=1.5ex, text depth=0.25ex]
11{xy\\
12zu};
13 \path[-]
14   (m-1-1) edge node[description] {$*$} (m-1-2)
15   edge node[description] {$*$} (m-2-1)
16   (m-1-2) edge[dashed] node[description] {$*$} (m-2-2)
17   (m-2-1) edge[dashed] node[description] {$*$} (m-2-2);
18 \stoptikzpicture
19 \nonknuthmode
20 \stoptext
21

to be read again
  \pgf@matrix@column@sep@2
\pgf@matrix@endcell ...ixcurrentcolumn \endcsname
 \relax \advance \pgf@picmi...
template \pgf@matrix@endcell
  }\endtemplate
\pgf@matrix@no@eom@found -\cr
  \noalign {\vskip \pgf@y \ifpgf@matrix@fixed \...
to be read again
  z
l.12  z
  u};
___
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] reencode fonts with fonts.trigger

2011-02-23 Thread Ulrike Fischer
Am Tue, 22 Feb 2011 18:05:58 +0100 schrieb Hans Hagen:


 Khaled had another idea to manipulate (reencode) fonts: He suggested
 to put a function in fonts.trigger. (Example below). I have some
 questions regarding this example:

 1. Is there a basic flaw in the idea?
 
 When triggers are done, there are only empty entries in the characters 
 table so swapping them has no effect. You can add info to them but some 
 entries in them will be added when scaling takes place.

For which entries can this be a problem?


 5. What is the recommanded lua-code to copy/reassign/remap the
 tables?  Does a library or some helper functions exist which would
 make it easier to move the tables around?
 
 For basemode reencoding you can use the changed subtable:
 
 \starttext
 
 \directlua{
  local function chess(tfmdata,value)
  if value then
  tfmdata.changed[75] = 81
  tfmdata.changed[81] = 75
  end
  end
  table.insert(fonts.triggers,chess)
  fonts.initializers.base.otf.chess = chess
 }
 
 \start
  \font\TestA=file:SkakNew-Figurine.otf:chess=yes  \TestA\char75 
 \char81 \par
  \font\TestB=file:SkakNew-Figurine.otf:chess=no   \TestB\char75 
 \char81 \par
 \stop
 
 \stoptext

That works fine - even with luaotfload and latex (after I understood
that basemode means that I must call the font with mode=base).
But curiously the dimens of the char change a bit in latex. E.g.
\showthe\fontcharwd reports without the reencoding 8.8pt, and
9.0pt with the reencoding. In context I get in both cases 9.0pt.

Is it possible to swap (or set) the tounicode value at his time so
that copypaste gives again a K for the king and a Q for the
queen?


-- 
Ulrike Fischer 

___
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] [t-vim] Line numbers

2011-02-23 Thread Marco
On 2011-02-23 Aditya Mahajan adit...@umich.edu wrote:

 [...]
 I do not think that either of these options is worth the trouble.

No, definitely not.

 I am not sure what you want.


 Do you want
 [...]

 context --purgeall

This will probably be difficult to implement, since the complete directory
tree has to be scanned to find xyz-externalfilter-abc-X.___ remains. However


context --purgeall filename

should remove all temporary files belonging to the document like

filename-externalfilter-CON-0.tmp % not removed
filename-externalfilter-CON-0.tmp.md5 % not removed
filename-externalfilter-CON-0.vimout  % not removed

So after the project is done one can run context --purgeall filename to get a
clean directory structure without having to archive 30 temporary files.


Regards
Marco


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

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


Re: [NTG-context] reencode fonts with fonts.trigger

2011-02-23 Thread Ulrike Fischer
Am Tue, 22 Feb 2011 20:29:48 +0100 schrieb Hans Hagen:


 I'll add the following to the luatex-fonts code. It demonstrates how to 
 use postprocessing hooks. (It should work with the current code, unless 
 you define multiple mapping of the same font, for which i've added a 
 patch).

The code didn't work with the context in miktex and a context from a
minimals about 3 month old (I got no errors but no reencoding
either). It worked fine with a current context. 

In latex/luaotfload I got at first an error (enc is nil). After I
added if not fonts.enc then fonts.enc = { } end it compiled but
didn't reencode. So I guess I will have to wait until luaotfload
gets updated before I can use this solution (which looks fine). 

But I wished they were some documentation about the general
structure of the font loading and processing and all this fields
(fonts.manipulators, fonts.triggers, tfmdata.postprocessors, ...).
Is there someone (beside yourself) who still understand the overall
picture?

-- 
Ulrike Fischer 

___
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] [t-vim] Line numbers

2011-02-23 Thread Aditya Mahajan

On Wed, 23 Feb 2011, Marco wrote:


Do you want
[...]



context --purgeall


This will probably be difficult to implement, since the complete directory
tree has to be scanned to find xyz-externalfilter-abc-X.___ remains.


Actually, `context --purgeall` deteles all the files with .tmp and .md5 
extension in the current directory. Only the .vimout files remain.




However
context --purgeall filename

should remove all temporary files belonging to the document like

filename-externalfilter-CON-0.tmp % not removed
filename-externalfilter-CON-0.tmp.md5 % not removed
filename-externalfilter-CON-0.vimout  % not removed

So after the project is done one can run context --purgeall filename to get a
clean directory structure without having to archive 30 temporary files.


Why not simply run `context --purgeall` (no filename)? I will check how to 
ensure that .vimout files are also removed. The t-gnuplot module does 
something similar. So, perhaps I can borrow code from 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] [t-vim] Line numbers

2011-02-23 Thread Marco
On 2011-02-23 Aditya Mahajan adit...@umich.edu wrote:

 Actually, `context --purgeall` deteles all the files with .tmp and .md5 
 extension in the current directory. Only the .vimout files remain.

Does it on your system? Not on mine. If I compile the example posted earlier
in the thread and execute context --purgeall afterwards, the files

t-externalfilter-CON-0.tmp.md5 and
t.tex.md5

still remain.

 Why not simply run `context --purgeall` (no filename)?

See above.


Regards
Marco


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

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


Re: [NTG-context] [t-vim] Line numbers

2011-02-23 Thread Aditya Mahajan

On Wed, 23 Feb 2011, Marco wrote:


On 2011-02-23 Aditya Mahajan adit...@umich.edu wrote:


Actually, `context --purgeall` deteles all the files with .tmp and .md5
extension in the current directory. Only the .vimout files remain.


Does it on your system? Not on mine. If I compile the example posted earlier
in the thread and execute context --purgeall afterwards, the files

t-externalfilter-CON-0.tmp.md5 and
t.tex.md5

still remain.


You are right. Only the .tmp files are removed.

@Hans: Can I somehow register temporary files that will be later removed 
by `context --purgeall`?


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
___


[NTG-context] Question regarding registertempfile

2011-02-23 Thread Aditya Mahajan

Hi Hans,

Currently, luat-run.lua defines registertempfile as:

function luatex.registertempfile(name)
name = name .. .mkiv-tmp -- maybe just .tmp
if trace_temp_files and not tempfiles[name] then
report_tempfiles(registering temporary file: %s,name)
end
tempfiles[name] = true
return name
end

Can you remove the first line of this function? (That is, do not modify 
the name at all). This will allow me to use this functionality to remove 
temporary files created by t-filter and t-vim. These files, do not end in 
.mkiv-tmp or .tmp.


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


[NTG-context] git repository in sync with minimals

2011-02-23 Thread Marco
Is the git repository git://gitorious.org/context/context.git
in sync with the minimals?

If not, is there another revision control system repository
for context that is?

Marco


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

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


Re: [NTG-context] Latest betas break tikz matrix

2011-02-23 Thread Mathieu Boespflug
Hi all,

just as a followup and for the mailing list archives, the solution is
to use both Aditya's suggestion to turn on \donknuthmode, as well
replacing the  signs with their interpretations, namely
\pgfmatrixnextcell. Thank you Aditya for the suggestion.

Regards,

Mathieu

On Wed, Feb 23, 2011 at 11:38 AM, Mathieu Boespflug 0xbadc...@gmail.com wrote:
 Hi Aditya,

 Could be due to the change in catcode of . Try adding \donknuthmode.

 It doesn't make any difference if I put the \donknuthmode just before
 \starttikzpicture. But If I put it before the \usemodule[tikz], then I
 get another error:

 Package pgfbasematrix: Error! Single ampersand used with wrong catcode.
 ! Missing number, treated as zero.

 system           tex  error on line 12 in file testcontext.tex:
 Missing number, treated as zero ...

  2     \usemodule[tikz]
  3     \usetikzlibrary{matrix}
  4
  5     \starttext
  6     \tikzstyle{description}=[fill=white,inner sep=2pt]
  7     \starttikzpicture
  8         \matrix(m)[matrix of math nodes,
  9           row sep=3em, column sep=3em,
 10           text height=1.5ex, text depth=0.25ex]
 11                {xy\\
 12                zu};
 13         \path[-]
 14           (m-1-1) edge node[description] {$*$} (m-1-2)
 15                   edge node[description] {$*$} (m-2-1)
 16           (m-1-2) edge[dashed] node[description] {$*$} (m-2-2)
 17           (m-2-1) edge[dashed] node[description] {$*$} (m-2-2);
 18     \stoptikzpicture
 19     \nonknuthmode
 20     \stoptext
 21

 to be read again
                  \pgf@matrix@column@sep@2
 \pgf@matrix@endcell ...ixcurrentcolumn \endcsname
                                                 \relax \advance \pgf@picmi...
 template \pgf@matrix@endcell
                              }\endtemplate
 \pgf@matrix@no@eom@found -\cr
                              \noalign {\vskip \pgf@y \ifpgf@matrix@fixed \...
 to be read again
                  z
 l.12              z
                  u};

___
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] TaBlE from Lua

2011-02-23 Thread Daniel Lyons
Is there a convenient way to create TaBlE tables from Lua? If so,
where can I read about it?

Thanks,

-- 
Daniel
___
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] TaBlE from Lua

2011-02-23 Thread Wolfgang Schuster

Am 24.02.2011 um 00:07 schrieb Daniel Lyons:

 Is there a convenient way to create TaBlE tables from Lua?

\startluacode
context.starttable({|l|l|})
context.HL()
context.NC()
context(One)
context.NC()
context(Two)
context.NC()
context.AR()
context.HL()
context.stoptable()
\stopluacode

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] TaBlE from Lua

2011-02-23 Thread Philipp Gesang
On 2011-02-23 17:07:38, Daniel Lyons wrote:
 Is there a convenient way to create TaBlE tables from Lua? If so,
 where can I read about it?

Good evening, Daniel!

[-1] Isn’t TaBlE deprecated?  http://wiki.contextgarden.net/Tables_Overview

[0] If you aim for convenience, wouldn’t you rather want to
switch to \[start|stop]tabulate? Its syntax is very similar
and there are a few examples to learn from in the context
source code.

[1] I don’t know how your table structure looks like, but the
example 1 can be a starting point, assuming a 2dimensional
table where all rows have the same element count:

[2] Item example 2, but using the cld interface
http://wiki.contextgarden.net/cld.

Put both files in the same directory and run “context” on
table.tex to build the examples.

Regards, Philipp

 
 Thanks,
 
 -- 
 Daniel
\registerctxluafile{table}{}

%%% Example 1 %%%
\def\typesetatable{%
  \ctxlua{userdata.do_typesetatable(userdata.t)}%
}

%%% Example 2 %%%
\def\typesetcldtable{%
  \ctxlua{userdata.do_typesetcldtable(userdata.t)}%
}

\starttext

%%% Demo 1 %%
\placetable[here]{Concatenation based}{\typesetatable}

%%% Demo 2 %%
\placetable[here]{CLD-based}{\typesetcldtable}

\stoptext \endinput
userdata = userdata or { }

userdata.t = {
{ 0, 0, 0, },
{ 0, 0, 1, },
{ 0, 1, 0, },
{ 0, 1, 1, },
{ 1, 0, 0, },
{ 1, 0, 1, },
{ 1, 1, 0, },
{ 1, 1, 1, },
}

--- Lua stuff 1 -
userdata.env = [[
\starttable[%s]
  \HL
%s
  \HL
\stoptable
]]

local fmt, rep, unpack = string.format, string.rep, table.unpack
userdata.do_typesetatable = function (t)
local maxx, maxy, lines = #t[1], #t, { }
local template = rep(\\NC %s, maxx)
for n=1, maxy do
local row = t[n]
lines[n] =.. fmt(template, unpack(row)) .. \\AR
end
context( fmt(userdata.env, | .. rep(c|, maxx), table.concat(lines, 
\n)) )
end

--- Lua stuff 2 -
local AR, HL, NC = context.AR, context.HL, context.NC

userdata.do_typesetcldtable = function (t)
local maxx, maxy = #t[1], #t
context.starttable({ | .. rep(c|, maxx) })
HL()
for n=1, maxy do
local row = t[n]
for m=1, maxx do
NC() context(row[m])
end
AR()
end
HL()
context.stoptable()
end


pgpt0IJu5TFFS.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] TaBlE from Lua

2011-02-23 Thread Daniel Lyons

On Feb 23, 2011, at 6:16 PM, Philipp Gesang wrote:

 On 2011-02-23 17:07:38, Daniel Lyons wrote:
 Is there a convenient way to create TaBlE tables from Lua? If so,
 where can I read about it?
 
 Good evening, Daniel!
 
 [-1] Isn’t TaBlE deprecated?  http://wiki.contextgarden.net/Tables_Overview

I didn't know that!

 [0] If you aim for convenience, wouldn’t you rather want to
switch to \[start|stop]tabulate? Its syntax is very similar
and there are a few examples to learn from in the context
source code.

My particular situation is a bit more involved. I want to put SQL in my ConTeXt 
source and have it run it against my database and format the result nicely in 
my document. I think I see how to do it, I just need to be able to take the 
parsed output and make the visually appealing table.

 [1] I don’t know how your table structure looks like, but the
example 1 can be a starting point, assuming a 2dimensional
table where all rows have the same element count:

It's not going to be too fancy, just headers and rows with the same number of 
columns on each line. I do want to be able to control how they get aligned but 
otherwise nothing interesting.

 [2] Item example 2, but using the cld interface
http://wiki.contextgarden.net/cld.
 
 Put both files in the same directory and run “context” on
 table.tex to build the examples.

Thanks!

— 
Daniel Lyons

___
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] TaBlE from Lua

2011-02-23 Thread luigi scarso
On Thu, Feb 24, 2011 at 2:45 AM, Daniel Lyons fus...@storytotell.org wrote:

 On Feb 23, 2011, at 6:16 PM, Philipp Gesang wrote:

 On 2011-02-23 17:07:38, Daniel Lyons wrote:
 Is there a convenient way to create TaBlE tables from Lua? If so,
 where can I read about it?

 Good evening, Daniel!

 [-1] Isn’t TaBlE deprecated?  http://wiki.contextgarden.net/Tables_Overview

 I didn't know that!

 [0] If you aim for convenience, wouldn’t you rather want to
    switch to \[start|stop]tabulate? Its syntax is very similar
    and there are a few examples to learn from in the context
    source code.

 My particular situation is a bit more involved. I want to put SQL in my 
 ConTeXt source and have it run it against my database and format the result 
 nicely in my document. I think I see how to do it, I just need to be able to 
 take the parsed output and make the visually appealing table.
Have a look at
http://robitex.wordpress.com/2011/02/22/postgresql-gestisce-i-dati-lualatex-li-stampa/
It's in italian  latex  postgres, but pretty clear.

-- 
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] TaBlE from Lua

2011-02-23 Thread Daniel Lyons

On Feb 23, 2011, at 11:35 PM, luigi scarso wrote:

 On Thu, Feb 24, 2011 at 2:45 AM, Daniel Lyons fus...@storytotell.org wrote:
 
 On Feb 23, 2011, at 6:16 PM, Philipp Gesang wrote:
 
 On 2011-02-23 17:07:38, Daniel Lyons wrote:
 Is there a convenient way to create TaBlE tables from Lua? If so,
 where can I read about it?
 
 Good evening, Daniel!
 
 [-1] Isn’t TaBlE deprecated?  
 http://wiki.contextgarden.net/Tables_Overview
 
 I didn't know that!
 
 [0] If you aim for convenience, wouldn’t you rather want to
switch to \[start|stop]tabulate? Its syntax is very similar
and there are a few examples to learn from in the context
source code.
 
 My particular situation is a bit more involved. I want to put SQL in my 
 ConTeXt source and have it run it against my database and format the result 
 nicely in my document. I think I see how to do it, I just need to be able to 
 take the parsed output and make the visually appealing table.
 Have a look at
 http://robitex.wordpress.com/2011/02/22/postgresql-gestisce-i-dati-lualatex-li-stampa/
 It's in italian  latex  postgres, but pretty clear.


This is gorgeous, and I'm sure it will come in handy, thanks! I'm glad to know 
I'm not alone in trying this.

My particular situation is a bit different though, I need to be able to do 
something along the lines of:

\startSQLinteraction
SELECT * FROM foo;
\stopSQLinteraction

and have it produce something like this (possibly):

SELECT * FROM mailinglists;
Listing 6.1

+---++
| mailing list name | email address  |
+---++
| ConTeXt   | ntg-context@ntg.nl |
| Snap Framework| s...@snapframework.com |
+---++
Output of Listing 6.1


My inspiration here is the Real World Haskell book, which ran the snippets in 
the book during rendering, ensuring both that the snippets actually work and 
that their output was faithful to the input. I don't mind having one connection 
as a constant.

— 
Daniel Lyons

___
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] git repository in sync with minimals

2011-02-23 Thread Florian Wobbe
 Is the git repository git://gitorious.org/context/context.git
 in sync with the minimals?

It is but it is incomplete compared to the minimals and therefore may not be 
what you are looking for.

Long answer: The repository is in sync with 
http://pragma-ade.nl/context/current/cont-tmf.zip (see 
http://gitorious.org/context/context/blobs/script/context_git_update.pl). 
However, the repository misses binaries, all extras and additional fonts that 
are available on http://minimals.contextgarden.net/.

 If not, is there another revision control system repository
 for context that is?

AFAIK only privately maintained ones.

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] Question regarding registertempfile

2011-02-23 Thread luigi scarso
On Wed, Feb 23, 2011 at 10:14 PM, Aditya Mahajan adit...@umich.edu wrote:
 Hi Hans,

 Currently, luat-run.lua defines registertempfile as:

 function luatex.registertempfile(name)
    name = name .. .mkiv-tmp -- maybe just .tmp
    if trace_temp_files and not tempfiles[name] then
        report_tempfiles(registering temporary file: %s,name)
    end
    tempfiles[name] = true
    return name
 end

 Can you remove the first line of this function? (That is, do not modify the
 name at all). This will allow me to use this functionality to remove
 temporary files created by t-filter and t-vim. These files, do not end in
 .mkiv-tmp or .tmp.
why not ?
--
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
___