Re: [NTG-context] \SetTableToWidth undefined?

2010-12-07 Thread Hans Hagen

On 6-12-2010 10:47, Vedran Miletić wrote:

2010/11/30 Richard Stephensrichard.steph...@converteam.com


Hello all,

I have just noticed that \SetTableToWidth does not work in MKIV.
Simple example below.

\starttext
\SetTableToWidth{8cm}
\starttable[|l|l|]
\NC One \NC Two \NC\SR
\NC Three \NC Four \NC\LR
\stoptable
\stoptext

I get the error:

! Undefined control sequence.
l.3 \SetTableToWidth
 {8cm}

It does work in MKII and also works if you use \tableSetTableToWidth.

Have I missed something, is something wrong or is it just me?


table is under reconstruction (cleaned up, stripped from obscure 
options, made a bit more context)


\SetTableWidth is too global so it's gone ... instead there will be

\starttable[|l|l|][textwidth=8cm] % or textwidth=max

% SetTableToWidth - textwidth=dimension
% Expand  - textwidth=max
% WidenTableBy- no proper key yet
% LongLines   - no proper key yet

the textwidth option will be in the next beta (only mkiv, no changes to 
mkii).


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] \SetTableToWidth undefined?

2010-12-07 Thread Hans Hagen

On 6-12-2010 10:47, Vedran Miletić wrote:

2010/11/30 Richard Stephensrichard.steph...@converteam.com


Hello all,

I have just noticed that \SetTableToWidth does not work in MKIV.
Simple example below.


btw, those using the starttable mechanism are also made responsible for 
keeping the documentation (on the wiki) uptodate


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] Bugs with newest beta

2010-12-07 Thread Hans Hagen

On 6-12-2010 5:55, Andreas Harder wrote:

Hello Hans,

I've downloaded the newest beta, but \comments still don't work. Besides of 
that there is a curious indenting problem with delimited text definitions (and 
floats). I will attach some test files.


comments work here in acrobat 10, so you use another viewer? if so, 
luigi might know more


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] Bugs with newest beta

2010-12-07 Thread luigi scarso
On Tue, Dec 7, 2010 at 10:16 AM, Hans Hagen pra...@wxs.nl wrote:
 On 6-12-2010 5:55, Andreas Harder wrote:

 Hello Hans,

 I've downloaded the newest beta, but \comments still don't work. Besides
 of that there is a curious indenting problem with delimited text definitions
 (and floats). I will attach some test files.

 comments work here in acrobat 10, so you use another viewer? if so, luigi
 might know more
I will download the beta to check

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


[NTG-context] colors for pretty-printing (was: Re: pret-c.lua - v-c.lua)

2010-12-07 Thread Peter Münster
On Mon, Dec 06 2010, Renaud AUBIN wrote:
 
 Concerning the color abstraction patch, one needs just to overload
 Ccomment, Cpreproc, Cstring, Ctype, Ckeyword, Cname and Cfuncnbound to
 use custom color scheme.

You don't need that. There is already a standard interface for color and style
configuration. Example:

\setupstartstop[CSnippetComment][color=blue]

So you can simplify t-pretty-c.mkiv:

\unprotect

\setupcolor[ema]

\definestartstop
[CSnippetName]
[\c!color=darkgoldenrod,
 \c!style=]

and so on...

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
___


[NTG-context] bug: no overfullrule in footnotes!

2010-12-07 Thread Steffen Wolfrum
Hi,

please have a look at this minimal example below:
the version temporary gives an overfullrule for body text but not for footnotes!

Is there something can be done (for the short term)?

Regards,
Steffen
---



\version[temporary]
\showframe


\starttext

Test \hbox{text text text text text text text text text text text text text 
text text text text text}.
\startfootnote[ftn007]
Test \hbox{text text text text text text text text text text text text text 
text text text text text text text text}.
\stopfootnote


\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] bib problems

2010-12-07 Thread Thomas A. Schmitz
All,

I've begun summarizing the bibliography problems. Could you all see if your 
particular problem is mentioned here? If I missed something, please send your 
test files to the list or to me, please use the sample.bib which is now 
included in the minimals, and please make the test cases as short as possible. 

