[NTG-context] TYPE 1 font

2010-11-11 Thread Herbert Voss
I have a pfb and tfm file of the DANTE font,
which has only the five characters D,A,N,T,E
However, this did not work

\definefont[dante][dante at 16pt]
\starttext
\dante DANTE
\stoptext

When I create a afm file from the dante.pfb then
everything is fine.

Does ConTeXt always needs an afm-file for the metrics of an
type 1 font? And, of course, a map file?

Herbert
___
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] TYPE 1 font

2010-11-11 Thread Hans Hagen

On 11-11-2010 9:16, Herbert Voss wrote:

I have a pfb and tfm file of the DANTE font,
which has only the five characters D,A,N,T,E
However, this did not work

\definefont[dante][dante at 16pt]
\starttext
\dante DANTE
\stoptext

When I create a afm file from the dante.pfb then
everything is fine.

Does ConTeXt always needs an afm-file for the metrics of an
type 1 font? And, of course, a map file?


yes, because in context it gets a unicode encoding (which also means 
that you can access more than 256 characters if the font has them


no more encodings

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] A pdf-file per XML-node

2010-11-11 Thread Hans Hagen

On 10-11-2010 11:04, Martin Schröder wrote:

2010/11/10 Daniel Grycmandaniel.gryc...@rub.de:

For everyworker  a separate pdf is needed. It would be also nice to have
thename-entry as a file-name. Any ideas?


We would have to extend luatex to allow the generation of multiple pdf
files from one source document. Not trivial, but quite interesting. :-)


quite tricky indeed as macro packages would need restart events as well 
(plus probably some macro related mem cleanup)


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] A pdf-file per XML-node

2010-11-11 Thread Hans Hagen

On 10-11-2010 10:58, Daniel Grycman wrote:

Hi list,

|worker
|surnamexxx/surname
|namexxx/name
|/worker
|worker
|surnamexxx/surname
|namexxx/name
|/worker
|worker
|surnamexxx/surname
|namexxx/name
|/worker
|worker
|surnamexxx/surname
|namexxx/name
|/worker
For everyworker  a separate pdf is needed. It would be also nice to have
thename-entry as a file-name. Any ideas?


you can make a worker.lua file that does it, something (untested) ...

local x = xml.load(workers.xml)

local i = 0
for e in xml.collected(x,worker) do
  i = 1 + 1
  logs.simple(processing worker %s,i)
  os.execute(context worker --worker= .. i)
end

and run that with

mtxrun --script worker.lua

where the worker.tex file looks like

... usual xml setups using workers.xml ...

\xmlfilter
  {main}
  {worker[position()==\getdocumentargument{worker}]}
  {xml:worker}

... special worker setup

\startxmlsetup xml:worker
...
\stopxmlsetup

etc etc

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] [***SPAM***] Re: typescripts

2010-11-11 Thread Arthur Reutenauer
   \definefontsynonym [Mono] [file:fvmr8a.pfb]
 
 \definefontsynonym [Mono] [file:fvmr8a.afm]

  For the same reason as Hans mentions in reply to Herbert, I guess.

Arthur

___
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] Dotted leader in index entries

2010-11-11 Thread Duncan Hothersall

[Now with a proper example!]

Hello all.

I'm using Mk II. I need to set up dotted leaders between an index entry 
and its page number as show in this runnable sample:


\def\Icmd#1{#1\dotfill}
\setupregister[index][n=2,textcommand=\Icmd,distance=1em,alternative=A]
\starttext
\index{Example+This index entry doesn't quite work}\index{This is 
okay}\index{Example+This is okay}\index{This index entry is not correct 
at all}\index{Example+This is another example in which the leaders don't 
work cos of wrapping}A little text.\par

\placeindex
\stoptext

When the entry text is just long enough to fill up the horizontal space 
it is pushing the number over onto the next line. What I really need is 
for all page numbers to be at the right hand side, with leading dots. So 
I'd like a solution to produce either this:


Long index entry text
  123

or this:

Long index entry
  text..123

At the moment I'm putting forced line breaks before the last word to 
achieve what I need, but I would really like to automate this!


Thanks for any help, hope the issue is clear.

Duncan

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

2010-11-11 Thread Mojca Miklavec
On Thu, Nov 11, 2010 at 06:20, Wolfgang Schuster wrote:

 Am 10.11.2010 um 21:28 schrieb Mojca Miklavec:

 You need something like this:

 \starttypescript [mono] [bera] [name]
    \definefontsynonym [Mono] [file:fvmr8a.pfb]

 \definefontsynonym [Mono] [file:fvmr8a.afm]

The file:*.pfb didn't sound right to me either, but I misinterpreted
from not-precise-enough reading that pfb worked. Thanks for correcting
me.

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
___


[NTG-context] Tikz figures not centred

