Re: [NTG-context] simple bibliography and dots after section numbering

2010-05-11 Thread Hans Hagen

On 10-5-2010 9:00, Taco Hoekwater wrote:

Rogutės Sparnuotos wrote:

Taco Hoekwater (2010-05-09 08:15):

Rogutės Sparnuotos wrote:

But would it let me place such a list of publications:

Books
1. Author (year). Title.
2. Author (year). Title.

Internet resources
3. URL

Movies
4. Author (year). Title.

It seems that I could easily use \setuppublicationlayout to define a
'movies' type, but is listing references by type implemented


Not in mkii.


But I am running MKIV, look one line below. So, is printing a list of
publications grouped by publication type possible or easily done with
MKIV?


I know it is not supported out of the box, but only Hans knows how
hard it would be to write an extension (it should be considerably
easier to do in lua than in TeX, but even so ...).


a more mkiv-ish approach is:

\starttext

% bibtex
%   entry tag=hagen:tb19-3-311 category=article
% field name=number3/field
% field name=bibdateFri Jul 13 10:24:20 MDT 2007/field
% field name=authorHans Hagen/field
% field name=journalTUGboat/field
% field name=title{Visual Debugging in \TeX, Part 1: The 
Story}/field

% field name=ISSN0896-3207/field
% field name=year1998/field
% field name=pages311--317/field
% field name=volume19/field
%   /entry
% /bibtex


\def\MF  {MF}
\def\MP  {MP}
\def\TUB {TUGboat}
\def\Mc  {Mac}
\def\sltt{\tt}
\let\acro\firstofoneargument

\usemodule[abr-01]

\definebibtexsession [somebibtex]

\registerbibtexfile [somebibtex] [tugboat.bib]
\registerbibtexfile [somebibtex] [komoedie.bib]

\preparebibtexsession [somebibtex] % [convert]

