Re: [NTG-context] teletype style in type-win.mkiv

2011-06-03 Thread Wolfgang Schuster

Am 02.06.2011 um 22:56 schrieb Pontus Lurcock:

 On Thu 02 Jun 2011, Richard Stephens wrote:
 
 \setupbodyfont[helvetica, 10pt]
 
 which is indistinguishable from Arial for 99% of the population, and
 it has the advantage that all the styles are already defined,
 including \tt.
 
 Anyone who can distinguish Helvetica from Arial is likely to have
 sufficient taste to realize that Helvetica is superior ;-).

But you can have somebody how takes a look at the font list
in Adobe Reader and complains that you don’t use Arial.

ConTeXt has predefined typescripts for Times New Roman,
Arial and Courier but they don’t work on each system
(e.g. the fonts use different filenames on the Mac).

The simplefonts module makes things a little bit easier
because it tries a few combinations to find the files
but it still depends on the filename.

\usemodule[simplefonts]

\setmainfont[Arial]
\setmonofont[Courier New]

\starttext
This Arial in combination with {\tt Courier New}.
\stoptext

The spec-system is another system to make font loading
easier but the quality of the result depends on the font
information which are sometimes a mess.

\definetypeface[mainface][ss][specsans][Arial]
\definetypeface[mainface][tt][specmono][Courier New]

\setupbodyfont[mainface]

\starttext
This Arial in combination with {\tt Courier New}.
\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] DocBook in ConTeXt - any new ideas?

2011-06-03 Thread R. Ermers
I tried typesetting docbook with Context, it can be done, I but got stuck on 
the cals tables and some other things. Cals tables can be processed, albeit as 
separate documents only - not as part of the docbook file - and then imported 
as pdf files. This was too cumbersome for me, and does not agree with the tex 
philosophy. I therefore gave up.

For some reason finetuning of, for example, the positioning of graphics, and 
headers as widows is more difficult than in a context document, at least I got 
this impression.

Robert


Op 2 jun 2011, om 22:20 heeft Hans Hagen het volgende geschreven:

 On 2-6-2011 7:17, Bruce wrote:
 Hans Hagenpragmaat  wxs.nl  writes:
 
 
 On 2-6-2011 12:53, Piotr Kopszak wrote:
 Many thanks for your reply! I would certainly go this way having a
 couple of months or a year perspective. Besides I'm eager to try
 finally the new way mkIV deals with xml. But realistically, preparing
 and testing a mapping of  even a subset of DocBook is a question of at
 least a couple of personmonths if not worse. Sadly, I'm not in a
 position to that now.
 
 Months? I never had a reason for doing a docbook mapping but a couple of
 hours should get you a start. Th eonly reason why I'd look into docbook
 is if I'd need in in a project. (I'd happily spent a few well paid
 months on it then.)
 
 You probably don't need all of docbook, so you could start with some
 simple tests. The mkii docbook stuff you mentioned definitely is doing a
 small subset.
 
 I never understand why you would try to typeset XML directly in ConTeXt?
 Why not just convert the DocBook to ConTeXt source using XSLT (or if the
 docs are simpler, use markdown with pandoc and you can easily get ConTeXt
 and HTML from the same source)?
 
 (1) because xslt mappings can become pretty unreadable
 (2) because you still need to make a file (and define environments)
 (3) because it then create another depencency and intermediate processing 
 stage
 (4) because sometimes it makes sense to let the typesetting engine make 
 decisions
 (5) because in mkiv one can apply lua functions to xml content
 (6) ...
 
 anyhow, the whole idea of xml is that it can be processed by whatever 
 machinery (and using xslt and/or xsl-fo for everything kin dof contradicts 
 that)
 
 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
 ___

___
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] I do not get a highlighted header with M-database

2011-06-03 Thread Cecil Westerhof
I looked at the example at:
http://wiki.contextgarden.net/M-database