2010-11-11 Thread Michael Murphy
Hi,

I've been having some problems with tikz figures. When I define a new
tikz figure, I normally put it in a buffer:

\startbuffer[mypic]
\starttikzfigure
...
\stoptikzfigure
\stopbuffer

which I use later when I place the figure

\placefigure{My picture}{\getbuffer[mypic]}

The problem is that the figure is not centred: it is always aligned with
the left side of the document. I guess this has something to do with
Context not being able to get the image bounds, since it works fine for
tikz images that are already precompiled into PDFs:

\placefigure{My picture}{\externalimage[mypic.pdf]}

Minimal example is attached.

Michael.

-- 
Michael Murphy michael.mur...@uni-ulm.de
University of Ulm
\usemodule[tikz]

\starttext

\startbuffer[tikz-picture]
  \starttikzpicture
\fill[red] (0,0) circle (2);
  \stoptikzpicture
\stopbuffer

\placefigure{A tikz figure}{\getbuffer[tikz-picture]}

\placefigure{Another tikz figure}{
  \starttikzpicture
\fill[red] (0,0) circle (2);
  \stoptikzpicture
}

\placefigure{An external tikz figure}{
  \externalfigure[tikzfig.pdf]
}

\stoptext


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

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


Re: [NTG-context] TYPE 1 font

2010-11-11 Thread Mojca Miklavec
2010/11/11 Herbert Voss wrote:
 I have a pfb and tfm file of the DANTE font,
 which has only the five characters D,A,N,T,E
 However, this did not work

 \definefont[dante][dante at 16pt]
 \starttext
 \dante DANTE
 \stoptext

 When I create a afm file from the dante.pfb then
 everything is fine.

 Does ConTeXt always needs an afm-file for the metrics of an
 type 1 font? And, of course, a map file?

Shouldn't DANTE launch a pet project and convert the font to OpenType?
(That should be 10-60 minutes of work for somebody familiar with
fonts.)

But yes, as Hans replied, you need afm file. pdfTeX gets all the font
metric data from tfm files, while ConTeXt MKIV prefers to be able to
use more than 256 characters when they are available in Type1 font (it
doesn't need or read enc, map, vf and tfm files).

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] Tikz figures not centred

2010-11-11 Thread Vedran Miletić
2010/11/11 Michael Murphy michael.mur...@uni-ulm.de

 Hi,

 I've been having some problems with tikz figures. When I define a new
 tikz figure, I normally put it in a buffer:

 \startbuffer[mypic]
\starttikzfigure
...
\stoptikzfigure
 \stopbuffer

 which I use later when I place the figure

 \placefigure{My picture}{\getbuffer[mypic]}

 The problem is that the figure is not centred: it is always aligned with
 the left side of the document. I guess this has something to do with
 Context not being able to get the image bounds, since it works fine for
 tikz images that are already precompiled into PDFs:

 \placefigure{My picture}{\externalimage[mypic.pdf]}

 Minimal example is attached.

 Michael.


You have to wrap up the picture inside of a \hbox, e.g.

\hbox{\starttikzfigure
   ...
\stoptikzfigure}

Regards,

-- 
Vedran Miletić
___
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] typescripts

2010-11-11 Thread Hans Hagen

On 11-11-2010 12:03, Mojca Miklavec wrote:

On Thu, Nov 11, 2010 at 06:20, Wolfgang Schuster wrote:


Am 10.11.2010 um 21:28 schrieb Mojca Miklavec:


You need something like this:

\starttypescript [mono] [bera] [name]
\definefontsynonym [Mono] [file:fvmr8a.pfb]


\definefontsynonym [Mono] [file:fvmr8a.afm]


The file:*.pfb didn't sound right to me either, but I misinterpreted
from not-precise-enough reading that pfb worked. Thanks for correcting
me.


i can support that suffix too if 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] \usepseudocaps (fwd)

2010-11-11 Thread Herbert Voss
 On 8-11-2010 9:00, Herbert Voss wrote:
 Also from the documentation:

 systems : begin file latex5 at line 2
 error: ...text/tex/texmf-context/tex/context/base/typo-cap.lua:100:
 attempt to call global 'copy_node' (a nil value)
 .

 system  error on line 6 in file latex5.tex: ? ...

 1
 2 \starttext
 3
 4 \userealcaps   \Caps{Herbert Voß}
 5 \usepseudocaps \Caps{Herbert Voß}
 6
 7 \stoptext

 l.6
 
 in typo-cap.lua, add
 
 local copy_node   = node.copy
 
 somewhere at the top and then remake the format.

thanks,
it helped

Herbert
___
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] TYPE 1 font

