Re: [NTG-context] Undefined \continueifinputfile on presentation

2013-08-14 Thread Pau
Hi,

something very strange is going on... when I set \runMPgraphicstrue on
top, texexec seems to enter an long process and takes ~10 minutes to
produce a pdf:

/usr/local/texlive/2013/texmf-dist/metapost/context/base/mp-text.mpii)
(/usr/local/texlive/2013/texmf-dist/metapost/context/base/mp-txts.mpii)
(/usr/local/texlive/2013/texmf-dist/metapost/context/base/mp-shap.mpii)
(/usr/local/texlive/2013/texmf-dist/metapost/context/base/mp-butt.mpii)
(/usr/local/texlive/2013/texmf-dist/metapost/context/base/mp-char.mpii)
(/usr/local/texlive/2013/texmf-dist/metapost/context/base/mp-step.mpii)
(/usr/local/texlive/2013/texmf-dist/metapost/context/base/mp-grph.mpii)
(/usr/local/texlive/2013/texmf-dist/metapost/context/base/mp-figs.mpii)
(/usr/local/texlive/2013/texmf-dist/metapost/context/base/mp-grid.mpii
(/usr/local/texlive/2013/texmf-dist/metapost/context/base/mp-form.mpii
(/usr/local/texlive/2013/texmf-dist/metapost/base/string.mp)
(/usr/local/texlive/2013/texmf-dist/metapost/base/marith.mp
(/usr/local/texlive/2013/texmf-dist/metapost/base/string.mp
(/usr/local/texlive/2013/texmf-dist/metapost/context/base/mp-func.mpii) ) )
(dump occurred when else on line 5 was incomplete)

mpost is running and CTRL+C does not break texexec...

Why is that??

Thanks


On Tue, Aug 13, 2013 at 9:48 PM, Aditya Mahajan adit...@umich.edu wrote:
 On Tue, 13 Aug 2013, Pau wrote:

 Yes, now I am getting my input, thanks!

 But the style seems to be severely broken: I do not become the frames,
 background colors etc as defined in the style.

 Compile your example and compare it with:

 http://wiki.contextgarden.net/Presentation_Styles#05._fuzzy

 Thanks again for your time and help!


 I am getting the correct output.

 Do you have write18 enabled (needed to run metapost in MkII)? Otherwise, set
 \runMPgraphicstrue on top of your 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
___


[NTG-context] problem with lua io.lines

2013-08-14 Thread Henning Hraban Ramm
Hi, after a long time I'm playing with ConTeXt again…

Current beta MkIV seems to have a bug in the Lua function io.lines:

for myline in io.lines(myfile) do
  logs.report(myline)
end

myfile just contains one line with a number, without return/newline.
If the number has more than one digit, I get single digits as myline.


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

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

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


Re: [NTG-context] problem with lua io.lines

2013-08-14 Thread Hans Hagen

On 8/14/2013 4:05 PM, Henning Hraban Ramm wrote:

Hi, after a long time I'm playing with ConTeXt again…

Current beta MkIV seems to have a bug in the Lua function io.lines:

for myline in io.lines(myfile) do
   logs.report(myline)
end

myfile just contains one line with a number, without return/newline.
If the number has more than one digit, I get single digits as myline.


looks ok here, btw it's

   logs.report(some tag,myline)




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




--

-
  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] problem with lua io.lines

2013-08-14 Thread Wolfgang Schuster

Am 14.08.2013 um 16:05 schrieb Henning Hraban Ramm te...@fiee.net:

 Hi, after a long time I'm playing with ConTeXt again…
 
 Current beta MkIV seems to have a bug in the Lua function io.lines:
 
 for myline in io.lines(myfile) do
  logs.report(myline)
 end
 
 myfile just contains one line with a number, without return/newline.
 If the number has more than one digit, I get single digits as myeline.

Do you have a minimal working example?

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] problem with lua io.lines

2013-08-14 Thread Henning Hraban Ramm

Am 2013-08-14 um 20:15 schrieb Hans Hagen pra...@wxs.nl:

 looks ok here, btw it's
 
   logs.report(some tag,myline)


Thanks, didn't realize since logs.reportt(everything) always worked ;-)


Greetlings, Hraban

___
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 lua io.lines

2013-08-14 Thread Henning Hraban Ramm

Am 2013-08-14 um 20:15 schrieb Wolfgang Schuster schuster.wolfg...@gmail.com:

 Current beta MkIV seems to have a bug in the Lua function io.lines:
 
 for myline in io.lines(myfile) do
 logs.report(myline)
 end
 
 myfile just contains one line with a number, without return/newline.
 If the number has more than one digit, I get single digits as myeline.
 
 Do you have a minimal working example?

Minimal working yes, but not minimal failing ;-)

This works:

io.output(io.open(myfile.txt,w))
io.write(123)
io.close()

for myline in io.lines(myfile.txt) do
  print(myline .. \n)
end

