[NTG-context] Feedback on draft manual

2010-10-07 Thread R (Chandra) Chandrasekhar

How does one provide feedback on the current draft manual at:

http://pmrb.free.fr/contextref.pdf

Thanks.

Chandra
___
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] Broken ConTeXt

2010-10-07 Thread Tom Maynard

 On 10/7/2010 9:09 AM, Mojca Miklavec wrote:


Did you by any chance set the variable TEXMF in your environment?
After much ado, I finally got everything working again.  I deleted 
everything (as usual), and then simplified my PATH (removing Cygwin and 
MikTeX, among others), cleaned up my environment variables ... and did a 
fresh install.  I got a cramp from having my fingers crossed the whole 
time, but a functional ConTeXt came out at the end.


Now, back to work!  Thanks everyone for your help.

Tom.

___
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] calling ConTeXt as a background process

2010-10-07 Thread taco

Henning Hraban Ramm wrote:


I can imagine that it has something to do with SElinux settings, didn't 
dive in that yet.


That does sound familiar, in fact. I had a hanging database server
a while back because I moved it to a different location. apparmor
was the culprit in that case, so perhaps it is here as well ?

(Basically an application will get a 'resource unavailable' when
it tries to access anything outside of the apparmor allowed
directories for that service/binary).

In any case, check /etc/apparmor and /etc/apparmor.d

Best wishes,
Taco



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

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


Re: [NTG-context] calling ConTeXt as a background process

2010-10-07 Thread Florian Wobbe
> Am 2010-10-07 um 12:54 schrieb Florian Wobbe:
> 
>> On Oct 7, 2010, at 12:19 , Henning Hraban Ramm wrote:
>> 
>>> Am 2010-10-07 um 11:06 schrieb Taco Hoekwater:
> Of course, prd_paket.tex is my input file. But that's there.
 
 Your shell quotes were off. It is looking for
 
 "./prd_paket --batchmode --once.tex"
>>> 
>>> Ok, but it doesn't work with any other call of luatex - I also tried to 
>>> start another shell script that calls luatex, but it hangs in the same 
>>> manner. If I kill the luatex process, further commands work.
>> 
>> could you send me the calling shell script along with all necessary files to 
>> run the context batch? or supply a minimal example instead of prd_paket.tex.
> 
> Hi Florian,
> 
> it doesn't depend on the tex file, it's the same with
> 
> \starttext
> Hello World!
> \stoptext
> 
> It also doesn't depend on context options (--batchmode etc.)
> 
> And it doesn't seem to depend on the way of calling it from Python/Django:
> - directly with subprocess.Popen (several options), subprocess.call, 
> subprocess.check_call
> - indirectly via shell script (that contains just the context call)
> - with context or mtxrun (didn't try texlua directly yet)
> - with setuptex or setting TEXROOT and TEXMFOS directly (in the environment 
> for the subprocess call)
> 
> I can imagine that it has something to do with SElinux settings, didn't dive 
> in that yet.
> 
> I can call context manually as the same user that's running the server 
> process with all the options.
> 
> It also works on my test system (osx-intel) with Django's dev server, just 
> not on my Ubuntu server (linux-64).

Well, remote sensing with computers is cumbersome and as I haven't got a clue 
what happens on your machine I'd rather see your the shell script. How is this 
script intended to be called: as a subshell from the prompt, as a cron job in 
the background, ...? I've got Ubunto and OSX here and could try to reproduce 
the error for you, if you post your script.

A shell script with just these 4 lines

 #!/bin/bash
 cd $HOME/context/tests
 export PATH=$PATH:$HOME/applic/context/tex/texmf-linux-64/bin
 context --batchmode test.tex

works as expected on Ubunto 2.6.32-24-server x86_64 with an almost empty 
environment (none of the TEX* variables set). You just have to set the path to 
context - nothing else is necessary.

As for the environment variables set: you can test for that in the script via 
'env' and redirect the output to a file.

Cheers,
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] calling ConTeXt as a background process

2010-10-07 Thread Henning Hraban Ramm

Am 2010-10-07 um 17:48 schrieb luigi scarso:

How's ConTeXt called in ConTeXtgarden Live? Any special means?

http://github.com/pgundlach/contextlive/blob/master/runtexexec.c
I use fork()/exec() combination in C.

Ok, I won't use C...


