Re: [NTG-context] problem in kpse.rb

2006-09-16 Thread Sanjoy Mahajan
> path = run("--expand-path=\\\$#{varname}") rescue ''
> 
> to
> 
> path = run("--expand-path=\$#{varname}") rescue ''

I also ran into this (a few weeks ago on the list) and the patch I
sent Hans after testing it on my Ubuntu Linux laptop was to use two
backslashes:

  run("--expand-path=\\$#{varname}")

so that Unix sees the command as, for example,

  kpsewhich --expand-path=\$TEXMFLOCAL

which prevents the shell from expanding TEXMFLOCAL as a shell or
environment variable, leaving it for kpse to find it in texmf.cnf.
Interesting that \$ also works.  I guess the \ gets passed unchanged,
so the $ still gets procted from the shell.

By the way, the rescue '' doesn't do anything, since a failed run of
kpsewhich doesn't throw an exception.  I think I have a patch for
that.

Hans, should I resend those patches?

-Sanjoy

`Never underestimate the evil of which men of power are capable.'
 --Bertrand Russell, _War Crimes in Vietnam_, chapter 1.
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] problem in kpse.rb

2006-09-16 Thread Johan Sandblom
Attempting to find out why this happened on linux

~$ texmfstart ctxtools --updatecontext
CtxTools | updating
CtxTools | unable to change to

I found that line 114 of kpse.rb can be changed from

path = run("--expand-path=\\\$#{varname}") rescue ''

to

path = run("--expand-path=\$#{varname}") rescue ''

which allows it to work, that is, the line should be the same under
windows and linux.

~$ ruby --version
ruby 1.8.4 (2005-12-24) [i486-linux]

Regards, Johan
-- 
Johan Sandblom  N8, MRC, Karolinska sjh
t +46851776108  17176 Stockholm
m +46735521477  Sweden
"What is wanted is not the will to believe, but the
will to find out, which is the exact opposite"
- Bertrand Russell
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] texfont error

2006-09-16 Thread Johan Sandblom
I have not used texfont in quite a while, but it seems something has
gone wrong as this was the output I got. Same result if prefixed with
texmfstart. This is debian linux and perl is

~$ perl --version

This is perl, v5.8.8 built for i486-linux-gnu-thread-multi

~$ texfont
Global symbol "$uselmencodings" requires explicit package name at
/home/johans/tex/texmf-local/scripts/context/perl/texfont.pl line 202.
Global symbol "$lm" requires explicit package name at
/home/johans/tex/texmf-local/scripts/context/perl/texfont.pl line 873.
Global symbol "$lm" requires explicit package name at
/home/johans/tex/texmf-local/scripts/context/perl/texfont.pl line 964.
Global symbol "$theencoding" requires explicit package name at
/home/johans/tex/texmf-local/scripts/context/perl/texfont.pl line 965.
Global symbol "$lm" requires explicit package name at
/home/johans/tex/texmf-local/scripts/context/perl/texfont.pl line
1042.
Global symbol "$lm" requires explicit package name at
/home/johans/tex/texmf-local/scripts/context/perl/texfont.pl line
1169.
Execution of /home/johans/tex/texmf-local/scripts/context/perl/texfont.pl
aborted due to compilation errors.

Regards, Johan

-- 
Johan Sandblom  N8, MRC, Karolinska sjh
t +46851776108  17176 Stockholm
m +46735521477  Sweden
"What is wanted is not the will to believe, but the
will to find out, which is the exact opposite"
- Bertrand Russell
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Captions in Combinations

2006-09-16 Thread Pepe Barbe
On 9/12/06, Hans Hagen <[EMAIL PROTECTED]> wrote:
> Pepe Barbe wrote:
> > Hoping that the captions in the figures and in the combinations would
> > have the same size, but they don't. Any ideas why this might be?
> >
> can you make a minimal sample file

Sorry about the delay. Here you go:

\setupcaptions[ headstyle=\ss\bf,style=\tfx ]
\setupcombinations[ style=\tfx\em ]

\starttext

\placefigure [center] {Combination Caption}
\startcombination [2*1]
{\framed[height=.45\textwidth,width=.45\textwidth]{My Graphic
1}}{Text: Test. Math: $Test$}
{\framed[height=.45\textwidth,width=.45\textwidth]{My Graphic
2}}{Text: Test. Math: $Test$}
\stopcombination

\stoptext

Thanks,
Pepe
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Templates and official documents

2006-09-16 Thread Willi Egger

Hi Jorge,

In order to fit a table on one page one can put the table into a buffer 
and issue the \placetable command, which enables you tou provide a 
height. In fact you include the table as a float.
Because the "TeacherDate" line occurs on each page, this can be put 
into a footerline.


About your question concerning the amplification of the interlinespace I 
have no appropriate answer. I do not know whether you have comman= 
option where you could give instructions like \setupinterlinespace.


Kind regards

Willi

batela wrote:

Hi Willi

Tanks a lot for your suggestions, but I need some additional 
assistance. With the code in attach my  final document have 4 pages, 
but I need to fit all information in only 2 pages. In each page I need 
to include the logo, the unit name, the school name, the table, the 
teacher name and the date.   If the table is to large, then the table 
will be splited.


I have an additional question for you: are there a way to amplified 
the interline space only in the columns 3,4 and 5 of the table?


 Thanks alot
Jorge

Em 15/09/2006, às 5:00, Willi Egger escreveu:


Hi Jorge,

May be you want much more, but based on your information you could do
something like this:

setuppapersize[A4,landscape][A4,landscape]
\setupcolors[state=start]

\setuplayout
[tospace = 2cm,
backspace=2.5cm,
headerdistance=3\bodyfontsize,
margin=2cm,
width=fit]

\definelogo[Schoollogo]
[top]
[leftmargin]

[command={\framedtext[width=\marginwidth,background=color,backgroundcolor=red]{School 


logo}},state=start]

\setupheadertexts[\hfill{\bfa This is our School Name}\hfill]

\starttext
\placelogos
\startalignment[middle]
\cap{unit}: (changing each page)
\stopalignment
\blank

\bTABLE
\setupTABLE[column][1][width=.9\textwidth]
\bTR
\bTD a table with several columns and several rows \eTD
\eTR
\dorecurse{10}{\bTR \bTD more rows \eTD \eTR}
\eTABLE
\vfill
\starttabulate[|l|lw(5cm)|l|]
\NC Teacher name\EQ \NC Date\EQ\NR
\stoptabulate
\stoptext


Willi

batela wrote:

Dear Sirs

I'm a teacher in a secondary school and I need to prepare some
planifications for my class. Until now Word can do the job but I'm
think that ConTexT can do better. The scheme of the layout of my
document is:

|--- 


- |
| logo School Name
|
|
 |
| UNIT: (changing in each page)   |
|
  |
|  |---|
  |
|  |   a table with several coluns|
 |
|  |  and several rows
| |
|  |---|
  |
|
  |
|  Teacher name: Date:
   |
|_|


The paper are in landscape orientation and in each page I need to
represent several elements, like: logo, school name, space for the unit
designation, teacher name, date and signatures.

My main question is: is there any way to prepare this kind of documents
in Context? Examples are welcome.

Thanks a lot

Have a nice day

jorge

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context



Um Abraço,

Jorge Magalhães


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
  
\language[pt]
\enableregime[latin11]
% \enableregime[windows]
\loadmapfile[context-base]
\setupcolors[state=start]
\definelogo[Schoollogo]
[top]
[leftmargin]

[command={\framedtext[width=\marginwidth,background=color,backgroundcolor=red]{Schoollogo}},state=start]


\definefont [PrimeiraColuna][Serif at 9pt]
\definefont [PrimeiraLinha][SerifBold at 10pt]
%\usetypescript [serif] [hanging] [thanh]
%\setupencoding [default=texnansi]
%\setupbodyfont [cmr,11pt]
\setupalign [hanging]
\setuppapersize[A4,landscape][A4,landscape]

\setuplayout
[tospace = 2cm,
backspace=2.5cm,
headerdistance=3\bodyfontsize,
footer=1.5\bodyfontsize,
margin=2cm,
width=fit]



\setupTABLE[r][first][style=\PrimeiraLinha,bottomframe=on,rulethickness=.05em]
\setupTABLE[column][1][style=\PrimeiraColuna,align={right,lohi},width=6cm]
\setupTABLE[column][2][align={lohi}, width=5.5cm]
\setupTABLE[column][3][align={lohi}, width=5cm]
\setupTABLE[column][4,5][width=3.0cm, align={middle, middle}]
\setupTABLE[column][6][width=3cm, align={middle, middle}]

\startbuffer[cabeca]
\bTABLEhead
\bTR
\bTD[style=\bf,align={middle, middle}] COMPETÊNCIAS (o aluno deve 
se capaz 

Re: [NTG-context] ConTeXt problem on Mac mini

2006-09-16 Thread Mojca Miklavec
A notice for Hans: can you please browse down for
\externalfigure[\jobname-something.tmp]

The thing with \AR versus \FR & \LR and table header & footer handling
might also be misfeatures, esp. if they have already worked before (I
never used them).

On 9/15/06, Bernd Militzer wrote:
> Hi all,
>
> I have problems with ConTeXt on my Mac mini (intel-platform).
>
> My "family" project compiles perfect on my linux-machine and on my
> PowerBook G4

The table causes problems here as well, so it's certainly not machine-specific.

> I use  TeXExec 5.2.4 - ConTeXt / PRAGMA ADE 1997-2005
>
>   texexec : TeXExec 5.2.4 - ConTeXt / PRAGMA ADE 1997-2005
>   texutil : TeXUtil 9.0.0 - ConTeXt / PRAGMA ADE 1992-2004
>   tex : pdfeTeX, 3.141592-1.21a-2.2 (Web2C 7.5.4)
>   context : ver: 2005.01.31
>
> but not  Mac mini (intel-platform)
>
> I installed ConTeXt with Gerbens i-installer and have here version
> TeXExec | version 6.2.0 - 1997-2006 - PRAGMA ADE/POD
>
> running   texexec --check
> TeXExec | current distribution: web2c
> TeXExec | context source date: 2006.09.11 00:42
> TeXExec | format path: . /Users/bmi/Library/texmf/web2c
> /usr/local/teTeX/share/texmf.local/web2c
> /usr/local/teTeX/share/texmf.gwtex/web2c
> /usr/local/teTeX/share/texmf.tetex/web2c /usr/local/teTeX/share/texmf/web2c
> TeXExec | start of analysis
> /usr/local/teTex/share/texmf.local/scripts/context/ruby/texexec.rb:17:
> command not found: texmfstart texexec --help
> /usr/local/teTex/share/texmf.local/scripts/context/ruby/texexec.rb:17:
> command not found: texmfstart texutil --help
> /usr/local/teTex/share/texmf.local/scripts/context/ruby/texexec.rb:17:
> command not found: texmfstart ctxtools --help
> TeXExec | end of analysis
>
> running texexec --pdf TestFile1.tex
>
>
> ! Misplaced \noalign.
> \TABLEnoalign ->\noalign
> \bgroup \let \noalign \relax \let \next =
> \insertTABLEtail ->\TABLEnoalign
> {\global \settrue \preventTABLEbreak
> \globa...
>
> \stoptables ...erepeattail \else \insertTABLEtail
>  \fi \finishTABLE
> \egroup \...
>
> \stopListeR ->\stoptables
>  \stop
> l.8 \stopListeR
>   ?

Same error here, even with MikTeX with 20060822. Perhaps an error in
macro (either in yours or in Hans's; how old are the other
distributions where your file compiles OK)?

> after that I changed in my table-macro
> first row: \NC\AR to \NC\FR
> last row: : \NC\AR to \NC\LR

That is (or at least should be?) only formatting issue. At least I
thought so. I have no idea why replacing \AR with \FR/\LR fixes the
problem.

> running texexec --pdf TestFile2.tex

You didn't attach it, but I also needed to make  a small change in
your file to make it work:

comment this line:
%\def\StopPersDatTab{\stoptables\stop}

uncomment this one:
\def\StopPersDatTab{\NC\use{2}\ReFormat[l]{}\NC\LR\stoptables\stop}

> I get no error, but
> 1. placetable ... \externalfigure[buffername.tmp]  does not work
>getbuffer produce the table

I always thought that only \externalfigure[\jobname-buffername.tmp]
works properly. But then I figured out that in my MikTeX distribution
\externalfigure[buffername.tmp] works and
\externalfigure[\jobname-buffername.tmp] doesn't and in the standalone
with latest beta it's exactly vice-versa. Seems like partially
backward-compatibility problem in either case. Hans?

> Is it an installation problem?

Bear in mind that you have the latest beta installed on your Mac and
probably some older distros on other computers (but that should not
make that much difference; if it does, it's a bug). If there's
something about installation: well, it would be nice if you managed to
enable "texmfstart" (but it should work without that as well). Apart
from that probably nothing worth mentioning.

Mojca
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] xetex and metapost

2006-09-16 Thread Mojca Miklavec
On 9/16/06, Hans Hagen wrote:
> Alex Lubberts wrote:
> > Hi,
> >
> > After switching to `XeConTeXt' my file with MP graphics (which ran fine
> > before) results in errors. I include a .mp-file like:
> >
> > \startuseMPgraphic{dia1}
> >   input Diagram1 ;
> > \stopuseMPgraphic
> > \placefigure{Comment}{\externalfigure[Diagram1.1]}
> >
> > When I run ConTeXt a file test-mprun.mp is created containing:
> >
> > [...]
> > defaultfont:="'Minion Pro:mapping=tex-text;
> > +onum;
> > +pnum'";
> > defaultscale:=12.0pt/10pt;
> > [...]
> >
> > which of course is responsible for the errors. Does anyone know how to
> > solve this?
> >
> hm, tricky, one option is to use the \sometxt (see older posts)
> mechanism which will keep font handling entirely inside tex