But in my t-lilyfilter.tex where it reads the systems.count files of LilyPond 
(that contain only the number of note systems that resulted from the included 
LilyPond code), it fails:

 function thirddata.parselilypondfile(name)
   -- include all systems (note lines)
   -- name is like \LILYTEMP/mainfile-temp-lilypond-21.pdf
   logs.report(LILYPOND,name=' .. name .. ')
   syco = 0
   for ts in io.lines(string.gsub(name, '%.pdf$', '-systems.count')) do
 syco = ts*1
   end
   
   for nr = 1, syco do
 logs.report(LILYPOND,including system no. .. nr)
 context(\\externalfigure[ .. string.gsub(name, '%.pdf$', '-' .. nr) .. 
])
   end
 end


While I have a single-digit number of systems, it works, but the song of my 
failing case has 11 lines.

I wouldn't complain if it wouldn't have worked before!


Greetlings, Hraban
___
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] Undefined \continueifinputfile on presentation

2013-08-14 Thread Aditya Mahajan

On Tue, 13 Aug 2013, Pau wrote:


Hi,

something very strange is going on... when I set \runMPgraphicstrue on
top, texexec seems to enter an long process and takes ~10 minutes to
produce a pdf:

Why is that??


I don't know. It has been more than five years since I used MkII.

Does a minimal file containing just MP graphics work?

\starttext
\startMPcode
draw fullcircle scaled 1cm;
\stopMPcode
\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] problem with lua io.lines

2013-08-14 Thread Hans Hagen

On 8/14/2013 5:00 PM, Hans Hagen wrote:

On 8/14/2013 4:43 PM, Henning Hraban Ramm wrote:


Am 2013-08-14 um 20:15 schrieb Wolfgang Schuster
schuster.wolfg...@gmail.com:


Current beta MkIV seems to have a bug in the Lua function io.lines:


btw, it's a lua issue, not related to luatex ...

local myfile = myfile.txt

for myline in io.lines(myfile) do
logs.report(test 1,myline)
end

for myline in io.lines(myfile,3) do
logs.report(test 2,myline)
end

for myline in io.lines(myfile,1) do
logs.report(test 2,myline)
end

for myline in io.lines(myfile,0) do
logs.report(test 2,myline)
end

for myline in io.lines(myfile,-1) do
logs.report(test 2,myline)
end

the zero case loops and the last case gives a memory allocation error: 
block too big so these can be considered buglets in lua


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] Undefined \continueifinputfile on presentation

2013-08-14 Thread Pau
Hi,

thanks for your patience... No, it does not work.

I just get a blank page with a 1 on it, but no circle.

I ran texexec example.tex on texlive 2013.

This is very bad. I am giving a talk tomorrow and I was hoping on
recycling some slides from a former talk, and it seems I am stuck!

Thanks...

On Wed, Aug 14, 2013 at 8:24 AM, Aditya Mahajan adit...@umich.edu wrote:
 On Tue, 13 Aug 2013, Pau wrote:

 Hi,

 something very strange is going on... when I set \runMPgraphicstrue on
 top, texexec seems to enter an long process and takes ~10 minutes to
 produce a pdf:

 Why is that??


 I don't know. It has been more than five years since I used MkII.

 Does a minimal file containing just MP graphics work?

 \starttext
 \startMPcode
 draw fullcircle scaled 1cm;
 \stopMPcode
 \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] Undefined \continueifinputfile on presentation

2013-08-14 Thread Aditya Mahajan

On Wed, 14 Aug 2013, Pau wrote:


Hi,

thanks for your patience... No, it does not work.

I just get a blank page with a 1 on it, but no circle.

I ran texexec example.tex on texlive 2013.

This is very bad. I am giving a talk tomorrow and I was hoping on
recycling some slides from a former talk, and it seems I am stuck!


What happens if you add

\runMPgraphicstrue

or just run your old slides throught MkIV.

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] problem with lua io.lines

2013-08-14 Thread Henning Hraban Ramm
Am 2013-08-14 um 21:00 schrieb Hans Hagen pra...@wxs.nl:

for ts in io.lines(string.gsub(name, '%.pdf$', '-systems.count')) do
  syco = ts*1
end
 
 well, you probably were lucky before: string.gsub returns multiple values so 
 io.lines get a second argument that limits the length of what gets returned

Thank you, didn't know that!

 local myfile = myfile.txt
 
 for myline in io.lines(myfile,2) do
logs.report(test,myline)
 end
 
 so you need:
 
  io.lines((string.gsub(name, '%.pdf$', '-systems.count')))
 
 or
 
  local name = string.gsub(name, '%.pdf$', '-systems.count')
 
  io.lines(name)

Great, that works!

 or maybe better:
 
  io.lines(file.replacesuffix(name,'-systems.count'))


No, that doesn't work, because the dot stays, so I get foobar.-systems.count


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

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

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


Re: [NTG-context] Undefined \continueifinputfile on presentation

2013-08-14 Thread Pau
adding that makes the circle, yes

That works out also for my presentation, but it takes ~10 minutes for
texexec to create the pdf...


How can I run the old slides through mkiv?


Thanks again...