I saw you set TEXMFHOME - I don't need that for MkIV, do I?


1) Are you sure to have done source setuptex before run luatex


tried that and tried to set TEXROOT and TEXMFOS "manually" (and the  
output of "set" looks right).



2) does os.system(...) in python only work ?



Thank you, I didn't think of the easiest option!

With strace I get a return code of 0, so the command seems to run  
through, nothing hangs, but also nothing happens.


Without strace texlua hangs, and after killing it I get a 36608 (don't  
know what that is, it's not the PID).



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

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

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


Re: [NTG-context] calling ConTeXt as a background process

2010-10-07 Thread Henning Hraban Ramm


Am 2010-10-07 um 12:54 schrieb Florian Wobbe:


On Oct 7, 2010, at 12:19 , Henning Hraban Ramm wrote:


Am 2010-10-07 um 11:06 schrieb Taco Hoekwater:

Of course, prd_paket.tex is my input file. But that's there.


Your shell quotes were off. It is looking for

"./prd_paket --batchmode --once.tex"


Ok, but it doesn't work with any other call of luatex - I also  
tried to start another shell script that calls luatex, but it hangs  
in the same manner. If I kill the luatex process, further commands  
work.


could you send me the calling shell script along with all necessary  
files to run the context batch? or supply a minimal example instead  
of prd_paket.tex.


Hi Florian,

it doesn't depend on the tex file, it's the same with

\starttext
Hello World!
\stoptext

It also doesn't depend on context options (--batchmode etc.)

And it doesn't seem to depend on the way of calling it from Python/ 
Django:
- directly with subprocess.Popen (several options), subprocess.call,  
subprocess.check_call

- indirectly via shell script (that contains just the context call)
- with context or mtxrun (didn't try texlua directly yet)
- with setuptex or setting TEXROOT and TEXMFOS directly (in the  
environment for the subprocess call)


I can imagine that it has something to do with SElinux settings,  
didn't dive in that yet.


I can call context manually as the same user that's running the server  
process with all the options.


It also works on my test system (osx-intel) with Django's dev server,  
just not on my Ubuntu server (linux-64).



Despairing 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] calling ConTeXt as a background process

2010-10-07 Thread luigi scarso
On Thu, Oct 7, 2010 at 5:44 PM, Henning Hraban Ramm  wrote:
> Am 2010-10-07 um 12:27 schrieb Patrick Gundlach:
>
>>> How's ConTeXt called in ConTeXtgarden Live? Any special means?
>>
>> http://github.com/pgundlach/contextlive/blob/master/runtexexec.c
>>
>> I use fork()/exec() combination in C.
>
> Ok, I won't use C...
>
> I guess it's a problem of my specific combination of Ubuntu/SElinux,
> Django/fcgi and LuaTeX... :-(
> I found others running latex from Django in exactly the same matter as
> ConTeXt fails for me.
> But I can call other programs that way, so part of the problem is in LuaTeX.
1) Are you sure to have done source setuptex before run luatex
2) does os.system(...) in python only work ?


-- 
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] calling ConTeXt as a background process

2010-10-07 Thread Henning Hraban Ramm

Am 2010-10-07 um 12:27 schrieb Patrick Gundlach:


How's ConTeXt called in ConTeXtgarden Live? Any special means?


http://github.com/pgundlach/contextlive/blob/master/runtexexec.c

I use fork()/exec() combination in C.


Ok, I won't use C...

I guess it's a problem of my specific combination of Ubuntu/SElinux,  
Django/fcgi and LuaTeX... :-(
I found others running latex from Django in exactly the same matter as  
ConTeXt fails for me.
But I can call other programs that way, so part of the problem is in  
LuaTeX.


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] wrong itemize indenting

2010-10-07 Thread Andreas Harder

Am 06.10.2010 um 15:24 schrieb Andreas Harder:

> Hi all,
> 
> I mentioned it already but so far I couldn't find a solution. Here is an 
> example of my problem:
> 
> \starttext  \showframe \overfullrule=4pt
> \startbuffer
>  \startitemize[n,fit][left={Abb. },distance=.5em]
>  \item \dorecurse{20}{eins }
>  \item \dorecurse{20}{zwei }
>  \item \dorecurse{20}{drei }
>  \stopitemize
> \stopbuffer
> \getbuffer % -> correct indenting
> \bTABLE 
> \bTR\bTD \getbuffer \eTD\eTR
> \eTABLE
> \getbuffer % -> wrong indenting
> \stoptext
> 
> If one uses an itemize environment with the "fit"-option in a TABLE the 
> further itemize environments getting disturbed.
> 
> Is this a bug or is there a workaround? 