Hans and Taco, one general remark: one thing that is confusing is that the 
key/value pair criterium=XXX is present for the \setuppublications and for 
the \setuppublicationlist and for the \placepublications command, yet seems to 
do slightly different things in each. Maybe that's a place where the interface 
should be changed? 

Here's what I have so far:

% Example 1, posted in a slightly different form by Curiouslearn on
% 2010-11-25: Hagen 2010c is not quoted and should not be in the list of
% references. On 2010-11-26, Mathieu Boespflug made a further observation on
% the original testfile which I can't reproduce because it's too complex. Can
% you show the effect by modifying this simple case?

\setuppublications[state=start,refcommand=authoryear]
\setupbibtex[database=sample]

\starttext
\section{Test}
This \cite[hh2010a]

and that \cite[Eijkhout1991]

\section{References}
\placepublications[criterium=all]
\stoptext 

% Example 2: a spurious entry [4] in the list of references.

\setuppublications[state=start,alternative=num]
\setupbibtex[database=sample]

\starttext
\section{Test}
This \cite[hh2010a]

and that \cite[Eijkhout1991]

\section{References}
\placepublications[criterium=all]
\stoptext 

% Example 3, posted by Mojca on 2010-11-29: horizontal spacing of list of
% references is insufficient

\setuppublications
[alternative=num]

\setuppublicationlayout[web]{%
{\sc url}: \inserturl{}{}{}%
}

\dorecurse{1200}{\startpublication[k=a\recurselevel,t=web]
\biburl{http://pragma-ade.nl}\stoppublication}

\starttext
\placepublications[criterium=all]
\stoptext 

% Example 4, posted by Charles Doherty on 2010-10-20: no references are typeset

\setuppublications[criterium=all,numbering=no]

\setupbibtex[database=sample,sort=author]

\starttext

\section{References}

\placepublications

\stoptext 

Please add further short examples; I will aggregate and send everything to Hans.


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] Unwanted spaces removing

2010-12-07 Thread Jaroslav Hajtmar

Hello ConTeXist,
For some reason I need to use \placefigure environment in such a way 
that no space
are before and after this environment  (eg space for image caption under 
image).
I want to hit as a result of using \externalfigure separately only. Can 
this be arranged? I tried \removelastskip, \removeunwantedspaces  etc, 
but without success.


Thanks Jaroslav.

Here is my example ...



\starttext

\input knuth

% here is no blank in PDF document

\externalfigure[cow]

% here is no blank in PDF document

\input knuth

% - Here is blank before image and I can remove it, so it was like in 
the previous example


\placefigure[here]{none}{\externalfigure[cow]}

% - Here is blank under image (for caption of figure) and I can remove 
it, so it was like in the previous example


\input tufte


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

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


Re: [NTG-context] Unwanted spaces removing

2010-12-07 Thread Peter Münster
On Tue, Dec 07 2010, Jaroslav Hajtmar wrote:

 For some reason I need to use \placefigure environment in such a way
 that no space
 are before and after this environment  (eg space for image caption
 under image).

\setupfloats[spacebefore=none, spaceafter=none]
\starttext
\input knuth
\placefigure[here, none]{}{\externalfigure[cow]}
\input tufte
\stoptext

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] \SetTableToWidth undefined?

2010-12-07 Thread Khaled Hosny
On Tue, Dec 07, 2010 at 10:10:01AM +0100, Hans Hagen wrote:
 On 6-12-2010 10:47, Vedran Miletić wrote:
 2010/11/30 Richard Stephensrichard.steph...@converteam.com
 
 Hello all,
 
 I have just noticed that \SetTableToWidth does not work in MKIV.
 Simple example below.
 
 \starttext
 \SetTableToWidth{8cm}
 \starttable[|l|l|]
 \NC One \NC Two \NC\SR
 \NC Three \NC Four \NC\LR
 \stoptable
 \stoptext
 
 I get the error:
 
 ! Undefined control sequence.
 l.3 \SetTableToWidth
  {8cm}
 
 It does work in MKII and also works if you use \tableSetTableToWidth.
 
 Have I missed something, is something wrong or is it just me?
 
 table is under reconstruction (cleaned up, stripped from obscure
 options, made a bit more context)
 
 \SetTableWidth is too global so it's gone ... instead there will be
 
 \starttable[|l|l|][textwidth=8cm] % or textwidth=max
 
 % SetTableToWidth - textwidth=dimension
 % Expand  - textwidth=max
 % WidenTableBy- no proper key yet
 % LongLines   - no proper key yet
 
 the textwidth option will be in the next beta (only mkiv, no changes
 to mkii).