2010-11-11 Thread Herbert Voss
Am 11.11.2010 12:10, schrieb Mojca Miklavec:
 2010/11/11 Herbert Voss wrote:

 Does ConTeXt always needs an afm-file for the metrics of an
 type 1 font? And, of course, a map file?
 
 Shouldn't DANTE launch a pet project and convert the font to OpenType?
 (That should be 10-60 minutes of work for somebody familiar with
 fonts.)
 
 But yes, as Hans replied, you need afm file. pdfTeX gets all the font
 metric data from tfm files, while ConTeXt MKIV prefers to be able to
 use more than 256 characters when they are available in Type1 font (it
 doesn't need or read enc, map, vf and tfm files).

thanks,
I converted it with fontforge to otf. Now I get

v...@shania:/opt/context mtxrun --script fonts --list --all
--pattern=*dante*

dante dante   DANTE.otf
dantenormal   dante   DANTE.otf

Is this the intended behaviour, that the afm files are now no
more listed? without the otf version the output is:

v...@shania:/opt/context mtxrun --script fonts --list --all
--pattern=*dante*

dante dante   dante.afm
dantenormal   dante   dante.afm

Herbert
___
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] TYPE 1 font

2010-11-11 Thread Hans Hagen

On 11-11-2010 12:59, Herbert Voss wrote:

Am 11.11.2010 12:10, schrieb Mojca Miklavec:

2010/11/11 Herbert Voss wrote:



Does ConTeXt always needs an afm-file for the metrics of an
type 1 font? And, of course, a map file?


Shouldn't DANTE launch a pet project and convert the font to OpenType?
(That should be 10-60 minutes of work for somebody familiar with
fonts.)

But yes, as Hans replied, you need afm file. pdfTeX gets all the font
metric data from tfm files, while ConTeXt MKIV prefers to be able to
use more than 256 characters when they are available in Type1 font (it
doesn't need or read enc, map, vf and tfm files).


thanks,
I converted it with fontforge to otf. Now I get

v...@shania:/opt/context  mtxrun --script fonts --list --all
--pattern=*dante*

dante dante   DANTE.otf
dantenormal   dante   DANTE.otf

Is this the intended behaviour, that the afm files are now no
more listed? without the otf version the output is:

v...@shania:/opt/context  mtxrun --script fonts --list --all
--pattern=*dante*

dante dante   dante.afm
dantenormal   dante   dante.afm


indeed, as the names are the same, otf takes precedence over type one

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] Latest info for Correspondance module

2010-11-11 Thread Russell Urquhart
Sorry, please see attached file.

BTW, here is the last part of the error that is generated. The toaddress works, 
however.

correspondence  : loading letter extension addrentry.nle
(/Users/russ/context/tex/texmf-context/tex/context/third/letter/extension/addrentry.nle))
correspondence  : letter style user.nls not found
! Missing { inserted.
argument ...ox 259000\\Dallas, Texas 75225-9000}
  
\setsomevalue #1#2-\...@ea \def \csname #1
#2\endcsname 
\p!doassign ...EAEA \setsomevalue \fi \fi {#1}{#2}
  {#3}
\xprocesscommaitem @relax@ #1==\empty \...@relax@ 
  \...@eaeaea 
\xprocesscommaite...
argument fromname={Russ Urquhart}, f
  romaddress={4645 Portrait Ln\\Plano TX...
\xdogetparameters #1]-\xprocesscommaitem #1
,],\...@relax@ 
...
l.7 ...address={4645 Portrait Ln\\Plano TX 75024}]
  
? 


On Thu, Nov 11, 2010 at 06:23:45AM +0100, Wolfgang Schuster wrote:
 
 Am 11.11.2010 um 05:20 schrieb Russell Urquhart:
 
  HI,
  
  Is the the info at: 
  http://dl.contextgarden.net/modules/t-letter/doc/context/third/letter/correspondence.pdf
  
  The latest for this module? I've tried the fromname and signature attribute 
  of \setupletter and i get errors.
  
  Just wanted to check.
 
 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
 ___


pres.tex
Description: TeX document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Latest info for Correspondance module

2010-11-11 Thread Wolfgang Schuster

Am 11.11.2010 um 14:16 schrieb Russell Urquhart:

 Sorry, please see attached file.
 
 BTW, here is the last part of the error that is generated. The toaddress 
 works, however.

You need more \setupletter commands in your setup, what you currently write is

\setupletter
   [..,..=..,..]
   [..,..=..,..]
   [..,..=..,..]

but you need

\setupletter
   [..,..=..,..]

\setupletter
   [..,..=..,..]

\setupletter
   [..,..=..,..]

This means your values need to be set as

\setupletter
   [toname={President George W. Bush}, 
toaddress={Office of George W. Bush\\Post Office Box 259000\\Dallas, Texas 
75225-9000}] 

\setupletter
   [fromname={Russ Urquhart},
fromaddress={4645 Portrait Ln\\Plano TX 75024}]

\setupletter
   [signature={Russ Urquhart}]

or

\setupletter
  [toname={President George W. Bush}, 
   toaddress={Office of George W. Bush\\Post Office Box 259000\\Dallas, Texas 
75225-9000},
   fromname={Russ Urquhart},
   fromaddress={4645 Portrait Ln\\Plano TX 75024},
   signature={Russ Urquhart}]

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] Latest info for Correspondance module