In case someone is interested, I found a workaround …

\starttext  \showframe \overfullrule=4pt

\startbuffer
  \startitemize[n,fit][left={Abb. },distance=.5em]
  \item \dorecurse{20}{eins }
  \item \dorecurse{20}{zwei }
  \item \dorecurse{20}{drei }
  \stopitemize
\stopbuffer

\defineoverlay
  [items]
  [{\framed[width=broad,offset=overlay,align=normal]{\getbuffer}}]

\getbuffer % -> correct indenting

% \bTABLE \bTR\bTD \getbuffer \eTD\eTR \eTABLE

\bTABLE[width=broad,height=9\lineheight]
  \setupTABLE[last][last][background=items]
  \bTR\bTD \eTD\eTR
\eTABLE

\getbuffer % -> wrong indenting (if one uses \getbuffer in TABLE)

\stoptext

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] Broken ConTeXt

2010-10-07 Thread Mojca Miklavec
On Wed, Oct 6, 2010 at 22:48, Tom Maynard wrote:
> On 10/6/2010 3:10 PM, Mojca Miklavec wrote:
>
>> What does
>>mtxrun --generate
>> return you?
>
> C:\>mtxrun --generate
>
> MTXrun | resolvers: variable 'SELFAUTOLOC' set to
> 'C:/context/tex/texmf-mswin/bin'
> MTXrun | resolvers: variable 'SELFAUTODIR' set to
> 'C:/context/tex/texmf-mswin'
> MTXrun | resolvers: variable 'SELFAUTOPARENT' set to 'C:/context/tex'
> MTXrun | resolvers: variable 'TEXMFCNF' set to
> 'c:\ConTeXt\texmf{-local,-context
> ,}/web2c'
> MTXrun | resolvers: variable 'TEXMF' set to
> '{c:\ConTeXt\texmf,c:\ConTeXt\texmf-
> local,c:\ConTeXt\texmf-context,c:\ConTeXt\texmf-mswin}'
> MTXrun | resolvers: variable 'TEXOS' set to 'texmf-mswin'
> MTXrun | resolvers
> MTXrun | resolvers: warning: no lua configuration files found
> MTXrun | resolvers: skipping list of 'c:/ConTeXt/texmf' (runtime)
> MTXrun | resolvers: skipping list of 'c:/ConTeXt/texmf-local' (runtime)
> MTXrun | resolvers: skipping list of 'c:/ConTeXt/texmf-context' (runtime)
> MTXrun | resolvers: skipping list of 'c:/ConTeXt/texmf-mswin' (runtime)
> MTXrun | resolvers
> MTXrun | resolvers
> C:\>

Did you by any chance set the variable TEXMF in your environment? I
guess not, but in my case both TEMF and TEXMFCNF are empty. In your
case they are both set wrong. What else do you have in C:\ConTeXt\
besides "bin", "tex", "first-setup.bat" and "status-of-update.lua"?

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

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


Re: [NTG-context] Verbatim typing with numbers inside float

2010-10-07 Thread Stefan Müller

On 07.10.2010 09:35, Alan BRASLAU wrote:

On Thursday 07 October 2010 09:19:42 Hans Hagen wrote:

On 7-10-2010 12:02, Stefan Müller wrote:


Splitting up long source code in several pieces (one per page) and put
them in separate figures doesn't seem right to me. Setting it as
numbered paragraph? Putting up a fake caption with \placefloatcaption
(which doesn't seem to work in MkIV)? Are there other possiblities of
numbering (by section) more or less big chunks of source code I'm not
thinking of? That would help me very much. Thanks for thinking about
that.


you can make your own construct, maybe something with a background
(textbackgrounds can cross pages)


Hello,

I use textbackgrounds to set-off paragraphs,
for example, here as secondary material.
It does not float and, indeed, may flow over many pages.

This is a concrete example (to which you could add line numbering):

\definetextbackground [secondary]
[location=paragraph,
background=color,backgroundscreen=middlegray,
leftoffset=0.5cm,rightoffset=0.5cm,
topoffset=.25ex,bottomoffset=.25ex,
before={\blank[small]\switchtobodyfont[script]},
after={\blank[small]},
frame=off]
\kindofpagetextareas3 % fix from Hans
% Indeed, there are several internal methods available
% for managing text areas. Without this fix, the background
% color bleeds over footnotes and floats external to the
% secondary material.

\startsecondary
Here is some less interesting detailed stuff that can be skipped
if you wish…
\stopsecondary

Alan


Thanks, this is pretty nice. I'm going to use something like that inside 
an "algorithm enumeration", so I get the number I can reference to. This 
is better than the floating-approach, I think.


Thanks for the ideas,
Stefan.
___
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] Euler font and context minimals

