Re: [NTG-context] Pipe symbol

2011-01-24 Thread Hans Hagen

On 24-1-2011 3:22, Vyatcheslav Yatskovsky wrote:

\starttext
a \textbar\ b \letterbar\ c \type{|} d ||| e
\stoptext

Wolfgang


Even more thanks!

P.S. Searching Wiki for pipe symbol gives no useful results. At what
section I can wikify this?


I think that having a special symbols (everything non letters) section 
makes sense.


-
  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] [PATCH] mtxrun: Typo. s/sometims/sometimes/

2011-01-24 Thread Hans Hagen

On 24-1-2011 2:10, Paul Menzel wrote:

Date: Mon, 24 Jan 2011 02:05:06 +0100

The following command was used.

$ git grep -l sometims | xargs sed -i 's/sometims/sometimes/'


fyi: only l-os.lua needs to be patched as the rest is derived from it


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

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


Re: [NTG-context] Pipe symbol

2011-01-24 Thread Khaled Hosny
On Mon, Jan 24, 2011 at 01:04:55AM +0100, Wolfgang Schuster wrote:
 
 Am 24.01.2011 um 00:26 schrieb Vyatcheslav Yatskovsky:
 
  Hi,
  
  How to use a pipe symbol (|) in a text?
  
  Both | and \| give errors.
 
 \starttext
 a \textbar\ b \letterbar\ c \type{|} d ||| e
 \stoptext

Just wondering, what is special about | now we can even have ^ and $ in
text mode?

Regards,
 Khaled

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

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


Re: [NTG-context] Pipe symbol

2011-01-24 Thread Wolfgang Schuster

Am 24.01.2011 um 12:47 schrieb Khaled Hosny:

 Just wondering, what is special about | now we can even have ^ and $ in text 
 mode?

http://wiki.contextgarden.net/Composed_words

Wolfgang

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

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


[NTG-context] metafun- how to pass array as an argument

2011-01-24 Thread dalyoung
Dear all,

I draw a simple figure using the code as below.
In the code, I use for i = 3,5,0,2,1,7: in def draw_balls.
However, if I can pass the array 3,5,0,2,1,7 as an argument for def 
draw_balls (expr n) and call draw_balls (3,5,0,2,1,7), then it can be used for 
different number of balls and number of boxes.
Is there a way to do that or any suggestions?

Thank you for reading.

Regards,

Dalyoung


\startbuffer[a]
path p;
numeric bwidth, u, lastpoint; 
u :=1cm; 
p := fullcircle scaled .3u;
lastpoint := 0;

def draw_balls = %(expr s)
  draw (0,0) -- (0, u);
  for i=3,5,0,2,1,7:
for j = 1 upto i:
draw p shifted (lastpoint+.32*j*u,.3u);
endfor;
  bwidth := .32i*u+.5u;
  draw (lastpoint,0) -- (lastpoint +bwidth,0) -- (lastpoint +bwidth,u);
  lastpoint := lastpoint+bwidth;
  endfor;
enddef;

draw_balls;

\stopbuffer

\starttext
\processMPbuffer[a]
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Pipe symbol

2011-01-24 Thread Khaled Hosny
On Mon, Jan 24, 2011 at 01:01:10PM +0100, Wolfgang Schuster wrote:
 
 Am 24.01.2011 um 12:47 schrieb Khaled Hosny:
 
 
 Just wondering, what is special about | now we can even have ^ and $
 in text mode?
 
 
 http://wiki.contextgarden.net/Composed_words

I see, but it is a feature I'd never need (not when typesetting Arabic
at least), is there a way to switch it off and get regular | instead?

Regards,
 Khaled

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

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


[NTG-context] Layer(s)

2011-01-24 Thread Ian Lawrence
Morning,

I am completely defeated by layers...from a more or less complete beginner.. So 
please be gentle.

I think you ought to be able to have multiple layers and so to switch them on 
and off, using modes.

However I can only find examples and documentation for single layers in use at 
any one time.

If this is true then I can also see that there ought to a parameter that sets 
the stacking order of the layer...