2010-11-11 Thread Russell Urquhart


Ah, that's it! Thanks, that did the trick.

(I guess i misread the docs on this. I interpreted the command a different way!)

Thanks,


Russ
___
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] typescripts

2010-11-11 Thread Mojca Miklavec
 The file:*.pfb didn't sound right to me either, but I misinterpreted
 from not-precise-enough reading that pfb worked. Thanks for correcting
 me.

 i can support that suffix too if needed

You have to find both afm and pfb with the same name. So maybe it does
make sense to also allow pfb. (pfb might be the more intuitive of the
two.)

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] Tikz figures not centred

2010-11-11 Thread Michael Murphy
On Thu, 2010-11-11 at 12:14 +0100, Vedran Miletić wrote:
 2010/11/11 Michael Murphy michael.mur...@uni-ulm.de
 Hi,
 
 I've been having some problems with tikz figures. When I
 define a new
 tikz figure, I normally put it in a buffer:
 
 \startbuffer[mypic]
\starttikzfigure
...
\stoptikzfigure
 \stopbuffer
 
 which I use later when I place the figure
 
 \placefigure{My picture}{\getbuffer[mypic]}
 
 The problem is that the figure is not centred: it is always
 aligned with
 the left side of the document. I guess this has something to
 do with
 Context not being able to get the image bounds, since it works
 fine for
 tikz images that are already precompiled into PDFs:
 
 \placefigure{My picture}{\externalimage[mypic.pdf]}
 
 Minimal example is attached.
 
 Michael.
 
 
 You have to wrap up the picture inside of a \hbox, e.g.
 
 \hbox{\starttikzfigure
...
 \stoptikzfigure}
 
 Regards,
 
 -- 
 Vedran Miletić

Hmm, why didn't I think of that... Thanks!

-- 
Michael Murphy michael.mur...@uni-ulm.de
University of Ulm

___
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] looking for fonts in a project's subdirectory

2010-11-11 Thread Vianney le Clément
Hi,

In order for some projects (mkiv) to be self-contained, I want to
put the used fonts inside the project directory. Putting them next to
the .tex files works fine, but I would like to put them in a
subdirectory, e.g., to have the following kind of structure:

project/
fonts/
fontA.otf
fontB.otf
env.tex
document1.tex
document2.tex

I could modify the OSFONTDIR environment variable before calling
context, but that's not very editor-friendly. Is there any command or
Lua code that I can put in my environment file env.tex forcing context
to also look into the fonts subdirectory?

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

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


[NTG-context] table background color in first row

2010-11-11 Thread Manfred Lotz
Hi there,


I have s simple table like this:

\starttext

\starttable[|l|l|]
\NC \bf Colheader 1 \NC \bf Colheader 2 \NC \SR \HL 
\NC cell 11 \NC cell 12 \NC \FR
\NC cell 11 \NC cell 12 \NC \LR
\stoptable

\stoptext  


and like to have a light gray background for the heading row. 

I found documentation about \setupTABLE which on the one hand I did not
fully understand how to use and on the other hand I'm not quite sure
how far this is the way it is done nowadays.



-- 
Thanks,
Manfred


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

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


Re: [NTG-context] table background color in first row

2010-11-11 Thread Wolfgang Schuster

Am 11.11.2010 um 19:44 schrieb Manfred Lotz:

 Hi there,
 
 I have s simple table like this:
 
 \starttext
 
 \starttable[|l|l|]
 \NC \bf Colheader 1 \NC \bf Colheader 2 \NC \SR \HL 
 \NC cell 11 \NC cell 12 \NC \FR
 \NC cell 11 \NC cell 12 \NC \LR
 \stoptable
 
 \stoptext  
 
 and like to have a light gray background for the heading row. 
 
 I found documentation about \setupTABLE which on the one hand I did not
 fully understand how to use and on the other hand I'm not quite sure
 how far this is the way it is done nowadays.

The \setupTABLE command for the natural tables environment, you can find
a overview of the different environments on the wiki.

Here is a example for a natural table:

\starttext

\setupTABLE[header][style=bold,background=color,backgroundcolor=gray]

\bTABLE
  \bTABLEhead
\bTR
  \bTD Colheader 1 \eTD
  \bTD Colheader 2 \eTD
\eTR
  \eTBALEhead
  \bTABLEbody