In this example the first row is highlighted. I tried something like
that, but I do not get a highlighted first row. I attached my tex and
pdf file. What am I doing wrong?

-- 
Cecil Westerhof


dummy.tex
Description: TeX document


dummy.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] I do not get a highlighted header with M-database

2011-06-03 Thread Marco
On 2011-06-03 Cecil Westerhof cldwester...@gmail.com wrote:

 I looked at the example at:
 http://wiki.contextgarden.net/M-database
 
 In this  example the first  row is highlighted.  I tried
 something  like that,  but I  do not  get a  highlighted
 first row.  I attached my  tex and  pdf file. What  am I
 doing wrong?

The example on the wiki is not exact. You have to tell the
system what  you want  to do  with the  first row,  how to
highlight. Here's a starting point:


\startsetups Table:NT
  \setupTABLE [r] [first] [
background=color,
backgroundcolor=darkgray,
color=white,
style=bold]
\stopsetups


\defineseparatedlist
  [MyTable]
  [separator=tab,
   left=\bTD,right=\eTD,
   first=\bTR,last=\eTR,
   setups=Table:NT,
   before=\bTABLE,after=\eTABLE]

Marco


___
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] DocBook in ConTeXt - any new ideas?

2011-06-03 Thread Hans Hagen

On 3-6-2011 5:43, R. Ermers wrote:


I tried typesetting docbook with Context, it can be done, I but got stuck on 
the cals tables and some other things. Cals tables can be processed, albeit as 
separate documents only - not as part of the docbook file - and then imported 
as pdf files. This was too cumbersome for me, and does not agree with the tex 
philosophy. I therefore gave up.


we process docs with cals tables here


For some reason finetuning of, for example, the positioning of graphics, and 
headers as widows is more difficult than in a context document, at least I got 
this impression.


the same renderer is used so it should be the same

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] Wiki Topics Menu

2011-06-03 Thread Mathieu DUPONT


Hi,
Is there a menu page on the wiki to see all the topics/pages there are, such as 
these few examples :
http://wiki.contextgarden.net/TABLEhttp://wiki.contextgarden.net/Layout
I really can't find it if it exits.Otherwise that would be very, very useful, 
rather that only hitting them when searching for something.
Thanks !



Mathieu

  ___
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] Include a list in a list, for example, a List of Figures in a Table of Content

2011-06-03 Thread Mathieu DUPONT


Hi,
How can one include a list into another list ?The \definecombinedlist command 
doesn't work.I tried to find other ways but didn't find anything that worked.
Thanks for help !

\definecombinedlist[TOC][chapter,LOF]\definecombinedlist[LOF][figure]
\setupheadtext[TOC=Table of Content]\setupheadtext[LOF=List of Figures]
\starttext
\completeTOC\completeLOF
\chapter{Chapter}\placefigure{Cow.}{\externalfigure[cow]}
\stoptext 


Mathieu

  ___
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 installing minimals on PowerMac G4

2011-06-03 Thread Robert Blackstone
On  Thu, 2 Jun 2011 17:53:34 +0200  Mojca Miklavec wrote

 Where did you install the minimals?

First of all: thank you for your quick reply.

As usual I installed it in a subdirectory of my Home directory. I
would assume that there would not be any problems of permissions.
However I did chmod -R 755 in this (sub)directory but to no avail.

 Can you try
   chown -R yourusername /path/to/installation
Yes, I did, but again the process stopped.

 (I even do not know how to abort the process other than quitting Terminal.)

 Ctrl-C (a couple of times), Ctrl-D, Ctrl-\, ... or killall (but I'm
 not experience enough in giving you further details).

Ctrl-C did nothing but Ctrl-D set the installation process in motion again.
The result is that I can use mkii but not mkiv.

I clearly need to experiment a bit more.
 Thanks again for your advice which really helped me.

Robert Blackstone
___
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 installing minimals on PowerMac G4