So I think I need to know about \setuplayer (just guessing)

But:

http://wiki.contextgarden.net/Command_Syntax/Missing#layer_commands


So if any one of you kind people can help with the missing syntax, or a 
**simple example** of a multiple layered document, I'd be grateful.

Thanks

Ian___
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] metafun- how to pass array as an argument

2011-01-24 Thread Peter Rolf
Am 24.01.2011 13:18, schrieb dalyoung:
 \startbuffer[a]
 path p;
 numeric bwidth, u, lastpoint; 
 u :=1cm; 
 p := fullcircle scaled .3u;
 lastpoint := 0;
 
 def draw_balls = %(expr s)
def draw_balls(text s) =

   draw (0,0) -- (0, u);
   for i=3,5,0,2,1,7:
for i=s:

   for j = 1 upto i:
   draw p shifted (lastpoint+.32*j*u,.3u);
   endfor;
   bwidth := .32i*u+.5u;
   draw (lastpoint,0) -- (lastpoint +bwidth,0) -- (lastpoint +bwidth,u);
   lastpoint := lastpoint+bwidth;
   endfor;
 enddef;
 
 draw_balls;
 
 \stopbuffer
 
 \starttext
 \processMPbuffer[a]
 \stoptext

works in mkii, but fails in mkiv. i use an outdated version (31.12.2010)
here.


! LuaTeX error main ctx instance:1: attempt to call field 'feedback'
(a nil value)
stack traceback:
main ctx instance:1: in main chunk.
argument feedback(\currentMPgraphicname )}

\processMPgraphic ...ntMPgraphicformat , \!!bs #1
  ;\!!es , \!!bs
\currentMPi...
argument ...feedback(\currentMPgraphicname )}}
  \endMPgraphicgroup
\secondoftwoarguments #1#2-#2

l.25 \processMPbuffer[a]

?


best wishes,  Peter
___
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] Layer(s)

2011-01-24 Thread luigi scarso
On Mon, Jan 24, 2011 at 1:46 PM, Ian Lawrence
physics.wande...@gmail.com wrote:
 Morning,

 I am completely defeated by layers...from a more or less complete beginner..
 So please be gentle.

 I think you ought to be able to have multiple layers and so to switch them
 on and off, using modes.

 However I can only find examples and documentation for single layers in use
 at any one time.

 If this is true then I can also see that there ought to a parameter that
 sets the stacking order of the layer...

 So I think I need to know about \setuplayer (just guessing)

 But:

 http://wiki.contextgarden.net/Command_Syntax/Missing#layer_commands


 So if any one of you kind people can help with the missing syntax, or a
 **simple example** of a multiple layered document, I'd be grateful.
http://wiki.contextgarden.net/Layers

-- 
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] metafun- how to pass array as an argument

2011-01-24 Thread Peter Rolf
Am 24.01.2011 13:50, schrieb Peter Rolf:
 Am 24.01.2011 13:18, schrieb dalyoung:
 \startbuffer[a]
 path p;
 numeric bwidth, u, lastpoint; 
 u :=1cm; 
 p := fullcircle scaled .3u;
 lastpoint := 0;

 def draw_balls = %(expr s)
 def draw_balls(text s) =
 
   draw (0,0) -- (0, u);
   for i=3,5,0,2,1,7:
 for i=s:
 
  for j = 1 upto i:
  draw p shifted (lastpoint+.32*j*u,.3u);
  endfor;
   bwidth := .32i*u+.5u;
   draw (lastpoint,0) -- (lastpoint +bwidth,0) -- (lastpoint +bwidth,u);
   lastpoint := lastpoint+bwidth;
   endfor;
 enddef;

 draw_balls;

draw_balls(3,5,0,2,1,7)