But I'm using \SetTableToWidth right now to set the width for all tables
at once, what is replacement of that (I'm using texlive right now, and I
hate to break the brand new document when I switch back to minimals).

Regards,
 Khaled

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

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


Re: [NTG-context] \SetTableToWidth undefined?

2010-12-07 Thread Hans Hagen

On 7-12-2010 2:00, Khaled Hosny wrote:


But I'm using \SetTableToWidth right now to set the width for all tables
at once, what is replacement of that (I'm using texlive right now, and I
hate to break the brand new document when I switch back to minimals).


just do \setuptables[textwidth=...] then (once)

or

\doifundefined{SetTableToWidth}{\setuptables[textwidth=...]}

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] colors for pretty-printing (was: Re: pret-c.lua - v-c.lua)

2010-12-07 Thread Aditya Mahajan

On Tue, 7 Dec 2010, Peter Münster wrote:


On Mon, Dec 06 2010, Renaud AUBIN wrote:


Concerning the color abstraction patch, one needs just to overload
Ccomment, Cpreproc, Cstring, Ctype, Ckeyword, Cname and Cfuncnbound to
use custom color scheme.


You don't need that. There is already a standard interface for color and style
configuration. Example:

\setupstartstop[CSnippetComment][color=blue]

So you can simplify t-pretty-c.mkiv:

\unprotect

\setupcolor[ema]

\definestartstop
   [CSnippetName]
   [\c!color=darkgoldenrod,
\c!style=]


I have not looked into the new verbatim code yet, but I have been thinking 
about a similar interface for a new module that uses external programs for 
syntax highlighting (sort of a superset of t-vim that will allow one to 
use other programs like pgyments, etc.).


Why are you using a C prefix for all environments? Isn't it better to use 
a syntax like this:


\startsetups[verbatim:C]
\definestartstop[SnippetName][color=...,style=...]
\definestartstop[string][color=...,style=...]

\stopsetups

and then pass setups=verbatim:C to an appropriate \setup... command. That 
will make it easy to share the same syntax highlighting between different 
languages.


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] for each script a different font

2010-12-07 Thread Khaled Hosny
On Mon, Dec 06, 2010 at 11:39:59PM +0100, Peter Schorsch wrote:
 Hi all,
 
 is it possible to mix severel fonts (for each script one font)? Regarding to 
 some fragments of the wiki I tried:
 
 \setupdirections[bidi=global]
 
 \definefontfeature[cyrl][script=cyrl]
 \definefontfeature[brai][script=brai]
 \definefontfeature[arab][script=arab]
 
 \starttypescript [serif] [vollkorn]
   \definefontsynonym [Serif][name:vollkornregular]
   \definefontsynonym [Serif][name:doulossil][feature=cyrl]
   \definefontsynonym [Serif][name:scheherazade][feature=arab]
   \defomefpmtsynonym [Serif][name:sechspunktbraille][feature=brai]
 \stoptypescript
 
 
 \definetypeface[fliesstext][rm][serif][vollkorn]
 \setupbodyfont[fliesstext,rm,11pt]
 
 \starttext
 
 Regular Еупгдфк цшкв уы more test text a ُءشةحمث and continue latin script 
 ⠇⠤⠧⠬⠀⠟⠢⠭.
 
 \stoptext
 
 But the last \definefontsynonym overrides the entire unicode space and not 
 only the part regarding to the related script.
 
 Is the mechanism I tried in ConTeXt possible?

There is the fallback feature:

\definefontfallback[arabic][name:scheherazade][arabic][force=yes,features=arab]

Then:

\definefontsynonym [Serif][name:vollkornregular][fallbacks=arrows]

But I don't know how to use multiple fallbacks.

The text below is a feature request for Hans (warning, a long, boring
email)