\bTR
  \bTD cell 11 \eTD
  \bTD cell 12 \eTD
\eTR
\bTR
  \bTD cell 21 \eTD
  \bTD cell 22 \eTD
\eTR
  \eTABLEbody
\eTABLE

\stoptext

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] Tikz figures not centred

2010-11-11 Thread Aditya Mahajan

On Thu, 11 Nov 2010, Michael Murphy wrote:


On Thu, 2010-11-11 at 12:14 +0100, Vedran Miletić wrote:

2010/11/11 Michael Murphy michael.mur...@uni-ulm.de
Hi,

I've been having some problems with tikz figures. When I
define a new
tikz figure, I normally put it in a buffer:

\startbuffer[mypic]
   \starttikzfigure
   ...
   \stoptikzfigure
\stopbuffer

which I use later when I place the figure

\placefigure{My picture}{\getbuffer[mypic]}

The problem is that the figure is not centred: it is always
aligned with
the left side of the document. I guess this has something to
do with
Context not being able to get the image bounds, since it works
fine for
tikz images that are already precompiled into PDFs:

\placefigure{My picture}{\externalimage[mypic.pdf]}

Minimal example is attached.

Michael.


You have to wrap up the picture inside of a \hbox, e.g.

\hbox{\starttikzfigure
   ...
\stoptikzfigure}

Regards,

--
Vedran Miletić


Hmm, why didn't I think of that... Thanks!


See 
http://archive.contextgarden.net/thread/20090722.010815.d9c051d3.en.html 
for an old discussion on this.


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] table background color in first row

2010-11-11 Thread Manfred Lotz
Hi Wolfgang,

On Thu, 11 Nov 2010 20:13:22 +0100
Wolfgang Schuster schuster.wolfg...@googlemail.com wrote:

 
 Am 11.11.2010 um 19:44 schrieb Manfred Lotz:
 
  Hi there,
  
  I have s simple table like this:
  
  \starttext
  
  \starttable[|l|l|]
  \NC \bf Colheader 1 \NC \bf Colheader 2 \NC \SR \HL 
  \NC cell 11 \NC cell 12 \NC \FR
  \NC cell 11 \NC cell 12 \NC \LR
  \stoptable
  
  \stoptext  
  
  and like to have a light gray background for the heading row. 
  
  I found documentation about \setupTABLE which on the one hand I did
  not fully understand how to use and on the other hand I'm not quite
  sure how far this is the way it is done nowadays.
 
 The \setupTABLE command for the natural tables environment, you can
 find a overview of the different environments on the wiki.
 
 Here is a example for a natural table:
 
 \starttext
 
 \setupTABLE[header][style=bold,background=color,backgroundcolor=gray]
 
 \bTABLE
   \bTABLEhead
 \bTR
   \bTD Colheader 1 \eTD
   \bTD Colheader 2 \eTD
 \eTR
   \eTBALEhead
   \bTABLEbody
 \bTR
   \bTD cell 11 \eTD
   \bTD cell 12 \eTD
 \eTR
 \bTR
   \bTD cell 21 \eTD
   \bTD cell 22 \eTD
 \eTR
   \eTABLEbody
 \eTABLE
 
 \stoptext
 

Thanks for your example which works fine but raises some more questions:

1. Your example creates borders around each cell which I don't want to
have. Any way to get rid of them?


2. It seems to me that \setupTABLE creates a shading for the header for 
all tables in a document?! That is ok. 

However, I'd like to know what would be the variant to have it only for
a single table?


3. How does this \bTABLE stuff compare to the \starttable stuff? Are
these just different methods to create tables which are both in use
these days in context or is one method to be preferred over the other? 



-- 
Thanks,
Manfred



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

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


Re: [NTG-context] table background color in first row

2010-11-11 Thread Herbert Voss
Am 11.11.2010 20:13, schrieb Wolfgang Schuster:

 The \setupTABLE command for the natural tables environment, you can find
 a overview of the different environments on the wiki.
 
 Here is a example for a natural table:
 
 \starttext
 
 \setupTABLE[header][style=bold,background=color,backgroundcolor=gray]
 
 \bTABLE
   \bTABLEhead
 \bTR
   \bTD Colheader 1 \eTD
   \bTD Colheader 2 \eTD
 \eTR
   \eTBALEhead

with current minimal mkiv I get:

(/opt/context/tex/texmf-context/tex/context/base/bxml-apa.mkiv)
systems : begin file latex5.tex at line 3
)
Runaway argument?
\bTR \bTD Colheader 1 \eTD \bTD Colheader 2 \eTD \eTR \eTBALEhead
\bTABLEbody \ETC.
! File ended while scanning use of \doTABLEhead.

system   error on line 0 in file : File ended while scanning
use of \doTABLEhead ...

empty file