sorry, i forgot to change this line.
example code is attached for testing...

 \stopbuffer

 \starttext
 \processMPbuffer[a]
 \stoptext
 
 works in mkii, but fails in mkiv. i use an outdated version (31.12.2010)
 here.
 
 
 ! LuaTeX error main ctx instance:1: attempt to call field 'feedback'
 (a nil value)
 stack traceback:
   main ctx instance:1: in main chunk.
 argument feedback(\currentMPgraphicname )}
 
 \processMPgraphic ...ntMPgraphicformat , \!!bs #1
   ;\!!es , \!!bs
 \currentMPi...
 argument ...feedback(\currentMPgraphicname )}}
   \endMPgraphicgroup
 \secondoftwoarguments #1#2-#2
 
 l.25 \processMPbuffer[a]
 
 ?
 
 
 best wishes,  Peter
 ___
 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
 ___
 

\startbuffer[a]
path p;
numeric bwidth, u, lastpoint; 
u :=1cm; 
p := fullcircle scaled .3u;
lastpoint := 0;

def draw_balls(text s) = 
  draw (0,0) -- (0, u);
  for i=s:
for j = 1 upto i:
draw p shifted (lastpoint+.32*j*u,.3u);
endfor;
  bwidth := .32i*u+.5u;
  draw (lastpoint,0) -- (lastpoint +bwidth,0) -- (lastpoint +bwidth,u);
  lastpoint := lastpoint+bwidth;
  endfor;
enddef;

draw_balls(3,5,0,2,1,7);

\stopbuffer

\starttext
\processMPbuffer[a]
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] metafun- how to pass array as an argument

2011-01-24 Thread dalyoung
Dear Peter,

Thank you for your help. 
By changing (expr s) to (text s), it works!
I am using ConTeXt Minimal and the luatex version is This is LuaTeX, Version 
beta-0.61.0-2010072816 

Thank you again.

Dalyoung


 
___
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] Labels in MetaPost (MetaObj)

2011-01-24 Thread Stefan Müller

Wikified: http://wiki.contextgarden.net/MetaObj_and_Labels
Please update/change as appropriate.

Best regards,
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
___


[NTG-context] Too many open files

2011-01-24 Thread Thomas Floeren
Hi,

with the actual minimals and luatex on Mac OSX I get pdfError: Couldn't open 
file image file name Too many open files and then fatal error 70. 
With an older installation everything is ok, minimals on Windows are ok, too. 
The document has about 700 figures.

En detail:

Working: OSX: context 2010.10.14 13:14; luatex (64) beta-0.63.0-2010091123
Working: Win XP: context 2011.01.24 10:00; luatex (32) beta-0.65.0-2010121421
Not working: OSX: 2011.01.24 10:00; luatex (64/32) beta-0.65.0-2010121316

Is this a known problem? 

Thanks for any help.

Kind regards

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] Too many open files

2011-01-24 Thread Hans Hagen

On 24-1-2011 8:41, Thomas Floeren wrote:

Hi,

with the actual minimals and luatex on Mac OSX I get pdfError: Couldn't open 
fileimage file name  Too many open files and then fatal error 70.
With an older installation everything is ok, minimals on Windows are ok, too. 
The document has about 700 figures.


test file needed


-
  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] Minimals/MTXrun: 32-bit system with 64-bit kernel: `MTXrun | no 'texmf-linux-64'`

2011-01-24 Thread Paul Menzel
Am Sonntag, den 23.01.2011, 20:50 -0500 schrieb Aditya Mahajan:
 On Mon, 24 Jan 2011, Paul Menzel wrote:

  I am running a 32-bit system with a 64-bit kernel. So relying on
 
  uname -m
 
  to determine the architecture leads to problems [1].
 
  So I do `cpu = i686` manually in `first-setup.sh` but I still do get
  the the following error message.
 
  sent 1145 bytes  received 8908331 bytes  774737.04 bytes/sec
  total size is 31230200  speedup is 3.51
 
  MTXrun | mtx update: updating mtxrun for linux: rsync -tgo --chmod=a+x 
  /opt/context/tex/texmf-context/scripts/context/lua/mtxrun.lua 
  /opt/context/tex/texmf-linux/bin/mtxrun
  MTXrun | run: rsync -tgo --chmod=a+x 
  /opt/context/tex/texmf-context/scripts/context/lua/mtxrun.lua 
  /opt/context/tex/texmf-linux/bin/mtxrun
  →   MTXrun | no 'texmf-linux-64' under tree /opt/context/tex
  When you want to use context, you need to initialize the tree by typing:
 
  . /opt/context/tex/setuptex
 
  `first-setup.sh` executes the following command
 
  # download or update the distribution
  # you may remove the --context=beta switch if you want to use current
  mtxrun --verbose --script ./bin/mtx-update.lua --update --make --force 
  --engine=all --context=beta --platform=$platform --texroot=$PWD/tex $@
 
  but `mtxrun` or `mtx-update.lua` does not seem to honor the option 
  `--platform` all the way.
 
  I tried to even hardcode `platform` to `linux` in `mtxrun` but it does not 
  help.¹
 
  elseif name == linux then
 