2010-10-07 Thread Mathieu Boespflug
Thanks you very much Khaled!

On Tue, Oct 5, 2010 at 11:36 AM, Khaled Hosny  wrote:
> On Sun, Sep 26, 2010 at 02:01:09PM +0200, Mathieu Boespflug wrote:
>> Hi Khaled,
>>
>> > Neo Euler does not have all math arrows at the moment, if some one can
>> > come with a list of standard math arrows (i.e. CM and AMS ones), I'll
>> > see if I can add them.
>>
>> I extracted the following list from the Tex Reference Card J.H.
>> Silverman. Seeing as that card is for plain TeX, I'd assume his list
>> of arrows is pretty standard. I don't know how much of a subset of all
>> the arrows available in CM is, but it's a start.
>>
>> \longleftarrow
> [...]
>> \swarrow
>
> The above arrows are all available now (except that the long arrows have
> no special versions for script sizes, I don't no if it is really
> needed).
>
> 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
> ___
>
___
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] calling ConTeXt as a background process

2010-10-07 Thread Henning Hraban Ramm

Am 2010-10-07 um 12:16 schrieb :

Have you tried attaching to the stalled processes using strace (Linux)
or dtruss (Mac)?  This will tell you what system call is blocking,  
might

give a clue. The defunct uname process in your original post suggests
to me the parent did not calling wait() on the child (uname) and it  
exited.


Here's the output of strace after I killed the stalled process:

execve("/var/opt/context/tex/texmf-linux-64/bin/context", ["/var/opt/ 
context/tex/texmf-linux"..., "--batchmode", "--once", "prd_streifband- 
d"], [/* 10 vars */]) = 0

brk(0)  = 0x1e4bd000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,  
0) = 0x2ababa192000

uname({sys="Linux", node="aine.fiee.net", ...}) = 0
access("/etc/ld.so.nohwcap", F_OK)  = -1 ENOENT (No such file or  
directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,  
0) = 0x2ababa193000
access("/etc/ld.so.preload", R_OK)  = -1 ENOENT (No such file or  
directory)

open("/etc/ld.so.cache", O_RDONLY)  = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=20573, ...}) = 0
mmap(NULL, 20573, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2ababa195000
close(3)= 0
access("/etc/ld.so.nohwcap", F_OK)  = -1 ENOENT (No such file or  
directory)

open("/lib/libncurses.so.5", O_RDONLY)  = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320% 
\1\0\0\0\0\0@"..., 832) = 832

fstat(3, {st_mode=S_IFREG|0644, st_size=256288, ...}) = 0
mmap(NULL, 2353152, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,  
0) = 0x2ababa393000

mprotect(0x2ababa3ce000, 2093056, PROT_NONE) = 0
mmap(0x2ababa5cd000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE| 
MAP_FIXED|MAP_DENYWRITE, 3, 0x3a000) = 0x2ababa5cd000

close(3)= 0
access("/etc/ld.so.nohwcap", F_OK)  = -1 ENOENT (No such file or  
directory)

open("/lib/libdl.so.2", O_RDONLY)   = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0> 
\0\1\0\0\0\20\16\0\0\0\0\0\0@"..., 832) = 832

fstat(3, {st_mode=S_IFREG|0644, st_size=14616, ...}) = 0
mmap(NULL, 2109728, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,  
0) = 0x2ababa5d2000

mprotect(0x2ababa5d4000, 2097152, PROT_NONE) = 0
mmap(0x2ababa7d4000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED| 
MAP_DENYWRITE, 3, 0x2000) = 0x2ababa7d4000

close(3)= 0
access("/etc/ld.so.nohwcap", F_OK)  = -1 ENOENT (No such file or  
directory)

open("/lib/libc.so.6", O_RDONLY)= 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0> 
\0\1\0\0\0\300\342\1\0\0\0\0\0@"..., 832) = 832

fstat(3, {st_mode=S_IFREG|0755, st_size=1375536, ...}) = 0
mmap(NULL, 3482232, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,  
0) = 0x2ababa7d6000

mprotect(0x2ababa92, 2093056, PROT_NONE) = 0
mmap(0x2ababab1f000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE| 
MAP_FIXED|MAP_DENYWRITE, 3, 0x149000) = 0x2ababab1f000
mmap(0x2ababab24000, 17016, PROT_READ|PROT_WRITE, MAP_PRIVATE| 
MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ababab24000

close(3)= 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,  
0) = 0x2ababab29000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,  
0) = 0x2ababab2a000