One of the problems is also that textext results in calling pdftex
instead of XeTeX (I never managed to get textext working under XeTeX,
but I didn't want to complain too much about it), but "draw
\sometxt{something}" is working perfectly and would be my choice for
this anyway (unless you really need to put something special in those
labels, but ask on the list again if you don't know how to handle it).

Then you don't need to take care of font switching inside of the
graphic, you just switch the font in your document.

Mojca
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] xetex and metapost

2006-09-16 Thread Hans Hagen
Alex Lubberts wrote:
> Hi,
>
> After switching to `XeConTeXt' my file with MP graphics (which ran fine
> before) results in errors. I include a .mp-file like:
>
> \startuseMPgraphic{dia1}
>   input Diagram1 ;
> \stopuseMPgraphic
> \placefigure{Comment}{\externalfigure[Diagram1.1]}
>
> When I run ConTeXt a file test-mprun.mp is created containing:
>
> [...]
> defaultfont:="'Minion Pro:mapping=tex-text;
> +onum;
> +pnum'";
> defaultscale:=12.0pt/10pt;
> [...]
>
> which of course is responsible for the errors. Does anyone know how to
> solve this?
>   
hm, tricky, one option is to use the \sometxt (see older posts) 
mechanism which will keep font handling entirely inside tex

Hans

-- 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] xetex and metapost

2006-09-16 Thread Alex Lubberts
Hi,

After switching to `XeConTeXt' my file with MP graphics (which ran fine
before) results in errors. I include a .mp-file like:

\startuseMPgraphic{dia1}
  input Diagram1 ;
\stopuseMPgraphic
\placefigure{Comment}{\externalfigure[Diagram1.1]}

When I run ConTeXt a file test-mprun.mp is created containing:

[...]
defaultfont:="'Minion Pro:mapping=tex-text;
+onum;
+pnum'";
defaultscale:=12.0pt/10pt;
[...]

which of course is responsible for the errors. Does anyone know how to
solve this?

Greetings,
Alex Lubberts

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context