2011-06-03 Thread Mojca Miklavec
Please send a complete log.

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] I do not get a highlighted header with M-database

2011-06-03 Thread Mojca Miklavec
On Fri, Jun 3, 2011 at 18:23, Marco wrote:

 The example on the wiki is not exact.

You can use view source/edit to see the full source. Yes, it is a
tiny simplification.

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] undefined control sequence bug with German umlaut in bibliography

2011-06-03 Thread Julian Becker
I came across an issue in context (context ver. 2011.05.18 22:26, LuaTeX
ver: beta-0.65.0-2010121421 (rev 4034) ) when trying to cite a bibliography
item having an author with a German umlaut ä

Compiling the short example below, produces the following output and then
-
...
system  begin file test.tex at line 3
publications  loading database from test.bbl
(test.bbl
! Undefined control sequence.
\@@pbs -Tr\0
6
\dostartpublication ...@@pby \noexpand \or \@@pbs
\noexpand \or \@@pbn \noex...
l.9 \stoppublication

)
backend  xmp  using file
'M:/Programs/context/tex/texmf-local/tex/context/base/lpdf-pdx.xml'
pages  flushing realpage 1, userpage 1, subpage 1
system  end file test.tex at line 5
...
mtx-context | fatal error: return code: 1
--

The strange thing is that when I change the Tr\{a}ger to Schr\{a}ger,
everything works just fine.
Does anybody know what's going on here?!

Julian


---test.tex-
\setuppublications[alternative=apa,sorttype=bbl]
\setupbibtex[database=test.bib]
\starttext
I'd like to cite \cite[Entry1].
\stoptext


-test.bib:---this one produces an error-
@misc{Entry1,
author = {Tr\{a}ger, D},
title = {{Some Document}},
year = {2006}
}
--

test.bib--this works---
@misc{Entry1,
author = {Schr\{a}ger, D},
title = {{Some Document}},
year = {2006}
}
--

-- 
Julian Becker
Institut für Angewandte Physik, R.123
Westfälische Wilhelms-Universität Münster
Corrensstr. 2/4
48149 Münster / Westfalen
Tel. 0251 83-3 61 53
Mob. 0151 599 848 29
e-mail: j_bec...@uni-muenster.de

Keep thy heart with all diligence; for it is the wellspring of life.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] undefined control sequence bug with German umlaut in bibliography

2011-06-03 Thread Thomas A. Schmitz

On Jun 3, 2011, at 8:38 PM, Julian Becker wrote:

 I came across an issue in context (context ver. 2011.05.18 22:26, LuaTeX ver: 
 beta-0.65.0-2010121421 (rev 4034) ) when trying to cite a bibliography item 
 having an author with a German umlaut ä
 

From btxdoc, which is part of texlive:

you must place the entire accented character in braces; in this case either 
{\a} or {\{a}} will do. Furthermore these braces must not themselves be 
enclosed in braces (other than the ones that might delimit the entire field or 
the entire entry); and there must be a backslash as the very first character 
inside the braces...

Thusly: Tr{\a}ger

But I admit it's not easy to know that, bibtex documentation is a real mess, 
and Oren Patashnik appears to suffer from a real disease which prevents him 
from writing clear sentences and easily parsable documents.

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
___


[NTG-context] xml syntax for \externalfigure

2011-06-03 Thread Thomas A. Schmitz
Hi all,

I'm pulling my hair - thought this was easy, but turns out to be more 
difficult. The \externalfigure command can take a width and/or a height 
parameter, and context will be happy to take either one into account. I'm 
trying to translate that into xml syntax. Here's a minimal example that I can't 
make work. If anyone can explain what to do here, I might be able to work this 
out (or will be back with more questions :-)

\startbuffer[test]
a
  externalfigure height=1cm resource=hacker/
/a
\stopbuffer

\startxmlsetups xml:testsetups
\xmlsetsetup{\xmldocument}{a|externalfigure}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:testsetups}