arch_prctl(ARCH_SET_FS, 0x2ababab29af0) = 0
mprotect(0x2ababab1f000, 12288, PROT_READ) = 0
munmap(0x2ababa195000, 20573)   = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
open("/dev/tty", O_RDWR|O_NONBLOCK) = -1 ENXIO (No such device or  
address)
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fff561b3e10) = -1 EINVAL  
(Invalid argument)

brk(0)  = 0x1e4bd000
brk(0x1e4be000) = 0x1e4be000
brk(0x1e4bf000) = 0x1e4bf000
getuid()= 1005
getgid()= 1006
geteuid()   = 1005
getegid()   = 1006
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
brk(0x1e4c) = 0x1e4c
open("/proc/meminfo", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,  
0) = 0x2ababa195000

read(3, "MemTotal:  2097152 kB\nMemFree"..., 4096) = 771
close(3)= 0
munmap(0x2ababa195000, 4096)= 0
brk(0x1e4c1000) = 0x1e4c1000
rt_sigaction(SIGCHLD, {SIG_DFL}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGCHLD, {SIG_DFL}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGINT, {SIG_DFL}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGINT, {SIG_DFL}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_DFL}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_DFL}, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigaction(SIGQUIT, {SIG_IGN}, {SIG_DFL}, 8) = 0
uname({sys="Linux", node="aine.fiee.net", ...}) = 0
stat("/var/www/xxx/_textemp", {st_mode=S_IFDIR|0755,  
st_size=4096, ...}) = 

Re: [NTG-context] calling ConTeXt as a background process

2010-10-07 Thread Patrick Gundlach
Hi Hraban,

> 
> How's ConTeXt called in ConTeXtgarden Live? Any special means?

Please CC me for these kind of questions, for I don't follow the list every day.


I've put context live into a repo at github:

http://github.com/pgundlach/contextlive

and take a look at

http://github.com/pgundlach/contextlive/blob/master/runtexexec.c


I use fork()/exec() combination in C.


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] calling ConTeXt as a background process

2010-10-07 Thread Henning Hraban Ramm

Am 2010-10-07 um 11:06 schrieb Taco Hoekwater:

Of course, prd_paket.tex is my input file. But that's there.


Your shell quotes were off. It is looking for

 "./prd_paket --batchmode --once.tex"


Ok, but it doesn't work with any other call of luatex - I also tried  
to start another shell script that calls luatex, but it hangs in the  
same manner. If I kill the luatex process, further commands work.


I found a lot of examples where people call other programs from Django  
in the same way as I tried with LuaTeX (i.e. without additional shell  
script), so my call isn't probably too wrong.


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

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

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


Re: [NTG-context] calling ConTeXt as a background process

2010-10-07 Thread Robin.Kirkham
Posted by Henning Hraban Ramm [hra...@fiee.net]

> Am 2010-10-07 um 10:42 schrieb Taco Hoekwater:
> 
> > On 10/07/10 09:34, Henning Hraban Ramm wrote:
> >> mtxrun --script context "prd_paket --batchmode --once"
> >
> > When I run that last thing on the command line, I get:
> >
> >  ! I can't find file `./prd_paket --batchmode --once'.
> >  <*> "./prd_paket --batchmode --once"
> >
> >  Please type another input file name:
> 
> Of course, prd_paket.tex is my input file. But that's there.
> 
> > But it is hard to say whether that is the problem. If it was
> > me, I would attach a gdb to the process to see where it is at
> > from the backtrace (but you need a non-stripped build of
> > the binary for that).
> 
> I'd like to avoid compiling a debugging version of luatex...