function os.resolvers.platform(t,k)
-- we sometims have HOSTTYPE set so let's check that first
local platform, architecture = , os.getenv(HOSTTYPE) 
  or os.resultof(uname -m) or 
if find(architecture,x86_64) then
platform = linux-64
elseif find(architecture,ppc) then
platform = linux-ppc
else
platform = linux
end
os.setenv(MTX_PLATFORM,platform)
os.platform = platform
  → return linux
end
 
  Could you please tell me, where the path for the `texmf` directory is 
  determined and how I can force that to a certain platform.
 
 You could try setting HOSTTYPE to anything other than ppc or x86_64.

Thank you for that hint. (It looks like I overlooked that `platform` is
used beforehand to set `MTX_PLATFORM` and `os.platform`. So `--platform`
does not seem to be honored all the way.)

Your hint gave me more output but left me with a non-working system.

$ HOSTTYPE=linux mtxrun --verbose --script ./bin/mtx-update.lua 
--update --make --force --engine=all --context=beta --platform=linux 
--texroot=/opt/context/tex
MTXrun | fileio: variable 'SELFAUTOLOC' set to '/usr/bin'
MTXrun | fileio: variable 'SELFAUTODIR' set to '/usr'
MTXrun | fileio: variable 'SELFAUTOPARENT' set to '/'
MTXrun | fileio: variable 'TEXMFCNF' set to 
'{$SELFAUTODIR,$SELFAUTOPARENT}{,{/share,}/texmf{-local,.local,}/web2c}'
MTXrun | fileio: skipping 'configuration' for '/usr/share/texmf/web2c' 
from 
'/home/joe/luatex-cache/context/6300afb4995fe38c77e9b86ed1ef1028/trees/f7d1b3c25487ab1e1035aff1c53b90da'
MTXrun | using script: ./bin/mtx-update.lua

MTXrun | state: loaded
MTXrun | update: start
MTXrun | run: rsync -rpztlv --delete  
contextgarden.net::'minimals/current/base/tex/ minimals/current/base/metapost/ 
minimals/current/fonts/common/ minimals/current/fonts/other/ 
minimals/current/misc/web2c minimals/current/base/xetex/ 
minimals/current/fonts/new/ minimals/current/fonts/new/ 
minimals/current/fonts/old/' '/opt/context/tex/texmf'
receiving incremental file list

sent 140 bytes  received 63713 bytes  25541.20 bytes/sec
total size is 80642372  speedup is 1262.94
MTXrun | run: rsync -rpztlv --delete  
contextgarden.net::'minimals/current/context/beta/ 
minimals/current/context/img/' '/opt/context/tex/texmf-context'
receiving incremental file list
./
bibtex/
[…]
$ . /opt/context/tex/setuptex
Setting /opt/context/tex as ConTeXt root.
$ texexec --version

MTXrun | kpse fallback with progname 'context' initialized in 0 seconds
$ texexec --version

MTXrun | kpse fallback with progname 'context' initialized in 0 seconds
$ texexec --lua test.tex # example from [3]

MTXrun | kpse fallback with progname 'context' initialized in 0 seconds

The whole output with `--verbose` is attached (compressed, as the other
message did not make it through).