inserted text
\par
* ./latex5.tex

?


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

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


Re: [NTG-context] table background color in first row

2010-11-11 Thread Hans Hagen

On 11-11-2010 8:42, Herbert Voss wrote:

Am 11.11.2010 20:13, schrieb Wolfgang Schuster:


The \setupTABLE command for the natural tables environment, you can find
a overview of the different environments on the wiki.

Here is a example for a natural table:

\starttext

\setupTABLE[header][style=bold,background=color,backgroundcolor=gray]

\bTABLE
   \bTABLEhead
 \bTR
   \bTD Colheader 1 \eTD
   \bTD Colheader 2 \eTD
 \eTR
   \eTBALEhead


with current minimal mkiv I get:

(/opt/context/tex/texmf-context/tex/context/base/bxml-apa.mkiv)
systems : begin file latex5.tex at line 3
)
Runaway argument?
\bTR \bTD Colheader 1 \eTD \bTD Colheader 2 \eTD \eTR \eTBALEhead


typo: \eTBALEhead - \eTABLEhead

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] table background color in first row

2010-11-11 Thread Manfred Lotz
Hi Herbert,

On Thu, 11 Nov 2010 20:42:17 +0100
Herbert Voss herbert.v...@fu-berlin.de wrote:

\eTBALEhead  


there was a typo which I corrected:  TBALE -- TABLE

-- 
Manfred


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

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


Re: [NTG-context] table background color in first row

2010-11-11 Thread Herbert Voss
Am 11.11.2010 20:45, schrieb Hans Hagen:
 On 11-11-2010 8:42, Herbert Voss wrote:
 Am 11.11.2010 20:13, schrieb Wolfgang Schuster:

 The \setupTABLE command for the natural tables environment, you can find
 a overview of the different environments on the wiki.

 Here is a example for a natural table:

 \starttext

 \setupTABLE[header][style=bold,background=color,backgroundcolor=gray]

 \bTABLE
\bTABLEhead
  \bTR
\bTD Colheader 1 \eTD
\bTD Colheader 2 \eTD
  \eTR
\eTBALEhead

 Runaway argument?
 \bTR \bTD Colheader 1 \eTD \bTD Colheader 2 \eTD \eTR \eTBALEhead
 
 typo: \eTBALEhead - \eTABLEhead

uuh, should have seen it myself ...

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

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


Re: [NTG-context] table background color in first row

2010-11-11 Thread Herbert Voss
Am 11.11.2010 20:40, schrieb Manfred Lotz:

 \starttext

 \setupTABLE[header][style=bold,background=color,backgroundcolor=gray]

 \bTABLE
   \bTABLEhead
 \bTR
   \bTD Colheader 1 \eTD
   \bTD Colheader 2 \eTD
 \eTR
   \eTBALEhead
   \bTABLEbody
 \bTR
   \bTD cell 11 \eTD
   \bTD cell 12 \eTD
 \eTR
 \bTR
   \bTD cell 21 \eTD
   \bTD cell 22 \eTD
 \eTR
   \eTABLEbody
 \eTABLE

 \stoptext

 
 Thanks for your example which works fine but raises some more questions:
 
 1. Your example creates borders around each cell which I don't want to
 have. Any way to get rid of them?

\bTABLE[frame=off]

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

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


Re: [NTG-context] table background color in first row

2010-11-11 Thread Wolfgang Schuster

Am 11.11.2010 um 20:40 schrieb Manfred Lotz:

 Thanks for your example which works fine but raises some more questions:
 
 1. Your example creates borders around each cell which I don't want to
 have. Any way to get rid of them?

You can disable the border rules with „frame=off“.

 2. It seems to me that \setupTABLE creates a shading for the header for 
 all tables in a document?! That is ok. 
 
 However, I'd like to know what would be the variant to have it only for
 a single table?

\startsetups table:mystyle

  \setupTABLE[frame=off]
  \setupTABLE[row][first][style=bold,background=color,backgroundcolor=gray]

\stopsetups

\bTABLE[setups=table:mystyle]
  \bTR
\bTD Colheader 1 \eTD
\bTD Colheader 2 \eTD
  \eTR
  \bTR
\bTD cell 11 \eTD
\bTD cell 11 \eTD
  \eTR
  \bTR
\bTD cell 11 \eTD
\bTD cell 11 \eTD
  \eTR
\eTABLE

or

\bTABLE[frame=off]
  \bTR[background=color,backgroundcolor=gray]
\bTH Colheader 1 \eTH
\bTH Colheader 2 \eTH
  \eTR
  \bTR
\bTD cell 11 \eTD
\bTD cell 11 \eTD
  \eTR
  \bTR
\bTD cell 11 \eTD
\bTD cell 11 \eTD
  \eTR