Font fallbacks is not really suitable for this kind of usage because it
does not handle common characters (digits, punctuation, etc.) that are
used in several scripts. Unicode provide script property for each
character and a simple algorithm to handle characters with no explicit
script property:

  http://unicode.org/reports/tr24/

* each character have a script property value, which is either:
  - explicit script value, in this case no special handling is needed

  - 'inherited': these character inherit the script property of the
preceding character. Unicode suggests that all combining marks be
treated as having 'inherited' property even if they have an explicit
one, the idea is that a combining mark should always have the same
script as its base character.

  - 'common': characters used in multiple scripts. In most cases this
can be handled by assigning it the script of preceding character,
with the exception of paired characters like () which should take
the script value of outer text, and both characters in a pair should
take the same value.
  
  - 'unknown': for unassigned character codes (like PUA).


The value of using that over simple fallbacks (it need not to replace
the existing fallback mechanism), is that one wants to apply the same
font and font features for contiguous runs of text of certain script
including things like numbers or punctuation, here is one (real) use
case:

 This week I was typesetting a small Arabic book[1], I wanted to use
 'anum' feature, but since I'm using the same font for Arabic and
 English that will convert all numbers globally which is not desired.

 Also I wanted to use different feature for Arabic and English texts (as
 you can see in that book, ligature and kerning not activated in English
 parts because I was using 'script=arab' for all the text).
 
 I would have defined a special English font and manually marked all
 English parts with it, but this has two main drawbacks:

   - Editing mixed Arabic and English is a real PITA because of the
 mixed directionality, adding command switches on top of that is
 adding salt to the wound.
   - The book was actually authored in OpenOffice and converted to
 ConTeXt in a semi-automated way, so searching for all English
 passages and marking them is not that simple. I'm also thinking in
 totally automated typesetting from XML and such, where it is not
 even possible to mark text runs in a clean way.

 [1] http://www.khaledhosny.org/files/tmp/arabic-foss-l10n-manual.pdf

IMHO, such feature coupled with bidi support will make multi-script
multi-directional typesetting first class citizens in ConTeXt :)

Thanks for reading tell here :)
Regards,
 Khaled

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

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


Re: [NTG-context] \SetTableToWidth undefined?

2010-12-07 Thread Khaled Hosny
On Tue, Dec 07, 2010 at 02:24:37PM +0100, Hans Hagen wrote:
 On 7-12-2010 2:00, Khaled Hosny wrote:
 
 But I'm using \SetTableToWidth right now to set the width for all tables
 at once, what is replacement of that (I'm using texlive right now, and I
 hate to break the brand new document when I switch back to minimals).
 
 just do \setuptables[textwidth=...] then (once)

Ah, that is fine, stupid me :) Actually I was feeling guilty for not
using a \setupfoo command.

Regards,
 Khaled

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

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


Re: [NTG-context] colors for pretty-printing

2010-12-07 Thread Hans Hagen

On 7-12-2010 2:29, Aditya Mahajan wrote:

On Tue, 7 Dec 2010, Peter Münster wrote:


On Mon, Dec 06 2010, Renaud AUBIN wrote:


Concerning the color abstraction patch, one needs just to overload
Ccomment, Cpreproc, Cstring, Ctype, Ckeyword, Cname and Cfuncnbound to
use custom color scheme.


You don't need that. There is already a standard interface for color
and style
configuration. Example:

\setupstartstop[CSnippetComment][color=blue]

So you can simplify t-pretty-c.mkiv:

\unprotect

\setupcolor[ema]

\definestartstop
[CSnippetName]
[\c!color=darkgoldenrod,
\c!style=]


I have not looked into the new verbatim code yet, but I have been
thinking about a similar interface for a new module that uses external
programs for syntax highlighting (sort of a superset of t-vim that will
allow one to use other programs like pgyments, etc.).


it all boils down hooking in a parser then:

\startluacode
local function parser(s)
  local s = somexternalthing(s)
  -- feedback s
end

visualizers.register(myparser, { parser = parser })
\stopluacode

\starttyping[option=myparser]

\stoptyping


Why are you using a C prefix for all environments? Isn't it better to
use a syntax like this:

\startsetups[verbatim:C]
\definestartstop[SnippetName][color=...,style=...]
\definestartstop[string][color=...,style=...]