Again there is the following line in there.

MTXrun | resolvers: skipping list of '/opt/context/tex/texmf-linux-64' 
(cached)

I also tried to prefix the last two command 

Re: [NTG-context] Minimals/MTXrun: 32-bit system with 64-bit kernel: `MTXrun | no 'texmf-linux-64'`

2011-01-24 Thread Aditya Mahajan

On Mon, 24 Jan 2011, Paul Menzel wrote:

   MTXrun | run: rsync -rpztlv --delete 
contextgarden.net::'minimals/current/base/tex/ 
minimals/current/base/metapost/ minimals/current/fonts/common/ 
minimals/current/fonts/other/ minimals/current/misc/web2c 
minimals/current/base/xetex/ minimals/current/fonts/new/ 
minimals/current/fonts/new/ minimals/current/fonts/old/' 
'/opt/context/tex/texmf'


   MTXrun | run: rsync -rpztlv --delete 
contextgarden.net::'minimals/current/context/beta/ 
minimals/current/context/img/' '/opt/context/tex/texmf-context'


There is no texmf-linux or texmf-linux-64 directory here. Can you check 
which binaries are downloaded?



   $ . /opt/context/tex/setuptex
   Setting /opt/context/tex as ConTeXt root.

[...]

Again there is the following line in there.

   MTXrun | resolvers: skipping list of '/opt/context/tex/texmf-linux-64' 
(cached)




Did you modify setuptex to set the correct value for $TEXMFOS and $PATH. 
This is what I do in the PKGBUILD for arch linux


 echo TEXMFOS=${_dest}/texmf-${_platform}$srcdir/tex/setuptex
 echo export TEXMFOS$srcdir/tex/setuptex
 echo   $srcdir/tex/setuptex
 echo TEXMFCACHE=\$HOME/texmf-cache $srcdir/tex/setuptex
 echo export TEXMFCACHE $srcdir/tex/setuptex
 echo   $srcdir/tex/setuptex
 echo unset TEXINPUTS MPINPUTS MFINPUTS $srcdir/tex/setuptex
 echo   $srcdir/tex/setuptex
 echo PATH=\$TEXMFOS/bin:\$PATH $srcdir/tex/setuptex
 echo export PATH   $srcdir/tex/setuptex
 echo   $srcdir/tex/setuptex
 echo OSFONTDIR=\$_userfontdir;$_osfontdir;\ \
 $srcdir/tex/setuptex
 echo export OSFONTDIR $srcdir/tex/setuptex


Here $_platform is either linux or linux-64, and $_dest is the 
installation location, and (by default) $_userfontdir=\$HOME/.fonts and 
$_osfontdir=/usr/share/fonts.



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] template for protocol (record) of experiment

2011-01-24 Thread Paul Menzel
Dear ConTeXt folks,


does anyone of you use(d) ConTeXt for typesetting a protocol/record of
an experiment (in my case physics, but it should not matter). I already
found the sample documents in the Wiki [1] and probably will be able to
come up with something, which would take me some time.

So I thought I’d be clever and ask you professionals if you have some
templates, especially for the title page, since you probably already
found a good font and the right settings for this purpose.

There are no real requirements. The name of the university [2], with the
logo, the name of the supervisor, the student with the student number,
date and the topic (Versuchsprotokoll).


Thanks in advance,

Paul


[1] http://wiki.contextgarden.net/Sample_documents
[2] http://www.physik.hu-berlin.de/


signature.asc
Description: This is a digitally signed message part
___
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] Minimals/MTXrun: 32-bit system with 64-bit kernel: `MTXrun | no 'texmf-linux-64'`