\startxmlsetups bibtex:one
  \starttabulate[|Bl|p|]
  \NC tag   \NC \xmlatt{#1}{tag} \NC\NR
  \NC author\NC \xmlfilter{#1}{/fie...@name='author']/context()} \NC\NR
  \NC title \NC \xmlfilter{#1}{/fie...@name='title' ]/context()} \NC\NR
  \stoptabulate
\stopxmlsetups

\startxmlsetups bibtex:bibtex
\xmlfilter{#1}{
/ent...@category='article']
/fie...@name='author' and (find(text(),'Hans Hagen')
or find(text(),'Taco Hoekwater'))]
/../command(bibtex:one)
}
\stopxmlsetups

\applytobibtexsession[somebibtex][bibtex]

\page

\startxmlsetups bibtex:entry:getkeys
\xmladdsortentry{bibtex}{#1}
{\xmlfilter{#1}{/fie...@name='author']/text()}}
\xmladdsortentry{bibtex}{#1}
{\xmlfilter{#1}{/fie...@name='year'  ]/text()}}
\xmladdsortentry{bibtex}{#1}
{\xmlatt{#1}{tag}}
\stopxmlsetups

\startxmlsetups xml:bibtex:sorter
\xmlresetsorter{bibtex}
  % \xmlfilter{#1}{entry/command(bibtex:entry:getkeys)}
\xmlfilter{#1}{
bibtex
/ent...@category='article']
/fie...@name='author' and find(text(),'Knuth')]
/../command(bibtex:entry:getkeys)}
\xmlsortentries{bibtex}
\xmlflushsorter{bibtex}{bibtex:entry:flush}
\stopxmlsetups

\startxmlsetups bibtex:entry:flush
\xmlfilter{#1}{/fie...@name='author']/context()} / %
\xmlfilter{#1}{/fie...@name='year'  ]/context()} / %
\xmlatt{#1}{tag}\par
\stopxmlsetups

\xmlsetup{bibtex:somebibtex}{xml:bibtex:sorter}

\stoptext


-
  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] simple bibliography and dots after section numbering

2010-05-11 Thread Taco Hoekwater

Hans Hagen wrote:


a more mkiv-ish approach is:


As even I don't quite understand this: could you or someone else
perhaps illuminate this code with explanations? It would make
an interesting article/wiki page, I think.

Best wishes,
Taco


\starttext

% bibtex
%   entry tag=hagen:tb19-3-311 category=article
% field name=number3/field
% field name=bibdateFri Jul 13 10:24:20 MDT 2007/field
% field name=authorHans Hagen/field
% field name=journalTUGboat/field
% field name=title{Visual Debugging in \TeX, Part 1: The 
Story}/field

% field name=ISSN0896-3207/field
% field name=year1998/field
% field name=pages311--317/field
% field name=volume19/field
%   /entry
% /bibtex


\def\MF  {MF}
\def\MP  {MP}
\def\TUB {TUGboat}
\def\Mc  {Mac}
\def\sltt{\tt}
\let\acro\firstofoneargument

\usemodule[abr-01]

\definebibtexsession [somebibtex]

\registerbibtexfile [somebibtex] [tugboat.bib]
\registerbibtexfile [somebibtex] [komoedie.bib]

\preparebibtexsession [somebibtex] % [convert]

\startxmlsetups bibtex:one
  \starttabulate[|Bl|p|]
  \NC tag   \NC \xmlatt{#1}{tag} \NC\NR
  \NC author\NC \xmlfilter{#1}{/fie...@name='author']/context()} \NC\NR
  \NC title \NC \xmlfilter{#1}{/fie...@name='title' ]/context()} \NC\NR
  \stoptabulate
\stopxmlsetups

\startxmlsetups bibtex:bibtex
\xmlfilter{#1}{
/ent...@category='article']
/fie...@name='author' and (find(text(),'Hans Hagen')
or find(text(),'Taco Hoekwater'))]
/../command(bibtex:one)
}
\stopxmlsetups

\applytobibtexsession[somebibtex][bibtex]

\page

\startxmlsetups bibtex:entry:getkeys
\xmladdsortentry{bibtex}{#1}
{\xmlfilter{#1}{/fie...@name='author']/text()}}
\xmladdsortentry{bibtex}{#1}
{\xmlfilter{#1}{/fie...@name='year'  ]/text()}}
\xmladdsortentry{bibtex}{#1}
{\xmlatt{#1}{tag}}
\stopxmlsetups

\startxmlsetups xml:bibtex:sorter
\xmlresetsorter{bibtex}
  % \xmlfilter{#1}{entry/command(bibtex:entry:getkeys)}
\xmlfilter{#1}{
bibtex
/ent...@category='article']
/fie...@name='author' and find(text(),'Knuth')]
/../command(bibtex:entry:getkeys)}
\xmlsortentries{bibtex}
\xmlflushsorter{bibtex}{bibtex:entry:flush}
\stopxmlsetups

\startxmlsetups bibtex:entry:flush
\xmlfilter{#1}{/fie...@name='author']/context()} / %
\xmlfilter{#1}{/fie...@name='year'  ]/context()} / %
\xmlatt{#1}{tag}\par
\stopxmlsetups

\xmlsetup{bibtex:somebibtex}{xml:bibtex:sorter}

\stoptext


-
  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] \hfill at the end of line

2010-05-11 Thread Jan Pohanka

Thanks, this works. (But it's a little bit tricky with hyphens)

Dne Mon, 10 May 2010 21:51:58 +0200 Aditya Mahajan adit...@umich.edu  
napsal(a):



On Mon, 10 May 2010, Honza Pohanka wrote:


Hello,

I'd like add a word at the end of the last line of the paragraph. \hfill
command works fine, when this word doesn't overflow to the next line. In
that case the word stays on the next line but left aligned.


example

Zakreslete průběh na signálu TX při vyslání dvou znaků, které odpovídají
vaším iniciálám. Jak dlouho bude tento proces trvat? (Předpokládejte
rychlost 57600 Bd, 8 datových bitů, 1 stopbit.) \hfill (4 body)


Try \wordright{(4 body)}

Aditya



--
Tato zpráva byla vytvořena převratným poštovním klientem Opery:  
http://www.opera.com/mail/

___
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] how to compute the sum of numbers

2010-05-11 Thread Jan Pohanka

Hello,
I'm preparing a simple template for exam tests. I have following commad.

\question{3}{text text text}

where firtst parametr stands for points.

I'd like to compute the sum of points to be used as Total points: xx

What is the correct approach to do that if I'm using MKII?

greetings Jan


--
Tato zpráva byla vytvořena převratným poštovním klientem Opery:  
http://www.opera.com/mail/

___
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] simple bibliography and dots after section numbering

2010-05-11 Thread Hans Hagen

On 11-5-2010 10:43, Taco Hoekwater wrote:

Hans Hagen wrote:


a more mkiv-ish approach is:


As even I don't quite understand this: could you or someone else
perhaps illuminate this code with explanations? It would make
an interesting article/wiki page, I think.


it's just the code from hybrid-bibtex.tex (without text) as di didn;t 
want to post an unfinished chapter so in due time there will be an 
explanation ... the xml bit is explained in the xml-mkiv document


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] how to compute the sum of numbers

2010-05-11 Thread Taco Hoekwater

Jan Pohanka wrote:

Hello,
I'm preparing a simple template for exam tests. I have following commad.

\question{3}{text text text}


\newcount\totalpoints

\def\question#1#2{\global\advance\totalpoints #1\relax ... #2 ...}


where firtst parametr stands for points.

I'd like to compute the sum of points to be used as Total points: xx


Total points: \the\totalpoints

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

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


Re: [NTG-context] how to compute the sum of numbers

2010-05-11 Thread Jan Pohanka

Thank you,
I have an additional question. Is it possible to have the sum available  
before the \question commands?

I mean

Total points: \the\totalpoints % or something like that

\question{5}{text text}
\question{3}{text text}
\question{1}{text text}

greetings,
Jan


Dne Tue, 11 May 2010 11:23:30 +0200 Taco Hoekwater t...@elvenkind.com  
napsal(a):



Jan Pohanka wrote:

Hello,
I'm preparing a simple template for exam tests. I have following commad.
 \question{3}{text text text}


\newcount\totalpoints

\def\question#1#2{\global\advance\totalpoints #1\relax ... #2 ...}


where firtst parametr stands for points.
 I'd like to compute the sum of points to be used as Total points: xx


Total points: \the\totalpoints

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


maillist : ntg-context@ntg.nl /  
http://www.ntg.nl/mailman/listinfo/ntg-context

webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___



--
Tato zpráva byla vytvořena převratným poštovním klientem Opery:  
http://www.opera.com/mail/

___
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] how to compute the sum of numbers

2010-05-11 Thread Taco Hoekwater

Jan Pohanka wrote:

Thank you,
I have an additional question. Is it possible to have the sum available 
before the \question commands?



This is what I would do (but I suspect Wolfgang can come up
with something cleaner):


\def\startquestions
  {\newcount\totalpoints}

\def\stopquestions
  {\expanded{\reference[totalpoints]{\the\totalpoints}}}

\def\question#1#2{\global\advance\totalpoints #1\relax #2\par}

\starttext
Total points: \in[totalpoints]

\startquestions
\question{5}{text text}
\question{3}{text text}
\question{1}{text text}
\stopquestions
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] sorting

2010-05-11 Thread Tomáš Pustelník
Hi,
thanks for your previous answers, they helped me. But now I'm little lost in 
sorting (in registers -- index etc.). I know there is file sort-lan.mkii with 
sorting rules for czech language, but Context is not sorting by these rules 
(letter ch is not recognized). So, is there some way how to use it? (I can add 
it to context.mkii and generate format again, but I'm not sure, it was supposed 
to be this way). Also mkiv version of this file doesn't exist, but sort-lan.lua 
does. So how is it handled in MkIV? 

Thank for your answers

Tomas Pustelnik___
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] How to get randomly coloured text in metapost?

2010-05-11 Thread Marco
Hi,

how to get random colours for text inside textext? Take a look at the
following example (MKIV).

\definecolor [static] [r=.9, g=.7, b=.8]
\starttext
\startuseMPgraphic {1}

def col=
  (uniformdeviate(1),uniformdeviate(1),uniformdeviate(1))
enddef;

% These dots have a random color
for i=0 upto 5:
  fill fullcircle scaled 5mm xshifted i*1cm withcolor col;
endfor;

% withcolor does not work, »Test« is black
for i=0 upto 5:
  label(textext(Test), (i*1cm,-1cm))  withcolor col;
endfor;

% To get a static color I use the following construct
for i=0 upto 5:
  label(textext(\color[static]Test), (i*1cm,-2cm));
endfor;

\stopuseMPgraphic
\useMPgraphic {1}
\stoptext

Is it possible to get the metapost construct »withcolor« to work with
text or do I have to take a different approach?

Thanks for any help.
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] How to get randomly coloured text in metapost?

2010-05-11 Thread Alan BRASLAU
On Tuesday 11 May 2010 17:48:09 Marco wrote:
 Hi,
 
 how to get random colours for text inside textext? Take a look at the
 following example (MKIV).
 
 \definecolor [static] [r=.9, g=.7, b=.8]
 \starttext
 \startuseMPgraphic {1}
 
 def col=
   (uniformdeviate(1),uniformdeviate(1),uniformdeviate(1))
 enddef;
 
 % These dots have a random color
 for i=0 upto 5:
   fill fullcircle scaled 5mm xshifted i*1cm withcolor col;
 endfor;
 
 % withcolor does not work, »Test« is black
 for i=0 upto 5:
   label(textext(Test), (i*1cm,-1cm))  withcolor col;
 endfor;
 
 % To get a static color I use the following construct
 for i=0 upto 5:
   label(textext(\color[static]Test), (i*1cm,-2cm));
 endfor;
 
 \stopuseMPgraphic
 \useMPgraphic {1}
 \stoptext
 
 Is it possible to get the metapost construct »withcolor« to work with
 text or do I have to take a different approach?
 
 Thanks for any help.
 Marco

I understood from a much earlier discussion with Hans that withcolor
will not be made to work with text, whose color therefore has to be
set with ConTeXt constructs.

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

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


[NTG-context] Removing last skip or insert negative space to captions of figures

2010-05-11 Thread Jaroslav Hajtmar

Hello,
Inasmuch as I dont fix the problem with stoppers in MkIV (in MkII is OK) 
(settings \setupcaption[figure][stopper={*}] and
\setuplist[figure][stopper={:}]  isnt doesn't work), therefore I want be 
resolving it throught very beastly way:
It is removing last skip (it is remove space after number of figure) 
from caption of figure
or inserting negative space with stoppers to captions of figures by 
example:


\placefigure{\negspacewithstopper Caption 1}
  {\externalfigure[figure1]}

Definition of \negspacewithstopper is:
\def\negspacewithstopper{$\!\!\!\!$:\quad }

It seem to me, that removing last skip is clearer method, but I dont 
know, if any like this command exist in context. PlainTeX macro \unskip 
hasnt effect.


Is there any way to removing last skip in Context (MkIV)??

Thankx Jaroslav





___
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] How to get randomly coloured text in metapost?

2010-05-11 Thread Marco
  Is it possible to get the metapost construct »withcolor« to work
  with text or do I have to take a different approach?

 I understood from a much earlier discussion with Hans that withcolor
 will not be made to work with text, whose color therefore has to be
 set with ConTeXt constructs.
Thanks for the information. But how to do this? How can I set up the
randomness in ConTeXt? I browsed a bit through the sources and found a
lua snipped producing random integers. So here's my first attempt.

% only Integers, so not much variation in color :-(
\def\r{\ctxlua{commands.getrandomcounta(0,1)}}

% Defining the colour at this point makes it kind of static again
\definecolor[my][r=\r,g=\r,b=\r]
\starttext
\startuseMPgraphic {1}

% The colour is all the same, but different in each run
for i=0 upto 5:
  label(textext(\color[my]{Test}), (i*1cm,-2cm));
endfor;

% Does not work, results in compile error
% for i=0 upto 5:
%   label(textext(\definecolor[my][r=\r,g=\r,b=\r]\color[my]{Test}),
%   (i*1cm,-3cm));
% endfor;

\stopuseMPgraphic
\useMPgraphic {1}
\stoptext

Maybe this code is an improvable step in the right direction, maybe it's
rubbish. Necessary improvements need to be:

i) need of floating point random numbers
   ii) random colours per call and not per ConTeXt run
  iii) the use is quite verbose, so need to put it in a macro

Any hints appreciated.

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] Removing last skip or insert negative space to captions of figures

2010-05-11 Thread Hans Hagen

On 11-5-2010 7:38, Jaroslav Hajtmar wrote:


Is there any way to removing last skip in Context (MkIV)??


\removeunwantedspaces

-
  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] float problem

2010-05-11 Thread Peter Rolf
Hi,

I have problems with a figure in a multicolumn layout (3 columns).
The graphic is around two columns wide and the caption text should be
displayed beside the graphic (one column wide).
Sadly the figure is shifted to the right and the width of the caption is
not considered (overwritten by normal text). I have tried several
things, but no success.

Test file and resulting pdf are attached.

Peter


MTXrun | current version: 2010.05.08 13:33
This is LuaTeX, Version beta-0.60.1-2010042809 (rev 3657)

\switchtobodyfont[small]
\setuptolerance[tolerant,stretch]


\definecolumnset[threecolumns][n=3]

\setupcolumnset[threecolumns][1,2][balance=yes]

\definecolumnsetspan[spantwo][n=2]
\definecolumnsetspan[spanthree][n=3]

\definecolumnsethsize{threecolumns}{1}{1}\One
\definecolumnsethsize{threecolumns}{1}{2}\Two
\definecolumnsethsize{threecolumns}{1}{3}\Three


\starttext
\showframe
\startcolumnset[threecolumns]

\setupcaption[figure][location={high,right},width=\dimexpr\One]
%\setupfloat[figure][location=left]

\null
\page[yes]

%\startcolumnsetspan[spanthree]
\placefigure[right][]
{\input ward}%
{\externalfigure[cow.pdf][width=.95\dimexpr\Two,frame=on]}
%\stopcolumnsetspan

\input tufte\column
\input knuth\column
\input zapf



\stopcolumnset
\stoptext


float.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] Removing last skip or insert negative space to captions of figures

2010-05-11 Thread Jaroslav Hajtmar

Hello Hans.
Thanx for quickly respons, but \removeunwantedspaces unfortunately hasnt 
effect - last space from caption isnt remove.


when I do:
\placefigure{\removeunwantedspaces : Caption 1}
  {\externalfigure[figure1]}
then result is:

Figure 1:   Caption 1

but I want get:

Figure 1:Caption 1

with negative spaces i.e.

\placefigure{$\!\!\!\!$:\quad  Caption 1}
  {\externalfigure[figure1]}

is result OK! BUT this method is terrible for me:

Thanx Jaroslav


Dne 11.5.2010 19:48, Hans Hagen napsal(a):

On 11-5-2010 7:38, Jaroslav Hajtmar wrote:


Is there any way to removing last skip in Context (MkIV)??


\removeunwantedspaces

-
  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] How to get randomly coloured text in metapost?

2010-05-11 Thread Hans Hagen

On 11-5-2010 7:38, Marco wrote:

label(textext(\definecolor[my][r=\r,g=\r,b=\r]\color[my]{Test}),
%   (i*1cm,-3cm));


numeric r, g, b ;

r := uniformdeviate 1 ;
g := uniformdeviate 1 ;
b := uniformdeviate 1 ;

textext(\colored[r=  r  ,g=  g  ,b=  b  ]{Test})

etc

-
  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] sorting

2010-05-11 Thread Hans Hagen

On 11-5-2010 5:31, Tomáš Pustelník wrote:

Hi,
thanks for your previous answers, they helped me. But now I'm little lost in 
sorting (in registers -- index etc.). I know there is file sort-lan.mkii with 
sorting rules for czech language, but Context is not sorting by these rules 
(letter ch is not recognized). So, is there some way how to use it? (I can add 
it to context.mkii and generate format again, but I'm not sure, it was supposed 
to be this way). Also mkiv version of this file doesn't exist, but sort-lan.lua 
does. So how is it handled in MkIV?



sort-lan.lua

-
  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] Removing last skip or insert negative space to captions of figures

2010-05-11 Thread Peter Münster
On Tue, May 11 2010, Jaroslav Hajtmar wrote:

 \placefigure{$\!\!\!\!$:\quad  Caption 1}
   {\externalfigure[figure1]}

 is result OK! BUT this method is terrible for me:

Better method:

\setupcaptions[distance=0pt]
\starttext
\placefigure{: Caption}{bla}
\stoptext

Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/


___
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] How to get randomly coloured text in metapost?

2010-05-11 Thread Marco
 numeric r, g, b ;
 
 r := uniformdeviate 1 ;
 g := uniformdeviate 1 ;
 b := uniformdeviate 1 ;
 
 textext(\colored[r=  r  ,g=  g  ,b=  b  ]{Test})
Thanks for this snipped, Hans. It looks promising, but I get the
following compile error:

!mplib  : mp terminal:  \colored [r=
 0.74464
! Not implemented: (string)(known numeric).
to be read again 

I used the following code:

\starttext
\startuseMPgraphic {1}

numeric r, g, b ;
r := uniformdeviate 1 ;
g := uniformdeviate 1 ;
b := uniformdeviate 1 ;

label(textext(\colored[r=  r  ,g=  g  ,b=  b  ]{Test}),
origin);

\stopuseMPgraphic
\useMPgraphic {1}
\stoptext

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] Removing last skip or insert negative space to captions of figures

2010-05-11 Thread Jaroslav Hajtmar
Thanx, it is well gracefull resolution - have not influence to content 
list of figures.


Jaroslav

Dne 11.5.2010 21:07, Peter Münster napsal(a):

On Tue, May 11 2010, Jaroslav Hajtmar wrote:

   

\placefigure{$\!\!\!\!$:\quad  Caption 1}
   {\externalfigure[figure1]}

is result OK! BUT this method is terrible for me:
 

Better method:

\setupcaptions[distance=0pt]
\starttext
\placefigure{: Caption}{bla}
\stoptext

Cheers, 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] How to get randomly coloured text in metapost?

2010-05-11 Thread Mojca Miklavec
On Tue, May 11, 2010 at 21:03, Marco wrote:
 numeric r, g, b ;

 r := uniformdeviate 1 ;
 g := uniformdeviate 1 ;
 b := uniformdeviate 1 ;

 textext(\colored[r=  r  ,g=  g  ,b=  b  ]{Test})
 Thanks for this snipped, Hans. It looks promising, but I get the
 following compile error:

    !mplib          : mp terminal:  \colored [r=
     0.74464
    ! Not implemented: (string)(known numeric).
    to be read again

You need to convert number to string first. Use decimal(r) instead
of r. (But I didn't test.)

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] How to get randomly coloured text in metapost?

2010-05-11 Thread luigi scarso
On Tue, May 11, 2010 at 9:27 PM, Mojca Miklavec
mojca.miklavec.li...@gmail.com wrote:
 On Tue, May 11, 2010 at 21:03, Marco wrote:
 numeric r, g, b ;

 r := uniformdeviate 1 ;
 g := uniformdeviate 1 ;
 b := uniformdeviate 1 ;

 textext(\colored[r=  r  ,g=  g  ,b=  b  ]{Test})
 Thanks for this snipped, Hans. It looks promising, but I get the
 following compile error:

    !mplib          : mp terminal:  \colored [r=
     0.74464
    ! Not implemented: (string)(known numeric).
    to be read again

 You need to convert number to string first. Use decimal(r) instead
 of r. (But I didn't test.)

 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
 ___


\starttext
\startuseMPgraphic {1}

numeric r, g, b ;
r := uniformdeviate 1 ;
g := uniformdeviate 1 ;
b := uniformdeviate 1 ;

label(textext(\colored[r=  decimal(r)  ,g=  decimal(g)  ,b=
 decimal(b)  ]{Test}),origin);
label(textext(r=  decimal(r)  ,g=  decimal(g)  ,b= 
decimal(b) ),origin+(0,-100));

\stopuseMPgraphic
\useMPgraphic {1}
\stoptext

( tested :-)  )

Warning: default is preserve seed (every runs will have the same random number)
if you don't purge temporary files *tuo, *tui etc.
I'm sure that there is a switch/macros to avoid this, but I don't
remember it  now

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

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


Re: [NTG-context] How to get randomly coloured text in metapost?

2010-05-11 Thread Marco
 You need to convert number to string first. Use decimal(r) instead
 of r. (But I didn't test.)
 
 Mojca
Thanks, Mojca. Works like a charm now.

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
___


[NTG-context] Changing separator in BIBliography

2010-05-11 Thread Jaroslav Hajtmar

Hello,
I am using Taco's  bib module in mkiv and I use only note field in misc 
layout.
Now I have problem with setting separator of keys. I want use it in 
czech language and therefore I want modify separator, but I dont know 
relevant option.


When I use in source \cite[15, 16] (keys of publications) then I get 
link to list of publications [15 and 16]
When I use in source \cite[15, 16, 17] then I get link to list of 
publications [15, 16 and 17]


I want set separator so that result was [15, 16]  or [15, 16, 17]

Where is point or option to change of separators??

Thanx Jaroslav

I use this option:
\usemodule[bib]
\usemodule[bibltx]
\setuppublications[setupinteraction=start, alternative=ams, 
sorttype=cite, criterium=cite]


\setuppublicationlist[andtext={ a },
  lastpubsep={ a },
   lastnamesep={ a },
   finalnamesep={ a },
   otherstext={ a~kol.},
   authoretaltext={ a~kol.},
   editoretaltext={ a~kol.},
   artauthoretaltext={ a~kol.},
   artauthor=\invertedauthor,
   author=\invertedauthor,
   surnamesep={ },
   namesep={, },
   Finalnamesep={},
   totalnumber=200]

\setuppublicationlayout[misc]{%
\insertnote{}{ }{}%
}

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