\eTABLE

 3. How does this \bTABLE stuff compare to the \starttable stuff? Are
 these just different methods to create tables which are both in use
 these days in context or is one method to be preferred over the other? 

Both are different method to write a table, \starttable/\stoptable is
older than \bTABLE/\eTABLE which use \framed for each table cell and
allows more fancy layouts but is slower than \starttable.

Wolfgang

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

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


Re: [NTG-context] table background color in first row

2010-11-11 Thread Manfred Lotz
On Thu, 11 Nov 2010 20:56:48 +0100
Herbert Voss herbert.v...@fu-berlin.de wrote:

 [frame=off]

We come closer. However, I like to have the horizontal line below the
header row. 



-- 
Manfred


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

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


Re: [NTG-context] table background color in first row

2010-11-11 Thread Wolfgang Schuster

Am 11.11.2010 um 21:01 schrieb Manfred Lotz:

 We come closer. However, I like to have the horizontal line below the
 header row. 

\bTABLE[frame=off]
  \bTR[bottomframe=on,...]
\bTH Celheader 1 \eTH
...

Wolfgang

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

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


Re: [NTG-context] table background color in first row

2010-11-11 Thread Manfred Lotz
On Thu, 11 Nov 2010 20:58:24 +0100
Wolfgang Schuster schuster.wolfg...@googlemail.com wrote:

 
 Am 11.11.2010 um 20:40 schrieb Manfred Lotz:
 
  Thanks for your example which works fine but raises some more
  questions:
  
  1. Your example creates borders around each cell which I don't want
  to have. Any way to get rid of them?
 
 You can disable the border rules with „frame=off“.
 

Yep. Just found that I get back the first horizontal line by:

\setupTABLE[row][first][bottomframe=on]


  2. It seems to me that \setupTABLE creates a shading for the header
  for all tables in a document?! That is ok. 
  
  However, I'd like to know what would be the variant to have it only
  for a single table?
 
 \startsetups table:mystyle
 
   \setupTABLE[frame=off]
   \setupTABLE[row][first][style=bold,background=color,backgroundcolor=gray]
 
 \stopsetups
 
 \bTABLE[setups=table:mystyle]
   \bTR
 \bTD Colheader 1 \eTD
 \bTD Colheader 2 \eTD
   \eTR
   \bTR
 \bTD cell 11 \eTD
 \bTD cell 11 \eTD
   \eTR
   \bTR
 \bTD cell 11 \eTD
 \bTD cell 11 \eTD
   \eTR
 \eTABLE
 
 or
 
 \bTABLE[frame=off]
   \bTR[background=color,backgroundcolor=gray]
 \bTH Colheader 1 \eTH
 \bTH Colheader 2 \eTH
   \eTR
   \bTR
 \bTD cell 11 \eTD
 \bTD cell 11 \eTD
   \eTR
   \bTR
 \bTD cell 11 \eTD
 \bTD cell 11 \eTD
   \eTR
 \eTABLE
 

Great, good to know.



  3. How does this \bTABLE stuff compare to the \starttable stuff? Are
  these just different methods to create tables which are both in use
  these days in context or is one method to be preferred over the
  other? 
 
 Both are different method to write a table, \starttable/\stoptable is
 older than \bTABLE/\eTABLE which use \framed for each table cell and
 allows more fancy layouts but is slower than \starttable.
 

Aaah, ok. Does it mean that \starttable/\stoptable is a simpler way of
writing tables with less possiblities than the \bTABLE/\eTABLE stuff? 

Is also seemed to me that it is not easy to get those shadings using
\starttable/\stoptable. Otherwise you would have given me an example
using \starttable/\stoptable.



-- 
Thanks,
Manfred





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

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


Re: [NTG-context] table background color in first row

2010-11-11 Thread Manfred Lotz
On Thu, 11 Nov 2010 21:01:52 +0100
Manfred Lotz manfred.l...@arcor.de wrote:

 On Thu, 11 Nov 2010 20:56:48 +0100
 Herbert Voss herbert.v...@fu-berlin.de wrote:
 
  [frame=off]
 
 We come closer. However, I like to have the horizontal line below the
 header row. 
 
 
 

OK, I found it:

\setupTABLE[row][first][bottomframe=on]



-- 
Manfred


___
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] Animations (again, but different)