2011-01-24 Thread Paul Menzel
Am Montag, den 24.01.2011, 19:18 -0500 schrieb Aditya Mahajan:
 On Mon, 24 Jan 2011, Paul Menzel wrote:
 
 MTXrun | run: rsync -rpztlv --delete 
  contextgarden.net::'minimals/current/base/tex/ 
  minimals/current/base/metapost/ minimals/current/fonts/common/ 
  minimals/current/fonts/other/ minimals/current/misc/web2c 
  minimals/current/base/xetex/ minimals/current/fonts/new/ 
  minimals/current/fonts/new/ minimals/current/fonts/old/' 
  '/opt/context/tex/texmf'
 
 MTXrun | run: rsync -rpztlv --delete 
  contextgarden.net::'minimals/current/context/beta/ 
  minimals/current/context/img/' '/opt/context/tex/texmf-context'
 
 There is no texmf-linux or texmf-linux-64 directory here. Can you check 
 which binaries are downloaded?

$ $ ls /opt/context/tex/
setuptex  setuptex.csh  texmf-cachetexmf-fonts  texmf-local
setuptex.bat  texmf texmf-context  texmf-linux  texmf-project
$ file /opt/context/tex/texmf-linux/bin/xetex
tex/texmf-linux/bin/xetex: ELF 32-bit LSB executable, Intel 80386, 
version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.2.0, 
stripped

So it looks like these are the correct binaries for my system.

 $ . /opt/context/tex/setuptex
 Setting /opt/context/tex as ConTeXt root.
 [...]
  Again there is the following line in there.
 
 MTXrun | resolvers: skipping list of 
  '/opt/context/tex/texmf-linux-64' (cached)
 
 Did you modify setuptex to set the correct value for $TEXMFOS and $PATH. 
 This is what I do in the PKGBUILD for arch linux
 
   echo TEXMFOS=${_dest}/texmf-${_platform}$srcdir/tex/setuptex
   echo export TEXMFOS$srcdir/tex/setuptex
   echo   $srcdir/tex/setuptex
   echo TEXMFCACHE=\$HOME/texmf-cache $srcdir/tex/setuptex
   echo export TEXMFCACHE $srcdir/tex/setuptex
   echo   $srcdir/tex/setuptex
   echo unset TEXINPUTS MPINPUTS MFINPUTS $srcdir/tex/setuptex
   echo   $srcdir/tex/setuptex
   echo PATH=\$TEXMFOS/bin:\$PATH $srcdir/tex/setuptex
   echo export PATH   $srcdir/tex/setuptex
   echo   $srcdir/tex/setuptex
   echo OSFONTDIR=\$_userfontdir;$_osfontdir;\ \
   $srcdir/tex/setuptex
   echo export OSFONTDIR $srcdir/tex/setuptex
 
 
 Here $_platform is either linux or linux-64, and $_dest is the 
 installation location, and (by default) $_userfontdir=\$HOME/.fonts and 
 $_osfontdir=/usr/share/fonts.

srcdir=/opt/context
_platform=linux
_dest=/opt/context/tex
_userfontdir=\$HOME/.fonts
_osfontdir=/usr/share/fonts
echo TEXMFOS=${_dest}/texmf-${_platform}$srcdir/tex/setuptex
echo export TEXMFOS$srcdir/tex/setuptex
echo   $srcdir/tex/setuptex
echo TEXMFCACHE=\$HOME/texmf-cache $srcdir/tex/setuptex
echo export TEXMFCACHE $srcdir/tex/setuptex
echo   $srcdir/tex/setuptex
echo unset TEXINPUTS MPINPUTS MFINPUTS $srcdir/tex/setuptex
echo   $srcdir/tex/setuptex
echo PATH=\$TEXMFOS/bin:\$PATH $srcdir/tex/setuptex
echo export PATH   $srcdir/tex/setuptex
echo   $srcdir/tex/setuptex
echo OSFONTDIR=\$_userfontdir;$_osfontdir;\ \
$srcdir/tex/setuptex
echo export OSFONTDIR $srcdir/tex/setuptex

Thank you very much for your continued support. But it still does not
work.

$ texexec --verbose --lua example.tex 