Hraban,

Have you tried attaching to the stalled processes using strace (Linux)
or dtruss (Mac)?  This will tell you what system call is blocking, might
give a clue. The defunct uname process in your original post suggests
to me the parent did not calling wait() on the child (uname) and it exited.

Best,

Robin
___
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] calling ConTeXt as a background process

2010-10-07 Thread Taco Hoekwater


On 10/07/10 11:00, Henning Hraban Ramm wrote:
> Am 2010-10-07 um 10:42 schrieb Taco Hoekwater:
> 
>> On 10/07/10 09:34, Henning Hraban Ramm wrote:
>>> mtxrun --script context "prd_paket --batchmode --once"
>>
>> When I run that last thing on the command line, I get:
>>
>>  ! I can't find file `./prd_paket --batchmode --once'.
>>  <*> "./prd_paket --batchmode --once"
>>
>>  Please type another input file name:
> 
> Of course, prd_paket.tex is my input file. But that's there.

Your shell quotes were off. It is looking for

  "./prd_paket --batchmode --once.tex"

___
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] calling ConTeXt as a background process

2010-10-07 Thread Henning Hraban Ramm

Am 2010-10-07 um 10:42 schrieb Taco Hoekwater:


On 10/07/10 09:34, Henning Hraban Ramm wrote:

mtxrun --script context "prd_paket --batchmode --once"


When I run that last thing on the command line, I get:

 ! I can't find file `./prd_paket --batchmode --once'.
 <*> "./prd_paket --batchmode --once"

 Please type another input file name:


Of course, prd_paket.tex is my input file. But that's there.


But it is hard to say whether that is the problem. If it was
me, I would attach a gdb to the process to see where it is at
from the backtrace (but you need a non-stripped build of
the binary for that).


I'd like to avoid compiling a debugging version of luatex...

I guess the problem isn't luatex itself, but the probably somehow  
restricted environment.


How's ConTeXt called in ConTeXtgarden Live? Any special means?


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

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

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


Re: [NTG-context] \seeindex

2010-10-07 Thread Hans Hagen

On 5-10-2010 5:17, Alan BRASLAU wrote:

Wishlist: add interaction to \seeindex


Explaination:

\seeindex{index_entry}{see_entry}
can be used to add entry to an index
that refers one to another entry.
Example: \seeindex{DNA}{deoxyribonucleic acid}

With \setupinteraction [state=start]
one gets active hyperlinks on the page numbers
of the index entries.
It would be nice if \seeindex entries to
the index would create an interaction hyperlink
to the corresponding real index entry.

This is pretty straight-forward, but probably
non-trivial to implement, as there is no guarantee
that the second entry of \seeindex indeed exists.
Of course, \seeindex could create this entry,
but it may not have an associated page number
or page numbers if \index{deoxyribonucleic acid}
was never called.


I can have a look at it ... as all data lives at the lua end it's easy 
to identify the tobeseen word but it would take some extra housekeeping 
to keep track of where that word ends up in the index (so that word 
actually becomes a reference) ... it's rather easy to implement, but 
less easy not to mess up the code to the level that 10 years from now no 
one understands why it's there


(I should also port the linked index entries in interactive documents: a 
linked list of hyperlinks that steps you through the 20 pages that 
discuss deoxyribonucleic acid.)



Even more sophisticated, but the bookkeeping on this
might get a bit complicated, \index{DNA} could
create an index entry under {deoxyribonucleic acid}
as \seeindex instructs to "hijack" this label.

(currently, it will put "see DNA" followed by a page number.)

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
___



--

-
  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] calling ConTeXt as a background process

2010-10-07 Thread Taco Hoekwater


On 10/07/10 09:34, Henning Hraban Ramm wrote:
> mtxrun --script context "prd_paket --batchmode --once"

When I run that last thing on the command line, I get:

  ! I can't find file `./prd_paket --batchmode --once'.
  <*> "./prd_paket --batchmode --once"

  Please type another input file name:

But it is hard to say whether that is the problem. If it was
me, I would attach a gdb to the process to see where it is at
from the backtrace (but you need a non-stripped build of
the binary for that).

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

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