\startxmlsetups xml:a
  \xmlflush{#1}\par
\stopxmlsetups 

\startxmlsetups xml:externalfigure
  \externalfigure[\xmlatt{#1}{resource}]
 
[\doifnotempty{\xmlatt{#1}{height}}{height=\xmlatt{#1}{height}}]
\stopxmlsetups

\starttext
\xmlprocessbuffer{main}{test}{}
\stoptext 

The height attribute is not taken into account - why? 

All best

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] No chapter prefixes in section numbers

2011-06-03 Thread Mathieu DUPONT


Is there an exhaustive list of all the parameters the \setuphead function can 
take ?
Neither the 2011 ConTeXt Commands Manual nor the Wiki Command Reference page 
mention this one (sectionsegments).
Where can I find all the parameters one ConTeXt command can take ?
Thanks for enlightenment !


Mathieu



 From: schuster.wolfg...@googlemail.com
 Date: Thu, 2 Jun 2011 05:28:02 +0200
 To: ntg-context@ntg.nl
 Subject: Re: [NTG-context] No chapter prefixes in section numbers
 
 
 Am 02.06.2011 um 02:28 schrieb Aditya Mahajan:
 
  Hi,
  
  I do not want chapter number to be prefixed in section and subsection 
  numbers. Thus,
  
  \starttext
  \chapter{One}
  \section{Two}
  \subsection{Three}
  \stoptext
  
  should give:
  
  1 One
  1 Two
  1.1 Three
  
  How to achieve that? I tried
  
  \setuphead[section][prefixset=none]
  
  but to no affect.
 
 \setuphead[section]   [sectionsegments=section]
 \setuphead[subsection][sectionsegments=section:subsection]
 
 Prefixes are used from commands which show the section numbers
 in front of their own number, e.g. floats or enumerations.
 
 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
 ___
  ___
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] xml syntax for \externalfigure

2011-06-03 Thread Aditya Mahajan

On Fri, 3 Jun 2011, Thomas A. Schmitz wrote:


Hi all,

I'm pulling my hair - thought this was easy, but turns out to be more 
difficult. The \externalfigure command can take a width and/or a height 
parameter, and context will be happy to take either one into account. I'm 
trying to translate that into xml syntax. Here's a minimal example that I can't 
make work. If anyone can explain what to do here, I might be able to work this 
out (or will be back with more questions :-)

\startbuffer[test]
a
 externalfigure height=1cm resource=hacker/
/a
\stopbuffer

\startxmlsetups xml:testsetups
\xmlsetsetup{\xmldocument}{a|externalfigure}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:testsetups}

\startxmlsetups xml:a
 \xmlflush{#1}\par
\stopxmlsetups

\startxmlsetups xml:externalfigure
 \externalfigure[\xmlatt{#1}{resource}]
[\doifnotempty{\xmlatt{#1}{height}}{height=\xmlatt{#1}{height}}]
\stopxmlsetups


(untested)

\exeternalfigure[...][height=\doifemptyelse{\xmlatt{#1}{height}}{fit}{\xmlatt{#1}{height}}]

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] xml syntax for \externalfigure

2011-06-03 Thread Thomas A. Schmitz

On Jun 3, 2011, at 9:57 PM, Aditya Mahajan wrote:

 (untested)
 
 \exeternalfigure[...][height=\doifemptyelse{\xmlatt{#1}{height}}{fit}{\xmlatt{#1}{height}}]
 
 Aditya

Hmm, almost... Gives the dreaded Missing number, treated as zero error. But 
your fit gave me an idea: this works:

[height=\xmlattdef{#1}{height}{fit}]

but only if I have a real dimension as in height=5cm. What if I want to 
define something like height=0.4 and want this to be the equivalent of 
height=0.4\textheight ? This of course doesn't work:

[height=\xmlattdef{#1}{height}{fit}\textheight]

since it will expand to fit\textheight as a default option. Any suggestions?

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] xml syntax for \externalfigure

2011-06-03 Thread Hans Hagen

On 3-6-2011 10:19, Thomas A. Schmitz wrote:


On Jun 3, 2011, at 9:57 PM, Aditya Mahajan wrote:


(untested)

\exeternalfigure[...][height=\doifemptyelse{\xmlatt{#1}{height}}{fit}{\xmlatt{#1}{height}}]

Aditya


Hmm, almost... Gives the dreaded Missing number, treated as zero error. But your 
fit gave me an idea: this works:

[height=\xmlattdef{#1}{height}{fit}]

but only if I have a real dimension as in height=5cm. What if I want to define 
something like height=0.4 and want this to be the equivalent of height=0.4\textheight ? 
This of course doesn't work:

[height=\xmlattdef{#1}{height}{fit}\textheight]

since it will expand to fit\textheight as a default option. Any suggestions?


something (slow):

\expdoifelse
  {\xmlattdef{#1}{height}{fit}
  {fit}
  {\xmlatt{#1}{height}\textheight}

(of you define a lua helper)

-
  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] Include a list in a list, for example, a List of Figures in a Table of Content

2011-06-03 Thread Hans Hagen

On 3-6-2011 7:10, Mathieu DUPONT wrote:



Hi,
How can one include a list into another list ?The \definecombinedlist command 
doesn't work.I tried to find other ways but didn't find anything that worked.
Thanks for help !

\definecombinedlist[TOC][chapter,LOF]\definecombinedlist[LOF][figure]
\setupheadtext[TOC=Table of Content]\setupheadtext[LOF=List of Figures]
\starttext
\completeTOC\completeLOF
\chapter{Chapter}\placefigure{Cow.}{\externalfigure[cow]}
\stoptext


What do you expect? Can you give some ascii art example?

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] xml syntax for \externalfigure

2011-06-03 Thread Thomas A. Schmitz

On Jun 3, 2011, at 10:50 PM, Hans Hagen wrote:

 On 3-6-2011 10:19, Thomas A. Schmitz wrote:
 
 Hmm, almost... Gives the dreaded Missing number, treated as zero error. 
 But your fit gave me an idea: this works:
 
 [height=\xmlattdef{#1}{height}{fit}]
 
 but only if I have a real dimension as in height=5cm. What if I want to 
 define something like height=0.4 and want this to be the equivalent of 
 height=0.4\textheight ? This of course doesn't work:
 
 [height=\xmlattdef{#1}{height}{fit}\textheight]
 
 since it will expand to fit\textheight as a default option. Any 
 suggestions?
 
 something (slow):
 
 \expdoifelse
  {\xmlattdef{#1}{height}{fit}
  {fit}
  {\xmlatt{#1}{height}\textheight}
 
 (of you define a lua helper)
 
Ah, expdoifelse is for expanded doifelse, right? Any examples for such a lua 
helper? Sounds good, but I still haven't been able to understand how to mix xml 
and lua code.

Thanks!

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] xml syntax for \externalfigure

2011-06-03 Thread Peter Münster
On Fri, Jun 03 2011, Thomas A. Schmitz wrote:

 Ah, expdoifelse is for expanded doifelse, right? Any examples for such a lua
 helper? Sounds good, but I still haven't been able to understand how to mix
 xml and lua code.

\startluacode
function my_externalfigure(file, t)
local args_present
for k, v in pairs(t) do
if v ==  then
t[k] = nil
else
args_present = true
end
end
context.externalfigure({file}, args_present and t)
end
\stopluacode

\startxmlsetups xml:externalfigure
  \ctxlua{my_externalfigure(\xmlatt{#1}{resource},
{width = \xmlatt{#1}{width}, height = \xmlatt{#1}{height}})}
\stopxmlsetups

My first idea was \expanded{\externalfigure[...][\doif...]} but it
does not work...

-- 
   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] xml syntax for \externalfigure

2011-06-03 Thread Hans Hagen

On 4-6-2011 12:14, Peter Münster wrote:

On Fri, Jun 03 2011, Thomas A. Schmitz wrote:


Ah, expdoifelse is for expanded doifelse, right? Any examples for such a lua
helper? Sounds good, but I still haven't been able to understand how to mix
xml and lua code.


\startluacode
function my_externalfigure(file, t)
 local args_present
 for k, v in pairs(t) do
 if v ==  then
 t[k] = nil
 else
 args_present = true
 end
 end
 context.externalfigure({file}, args_present and t)
end
\stopluacode

\startxmlsetups xml:externalfigure
   \ctxlua{my_externalfigure(\xmlatt{#1}{resource},
 {width = \xmlatt{#1}{width}, height = \xmlatt{#1}{height}})}
\stopxmlsetups

My first idea was \expanded{\externalfigure[...][\doif...]} but it
does not work...


you can consider passing #1 and using lxml.att at the lua end or go even 
further and pop in your own finalizer


-
  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] marginal material in Arabic, tei/xml context mkiv

2011-06-03 Thread Jon Crump
All,

Pardon for trying to boost the topic, but I still can't seem to gain
control over marginal material in an Arabic section using the new
typo-mar.mkiv. I confess, it's quite likely that I'm just not getting
something obvious.

I've rotated the page to landscape to show where the marginal material
winds up when margin is [right]. When it's [left], it overwrites the
beginning of the Arabic line

If anyone has thoughts on this, I'd be grateful.

context environment file:
~
\startxmlsetups xml:teisetups
\xmlsetsetup{#1}{*}{-}
\xmlsetsetup{#1}{body}{xml:*}
\xmlsetsetup{#1}{div[@xml:id='arab']}{xml:div:arab}
\xmlsetsetup{#1}{div[@xml:id='engl']}{xml:div:engl}
\xmlsetsetup{#1}{lb}{xml:lb}
\stopxmlsetups

\setuppapersize[][A3,landscape]
\setuplayout[width=middle,textwidth=5in]
\xmlregistersetup{xml:teisetups}
\environment ara-sty

\startxmlsetups xml:body
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:lb
\MarText{\tfxx{xml linebreak numbers}}
\xmlflush{#1}
\stopxmlsetups

\definemargindata [MarText][right][color=red]

\startxmlsetups xml:div:arab
\setarabic{\switchtobodyfont[Arabic] \xmlflush{#1}}
\endgraf
\stopxmlsetups

\startxmlsetups xml:div:engl
\setlatin{\xmlflush{#1}}
\stopxmlsetups
~~~

XML source:
~~
?xml version=1.0 encoding=utf-8?
body
  div type=month xml:id=arab
lb n=01 /فقد صممنا على السفر الى اورباو ممشانا من هنا سيكون
  /div
  div type=month xml:id=engl
lb n=01 /And so, we decided to travel to Europe. Our departure
from here will be
  /div
/body
~~

ara-sty.tex setting up ScheherazadeRegOT:

\startenvironment ara-sty

\mainlanguage[arabic]

% Font setup

\definefontfeature
   [arabic]
   [mode=node,language=dflt,script=arab,
init=yes,medi=yes,fina=yes,isol=yes,
liga=yes,dlig=yes,rlig=yes,clig=yes,
mark=yes,mkmk=yes,kern=yes,curs=yes]

\starttypescript [serif] [arabic]
 \definefontsynonym [Arabic-Light]   [name:ScheherazadeRegOT]
[features=arabic]
 \definefontsynonym [Arabic-Bold][name:ScheherazadeRegOT]
[features=arabic]
 \definefontsynonym [Arabic-Italic]  [name:ScheherazadeRegOT]
[features=arabic]
 \definefontsynonym [Arabic-Bold-Italic] [name:ScheherazadeRegOT]
[features=arabic]
\stoptypescript

\starttypescript [serif] [arabic] [name]
 \usetypescript[serif][fallback]
 \definefontsynonym [Serif]   [Arabic-Light]   [features=arabic]
 \definefontsynonym [SerifItalic] [Arabic-Italic]  [features=arabic]
 \definefontsynonym [SerifBold]   [Arabic-Bold][features=arabic]
 \definefontsynonym [SerifBoldItalic] [Arabic-Bold-Italic] [features=arabic]
\stoptypescript

\starttypescript [Arabic]
  \definetypeface [Arabic] [rm] [serif] [arabic] [default]
\stoptypescript

\def\ArabicGlobalDir {\pagedir TRT\bodydir TRT\pardir TRT\textdir TRT}
\def\ArabicParDir{\textdir TRT\pardir TRT}
\def\ArabicTextDir   {\textdir TRT}
\def\LatinParDir {\textdir TLT\pardir TLT}
\def\LatinTextDir{\textdir TLT}
\def\LatinGlobalDir  {\pagedir TLT\bodydir TLT\pardir TLT\textdir TLT}

\define\setarabic
  {\ArabicGlobalDir%
   \usetypescript[Arabic]%
   \setupbodyfont[Arabic,20pt]}

\definestartstop
  [arabicpar]
  [commands=\Arabic\ArabicParDir]

\define[1]\RT
  {{\Arabic\ArabicTextDir#1}}

\define\setlatin
  {\LatinGlobalDir%
   \usetypescript[lm]%
   \setupbodyfont[lm,20pt]}

\definestartstop
  [latinpar]
  [commands=\Arabic\LatinParDir]

\define[1]\LT
  {{\LatinTextDir#1}}

\setupdirections[bidi=local]


\stopenvironment
___
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] Wiki Topics Menu

2011-06-03 Thread Pontus Lurcock
On Fri 03 Jun 2011, Mathieu DUPONT wrote:

 Is there a menu page on the wiki to see all the topics/pages there
 are, such as these few examples :

Do you mean something like http://wiki.contextgarden.net/Special:AllPages ?
http://wiki.contextgarden.net/Special:SpecialPages has some
other resources of a similar nature.

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

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


Re: [NTG-context] undefined control sequence bug with German umlaut in bibliography

2011-06-03 Thread Pontus Lurcock
On Fri 03 Jun 2011, Thomas A. Schmitz wrote:

 But I admit it's not easy to know that, bibtex documentation is a
 real mess

Patience please! ‘This document will be expanded when BibTEX version
1.00 comes out’ -- BIBTEXing, February 8, 1988.

:-)

Pont
___
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] I do not get a highlighted header with M-database

2011-06-03 Thread Cecil Westerhof
2011/6/3 Marco net...@lavabit.com:
 I looked at the example at:
     http://wiki.contextgarden.net/M-database

 In this  example the first  row is highlighted.  I tried
 something  like that,  but I  do not  get a  highlighted
 first row.  I attached my  tex and  pdf file. What  am I
 doing wrong?

 The example on the wiki is not exact. You have to tell the
 system what  you want  to do  with the  first row,  how to
 highlight. Here's a starting point:


 \startsetups Table:NT
  \setupTABLE [r] [first] [
    background=color,
    backgroundcolor=darkgray,
    color=white,
    style=bold]
 \stopsetups


 \defineseparatedlist
  [MyTable]
  [separator=tab,
   left=\bTD,right=\eTD,
   first=\bTR,last=\eTR,
   setups=Table:NT,
   before=\bTABLE,after=\eTABLE]

Works. Thanks.

-- 
Cecil Westerhof
___
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] entity-relation diagram

2011-06-03 Thread Cecil Westerhof
Is it possible to make an entity-relation diagram with ConTeXt, or can
I better look for another tool?

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