MTXrun | resolvers: variable 'SELFAUTOLOC' set to 
'/opt/context/tex/texmf-linux/bin'
MTXrun | resolvers: variable 'SELFAUTODIR' set to 
'/opt/context/tex/texmf-linux'
MTXrun | resolvers: variable 'SELFAUTOPARENT' set to '/opt/context/tex'
MTXrun | resolvers: variable 'TEXMFCNF' set to ''
MTXrun | resolvers: variable 'TEXMF' set to ''
MTXrun | resolvers: variable 'TEXOS' set to 'texmf-linux'
MTXrun | resolvers
MTXrun | resolvers: loading configuration file 
'/opt/context/tex/texmf/web2c/texmfcnf.lua'
MTXrun | resolvers
MTXrun | resolvers: skipping list of '/home/joe/texmf' (runtime)
MTXrun | resolvers: locating list of '/opt/context/tex/texmf-project' 
(cached)
MTXrun | resolvers: resolver: method=locators, how=uri, scheme=file, 
argument=/opt/context/tex/texmf-project
MTXrun | resolvers: file locator '/opt/context/tex/texmf-project' found
MTXrun | resolvers: hash '/opt/context/tex/texmf-project' appended
  

[NTG-context] Problem calling Lua during \startsetups

2011-01-24 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

I encountered a bit weird thing when I used Lua in \startsetup:

---
\definelayer[T][x=0mm,y=0mm,width=\paperwidth,height=\paperheight]

\directlua{n, m = 1, 11} % Initialization

\startsetups layer
  % In my real code (= not in this example)
  % the value of 'n' is used here to set the appropriate background,
  % = n-th page of a PDF, and also to draw a filled rectangle on
  % the left or right side (depending on whether n is even or odd)

  % The code bellow fails [1]

  \startluacode
print(N=, n)

if n == 2 then
else
end
  \stopluacode
\stopsetups

\setupbackgrounds[page][setups=layer,background={T}]

\starttext
  % The code bellow works well [2]

  \startluacode
print(M=, m)

if m == 2 then
else
end
  \stopluacode

  \dorecurse{4}{\page[empty]}
\stoptext
---

The problem is that Lua code between \startsetups ... \stopsetups [1] seems to be 
parsed another way than when in [2].

The [1] gives the following error message:

---
! LuaTeX error main ctx instance:1: 'then' expected near 'thenelseend'.
---

So it seems like spaces and/or \ns were ignored.

If you commented [1], the section [2] would work well.

So how to use make Lua work well even between \startsetups ... \stopsetups?

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-Bkg.log
Description: Binary data


t-Bkg.mkiv
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
___


Re: [NTG-context] Problem calling Lua during \startsetups

2011-01-24 Thread Wolfgang Schuster

Am 25.01.2011 um 08:33 schrieb Procházka Lukáš Ing. - Pontex s. r. o.:

 Hello,
 
 I encountered a bit weird thing when I used Lua in \startsetup:
 
 ---
 \definelayer[T][x=0mm,y=0mm,width=\paperwidth,height=\paperheight]
 
 \directlua{n, m = 1, 11} % Initialization
 
 \startsetups layer
  % In my real code (= not in this example)
  % the value of 'n' is used here to set the appropriate background,
  % = n-th page of a PDF, and also to draw a filled rectangle on
  % the left or right side (depending on whether n is even or odd)
 
  % The code bellow fails [1]
 
  \startluacode
print(N=, n)
 
if n == 2 then
else
end
  \stopluacode
 \stopsetups
 
 \setupbackgrounds[page][setups=layer,background={T}]
 
 \starttext
  % The code bellow works well [2]
 
  \startluacode
print(M=, m)
 
if m == 2 then
else
end
  \stopluacode
 
  \dorecurse{4}{\page[empty]}
 \stoptext
 ---
 
 The problem is that Lua code between \startsetups ... \stopsetups [1] seems 
 to be parsed another way than when in [2].
 
 The [1] gives the following error message:
 
 ---
 ! LuaTeX error main ctx instance:1: 'then' expected near 'thenelseend'.
 ---
 
 So it seems like spaces and/or \ns were ignored.
 
 If you commented [1], the section [2] would work well.
 
 So how to use make Lua work well even between \startsetups ... \stopsetups?

Use \startrawsetups … \stoprawsetups.

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
___