Re: [NTG-context] subfootnote

2010-10-07 Thread Hans Hagen



\definestructureseparatorset [footnote][][]
\definestructureconversionset[footnote][number,characters][numbers]
\setupenumerations[footnote][numberconversionset=footnote,numberseparatorset=footnote]

\setupfootnotes[way=bytext]%<- here is the problem!!

\starttext
  test \footnote{}
  text
  test \startfootnote note \stopfootnote
  test \startsubfootnote subnote \stopsubfootnote
  test \startfootnote note \stopfootnote
\stoptext


fixed in next beta

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


[NTG-context] Example Gallery

2010-10-07 Thread R (Chandra) Chandrasekhar

Dear Folks,

When I first started learning to use TikZ-PGF, I was aided a great deal 
by the varied examples available at:


http://www.texample.net/tikz/

Is there any such example gallery for ConTeXt?

Thank you.

Chandra
07 Oct 10
___
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] Verbatim typing with numbers inside float

2010-10-07 Thread Alan BRASLAU
On Thursday 07 October 2010 09:19:42 Hans Hagen wrote:
> On 7-10-2010 12:02, Stefan Müller wrote:
> 
> > Splitting up long source code in several pieces (one per page) and put
> > them in separate figures doesn't seem right to me. Setting it as
> > numbered paragraph? Putting up a fake caption with \placefloatcaption
> > (which doesn't seem to work in MkIV)? Are there other possiblities of
> > numbering (by section) more or less big chunks of source code I'm not
> > thinking of? That would help me very much. Thanks for thinking about
> > that.
> 
> you can make your own construct, maybe something with a background
> (textbackgrounds can cross pages)
> 
Hello,

I use textbackgrounds to set-off paragraphs,
for example, here as secondary material.
It does not float and, indeed, may flow over many pages.

This is a concrete example (to which you could add line numbering):

\definetextbackground [secondary]
[location=paragraph,
background=color,backgroundscreen=middlegray,
leftoffset=0.5cm,rightoffset=0.5cm,
topoffset=.25ex,bottomoffset=.25ex,
before={\blank[small]\switchtobodyfont[script]},
after={\blank[small]},
frame=off]
\kindofpagetextareas3 % fix from Hans
% Indeed, there are several internal methods available
% for managing text areas. Without this fix, the background
% color bleeds over footnotes and floats external to the
% secondary material.

\startsecondary
Here is some less interesting detailed stuff that can be skipped
if you wish…
\stopsecondary

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] calling ConTeXt as a background process

2010-10-07 Thread Henning Hraban Ramm


Am 2010-10-07 um 09:06 schrieb Henning Hraban Ramm:


Hi together!

I'm trying since about a week to get ConTeXt running as a background  
process of a web application.

It's always hanging, and I get no log.

"ps axef" shows the call stack:

\_ /var/www/xxx/bin/python /var/www/xxx/releases/current/cerebrale/ 
manage.py runfcgi method=threaded ...
   \_ /bin/sh -c cd /var/www/xxx/_textemp && /var/opt/context/tex/ 
texmf-linux-64/bin/context ...
   \_ /bin/sh /var/opt/context/tex/texmf-linux-64/bin/context -- 
purgeall --batchmode --result=/var/www/xxx/_textemp/xxx.pdf
   \_ texlua /var/opt/context/tex/texmf-linux-64/bin/mtxrun  
--script context --purgeall --batchmode --result=/ ...

   \_ [uname] 

I.e. it looks like texlua calls uname in a way that lets the process  
hang forever.
If I call the same from an active shell everything runs fine. Also  
uname alone works in the shell command.

Any ideas what I could/should check?

I don't think it could be the PATH, since ConTeXt's bin as well as  
all the system tools are in:
PATH=/var/opt/context/tex/texmf-linux-64/bin:/var/www/cerebrale/bin:/ 
command:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/ 
sbin:/usr/X11R6/bin

TEXMFOS=/var/opt/context/tex/texmf-linux-64
TEXROOT=/var/opt/context/tex

The user that runs the server process (incl. sub-shell and ConTeXt)  
owns all the TeX files and the directory.


Maybe it's a Python problem, here's my call:
subprocess.Popen(cmd.encode('utf-8'), shell=True, stderr=logfile,  
stdout=logfile)