\stopsetups

and then pass setups=verbatim:C to an appropriate \setup... command.
That will make it easy to share the same syntax highlighting between
different languages.


it's hard to come up with common names for characteristics for all those 
languages but at some point we can have a set predefined as default


btw, startstop can inherit (now):

\definestartstop
[MetapostSnippet]
[DefaultSnippet]

etc so there is no need for setups

-
  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] Unwanted spaces removing

2010-12-07 Thread Jaroslav Hajtmar

Great. How easy!!! It works very well now!
I have gaps in basic knowledges ...

Thanx very much to Peter !!!

Jaroslav Hajtmar


Dne 7.12.2010 13:09, Peter Münster napsal(a):

\setupfloats[spacebefore=none, spaceafter=none]
\starttext
\input knuth
\placefigure[here, none]{}{\externalfigure[cow]}
\input tufte
\stoptext

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] bib problems

2010-12-07 Thread Mojca Miklavec
I have a tiny feature request.

I would like to have a separate bibliography for, say, list of
figures. Basically all I ask for is the ability to have a separate
named bibliography as opposed to a single list.

But maybe I need to elaborate a bit more before sending request. It
makes no sense to implement it in the wrong and unstatisfactory way.

... Just to mention it before I forget.

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] bib problems

2010-12-07 Thread Hans Hagen

On 7-12-2010 3:26, Mojca Miklavec wrote:

I have a tiny feature request.

I would like to have a separate bibliography for, say, list of
figures. Basically all I ask for is the ability to have a separate
named bibliography as opposed to a single list.


no big deal in mkiv i guess


But maybe I need to elaborate a bit more before sending request. It
makes no sense to implement it in the wrong and unstatisfactory way.

 Just to mention it before I forget.


so how would that look at the input end? an extra key?

-
  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] for each script a different font

2010-12-07 Thread Thomas A. Schmitz

On Dec 7, 2010, at 2:44 PM, Khaled Hosny wrote:

 Then:
 
 \definefontsynonym [Serif][name:vollkornregular][fallbacks=arrows]
 
 But I don't know how to use multiple fallbacks.

You can define as many fallbacks as you wish. Here's a silly example:

\definefontfallback [Foo] [name:texgyretermes-bold] [0x0031-0x0032] 
[force=yes,check=no]
\definefontfallback [Foo] [name:texgyreheros-italic] [0x0033-0x0034] 
[force=yes,check=no]
\definefontfallback [Foo] [name:texgyreadventor-bolditalic] [0x0035-0x0036] 
[force=yes,check=no]

\definefontsynonym[SerifPlus][Serif][fallbacks=Foo]

\definefont[MySerif][SerifPlus at 24pt]

\starttext

\MySerif 1234567890

\stoptext

That should get you going.

HTH

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] margintext writes text out of range

2010-12-07 Thread Wolfgang Schuster

Am 07.12.2010 um 05:52 schrieb Jonas Stein:

 example here:
 http://wiki.contextgarden.net/Reference/en/margintext
 
 is is cut of.
 I saw the same in the documentation of the fixme module. [1]
 
 probably because the margin is larger than the backspace
 
 How should this be fixed in the wikipages?
 
 ...and how in own documents?

\setuplayout[margin=2cm]

or

\setuplayout[leftmargin=2cm]

or

\setuplayout
  [backspace=4cm,
   margin=3cm,
   ...]

The important part is to have a leftmargin which is narrower
than the backspace, you can do this by increasing the backspace
or decreasing the left margin.

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] for each script a different font

2010-12-07 Thread Khaled Hosny
On Tue, Dec 07, 2010 at 04:19:45PM +0100, Thomas A. Schmitz wrote:
 
 On Dec 7, 2010, at 2:44 PM, Khaled Hosny wrote:
 
  Then:
  
  \definefontsynonym [Serif][name:vollkornregular][fallbacks=arrows]
  
  But I don't know how to use multiple fallbacks.
 
 You can define as many fallbacks as you wish. Here's a silly example:
 
 \definefontfallback [Foo] [name:texgyretermes-bold] [0x0031-0x0032] 
 [force=yes,check=no]
 \definefontfallback [Foo] [name:texgyreheros-italic] [0x0033-0x0034] 
 [force=yes,check=no]
 \definefontfallback [Foo] [name:texgyreadventor-bolditalic] [0x0035-0x0036] 
 [force=yes,check=no]
 
 \definefontsynonym[SerifPlus][Serif][fallbacks=Foo]
 
 \definefont[MySerif][SerifPlus at 24pt]
 
 \starttext
 
 \MySerif 1234567890
 
 \stoptext
 
 That should get you going.