2010-11-11 Thread Erik Margraf
Thank's for your example! But I'm sorry to say, I didn't get it.
When I run context on it, it results in a 2x2 matrix of pictures.
Two of them show some reaction (change the color somewhat)
when I click on them. (the cows don't). That's all.

Maybe it has to with the following lines in the log file:
...
interaction : active
references  : unknown reference [][VideLayer{1}]
references  : unknown reference [][VideLayer{2}]
references  : unknown reference [][VideLayer{3}]
references  : unknown reference [][VideLayer{4}]
...
I tried the following example from the Wiki:
===
\defineproperty[my-hasitations][layer][state=stop]

\startproperty[my-hasitations]
To \ConTeXt\ or not to \ConTeXt?
\stopproperty

\button{Show   Decision}[VideLayer{my-hasitations}]
\button{Hide   Decision}[HideLayer{my-hasitations}]
\button{Toggle Decision}[ToggleLayer{my-hasitations}]

This produces the analogous messages for these three buttons.

My Context Version  - MTXrun | current version: 2010.11.03 19:42
My LuaTeX Version - This is LuaTeX, Version beta-0.63.0-2010090921

on Debian AMD64.  I looked at the files with Acrobat Reader 9 on Windows XP
(BTW. I also tried this completely using a MiKTeX 9 Installation on WinXP
without
success)

Am I missing something?

kind regards
Erik



2010/11/4 Wolfgang Schuster schuster.wolfg...@googlemail.com


 Am 03.11.2010 um 17:38 schrieb Erik Margraf:

  Dear Contexters!
  In the last few days I could read a few posts about
  animations in a resulting PDF document. Some
  statements mentioned java script as possible means
  to create an animation.
  Is it possible to do the following (which is rather
  simple using html and javascript)?
 
-- Have a bunch of thumbnail pictures
-- When you click on a thumbnail you see a
   larger version of the same picture
-- With the next mouseclick the picture
   vanishes (you see the gallery of thumbnails again)
 
  if yes, how?
  Any hints are welcome.

 Not perfect (it’s not possible to close the big pictures) but it should
 give you a first impression:

 \setupinteraction[state=start]

 \defineproperty [1] [layer] [state=stop,global=yes]
 \defineproperty [2] [layer] [state=stop,global=yes]
 \defineproperty [3] [layer] [state=stop,global=yes]
 \defineproperty [4] [layer] [state=stop,global=yes]

 \starttexdefinition properties
  \startoverlay
{\startproperty[1]\overlayfigure{cow}\stopproperty}
{\startproperty[2]\overlayfigure{mill}\stopproperty}
{\startproperty[3]\overlayfigure{hacker}\stopproperty}
{\startproperty[4]\overlayfigure{cow}\stopproperty}
  \stopoverlay
 \stoptexdefinition

 \defineoverlay[properties][\properties]

 \startTEXpage[background={foreground,properties}]

 \bTABLE[width=4cm,height=4cm,offset=none]
  \bTR
\bTD \goto{\overlayfigure{cow}}[VideLayer{1}] \eTD
\bTD \goto{\overlayfigure{mill}}[VideLayer{2}] \eTD
  \eTR
  \bTR
\bTD \goto{\overlayfigure{hacker}}[VideLayer{3}] \eTD
\bTD \goto{\overlayfigure{cow}}[VideLayer{4}] \eTD
  \eTR
 \eTABLE

 \stopTEXpage

 Wolfgang


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

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


Re: [NTG-context] table background color in first row

2010-11-11 Thread Aditya Mahajan

This is mainly for completeness:

On Thu, 11 Nov 2010, Manfred Lotz wrote:


and like to have a light gray background for the heading row.



\starttext

\starttable[|l|l|]

\BL[2] \SR
% or
% \CL[gray] \SR

\NC \bf Colheader 1 \NC \bf Colheader 2 \NC \SR \HL
\NC cell 11 \NC cell 12 \NC \FR
\NC cell 11 \NC cell 12 \NC \LR
\stoptable

\stoptext


Both \BL and \CL work with MkII but in MkIV \BL gives a black rule (rather 
than gray), which \CL gives an error. Hans, any ideas?


For a simple table, you can also use

\startTABLE
 \NC  \NC  ... \NC \NR
 \NC  \NC  ... \NC \NR
\stopTABLE

which is wrapper around \bTABLE .. \eTABLE.

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] Separate layout and content XML files?

2010-11-11 Thread Peter Davis
I want to process documents from two separate XML files.  One XML file
defines the layout of the page ... placement of text boxes, fonts to use ...
even placeholder text.  The other XML contains the actual content that gets
placed into that layout.

Is this possible?  Anyone have any examples of something like this?

I'm a LaTeX user who's new to ConTeXt.  I figured I can learn more quickly
by starting with a recipe and modifying it to fit my needs.

Thank you!

-pd
___
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] Separate layout and content XML files?

2010-11-11 Thread Aditya Mahajan

On Thu, 11 Nov 2010, Peter Davis wrote:


I want to process documents from two separate XML files.  One XML file
defines the layout of the page ... placement of text boxes, fonts to use ...
even placeholder text.  The other XML contains the actual content that gets
placed into that layout.


You can generate the \setup commands (i.e. the preable) from the first XML 
file, and the main body of the document from the second XML 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
___