But I can call several other commands in this way without problems.
The whole thing (incl. ConTeXt) works on my Mac (OSX 10.5.8) at home.
Everything I call before ConTeXt shows up in the logfile.


I tried to call mtxrun directly and replaced the calls to uname -m  
with their return value (x86_64).
Now the texlua process itself hangs, even if not "defunct" it doesn't  
do anything:


\_ /var/www/xxx/bin/python /var/www/xxx/releases/current/cerebrale/ 
manage.py runfcgi method=threaded ...
\_ /bin/sh -c cd /var/www/xxx/_textemp && mtxrun --script context  
"prd_paket --batchmode --once" PATH=/var/opt/context/tex/texmf- 
linux-64/bin:/var/www/xxx/bin:...
\_ texlua /var/opt/context/tex/texmf-linux-64/bin/mtxrun -- 
script context prd_paket --batchmode --once TEXMFOS=/var/opt/context/ 
tex/texmf-linux-64 VIRTUAL_ENV=/var/www/xxx PATH=/var/opt/context/tex/ 
texmf-linux-64/bin:...


Help?

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

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

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


Re: [NTG-context] Verbatim typing with numbers inside float

2010-10-07 Thread Hans Hagen

On 7-10-2010 12:02, Stefan Müller wrote:


Thank you very much for your effort. Pretty amazing what's doable.
Unfortunately there are two issues: The distance between numbers and
source lines is too small for bigger line numbers. I just have to make
"distance=0em" big enough for this to work, right?


or width .. just experiment with values


The other thing: The width available for the caption is capped by the
width of the longest source line. I think I prefer the source lines to
start at the left margin.


you could move the framed to the right (\hskip1em or so) but on the 
other hand it might look more consistent if the numbers stick into some 
virtual margin



In addition there is something else I didn't think of when I put up that
mail (sorry for that). If I put (a very long piece) source inside a
figure I won't have pagebreaks, right? So this makes me think it's
probably not what I'm looking for.


no page breaks indeed (at least not now in such cases)


Splitting up long source code in several pieces (one per page) and put
them in separate figures doesn't seem right to me. Setting it as
numbered paragraph? Putting up a fake caption with \placefloatcaption
(which doesn't seem to work in MkIV)? Are there other possiblities of
numbering (by section) more or less big chunks of source code I'm not
thinking of? That would help me very much. Thanks for thinking about that.


you can make your own construct, maybe something with a background 
(textbackgrounds can cross pages)


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
___


[NTG-context] calling ConTeXt as a background process

2010-10-07 Thread Henning Hraban Ramm

Hi together!

I'm trying since about a week to get ConTeXt running as a background  
process of a web application.

It's always hanging, and I get no log.

"ps axef" shows the call stack:

 \_ /var/www/xxx/bin/python /var/www/xxx/releases/current/cerebrale/ 
manage.py runfcgi method=threaded ...
\_ /bin/sh -c cd /var/www/xxx/_textemp && /var/opt/context/tex/ 
texmf-linux-64/bin/context ...
\_ /bin/sh /var/opt/context/tex/texmf-linux-64/bin/context -- 
purgeall --batchmode --result=/var/www/xxx/_textemp/xxx.pdf
\_ texlua /var/opt/context/tex/texmf-linux-64/bin/mtxrun  
--script context --purgeall --batchmode --result=/ ...

\_ [uname] 

I.e. it looks like texlua calls uname in a way that lets the process  
hang forever.
If I call the same from an active shell everything runs fine. Also  
uname alone works in the shell command.

Any ideas what I could/should check?

I don't think it could be the PATH, since ConTeXt's bin as well as all  
the system tools are in:
PATH=/var/opt/context/tex/texmf-linux-64/bin:/var/www/cerebrale/bin:/ 
command:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/ 
usr/X11R6/bin

TEXMFOS=/var/opt/context/tex/texmf-linux-64
TEXROOT=/var/opt/context/tex

The user that runs the server process (incl. sub-shell and ConTeXt)  
owns all the TeX files and the directory.


Maybe it's a Python problem, here's my call:
subprocess.Popen(cmd.encode('utf-8'), shell=True, stderr=logfile,  
stdout=logfile)


But I can call several other commands in this way without problems.
The whole thing (incl. ConTeXt) works on my Mac (OSX 10.5.8) at home.
Everything I call before ConTeXt shows up in the logfile.


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
___