Thanks. I, naïvely, assumed I have to define several different fallbacks
and pass that do \definefontsynonym. This will simplify my font setup a
bit, but the issues in my other mail still exist.

Regards,
 Khaled

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

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


Re: [NTG-context] colors for pretty-printing

2010-12-07 Thread Aditya Mahajan

On Tue, 7 Dec 2010, Hans Hagen wrote:


On 7-12-2010 2:29, Aditya Mahajan wrote:

On Tue, 7 Dec 2010, Peter Münster wrote:


On Mon, Dec 06 2010, Renaud AUBIN wrote:


Concerning the color abstraction patch, one needs just to overload
Ccomment, Cpreproc, Cstring, Ctype, Ckeyword, Cname and Cfuncnbound to
use custom color scheme.


You don't need that. There is already a standard interface for color
and style
configuration. Example:

\setupstartstop[CSnippetComment][color=blue]

So you can simplify t-pretty-c.mkiv:

\unprotect

\setupcolor[ema]

\definestartstop
[CSnippetName]
[\c!color=darkgoldenrod,
\c!style=]


I have not looked into the new verbatim code yet, but I have been
thinking about a similar interface for a new module that uses external
programs for syntax highlighting (sort of a superset of t-vim that will
allow one to use other programs like pgyments, etc.).


it all boils down hooking in a parser then:

\startluacode
local function parser(s)
 local s = somexternalthing(s)
 -- feedback s
end

visualizers.register(myparser, { parser = parser })
\stopluacode

\starttyping[option=myparser]

\stoptyping


Thanks for the explanation. But, I am not too keen to write parsers on my 
own when I can easily borrow existing ones.



Why are you using a C prefix for all environments? Isn't it better to
use a syntax like this:

\startsetups[verbatim:C]
\definestartstop[SnippetName][color=...,style=...]
\definestartstop[string][color=...,style=...]

\stopsetups

and then pass setups=verbatim:C to an appropriate \setup... command.
That will make it easy to share the same syntax highlighting between
different languages.


it's hard to come up with common names for characteristics for all those 
languages


But it does allow you to choose a color scheme for pretty printing. This 
is similar to how most editors choose color schemes.



but at some point we can have a set predefined as default

btw, startstop can inherit (now):

\definestartstop
   [MetapostSnippet]
   [DefaultSnippet]

etc so there is no need for setups


Setups have an advantage that one does not pollute the cs names. After 
all, \DefaultSnippet is not useful outside the pretty printing region.


An alternative could be to use a namsespace in define in all definitions, 
e.g.,


\definestartstop[visualizer::Snippet]

On a related note, does it make sense to add foregroundcolor and 
foregroupdstyle keys to \definebar? (Then, bars will be an appropriate and 
versatile mechanism to define syntax highlighting regions).


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] margintext writes text out of range

2010-12-07 Thread Jonas Stein
 example here:
 http://wiki.contextgarden.net/Reference/en/margintext
 
 is is cut of.
 I saw the same in the documentation of the fixme module. [1]
 
 probably because the margin is larger than the backspace
 
 How should this be fixed in the wikipages?
 
 ...and how in own documents?

 \setuplayout[margin=2cm]

 or

 \setuplayout[leftmargin=2cm]

 or

 \setuplayout
   [backspace=4cm,
margin=3cm,
...]

 The important part is to have a leftmargin which is narrower
 than the backspace, you can do this by increasing the backspace
 or decreasing the left margin.

 Wolfgang

Thank you. It works well now.
I have put your knowledge to the wiki too.


-- 
Jonas Stein n...@jonasstein.de

___
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] colors for pretty-printing

2010-12-07 Thread Hans Hagen