On Wed, Aug 14, 2013 at 9:54 AM, Aditya Mahajan adit...@umich.edu wrote:
 On Wed, 14 Aug 2013, Pau wrote:

 Hi,

 thanks for your patience... No, it does not work.

 I just get a blank page with a 1 on it, but no circle.

 I ran texexec example.tex on texlive 2013.

 This is very bad. I am giving a talk tomorrow and I was hoping on
 recycling some slides from a former talk, and it seems I am stuck!


 What happens if you add

 \runMPgraphicstrue

 or just run your old slides throught MkIV.

 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] Undefined \continueifinputfile on presentation

2013-08-14 Thread Aditya Mahajan
On 2013-08-14, at 1:04 PM, Pau vim.u...@gmail.com wrote:

 adding that makes the circle, yes
 
 That works out also for my presentation, but it takes ~10 minutes for
 texexec to create the pdf...

That actually depends on the number of metapost runs needed to create all the 
random frames. You might get some sipped up if you enable write18. 

 
 How can I run the old slides through mkiv?

context filename

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] Undefined \continueifinputfile on presentation

2013-08-14 Thread Pau
sorry for these newbie questions... but how to enable write18?

context failed to compile it...

I am out of luck, seemingly...

Is this to be envisaged as a regression?

Why a document that used to compile perfectly over many years cannot
be compiled now, if nothing was changed?

Thanks for all of the help!

On Wed, Aug 14, 2013 at 10:38 AM, Aditya Mahajan adit...@umich.edu wrote:
 On 2013-08-14, at 1:04 PM, Pau vim.u...@gmail.com wrote:

 adding that makes the circle, yes

 That works out also for my presentation, but it takes ~10 minutes for
 texexec to create the pdf...

 That actually depends on the number of metapost runs needed to create all the 
 random frames. You might get some sipped up if you enable write18.


 How can I run the old slides through mkiv?

 context filename

 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] Undefined \continueifinputfile on presentation

2013-08-14 Thread Aditya Mahajan

On Wed, 14 Aug 2013, Pau wrote:


sorry for these newbie questions... but how to enable write18?


See the wiki.

http://wiki.contextgarden.net/write18


Why a document that used to compile perfectly over many years cannot
be compiled now, if nothing was changed?


MkII has been frozen for couple of years now, and there has been no 
fundamental change in MkII for a while. I don't know why compiling the 
document is taking 10 minutes for you.


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] Trouble with editors on Mac

2013-08-14 Thread Mari Voipio
Hi!

I updated my ConTeXt installation today and now it refuses to work
with TextMate and TeXworks. When I use the typesetting command on
either editor, I get the error message

mtxrun  | unknown script 'context.lua' or 'mtx-context.lua'


The weird thing is that my ConTeXt standalone installation works on
command line (with context myfile.tex).
I've used TextMate for a year and did not change anything there. Both
editors also have my ConTeXt directory
/Applications/ConTeXt/tex/texmf-osx-64/bin/context as PATH variable (I
got a different error message on TeXworks before I edited the path
variable to include ConTeXt). So in theory everything should be
fine...


I first installed the newest ConTeXt and when it gave the above error
message, I switched to latest stable version (installation with
--context=current), but that didn't make any difference. My previous
installation was at least 3 months old, possibly quite a bit older.


This problem is not critical as I can use TextMate/TeXworks as editor
and compile on command line in Terminal,  but it is a bit of a
nuisance not to be able to use the typesetting command in the editor.
So any help is highly appreciated.


Thanks,

Mari
___
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] [PATCH] chart-line-bug-fix.patch

2013-08-14 Thread 邱红文
The following patch(pasted below and also attached as an attachment) fixes
the bug that \setupFLOWlines[rulethickness=whatever] have no effects:
--- m-chart.lua.orig2013-03-12 09:22:42.0 +0800
+++ m-chart.lua 2013-08-15 10:52:08.617268698 +0800
@@ -499,7 +499,7 @@
 local linesettings = settings.line
 context(flow_shape_line_color := \\MPcolor{%s} ;,
linesettings.color)
 context(flow_shape_fill_color := \\MPcolor{%s} ;,
linesettings.backgroundcolor)
-context(flow_shape_line_width := %s ; ,
points(linesettingsrulethickness))
+context(flow_shape_line_width := %s ; ,
points(linesettings.rulethickness))
 elseif focus[cell.focus] or focus[cell.name] then
 local focussettings = settings.focus
 context(flow_shape_line_color := \\MPcolor{%s} ;,
focussettings.framecolor)
@@ -580,7 +580,7 @@
 context(flow_touchshape := %s ;,
linesettings.offset == v_none and true or false)
 context(flow_dsp_x := %s ; flow_dsp_y := %s
;,connection.dx or 0, connection.dy or 0)
 context(flow_connection_line_color :=
\\MPcolor{%s} ;,linesettings.color)
-context(flow_connection_line_width := 2pt
;,points(linesettings.rulethickness))
+context(flow_connection_line_width := %s
;,points(linesettings.rulethickness))
 context(flow_connect_%s_%s (%s) (%s,%s,%s)
(%s,%s,%s)
;,where_cell,where_other,j,cellx,celly,what_cell,otherx,othery,what_other)
 context(flow_dsp_x := 0 ; flow_dsp_y := 0 ;)
 end


chart-line-bug-fix.patch
Description: Binary data
___
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
___