On 7-12-2010 6:57, Aditya Mahajan wrote:


Thanks for the explanation. But, I am not too keen to write parsers on
my own when I can easily borrow existing ones.


sure, but a simple one can be:

function myparser(str)
  .. call your prog do do something with str and return the result
end


But it does allow you to choose a color scheme for pretty printing.
This is similar to how most editors choose color schemes.


sure, but my experience is that there are easily 10-15 different 
categories and naming them right is somewhat tricky



On a related note, does it make sense to add foregroundcolor and
foregroupdstyle keys to \definebar? (Then, bars will be an appropriate
and versatile mechanism to define syntax highlighting regions).


maybe

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] colors for pretty-printing

2010-12-07 Thread Renaud AUBIN

 You don't need that. There is already a standard interface for color and style
 configuration. Example:

 \setupstartstop[CSnippetComment][color=blue]

 So you can simplify t-pretty-c.mkiv:

 \unprotect

 \setupcolor[ema]

 \definestartstop
 [CSnippetName]
 [\c!color=darkgoldenrod,
  \c!style=]

 and so on...
   
OK, but anyway, I have to protect the color names (to prevent darkred
redefinition for example ;) )… So, I have made the choice to use
Csomething and it is not annoying as soon as the source color names are
kept…

Cheers

Renaud
___
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] colors for pretty-printing

2010-12-07 Thread Peter Münster
On Tue, Dec 07 2010, Renaud AUBIN wrote:
 
  So you can simplify t-pretty-c.mkiv:
 
  \unprotect
 
  \setupcolor[ema]
 
  \definestartstop
  [CSnippetName]
  [\c!color=darkgoldenrod,
   \c!style=]
 
  and so on...

 OK, but anyway, I have to protect the color names (to prevent darkred
 redefinition for example ;) )

I still don't understand. Where do you need to redefine darkred?
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
___


[NTG-context] heading in margin + paragraph starting with float

2010-12-07 Thread Philipp Gesang
Dear fellow contextualists,

a while ago Wolfgang saved me from erratic blank lines that had
kept appearing next to margin headings.[1]

Now the problem arose again when starting the first paragraph
with a caption. Placement does not seem to effect this (try
“bottom”, but at sufficiently large sizes of the float and grid
typesetting activated an additional line is inserted. How can I
suppress those?

··8·

\define[2]\SectionCommand
  {\inleftmargin{#2}} 

\setuphead [section] [
  alternative=text, 
  style=bold, 
  command=\SectionCommand, 
  distance=0pt, 
  before={\blank[nowhite]},
  after={\blank[nowhite]},
]

\useexternalfigure[cow][cow][width=8cm] % try “8cm”

\setuplayout[grid=yes]
\showgrid \showframe
\starttext

\dorecurse{5}{
  \section{Hello Cow!}
  \placefigure[outer]{Artistic Rendering of a Dutch Cow ({\em Bos primigenius 
taurus}).}{\externalfigure[cow]}%
  \input dawkins \par
}

\stoptext

··8·

[1] http://archive.contextgarden.net/message/20101121.122232.07a565dd.en.html

Thanks for any advice, Philipp

-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments


pgpghcltwNkdk.pgp
Description: PGP signature
___
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] colors for pretty-printing

2010-12-07 Thread Aditya Mahajan
On Tue, Dec 7, 2010 at 2:30 PM, Hans Hagen pra...@wxs.nl wrote:
 On 7-12-2010 6:57, Aditya Mahajan wrote:

 Thanks for the explanation. But, I am not too keen to write parsers on
 my own when I can easily borrow existing ones.

 sure, but a simple one can be:

 function myparser(str)
  .. call your prog do do something with str and return the result
 end

OK. This sounds much easier than writing my own wrappers. I will try
to port the t-vim module to use the new code.

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] Is setupspacing configurable?

2010-12-07 Thread seasoul
I am setting up the space after a period.
From the context manual, it is said that
Default a space is placed after a period that ends a sentence. In some
countries it is custom to stretch the space after a period. ... One can
however change this spacing

\setupspacing[...]
...broad packed

if this argument is set as 'broad', what is the exact space? Let's say I
want two spaces after the period, how to set this?
___
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
___