[NTG-context] Changing default rule thickness (globally)

2020-03-25 Thread Benjamin Buchmuller
Hi!

I would like to change the rule thickness that is used by default in ConTeXt. 
However, from the  command documentation 
(http://www.pragma-ade.nl/general/qrcs/setup-en.pdf), I see that I would need 
to basically change this for

\basegrid[rulethickness=...]
\setupbar[rulethickness=...]
\setupchemical[rulethickness=...]
\setupeffect[rulethickness=...]
\setupfillinlines[rulethickness=...]
\setupfillinrules[rulethickness=...]
\setupframed[rulethickness=...]
\setuplinefillers[rulethickness=...]
\setupmarginrules[rulethickness=...]
\setupmixedcolumns[rulethickness=...]
\setupnote[rulethickness=...]
\setupparagraphs[rulethickness=...]
\setupsidebar[rulethickness=...]
\setuptables[rulethickness=...]
\setuptabulation[rulethickness=...]
\setuptextbackground[rulethickness=...]
\setuptextrules[rulethickness=...]
\setupthinrules[rulethickness=...]
\setupxtable[rulethickness=...]

(And for \setupbackgrounds for [top header text footer bottom].) I’m sure there 
is a more elegant way to do this. But how?

Cheers


Benjamin
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] About \textrule [ ]

2019-10-01 Thread Fabrice Couvreur
Thank you for your suggestions,
Fabrice


Le mar. 1 oct. 2019 à 11:35, Taco Hoekwater  a écrit :

>
>
> > On 1 Oct 2019, at 11:09, Fabrice Couvreur 
> wrote:
> >
> > Hello,
> > The top line is in the text, how to fix this problem ?
>
>   % alternative=serried,
> inbetween=,
>
> Best wishes,
> Taco
>
> > Thank you.
> > Fabrice
> >
> > \setuptextrules[width=0.5cm]
> >
> > \define[1]\ProprieteHeadcommand
> >   {\textrule[top]{#1}}
> >
> > \defineenumeration
> >   [propriete]
> >   [text=Propriété,
> >title=yes,
> >headstyle={bold},
> >alternative=serried,
> >style=italic,
> >number=no,
> >headcommand=\ProprieteHeadcommand,
> >numbercommand=\groupedcommand{}{\nbsp},
> >after=\textrule]
> >
> > \starttext
> > \startpropriete
> >   \input ward
> > \stoppropriete
> > \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://context.aanhet.net
> > archive  : https://bitbucket.org/phg/context-mirror/commits/
> > wiki : http://contextgarden.net
> >
> ___
>
> Taco Hoekwater
> Elvenkind BV
>
>
>
>
>
> ___
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] About \textrule [ ]

2019-10-01 Thread Taco Hoekwater


> On 1 Oct 2019, at 11:09, Fabrice Couvreur  wrote:
> 
> Hello,
> The top line is in the text, how to fix this problem ?

  % alternative=serried,
inbetween=,

Best wishes,
Taco

> Thank you.
> Fabrice
> 
> \setuptextrules[width=0.5cm]
> 
> \define[1]\ProprieteHeadcommand
>   {\textrule[top]{#1}}
> 
> \defineenumeration
>   [propriete]
>   [text=Propriété,
>title=yes,
>headstyle={bold},
>alternative=serried,
>style=italic,
>number=no,
>headcommand=\ProprieteHeadcommand,
>numbercommand=\groupedcommand{}{\nbsp},
>after=\textrule]
> 
> \starttext
> \startpropriete
>   \input ward
> \stoppropriete
> \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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

Taco Hoekwater
Elvenkind BV




___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] About \textrule [ ]

2019-10-01 Thread Otared Kavian
Hi Fabrice,

Is this what you are looking for?
Best regards: OK

\setuptextrules[width=.5cm]

\define[1]\ProprieteHeadcommand
{\textrule[top]{Propriété}}

\defineenumeration[propriete]
[headstyle={bold},
style=italic,
number=no,
headcommand=\ProprieteHeadcommand,
numbercommand=\groupedcommand{}{\nbsp},
after=\textrule]

\starttext
\startpropriete
  \input ward
\stoppropriete
\stoptext

> On 1 Oct 2019, at 11:09, Fabrice Couvreur  wrote:
> 
> Hello,
> The top line is in the text, how to fix this problem ?
> Thank you.
> Fabrice
> 
> \setuptextrules[width=0.5cm]
> 
> \define[1]\ProprieteHeadcommand
>   {\textrule[top]{#1}}
> 
> \defineenumeration
>   [propriete]
>   [text=Propriété,
>title=yes,
>headstyle={bold},
>alternative=serried,
>style=italic,
>number=no,
>headcommand=\ProprieteHeadcommand,
>numbercommand=\groupedcommand{}{\nbsp},
>after=\textrule]
> 
> \starttext
> \startpropriete
>   \input ward
> \stoppropriete
> \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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] About \textrule [ ]

2019-10-01 Thread Fabrice Couvreur
Hello,
The top line is in the text, how to fix this problem ?
Thank you.
Fabrice

\setuptextrules[width=0.5cm]

\define[1]\ProprieteHeadcommand
  {\textrule[top]{#1}}

\defineenumeration
  [propriete]
  [text=Propriété,
   title=yes,
   headstyle={bold},
   alternative=serried,
   style=italic,
   number=no,
   headcommand=\ProprieteHeadcommand,
   numbercommand=\groupedcommand{}{\nbsp},
   after=\textrule]

\starttext
\startpropriete
  \input ward
\stoppropriete
\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] hairline & rules

2018-06-16 Thread Marco Patzer
On Fri, 15 Jun 2018 00:20:23 -0700
"jdh"  wrote:

> I want to use a colored hairline, but can't get it working and can't
> find anything to explain any options or parameters.
> 
> I've tried
> 
>   \setuptextrules[rulecolor=red,color=red]
>   \hairline
>   or
>   \hairline[color=red]

\setupblackrules
  [height=1pt,
   color=blue,
   width=\textwidth]

\starttext
  \blackrule
  \blackrule [color=red, height=1ex, width=5cm]
\stoptext

  http://wiki.contextgarden.net/Command/setupblackrules

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] hairline & rules

2018-06-16 Thread jdh

I want to use a colored hairline, but can't get it working and can't find 
anything to explain any options or parameters.

I've tried

\setuptextrules[rulecolor=red,color=red]
\hairline
or
\hairline[color=red]

Doesn't work


this is a test \thinrule[color=red]

also doesn't catch the color
or does

this is a test \thinrule[color=red]



Can the hairline command be set to use a specific color and how?

Same for the  \thinrul  command


Thanks
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] referencing the customized enumeration with framed title

2018-01-12 Thread Jeong Dal

Dear Hans,

Thank you for the quick answer.
Repalcing “p:=textext.rt();” and commenting out “headcommand=gobbleone…”  with 
your suggestion, the references are working.
However, there is a side effect.
“Theorem 1.1” appears twice, one in the frame which I expected and one at the 
beginning of the framed text which I don’t want.

One more thing, is there no way to show the number of  the Definition?

Thanks again.

Best regards,

Dalyoung

%%

\setupcolors[state=start]
\definecolor[dGreen] [r=0,g=.375,b=.0]
%%% define the background of Theorems:
\defineframed
  [FunnyFramed]
  [frame=off,
   loffset=1ex,
   roffset=1ex,
   foregroundstyle=\ssbf]

\startuseMPgraphic{FunnyFrame}
picture p ; numeric o ; path a, b ; pair c ;
%p := textext.rt(“\FunnyFramed{\enumerationparameter{text} 
\convertedcounter[Theorem]}”) ;
p := textext.rt("\FunnyFramed{\currentconstructiontext}") ;
o := BodyFontSize ;
a := unitsquare xyscaled (OverlayWidth,OverlayHeight) ;
p := p shifted (2o,OverlayHeight-ypart center p) ;
drawoptions (withpen pencircle scaled 1pt withcolor .625red) ;
b := a superellipsed .95 ;
draw b ;
b := (boundingbox p) superellipsed .95 ;
fill b withcolor .85white ;
draw b ;
draw p withcolor black ;
setbounds currentpicture to a ;
\stopuseMPgraphic 

\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}] 

\defineframedtext
  [FunnyText]
  [frame=off,
   background=FunnyFrame,
   before={\blank[line,halfline]},
   after={\blank[line]},
   offset=\bodyfontsize,
   width=\textwidth]

\defineenumeration[Theorem]
  [title=no,
  text={\translate[en=Theorem, kr=정리]},
   prefix=yes,
   prefixsegments=chapter,
   way=bychapter,
   alternative=command,
%% headcommand=\gobbleoneargument,
   before=\startFunnyText,  
   after=\stopFunnyText]

 Definition style
\definenumber[DefNumber][way=bychapter,sectionumber=yes]
\setuptextrules[rulecolor=dBlue]

\define\DefCommand{\incrementnumber[DefNumber]
\textrule[top]{\translate[en=Definition, kr=정 의] \getnumber[DefNumber]}
}   
\defineenumeration[Definition]
[width=fit,
alternative=serried,
text={}, 
number=no,
before={\DefCommand}, 
after=\vskip3pt\hrule\blank] 

%%% Examples with or without solutions
\defineenumeration[Exam]
   [text={\white\translate[en=Example, kr=예제]},
   numbercommand={\inframed[corner=round, 
framecolor=dYellow,toffset=-1pt,boffset=-1pt, loffset=1ex,roffset=1ex, 
background=color,backgroundcolor=dGreen]},
%title=no,
alternataive=hanging,
prefix=yes,
prefixsegments=chapter,
way=bychapter,
before={\blank[big]},
after=\blank]

 
\starttext

\chapter{Spaces}

\section{Space 1}

\startDefinition[def:first]
Let $X$ be a uncountable set. Let $\infty$ is a fixed point of $X$. Let 
$\mathcal T$ be the family of subsets $G$ such that either (i) $\infty \notin 
G$ or (ii) $\infty \in G \text{ and } G^c$ is finite. The space $(X, {\mathcal 
T} )$ is called {\bf Fort's space}.
\stopDefinition

\startTheorem[lem:first]
Fort's space is a compact and Hausdorff topological space.\par
\stopTheorem

\startTheorem[thm:second]
Fort's space is a compact and Hausdorff topological space.
\stopTheorem

\startExam[Ex:first]
Example Example Example Example Example Example Example Example Example 
Example Example Example Example Example Example Example Example Example 
Example Example Example Example Example Example Example Example Example 
\stopExam

In this example, we defined \in{Definition}[def:first]. After that, we proved 
\in{Lemma}[lem:first] and \in{정리}[thm:second]. Finally, \in{Example}[Ex:first], 
we saw an example of it.

\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] referencing the customized enumeration with framed title

2018-01-12 Thread Hans Hagen

On 1/12/2018 3:54 AM, Jeong Dal wrote:

Hi,

Some time ago, I am able to use following code(the framed title for Theorems 
and etc.)
Thank Wolfgang and Otared again.

Since it uses the customized style of numbering, there is a problem to 
reference them.
As in the following code, \in{Definition}[] shows no number and \in{Theorem}[] 
shows ?? instead of numbers while \in{Exam}[] shows correctly.

Is there a way to show the numbers correctly?

Thank you for reading.

Best regards,

Dalyoung

%%%
\setupcolors[state=start]
\definecolor[dGreen] [r=0,g=.375,b=.0]
%%% define the background of Theorems:
\defineframed
   [FunnyFramed]
   [frame=off,
loffset=1ex,
roffset=1ex,
foregroundstyle=\ssbf]

\startuseMPgraphic{FunnyFrame}
 picture p ; numeric o ; path a, b ; pair c ;
 p := textext.rt("\FunnyFramed{\enumerationparameter{text} 
\convertedcounter[Theorem]}") ;


p := textext.rt("\FunnyFramed{\currentconstructiontext}") ;

in a next version:
% p := 
textext.rt("\wrappedconstruction{\FunnyFramed{\currentconstructiontext}}") ;
% p := 
textext.rt("\FunnyFramed{\wrappedconstruction{\currentconstructiontext}}") ;

% p := textext.rt("\FunnyFramed{\wrappedcurrentconstruction}") ;



 o := BodyFontSize ;
 a := unitsquare xyscaled (OverlayWidth,OverlayHeight) ;
 p := p shifted (2o,OverlayHeight-ypart center p) ;
 drawoptions (withpen pencircle scaled 1pt withcolor .625red) ;
 b := a superellipsed .95 ;
 draw b ;
 b := (boundingbox p) superellipsed .95 ;
 fill b withcolor .85white ;
 draw b ;
 draw p withcolor black ;
 setbounds currentpicture to a ;
\stopuseMPgraphic

\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]

\defineframedtext
   [FunnyText]
   [frame=off,
background=FunnyFrame,
before={\blank[line,halfline]},
%before={\blank[line]},
 after={\blank[line]},
offset=\bodyfontsize,
width=\textwidth]

\defineenumeration[Theorem]
   [title=yes,
   text={\translate[en=Theorem, kr=정리]},
prefix=yes,
prefixsegments=chapter,
way=bychapter,
alternative=command,
headcommand=\gobbleoneargument,


Don't do this ^^


before=\startFunnyText,
after=\stopFunnyText]

 Definition style
\definenumber[DefNumber][way=bychapter,sectionumber=yes]
\setuptextrules[rulecolor=dBlue]

\define\DefCommand{\incrementnumber[DefNumber]
\textrule[top]{\translate[en=Definition, kr=정 의] \getnumber[DefNumber]}
}   
\defineenumeration[Definition]
[alternative=hanging,
width=fit,
alternative=serried,
text={},
number=no,
before={\DefCommand},
after=\vskip3pt\hrule\blank]

%%% Examples with or without solutions
\defineenumeration[Exam]
[text={\white\translate[en=Example, kr=예제]},
numbercommand={\inframed[corner=round, 
framecolor=dYellow,toffset=-1pt,boffset=-1pt, loffset=1ex,roffset=1ex, 
background=color,backgroundcolor=dGreen]},%height=1.3em,
%title=no,
 prefix=yes,
 prefixsegments=chapter,
 way=bychapter,
 before={\blank[big]},
 after=\blank]

\starttext

\chapter{Spaces}
 
\section{Space 1}


\startDefinition[def:first]
Let $X$ be a uncountable set. Let $\infty$ is a fixed point of $X$. Let 
$\mathcal T$ be the family of subsets $G$ such that either (i) $\infty \notin 
G$ or (ii) $\infty \in G \text{ and } G^c$ is finite. The space $(X, {\mathcal 
T} )$ is called {\bf Fort's space}.
\stopDefinition

\startTheorem[lem:first]
 Fort's space is a compact and Hausdorff topological space.\par
\stopTheorem

\startTheorem[thm:second]
 Fort's space is a compact and Hausdorff topological space.
\stopTheorem

\startExam[Ex:first]
Example Example Example Example Example Example Example Example Example
Example Example Example Example Example Example Example Example Example
Example Example Example Example Example Example Example Example Example
\stopExam

In this example, we defined \in{Definition}[def:first]. After that, we proved 
\in{Lemma}[lem:first] and \in{정리}[thm:second]. Finally, \in{Example}[Ex:first], 
we saw an example of it.

\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___




--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038

[NTG-context] referencing the customized enumeration with framed title

2018-01-11 Thread Jeong Dal
Hi,

Some time ago, I am able to use following code(the framed title for Theorems 
and etc.)
Thank Wolfgang and Otared again.

Since it uses the customized style of numbering, there is a problem to 
reference them.
As in the following code, \in{Definition}[] shows no number and \in{Theorem}[] 
shows ?? instead of numbers while \in{Exam}[] shows correctly.

Is there a way to show the numbers correctly?

Thank you for reading.

Best regards,

Dalyoung

%%%
\setupcolors[state=start]
\definecolor[dGreen] [r=0,g=.375,b=.0]
%%% define the background of Theorems:
\defineframed
  [FunnyFramed]
  [frame=off,
   loffset=1ex,
   roffset=1ex,
   foregroundstyle=\ssbf]

\startuseMPgraphic{FunnyFrame}
picture p ; numeric o ; path a, b ; pair c ;
p := textext.rt("\FunnyFramed{\enumerationparameter{text} 
\convertedcounter[Theorem]}") ;
o := BodyFontSize ;
a := unitsquare xyscaled (OverlayWidth,OverlayHeight) ;
p := p shifted (2o,OverlayHeight-ypart center p) ;
drawoptions (withpen pencircle scaled 1pt withcolor .625red) ;
b := a superellipsed .95 ;
draw b ;
b := (boundingbox p) superellipsed .95 ;
fill b withcolor .85white ;
draw b ;
draw p withcolor black ;
setbounds currentpicture to a ;
\stopuseMPgraphic 

\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}] 

\defineframedtext
  [FunnyText]
  [frame=off,
   background=FunnyFrame,
   before={\blank[line,halfline]},
%before={\blank[line]},
after={\blank[line]},
   offset=\bodyfontsize,
   width=\textwidth]

\defineenumeration[Theorem]
  [title=yes,
  text={\translate[en=Theorem, kr=정리]},
   prefix=yes,
   prefixsegments=chapter,
   way=bychapter,
   alternative=command,
   headcommand=\gobbleoneargument,
   before=\startFunnyText,
   after=\stopFunnyText]

 Definition style
\definenumber[DefNumber][way=bychapter,sectionumber=yes]
\setuptextrules[rulecolor=dBlue]

\define\DefCommand{\incrementnumber[DefNumber]
\textrule[top]{\translate[en=Definition, kr=정 의] \getnumber[DefNumber]}
}   
\defineenumeration[Definition]
[alternative=hanging,
width=fit,
alternative=serried,
text={}, 
number=no,
before={\DefCommand}, 
after=\vskip3pt\hrule\blank] 

%%% Examples with or without solutions
\defineenumeration[Exam]
   [text={\white\translate[en=Example, kr=예제]},
   numbercommand={\inframed[corner=round, 
framecolor=dYellow,toffset=-1pt,boffset=-1pt, loffset=1ex,roffset=1ex, 
background=color,backgroundcolor=dGreen]}, %height=1.3em,
%title=no,
prefix=yes,
prefixsegments=chapter,
way=bychapter,
before={\blank[big]},
after=\blank]
 
\starttext

\chapter{Spaces}

\section{Space 1}

\startDefinition[def:first]
Let $X$ be a uncountable set. Let $\infty$ is a fixed point of $X$. Let 
$\mathcal T$ be the family of subsets $G$ such that either (i) $\infty \notin 
G$ or (ii) $\infty \in G \text{ and } G^c$ is finite. The space $(X, {\mathcal 
T} )$ is called {\bf Fort's space}.
\stopDefinition

\startTheorem[lem:first]
Fort's space is a compact and Hausdorff topological space.\par
\stopTheorem

\startTheorem[thm:second]
Fort's space is a compact and Hausdorff topological space.
\stopTheorem

\startExam[Ex:first]
Example Example Example Example Example Example Example Example Example 
Example Example Example Example Example Example Example Example Example 
Example Example Example Example Example Example Example Example Example 
\stopExam

In this example, we defined \in{Definition}[def:first]. After that, we proved 
\in{Lemma}[lem:first] and \in{정리}[thm:second]. Finally, \in{Example}[Ex:first], 
we saw an example of it.

\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Setting \textrules

2016-07-20 Thread Fabrice Couvreur
Hi Wolfgang,
Is there a simple way to add a light gray background ?
thanks,
Fabrice

2016-07-14 11:57 GMT+02:00 Fabrice Couvreur <fabrice1.couvr...@gmail.com>:

> Hi Wolfgang,
> it's perfect !
> thanks,
> Fabrice
>
> 2016-07-14 6:41 GMT+02:00 Wolfgang Schuster <schuster.wolfg...@gmail.com>:
>
>> Fabrice Couvreur <fabrice1.couvr...@gmail.com>
>> 13. Juli 2016 um 01:02
>> Hello,
>> I would like the text of the property is in italic without using the
>> environment {\it}.
>>
>> Use the enumeration environment.
>>
>> Is this the best way when I use \setuptextrules[width=-1ex] ?
>>
>> You can set the width and distance values to 0pt and put a space after
>> the counter.
>>
>>  begin example
>> \setupbodyfont[pagella,11pt]
>>
>> \define[1]\ProprieteHeadcommand
>>   {\textrule[top]{#1}}
>>
>> \defineenumeration
>>   [propriete]
>>   [text=Propriété ,
>>style=italic,
>>headcommand=\ProprieteHeadcommand,
>>numbercommand=\groupedcommand{}{\nbsp},
>>after=\textrule]
>>
>> \setuptextrules[width=0pt,distance=0pt]
>>
>> \starttext
>>
>> \startpropriete
>> Soit \math{q} un réel \math{\neq 1}, alors pour tout entier naturel
>> \math{n\geqslant 1} on a :
>> \startformula
>> S=1+q+q^2+\dots+q^n=\frac{1-q^{n+1}}{1-q}.
>> \stopformula
>> \stoppropriete
>>
>> \stoptext
>>  end example
>>
>> Wolfgang
>>
>>
>> ___
>> If your question is of interest to others as well, please add an entry to
>> the Wiki!
>>
>> maillist : ntg-context@ntg.nl /
>> http://www.ntg.nl/mailman/listinfo/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
>> archive  : http://foundry.supelec.fr/projects/contextrev/
>> wiki : http://contextgarden.net
>>
>> ___
>>
>
>
___
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] Setting \textrules

2016-07-14 Thread Fabrice Couvreur
Hi Wolfgang,
it's perfect !
thanks,
Fabrice

2016-07-14 6:41 GMT+02:00 Wolfgang Schuster <schuster.wolfg...@gmail.com>:

> Fabrice Couvreur <fabrice1.couvr...@gmail.com>
> 13. Juli 2016 um 01:02
> Hello,
> I would like the text of the property is in italic without using the
> environment {\it}.
>
> Use the enumeration environment.
>
> Is this the best way when I use \setuptextrules[width=-1ex] ?
>
> You can set the width and distance values to 0pt and put a space after the
> counter.
>
>  begin example
> \setupbodyfont[pagella,11pt]
>
> \define[1]\ProprieteHeadcommand
>   {\textrule[top]{#1}}
>
> \defineenumeration
>   [propriete]
>   [text=Propriété ,
>style=italic,
>headcommand=\ProprieteHeadcommand,
>numbercommand=\groupedcommand{}{\nbsp},
>after=\textrule]
>
> \setuptextrules[width=0pt,distance=0pt]
>
> \starttext
>
> \startpropriete
> Soit \math{q} un réel \math{\neq 1}, alors pour tout entier naturel
> \math{n\geqslant 1} on a :
> \startformula
> S=1+q+q^2+\dots+q^n=\frac{1-q^{n+1}}{1-q}.
> \stopformula
> \stoppropriete
>
> \stoptext
>  end example
>
> Wolfgang
>
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
>
> ___
>
___
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] Setting \textrules

2016-07-13 Thread Wolfgang Schuster

Fabrice Couvreur <mailto:fabrice1.couvr...@gmail.com>
13. Juli 2016 um 01:02
Hello,
I would like the text of the property is in italic without using the 
environment {\it}.

Use the enumeration environment.

Is this the best way when I use\setuptextrules[width=-1ex] ?
You can set the width and distance values to 0pt and put a space after 
the counter.


 begin example
\setupbodyfont[pagella,11pt]

\define[1]\ProprieteHeadcommand
  {\textrule[top]{#1}}

\defineenumeration
  [propriete]
  [text=Propriété ,
   style=italic,
   headcommand=\ProprieteHeadcommand,
   numbercommand=\groupedcommand{}{\nbsp},
   after=\textrule]

\setuptextrules[width=0pt,distance=0pt]

\starttext

\startpropriete
Soit \math{q} un réel \math{\neq 1}, alors pour tout entier naturel 
\math{n\geqslant 1} on a :

\startformula
S=1+q+q^2+\dots+q^n=\frac{1-q^{n+1}}{1-q}.
\stopformula
\stoppropriete

\stoptext
 end example

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

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

[NTG-context] Setting \textrules

2016-07-12 Thread Fabrice Couvreur
Hello,
I would like the text of the property is in italic without using the
environment {\it}.
Is this the best way when I use \setuptextrules[width=-1ex] ?
thank you,
Fabrice

###
\definetypeface [mainface] [rm] [serif] [palatino] [default]
[features=default]

\definetypeface [mainface] [tt] [mono]  [modern] [default]
[features=default,
rscale=1.1]

\definetypeface [mainface] [mm] [math]  [pagella] [default]
[encoding=texnansi]


\setupbodyfont[mainface,11pt]

\definelabel
  [Propriété]
  [headstyle=bolditalic,way=bytext]

\setuptextrules[width=-1ex]

\starttext

\textrule[top]{\Propriété}


{\it Soit \math{q} un réel \math{\neq 1}, alors pour tout entier naturel
\math{n\geqslant 1} on a :

\startformula

S=1+q+q^2+\dots+q^n=\frac{1-q^{n+1}}{1-q}.

\stopformula}

\textrule

\textrule[top]{\Propriété}

 Soit \math{q} un réel \math{\neq 1}, alors pour tout entier naturel
\math{n\geqslant 1} on a :

\startformula

S=1+q+q^2+\dots+q^n=\frac{1-q^{n+1}}{1-q}.

\stopformula

\textrule

\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] Move textrule closer to head

2016-04-13 Thread Pablo Rodriguez
On 04/13/2016 06:10 PM, Tom Harrop wrote:
> Hello,
> 
> I'm a ConTeXt beginner. I'm working on a document where I would like a 
> textrule under my subsubsection headings. If I use after=\textrule, the 
> placement of the textrule is too far from the heading, and I haven't 
> found a way to move it closer to the heading either with \setuphead or 
> \setuptextrules.

Hi Tom,

how about another rule? (From
http://wiki.contextgarden.net/Titles#Titling_Style.)

   \setuphead[subsubsection]
 [after=\hrule\blank]

I hope it helps,

Pablo
-- 
http://www.ousia.tk
___
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] Move textrule closer to head

2016-04-13 Thread Tom Harrop

Hello,

I'm a ConTeXt beginner. I'm working on a document where I would like a 
textrule under my subsubsection headings. If I use after=\textrule, the 
placement of the textrule is too far from the heading, and I haven't 
found a way to move it closer to the heading either with \setuphead or 
\setuptextrules.


Here is an example:


\setuphead[subsubsection]
  [after=\textrule]

\starttext

\subsubsection{I would like less space between this heading and its 
textrule}


Here is some text.

\stoptext



I realise that the spacing looks pretty good in the PDF produced by this 
example, so you'll just have to believe me that it needs to be closer to 
the headings in my document.


I'd appreciate any help on this, including suggestions of 
alternative/better methods to do this.


Thanks for reading,

Tom
___
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 between textrule and setupindenting ?

2014-05-06 Thread Hans Hagen

On 5/3/2014 9:34 AM, Bertrand Masson wrote:

Hello,
In the following code, the second ruleis indented.
How to remove this indentation ?

%code%
\setuppapersize[A5]
\setupindenting[small,yes]
\setuptextrules[inbetween=\noindentation]
\starttext
\starttextrule{introduction}
Once upon a time \unknown
\stoptextrule
\stoptext
%code%


it's a buglet ... add this to cont-new.mkiv:

\unprotect

\def\pack_textrule_following#1%
  {\doifelsenothing{#1}
 {\ifhmode
\endgraf
  \fi

\doifelse{\directtextrulesparameter\c!depthcorrection}\v!on\pack_textrule_correct_depth_yes\pack_textrule_correct_depth_nop
  \nointerlineskip
  \noindent\vbox
{\color[\directtextrulesparameter\c!rulecolor]

{\hrule\s!depth\directtextrulesparameter\c!rulethickness\s!height\zeropoint\s!width\availablehsize}}}
 {\pack_textrule_with_text{#1}}%
   \ifvmode
 \prevdepth\zeropoint
   \fi}

\protect

fixed in next beta

-
  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] problem between textrule and setupindenting ?

2014-05-03 Thread Bertrand Masson

Hello,
In the following code, the second ruleis indented.
How to remove this indentation ?

%code%
\setuppapersize[A5]
\setupindenting[small,yes]
\setuptextrules[inbetween=\noindentation]
\starttext
\starttextrule{introduction}
Once upon a time \unknown
\stoptextrule
\stoptext
%code%

Many thanks,
Bertrand
___
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] New header

2014-01-20 Thread Hans Hagen

On 1/20/2014 10:34 AM, Fabrice Couvreur wrote:

Hi,
Here is the resulting file with LuaLaTeX.
Thank you.


2014/1/18 Fabrice Couvreur fabrice1.couvr...@gmail.com
mailto:fabrice1.couvr...@gmail.com

Hi,
I use the following header to my statements made with tittlesec
package.

\makeatletter

 \newcommand{\@classe}[1]{}
 \newcommand{\classe}[1]{\gdef\@classe{#1}}
 \newcommand{\@typedevoir}[1]{}
 \newcommand{\typedevoir}[1]{\gdef\@typedevoir{#1}}
 \newcommand{\@numerodevoir}[1]{}
 \newcommand{\numerodevoir}[1]{\gdef\@numerodevoir{#1}}
 \AtBeginDocument{\section{\@typedevoir\space\no\@numerodevoir}}
 \titleformat{\section}[frame]
   {\normalfont}
   {\footnotesize\enspace\itshape\@classe\enspace--\enspace Le
\@date\enspace}
   {10pt}
   {\Large\scshape\bfseries\filcenter}
   \makeatother

I want to gradually move to ConTeXt and I tried to create the same
header.
But I do not yet know all the commands to do with ConTeXt.

\setuptextrules
[style=\it,location=top]
\define[6]\MyHeader{%


\textrule[top]{#1\space--\space\date[d=#2,m=#3,y=#4]}{\startlinealignment[middle]{\cap
\bf #5 \space n\high{{o}}\space {#6}}\stoplinealignment\blank\textrule}}

\starttext
\MyHeader{Seconde GTA}{11}{1}{2014}{Devoir de Mathématiques}{7}
\stoptext
Thank you.


an exercise in

- mkvi
- metapost
- framed
- definitions

don't forget to start your tex file with this line:

% macros=mkvi

\starttext

\starttexdefinition MyOtherHeader #where #day #month #year #title 
#number


\defineoverlay[whatever][\useMPgraphic{whatever}]

\startuseMPgraphic{whatever}

draw OverlayBox withpen pencircle scaled .5pt dashed evenly ;

picture p ; p := 
textext(\it\quad#where\space\endash\space\date[d=#day,m=#month,y=#year]\quad)

shifted .5[ulcorner OverlayBox,urcorner OverlayBox];

fill boundingbox p withcolor white ; draw p ;

setbounds currentpicture to OverlayBox ;

\stopuseMPgraphic

\framed [
width=\hsize,
height=5em,
foregroundstyle=\cap\bf,
background=whatever,
frame=off,
] {
#title
\space
n\high{o}
\space
#number
}

\stoptexdefinition

\MyOtherHeader{Seconde GTA}{11}{1}{2014}{Devoir de Mathématiques}{7}

\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
-
% macros=mkvi

\starttext

\starttexdefinition MyOtherHeader #where #day #month #year #title #number

\defineoverlay[whatever][\useMPgraphic{whatever}]

\startuseMPgraphic{whatever}

draw OverlayBox withpen pencircle scaled .5pt dashed evenly ;

picture p ; p := textext(\it\quad#where\space\endash\space\date[d=#day,m=#month,y=#year]\quad)
shifted .5[ulcorner OverlayBox,urcorner OverlayBox];

fill boundingbox p withcolor white ; draw p ;

setbounds currentpicture to OverlayBox ;

\stopuseMPgraphic

\framed [
width=\hsize,
height=5em,
foregroundstyle=\cap\bf,
background=whatever,
frame=off,
] {
#title
\space
n\high{o}
\space
#number
}

\stoptexdefinition

\MyOtherHeader{Seconde GTA}{11}{1}{2014}{Devoir de Mathématiques}{7}

\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] New header

2014-01-18 Thread Fabrice Couvreur
Hi,
I use the following header to my statements made with tittlesec package.

\makeatletter

\newcommand{\@classe}[1]{}
\newcommand{\classe}[1]{\gdef\@classe{#1}}
\newcommand{\@typedevoir}[1]{}
\newcommand{\typedevoir}[1]{\gdef\@typedevoir{#1}}
\newcommand{\@numerodevoir}[1]{}
\newcommand{\numerodevoir}[1]{\gdef\@numerodevoir{#1}}
\AtBeginDocument{\section{\@typedevoir\space\no\@numerodevoir}}
\titleformat{\section}[frame]
  {\normalfont}
  {\footnotesize\enspace\itshape\@classe\enspace--\enspace Le
\@date\enspace}
  {10pt}
  {\Large\scshape\bfseries\filcenter}
  \makeatother

I want to gradually move to ConTeXt and I tried to create the same header.
But I do not yet know all the commands to do with ConTeXt.

\setuptextrules
[style=\it,location=top]
\define[6]\MyHeader{%

\textrule[top]{#1\space--\space\date[d=#2,m=#3,y=#4]}{\startlinealignment[middle]{\cap
\bf #5 \space n\high{{o}}\space {#6}}\stoplinealignment\blank\textrule}}

\starttext
\MyHeader{Seconde GTA}{11}{1}{2014}{Devoir de Mathématiques}{7}
\stoptext
Thank you.
___
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] setuphead for in-paragraph head ?

2014-01-09 Thread Otared Kavian
Hi Jean Guillaume,

I guess Marco Patzer and Wolfgang Schuster gave you already the appropriate 
answers.
Nevertheless, I wanted to share with you the definitions I use for the kind of 
work you want to do:

%%% begin example-exercise.tex
%%%
% defining \startexo, \stopexo as an enumeration:
\startsetups style:simple
\defineenumeration[exo]
[alternative=hanging,
width=fit,
stopper={.},
text=Exercise, 
%   between=,
before=, 
after=\blank] 
\stopsetups % style:simple

\startsetups style:textrule
\definenumber[MyExoNumber][way=bysection,sectionumber=yes]
\setuptextrules[rulecolor=darkred]
\define\ExoCommand{\incrementnumber[MyExoNumber]
\textrule[top]{Exercise \getnumber[MyExoNumber]}
\startbackground[frame=off,leftframe=on,backgroundcolor=white,
framecolor=darkred]}

\defineenumeration[exo]
[alternative=hanging,
width=fit,
text={}, 
number=hide,
number=no,
before={\ExoCommand}, 
after={\stopbackground\blank}]
\stopsetups % style:textrule

% end defining \startexo, \stopexo as an enumeration
%%%

%defining  numbered questions
\defineconversion[exercise][\numbers]
%\setupitemize[packed]
\def\StartQuestions{%
\startitemize[exercise][width=2em,packed,style=bold,stopper=,right=)]}
\def\StopQuestions{\stopitemize}
\def\q{\item}

% trye each of the following
\setups[style:simple]
%\setups[style:textrule]

\starttext
\startexo 
Prove that for all $a,b\in {\Bbb K}$, a field of characteristic 2, one has 
$(a+b)^2 = a^2 + b^2$.
\stopexo


\startexo 
Prove that for all $a,b\in {\Bbb K}$, a field of characteristic 2, one has 
$(a+b)^4 = a^4 + b^4$.
\stopexo

\startexo
\StartQuestions
\q Prove that 
\startformula
\sum_{n=1}^\infty{1 \over n^2} = {\pi^2 \over 6}.
\stopformula

\q Prove that for any $n \geq 1$ integer one has
\startformula
\sum_{k=1}^n k^3 = \left({n(n+1) \over 2}\right)^2.
\stopformula
\StopQuestions
\stopexo

\stoptext
%%% end example-exercise.tex


Best regards: OK

On 9 janv. 2014, at 14:23, Jean-Guillaume jng...@gmail.com wrote:

 But this:
 
 \definehead
  [Exercise] [subsection]
  [after=]
 \starttext
  \startExercise [title=This is the exercise's title]
The exercise's content.
  \stopExercise
 \stoptext
 
 results to:
 
 1 This is the exercise's title
 The exercise's content.
 
 and I would like it to be:
 
 1 This is the exercise's title The exercise's content.
 
 (When I can typeset that, I will see about formatting the number and so on.)
 
 I'm sorry it wasn't very clear. Now I understand that I misunderstood
 \startExercise{...} for \startExercise[title=...] and that's why I was
 confused about which newline I want to get rid of.
 
 Jean-Guillaume
 ___
 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] setuphead for in-paragraph head ?

2014-01-09 Thread Jaroslav Hajtmar

Hello Otared.
I will throw this one... Thanx.

Once I was using exercise-answer package for LaTeX.
Is there anything like this to use in ConTeXt?

Thanx
Jaroslav Hajtmar


Dne 9.1.2014 15:19, Otared Kavian napsal(a):

%%% begin example-exercise.tex
%%%
% defining \startexo, \stopexo as an enumeration:
\startsetups style:simple
\defineenumeration[exo]
[alternative=hanging,
width=fit,
stopper={.},
text=Exercise,
%   between=,
before=,
after=\blank]
\stopsetups % style:simple

\startsetups style:textrule
\definenumber[MyExoNumber][way=bysection,sectionumber=yes]
\setuptextrules[rulecolor=darkred]
\define\ExoCommand{\incrementnumber[MyExoNumber]
\textrule[top]{Exercise \getnumber[MyExoNumber]}
\startbackground[frame=off,leftframe=on,backgroundcolor=white,
framecolor=darkred]}

\defineenumeration[exo]
[alternative=hanging,
width=fit,
text={},
number=hide,
number=no,
before={\ExoCommand},
after={\stopbackground\blank}]
\stopsetups % style:textrule

% end defining \startexo, \stopexo as an enumeration
%%%

%defining  numbered questions
\defineconversion[exercise][\numbers]
%\setupitemize[packed]
\def\StartQuestions{%
\startitemize[exercise][width=2em,packed,style=bold,stopper=,right=)]}
\def\StopQuestions{\stopitemize}
\def\q{\item}

% trye each of the following
\setups[style:simple]
%\setups[style:textrule]

\starttext
\startexo
Prove that for all $a,b\in {\Bbb K}$, a field of characteristic 2, one has 
$(a+b)^2  = a^2  + b^2$.
\stopexo


\startexo
Prove that for all $a,b\in {\Bbb K}$, a field of characteristic 2, one has 
$(a+b)^4  = a^4  + b^4$.
\stopexo

\startexo
\StartQuestions
\q Prove that
\startformula
\sum_{n=1}^\infty{1 \over n^2} = {\pi^2  \over 6}.
\stopformula

\q Prove that for any $n \geq 1$ integer one has
\startformula
\sum_{k=1}^n k^3  = \left({n(n+1) \over 2}\right)^2.
\stopformula
\StopQuestions
\stopexo

\stoptext
%%% end example-exercise.tex


___
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] setuphead for in-paragraph head ?

2014-01-09 Thread Otared Kavian

On 9 janv. 2014, at 15:48, Jaroslav Hajtmar hajt...@gyza.cz wrote:

 Hello Otared.
 I will throw this one... Thanx.
 
 Once I was using exercise-answer package for LaTeX.
 Is there anything like this to use in ConTeXt?
 
 Thanx
 Jaroslav Hajtmar

Hello Jaroslav,

I have something like the following which was given to me by Hans a long time 
ago: unfortunately for some reason this does not work anymore with ConTeXt 
mkiv, but it is quite fine with mkii:

%%% begin question-hint-answer.tex
\defineblock[question]
\defineblock[hint]
\defineblock[answer]

\defineenumeration[question][location=hanging,text={Question},stopper={.}]
\defineenumeration[hint][location=hanging,text={Hint for question},stopper={.}]
\defineenumeration[answer][location=hanging,text={Answer to 
question},stopper={.}]

\hideblocks[hint]
\hideblocks[answer]

\starttext
\section{Questions}

\beginquestion
\question Compute $4\times 5$.

\beginhint
\hint Use the fact that $2\times 5 = 10$.
\endhint

\beginanswer
\answer $20$.
\endanswer

\endquestion

\beginquestion
\question What is the value of $100 / 10$?

\beginhint
\hint Remember that $10\times 10 = 100$.
\endhint

\beginanswer
\answer $10$
\endanswer

\endquestion

\section{Hints}
\useblocks[hint]

\section{Answers}
\useblocks[answer]

\stoptext
%%% end question-hint-answer.tex

Best regards: OK



 
 
 Dne 9.1.2014 15:19, Otared Kavian napsal(a):
 %%% begin example-exercise.tex
 %%%
 % defining \startexo, \stopexo as an enumeration:
 \startsetups style:simple
 \defineenumeration[exo]
  [alternative=hanging,
  width=fit,
  stopper={.},
  text=Exercise,
 %between=,
  before=,
  after=\blank]
 \stopsetups % style:simple
 
 \startsetups style:textrule
 \definenumber[MyExoNumber][way=bysection,sectionumber=yes]
 \setuptextrules[rulecolor=darkred]
 \define\ExoCommand{\incrementnumber[MyExoNumber]
  \textrule[top]{Exercise \getnumber[MyExoNumber]}
  \startbackground[frame=off,leftframe=on,backgroundcolor=white,
  framecolor=darkred]}
 
 \defineenumeration[exo]
  [alternative=hanging,
  width=fit,
  text={},
  number=hide,
  number=no,
  before={\ExoCommand},
  after={\stopbackground\blank}]
 \stopsetups % style:textrule
 
 % end defining \startexo, \stopexo as an enumeration
 %%%
 
 %defining  numbered questions
 \defineconversion[exercise][\numbers]
 %\setupitemize[packed]
 \def\StartQuestions{%
  \startitemize[exercise][width=2em,packed,style=bold,stopper=,right=)]}
 \def\StopQuestions{\stopitemize}
 \def\q{\item}
 
 % trye each of the following
 \setups[style:simple]
 %\setups[style:textrule]
 
 \starttext
 \startexo
 Prove that for all $a,b\in {\Bbb K}$, a field of characteristic 2, one has 
 $(a+b)^2  = a^2  + b^2$.
 \stopexo
 
 
 \startexo
 Prove that for all $a,b\in {\Bbb K}$, a field of characteristic 2, one has 
 $(a+b)^4  = a^4  + b^4$.
 \stopexo
 
 \startexo
 \StartQuestions
 \q Prove that
 \startformula
 \sum_{n=1}^\infty{1 \over n^2} = {\pi^2  \over 6}.
 \stopformula
 
 \q Prove that for any $n \geq 1$ integer one has
 \startformula
 \sum_{k=1}^n k^3  = \left({n(n+1) \over 2}\right)^2.
 \stopformula
 \StopQuestions
 \stopexo
 
 \stoptext
 %%% end example-exercise.tex
 
 ___
 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] \startitemize[columns] broken with backgrounds?

2012-01-22 Thread Otared Kavian
Hi all,

It seems that when using background, \startitemize[columns] does not work as 
expected: there are no columns, and the numbers of the items are pushed to the 
left. 
Below is a not so minimal example: the resulting PDF can be found here:
http://dl.dropbox.com/u/4316076/enumeration-background-exo.pdf
I am not sure whether this behaviour began with a recent beta or  not. 
The version I am using is: ConTeXt  ver: 2012.01.16 18:33 MKIV.

Best regards: OK
%%% begin enumeration-background-exo.pdf
\definenumber[MyExoNumber][way=bysection,sectionumber=yes]
\setuptextrules[rulecolor=darkred]
\define\ExoCommand{\incrementnumber[MyExoNumber]
\textrule[top]{Exercise \getnumber[MyExoNumber]}
\startbackground[frame=off,leftframe=on,
framecolor=darkred]}

\defineenumeration[exo]
[location=hanging,
width=fit,
text={}, 
number=hide,
number=no,
before={\ExoCommand}, 
after={\stopbackground\blank}]

\defineconversion[exercice][\numbers]
\def\StartQuestions{%
\startitemize[exercice][width=2em,packed,style=bold,stopper=,right=)]}
\def\StopQuestions{\stopitemize}
\def\q{\item}

\starttext

%
\startexo
Prove that
\startformula
\cos(nt) + {\rm i}\sin(nt) = (\cos(t) + {\rm i}\sin(t))^n.
\stopformula
\StartQuestions
\dorecurse{5}{\q This is question \recurselevel. }
\StopQuestions
\stopexo
%

%
\startexo Solve the following equations or inequations:
\startitemize[r,packed,columns][stopper=,left={(},right={)},distance=1em]
\item $3x - 5 = 4$.
\item $(x-1)(x+3) = 5$.
\item $2 - 3x \geq 2 x - 8$.
\item $(x - 1) \leq (x-1)(x+2)$.
\item $2x^2 - 3x +1  0$.
\item $x^2 - 4x \geq x - x^2 - 1$.
\stopitemize
\stopexo
%

\stoptext
%%% end enumeration-background-exo.pdf
___
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] textrule customization

2011-07-08 Thread Hans van der Meer
The \texrule is typeset as:
--- _TEXT_ -
this I would like to change to:
- _TEXT_ ---

\setuptextrules has location=left|inmargin but regrettably not location=right 
or location=middle (or center) (neither in the wiki nor by experiment).
Isn't that easily implemented? If so, it would be appreciated.

As an aside, setting up the thickness of the line seems desirable to, 
especially in view of the fact that other aspects as the color are already 
customizable.

Hans van der Meer

___
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] Title in textrule

2011-04-12 Thread Aditya Mahajan

On Tue, 12 Apr 2011, Flavien Lambert wrote:


Dear all, is there a way to change the style and size of the font used to
print Instruments in the following example ? I would like something like
\bfb\ss.

\textrule[top]{Instruments}
Some artists mention the instruments that they use during the production
of their \kap{CD}. In Peter Gabriel’s \quote {Digging in the dust} he used
the {\em diembe}, {\em tama} and {\em surdu}. The information on another
song mentions the {\em doudouk}. Other \quote {unknown} instruments are
used on his \kap{cd} \quote {Passion}.
\textrule


From pack-rul,mkiv

%D \startbuffer
%D \setuptextrules
%D   [width=90pt,distance=12pt,rulecolor=blue,
%Dbodyfont=small,style=\sc,color=red]
%D
%D \starttextrule{Ship Building Tools}
%D   \nl \setuptolerance[tolerant] \input materie
%D \stoptextrule
%D \stopbuffer
%D
%D \bgroup \typebuffer \getbuffer \egroup
%D
%D \startbuffer
%D \setuptextrules
%D   [location=inmargin,
%Dbodyfont=small,style=slantedbold]
%D
%D \starttextrule{wonderful}
%D   \input tufte
%D \stoptextrule
%D \stopbuffer
%D
%D \bgroup \typebuffer \getbuffer \egroup

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] Title in textrule

2011-04-12 Thread Flavien Lambert
Thanks!

2011/4/12 Aditya Mahajan adit...@umich.edu

 On Tue, 12 Apr 2011, Flavien Lambert wrote:

  Dear all, is there a way to change the style and size of the font used to
 print Instruments in the following example ? I would like something like
 \bfb\ss.

 \textrule[top]{Instruments}
 Some artists mention the instruments that they use during the production
 of their \kap{CD}. In Peter Gabriel’s \quote {Digging in the dust} he used
 the {\em diembe}, {\em tama} and {\em surdu}. The information on another
 song mentions the {\em doudouk}. Other \quote {unknown} instruments are
 used on his \kap{cd} \quote {Passion}.
 \textrule


 From pack-rul,mkiv

 %D \startbuffer
 %D \setuptextrules
 %D   [width=90pt,distance=12pt,rulecolor=blue,
 %Dbodyfont=small,style=\sc,color=red]
 %D
 %D \starttextrule{Ship Building Tools}
 %D   \nl \setuptolerance[tolerant] \input materie
 %D \stoptextrule
 %D \stopbuffer
 %D
 %D \bgroup \typebuffer \getbuffer \egroup
 %D
 %D \startbuffer
 %D \setuptextrules
 %D   [location=inmargin,
 %Dbodyfont=small,style=slantedbold]
 %D
 %D \starttextrule{wonderful}
 %D   \input tufte
 %D \stoptextrule
 %D \stopbuffer
 %D
 %D \bgroup \typebuffer \getbuffer \egroup

 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

 ___




-- 
Flavien.

Quantum objects are completely crazy but, at least, they are all crazy in
the same way. R.P. Feynman.
___
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] Blank lines and \noindent

2010-08-05 Thread Wolfgang Schuster

 Am 05.08.10 14:14, schrieb Martin Althoff:

Just curious about the intented behaviour of \noindent.

If I place it as shown in the example, the next paragraph will still be indented. 
However, if the blank line between \noindent and the following text is deleted or 
contains a comment, the following text will not be indented. Is this placement dependency 
intended? I thought I could use blank lines at liberty to style the sources.
No, you use it the wrong way, \noindent has to be used in front of text 
or a box but you in your case a paragraph is between \noindent and the text.


You should also use ConTeXt’s own commands \indentation and \noindentation.

Secondly, is there any way of integrating the \noindent into the \textrule. 
Means: the paragraph following a textrule should not be indented. Not crucial, 
but would reduce the clutter in the sources. There are about 600 textrules... 
Not pretty, I know, but currently they are my indicator, that a page in the 
original book, from which the text comes, has changed.

\setuptextrules[inbetween=\noindentation]

Thanks again, Martin


\setupindenting[yes,small]
\indenting[next]
\indenting is just a synonym for \setupindenting and deprecated, move 
'next' into \setupindenting

\starttext
\input{davis}
\input{...} is LaTeX style, to read files with spaces in ConTeXt you can 
use \input ... or \ReadFile{...}


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
___


[NTG-context] descriptions failing in mkiv

2010-03-22 Thread Hans van der Meer

I made use of descriptions in mkii. For example:
% Define the intro for the annotation
% Block opened on \startquestion and closed on \stopquestion
% \startannotation{} ... \stopannotation; {} required
\definedescription[annotationblock][%
\c!margin=\v!no,\c!location=\v!top,\c!width=\v!broad,%
\c!headstyle=\@@exmintrostyle,\c!style=\@@exmstyle,%
\c!before=,\c!inbetween=,\c!after=,%
\c!text=\placeannotationstart]
etcetera

The error message in latest context beta is:

! Use of \@@startdescription doesn't match its definition.
\doifnextoptionalelse ...\nextoptionalcommandyes {
  #1}\def  
\nextoptionalcomma...

\setuptextrules ...odoubleargument \getparameters
  [\??tl ]
\placeannotationstart ...aloffset \setuptextrules
  [\c!style = 
\@@exmintrostyl...

\dododescriptioncomponent ...onparameter \c!label
  }\xdef  
\currentdescription...

\@@makedescription ...},\c!bookmark =,\c!list =][]
   
\@@dostartdescriptionindeed

\dodogotopar -\@@makedescription []{}
  \BeforePar \emptytoks
...

Can someone tell me if it is known to be broken in mkiv? Before  
delving too deep in the code myself


Hans van der Meer




___
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 things broken in mkiv?

2010-03-22 Thread Hans van der Meer
Sorry it took a few hours before responding, but first things first  
(luckily old setup of mkii turned to be working still).


Pinpointed the origin of the error message to this call:
   \the\everysetuppublications
I will search a bit further, but perhaps Taco has already enough clues  
from this experiment.

Something with processcomma?
By the way, could it be related to some other error I get in mkiv in  
processing a description? There in the log similarly something with  
parameterlists seems at hand:

! Use of \@@startdescription doesn't match its definition.
\doifnextoptionalelse ...\nextoptionalcommandyes {
  #1}\def  
\nextoptionalcomma...

\setuptextrules ...odoubleargument \getparameters
  [\??tl ]

Back to bib: From inserted code from bibl-tra.mkiv:

\writestatus{HVDM-TESTING =}{\string 
\setuppublicationlist[numbering=short,refcommand=data]}

\unprotect
\def\dosetuppublications[#1]%
  {\getparameters[\??pb][\c!alternative=,#1]%
\writestatus{HVDM-TESTING =}{after \string\getparameters  
1}%

   \doifsomething\@@pbalternative
 {\readsysfile{bibl-\@@pbalternative.tex}
{\showmessage\m!publications{6}{bibl-\@@pbalternative}}
{\showmessage\m!publications{1}{bibl-\@@pbalternative}}%
  \let\@@pbalternative\empty}%
   \getparameters[\??pb][#1]% as bibl-* can have set things back
\writestatus{HVDM-TESTING =}{after \string\getparameters  
2}%

   \the\everysetuppublications
\writestatus{HVDM-TESTING =}{after \string\the\string 
\everysetuppublications}%

   \ignorespaces}
\protect
\usepublications[literature]
\setuppublications  [alternative=apa]
\setuppublications	[numbering=short,refcommand=data] % separate -- see  
doc p2


And in the log:

HVDM-TESTING =: after \getparameters1
publications: loading formatting style from bibl-apa
(/Users/hans/Documents/TeX/context/beta/tex/texmf-context/tex/context/ 
bib/bibl-apa.tex

HVDM-TESTING =: after \getparameters1
HVDM-TESTING =: after \getparameters2
HVDM-TESTING =: after \the\everysetuppublications
)
HVDM-TESTING =: after \getparameters2
HVDM-TESTING =: after \the\everysetuppublications
HVDM-TESTING =: after \getparameters1
HVDM-TESTING =: after \getparameters2
! Parameters must be numbered consecutively.
to be read again
   ##
argument \def \@@pbinumbercommand 
1{\bibgetvars  
\currentpublicationkey }

\p!compareprocessaction ...commalistelement {#3}#2
  \expandafter  
\quitcommalis...

\next1 #1,-\p!doprocessaction {#1}
   \doprocesscommaitem
argument ...bibgetvars \currentpublicationkey },
   \v!bib =\def  
\@@pbinumbe...

\processnextcommalist ...dodoprocesscommaitem #4#5
  ,]\relax \global  
\advance ...

...
l.32 ...ications[numbering=short,refcommand=data]

On 22 mrt 2010, at 10:56, Hans Hagen wrote:


On 22-3-2010 10:51, Taco Hoekwater wrote:



Hans van der Meer wrote:
The following I didn't use for some time. Is it replaced or broken  
in mkiv?
Is there a quick fix? I must retypsetting something I need on  
short notice.


Perhaps the quickest fix is to downgrade your context release for a  
bit.


This looks like an expansion bug, but I have no idea what could have
changed nor when.


mayhe hans can track down what command is triggering it, probably  
some command in the bib databae file


Hans



Hans van der Meer


___
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 things broken in mkiv?

2010-03-22 Thread Hans van der Meer

Further tracked the error down to calling:
\setuppublications[numbering=short]
while \setuppublications[nrefcommand=data] does not give the error.

Hans van der Meer




On 22 mrt 2010, at 13:53, Hans van der Meer wrote:

Sorry it took a few hours before responding, but first things first  
(luckily old setup of mkii turned to be working still).


Pinpointed the origin of the error message to this call:
   \the\everysetuppublications
I will search a bit further, but perhaps Taco has already enough  
clues from this experiment.

Something with processcomma?
By the way, could it be related to some other error I get in mkiv in  
processing a description? There in the log similarly something with  
parameterlists seems at hand:

! Use of \@@startdescription doesn't match its definition.
\doifnextoptionalelse ...\nextoptionalcommandyes {
  #1}\def  
\nextoptionalcomma...

\setuptextrules ...odoubleargument \getparameters
  [\??tl ]

Back to bib: From inserted code from bibl-tra.mkiv:

\writestatus{HVDM-TESTING =}{\string 
\setuppublicationlist[numbering=short,refcommand=data]}

\unprotect
\def\dosetuppublications[#1]%
  {\getparameters[\??pb][\c!alternative=,#1]%
\writestatus{HVDM-TESTING =}{after \string 
\getparameters 1}%

   \doifsomething\@@pbalternative
 {\readsysfile{bibl-\@@pbalternative.tex}
{\showmessage\m!publications{6}{bibl-\@@pbalternative}}
{\showmessage\m!publications{1}{bibl-\@@pbalternative}}%
  \let\@@pbalternative\empty}%
   \getparameters[\??pb][#1]% as bibl-* can have set things back
\writestatus{HVDM-TESTING =}{after \string 
\getparameters 2}%

   \the\everysetuppublications
\writestatus{HVDM-TESTING =}{after \string\the\string 
\everysetuppublications}%

   \ignorespaces}
\protect
\usepublications[literature]
\setuppublications  [alternative=apa]
\setuppublications	[numbering=short,refcommand=data] % separate --  
see doc p2


And in the log:

HVDM-TESTING =: after \getparameters1
publications: loading formatting style from bibl-apa
(/Users/hans/Documents/TeX/context/beta/tex/texmf-context/tex/ 
context/bib/bibl-apa.tex

HVDM-TESTING =: after \getparameters1
HVDM-TESTING =: after \getparameters2
HVDM-TESTING =: after \the\everysetuppublications
)
HVDM-TESTING =: after \getparameters2
HVDM-TESTING =: after \the\everysetuppublications
HVDM-TESTING =: after \getparameters1
HVDM-TESTING =: after \getparameters2
! Parameters must be numbered consecutively.
to be read again
   ##
argument \def \@@pbinumbercommand 
1{\bibgetvars  
\currentpublicationkey }

\p!compareprocessaction ...commalistelement {#3}#2
  \expandafter  
\quitcommalis...

\next1 #1,-\p!doprocessaction {#1}
   \doprocesscommaitem
argument ...bibgetvars \currentpublicationkey },
   \v!bib =\def  
\@@pbinumbe...

\processnextcommalist ...dodoprocesscommaitem #4#5
  ,]\relax \global  
\advance ...

...
l.32 ...ications[numbering=short,refcommand=data]

On 22 mrt 2010, at 10:56, Hans Hagen wrote:


On 22-3-2010 10:51, Taco Hoekwater wrote:



Hans van der Meer wrote:
The following I didn't use for some time. Is it replaced or  
broken in mkiv?
Is there a quick fix? I must retypsetting something I need on  
short notice.


Perhaps the quickest fix is to downgrade your context release for  
a bit.


This looks like an expansion bug, but I have no idea what could have
changed nor when.


mayhe hans can track down what command is triggering it, probably  
some command in the bib databae file


Hans



Hans van der Meer


___
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] \showmathcharacters problems with TeXlive 2009 on Win 7 64bit

2010-02-10 Thread Hans Hagen

On 10-2-2010 17:03, comm...@googlemail.com wrote:

\mainlanguage[de]
\enableregime[windows]
\setuplayout[backspace=1cm, rightmargin=0.58cm, width=fit, topspace=1cm,
header=1cm, footer=1cm, height=fit]

\starttext

\showmathcharacters

\stoptext


ok, this was the problem:

the math definition files are read and then the column width is 
calculated which is used in a second read


as the files to be used now have the mkii suffix, no file is read and we 
end up with 24 columns which is too much for tex's calculations


I now intercept that as well as fixedthe loading (to use mkii files)

Hans

--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
%D \module
%D   [ file=math-run,
%D  version=2001.23.04,
%Dtitle=\CONTEXT\ Math Macros,
%D subtitle=Runtime Macros,
%D   author=Hans Hagen,
%D date=\currentdate,
%Dcopyright=Hans Hagen \ Ton Otten]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

\writestatus{loading}{ConTeXt Math Macros / Runtime Macros}

\unprotect

\ifx\showmathmodern\undefined \global\chardef\showmathmodern\zerocount \fi

\gdef\showmathcharacters% nearly \showcharacters
  {\par
   \bgroup
   
\ifcase\showmathmodern\or\ifx\modern\undefined\chardef\showmathmodern\zerocount\fi\fi
   \setuptextrules[\c!bodyfont=,\c!style=]
   \starttextrule{math characters -- \currentmathcollection}
   \whitespace
   \dontcomplain
   \forgetall
   \def\startmathcollection[##1]{}
   \let\stopmathcollection\relax
   \dimen0\zeropoint
   \dimen2\zeropoint
   \def\definemathsymbol   {\dosixtupleempty\dodefinemathsymbol}
   \def\definemathcharacter{\dosixtupleempty\dodefinemathcharacter}
   \def\definemathcommand  {\dotripleempty  \dodefinemathcommand}
   %\newcounter\mathcolor
   \def\dodefinemathsymbol[##1][##2][##3][##4][##5][##6]%
 {%\doifcolorelse{math \purefamilyhex{##3}}{}
  %  {\increment\mathcolor
  %   \definecolor[math \purefamilyhex{##3}][\mathcolor]}%
  \setbox0\hbox spread 1em{\mathematics{\getvalue{##1}{}{}{}}}%
  \ifdim\wd0\dimen0 \dimen0=\wd0 \fi
  \setbox2\hbox spread 1em{\hbox to 1em{\tttf\purefamilyhex{##3}\hss}\box0 
##1}%
  \ifdim\wd2\dimen2 \dimen2=\wd2 \fi}
   \def\dodefinemathcharacter[##1][##2][##3][##4][##5][##6]{}
   \def\dodefinemathcommand  [##1][##2][##3]##4{}
   \readsysfile{\f!mathprefix tex.mkii}\!!doneatrue\!!doneafalse
   \readsysfile{\f!mathprefix ams.mkii}\!!donebtrue\!!donebfalse
   \if!!donea
 \if!!doneb
   \edef\encwidth{\the\dimen0}
   \dimen0=\hsize
   \advance\dimen0 2em
   \advance\dimen2 2em
   \ifcase\showmathmodern\or\advance\dimen2 4em\fi
   \divide \dimen0 by \dimen2 \advance\dimen0 1sp
   \edef\enccols{\number\dimen0}
   \startcolumns[\c!n=\enccols,\c!distance=2em]
   \def\dodefinemathsymbol[##1][##2][##3][##4][##5][##6]%
 {%\localcolortrue
  %\color
  %  [math \purefamilyhex{##3}]
 {\hbox
{\ifcase\showmathmodern\or
   \hbox to 
\encwidth{\modern\let\mathcollection\nomathcollection\mathematics{\getvalue{##1}{}{}{}}\hss}%
 \fi
 \hbox to \encwidth{\mathematics{\getvalue{##1}{}{}{}}\hss}%
 \hbox to 1em{\tttf\purefamilyhex{##3}\hss}##1}\par}}
   \readsysfile{\f!mathprefix tex.mkii}\donothing\donothing
   \readsysfile{\f!mathprefix ams.mkii}\donothing\donothing
   \stopcolumns
 \else
   \par \tttf no chars in \f!mathprefix ams\par
 \fi
   \else
 \par \tttf no chars in \f!mathprefix tex\par
   \fi
   \stoptextrule
   \egroup}

% \definecolor[math \purefamilyhex{mr}] [darkred]
% \definecolor[math \purefamilyhex{mi}] [darkgreen]
% \definecolor[math \purefamilyhex{sy}] [darkblue]
% \definecolor[math \purefamilyhex{ex}] [darkmagenta]
% \definecolor[math \purefamilyhex{nn}] [darkyellow]
% \definecolor[math \purefamilyhex{ma}] [lightred]
% \definecolor[math \purefamilyhex{mb}] [lightgreen]
% \definecolor[math \purefamilyhex{mc}] [lightblue]
% \definecolor[math \purefamilyhex{md}] [lightmagenta]

\gdef\showmathtoken#1%
  {\starttabulate[|lT|lT|lT|l|]
   \NC token \NC #1 \NC \NR
   \NC collection\NC \ifcsna...@mt@\mathcollection#1\endcsname
   \mathcollection
 \else\ifcsna...@mt@\nomathcollection#1\endcsname
   \nomathcollection
 \else
   ?%
 \fi\fi \NC \NR
   \NC visualization \NC \mathematics{\getvalue{#1}} \NC \NR
   \NC definition\NC \tttf 
\...@ea

[NTG-context] \setupspacing[...] and the last line of a paragraph

2008-10-10 Thread Bernd Kosubek
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dear all!

%%%
% Source:
%%%

\enableregime[utf]
\installlanguage[german][de]
\mainlanguage[de]
\setuppapersize[C5][A4]
\setuplayout[width=124mm]
\setupbodyfont[10pt]
\setupindenting[none]
\setupwhitespace[small]
\setuptolerance[horizontal,strict]
\setupspacing[packed]

\definestartstop[Ausgabe][%
  before={%
\setuptextrules[location=left]%
\textrule[top]{Ausgabe}%
  },%
  after={\textrule},%
  commands={\indenting[no]}%
]

\starttext
\startAusgabe
Kurze Sätze.
Das A und O der Tagespresse!\space{}
Dem Leser nur nichts zumuten.
Es muss zwischen Tür und Angel passen.
Alles muss schnell verdaut werden können.

{
  \setupspacing[broad]
  Kurze Sätze.
  Das A und O der Tagespresse!\nospace{}
  Dem Leser nur nichts zumuten.
  Es muss zwischen Tür und Angel passen.
  Alles muss schnell verdaut werden können.
}
\stopAusgabe
\stoptext

%%%
% Problem:
%%%

In the output the last line of the first paragraph is longer than the last
line of the second paragraph.

Logically, the last line of the second paragraph supposed to be longer,
because there is more space between the sentences.

Is there a blank (space), with a wrong interpretation at the last punctuation
mark or is it a bug or what is the reason?
- --
Gruß
Bernd Kosubek

Unsigned eMails are not from me.

eMail: [EMAIL PROTECTED]
Fingerprint: C121 F3C2 A6DD 1ACD A9BC F0AF 1289 2AEC B7C4 D63B

Keyserver: blackhole.pca.dfn.de (oder andere)
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iD8DBQFI7zJ1Eokq7LfE1jsRAlbrAJ9xUxuJFuLtAWunzWn+uqnhY0XbnwCbBMjT
OISFd44KkchZi3R7IH0LZFo=
=OWXc
-END 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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] \setupspacing[...] and the last line of a paragraph

2008-10-10 Thread Wolfgang Schuster
On Fri, Oct 10, 2008 at 12:46 PM, Bernd Kosubek [EMAIL PROTECTED] wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Dear all!

 %%%
 % Source:
 %%%

 \enableregime[utf]
 \installlanguage[german][de]
 \mainlanguage[de]
 \setuppapersize[C5][A4]
 \setuplayout[width=124mm]
 \setupbodyfont[10pt]
 \setupindenting[none]
 \setupwhitespace[small]
 \setuptolerance[horizontal,strict]
 \setupspacing[packed]

 \definestartstop[Ausgabe][%
  before={%
\setuptextrules[location=left]%
\textrule[top]{Ausgabe}%
  },%
  after={\textrule},%
  commands={\indenting[no]}%
 ]

 \starttext
 \startAusgabe
 Kurze Sätze.
 Das A und O der Tagespresse!\space{}
 Dem Leser nur nichts zumuten.
 Es muss zwischen Tür und Angel passen.
 Alles muss schnell verdaut werden können.

 {
  \setupspacing[broad]
  Kurze Sätze.
  Das A und O der Tagespresse!\nospace{}
  Dem Leser nur nichts zumuten.
  Es muss zwischen Tür und Angel passen.
  Alles muss schnell verdaut werden können.
 }

Alles muss schnell verdaut werden können.%
}

or

Alles muss schnell verdaut werden können.}

 \stopAusgabe
 \stoptext

 %%%
 % Problem:
 %%%

 In the output the last line of the first paragraph is longer than the last
 line of the second paragraph.

 Logically, the last line of the second paragraph supposed to be longer,
 because there is more space between the sentences.

 Is there a blank (space), with a wrong interpretation at the last punctuation
 mark or is it a bug or what is the reason?

You inserted a space after the last word in the second paragraph.

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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] ConTeXt-ifying Kile

2008-01-02 Thread Matija Šuklje
]
# \setuptextbackground
\setuptextposition[name][settings]
\setuptextrules[options]
\setuptexttexts[text|margin|edge][text|section|date|mark|pagenumber][text|section|date|mark|pagenumber]
\setuptextvariable[name][options]
\setupthinrules[options]
\setuptolerance[options]
\setuptop[text|margin|edge][options]
\setuptoptexts[text|margin|edge][text|section|date|mark|pagenumber][text|section|date|mark|pagenumber]
\setuptype[options]
\setuptyping[file|typing|name][options]
\setupunderbar[options]
\setupurl[options]
\setupversions[options]
\setupwhitespace[none|small|medium|big|line|fixed|fix|dimension]
# \setvalue
# \setvariables
# \setxvalue
# \setxvariables
# \showaccents
\showbodyfont[settings]
\showbodyfontenvironment[settings]
# \showcharacters
\showcolor[name]
\showcolorgroup[name][horizontal|vertical|name|value|number]
\showexternalfigures[alternative=a|b|c]
\showfields[names]
# \showfont
\showframe[text|margin|edge]
\showgrid
# \showgridboxes
# \showgridsnapping
\showlayout
# \showlayoutcomponents
\showmakeup
\showpalet[name][horizontal|vertical|name|value]
\showprint[typesetting papersize][printing papersize][settings]
\showsetups
\showstruts
# \showstruts
\showsymbolset[name]
# \snaptogrid
\someline[reference]
\somewhere{text}{text}[reference]
\sort[text]{text}
\space
\splitfloat[settings]{text}{text}
# \splitstring
# \SR
# \start \stop
# \start \stop
\startalignment[width|left|right|middle|inner|outer|wide|broad|height|bottom|line|reset|hanging|nothanging|hyphenated|nothyphenated]
 \stopalignment
# \startarabicpar \stoparabicpar
# \startarabictext \stoparabictext
# \startappendices \stopappendices
\startbackground \stopbackground
# \startbackmatter \stopbackmatter
# \startbaselinecorrection \stopbaselinecorrection
# \startblockquote \stopblockquote
# \startbodymatter \stopbodymatter
\startbuffer[name] \stopbuffer
\startcolor[name] \stopcolor
\startcolumns[settings] \stopcolumns
\startcombination[matrix] \stopcombination
\startcomment[name][settings] \stopcomment
\startcomponent file \stopcomponent
\startdescription{text} \stopdescription
\startdocument[name] \stopdocument
\startenumeration \stopenumeration
\startenvironment file \stopenvironment
\startfact\fact text \\ text \\ text \\\fact text \stopfact
\startfigure[name][file][factor=number][frame=on|off] \stopfigure
\startfloattext[left|right|high|middle|low|offset|tall][reference]{text}{text} 
\stopfloattext
# \startFLOWcell \stopFLOWcell
# \startFLOWchart \stopFLOWchart
\startformula \stopformula
# \startframedcontent \stopframedcontent
\startframedtext[left|right|middle|none][settings] \stopframedtext
# \startfrontmatter \stopfrontmatter
# \starthanging \stophanging
\starthiding \stophiding
\startinteractionmenu[name] \stopinteractionmenu
\startitemgroup[name][options][settings] \stopitemigroup
# \startitemize \stopitemize
# \startitemize \stopitemize
# \startJScode \stopJScode
# \startJSpreamble \stopJSpreamble
# \startJSscripts \stopJSscripts
\startlegend[two]\leg text \\ text \\ text \\\leg \stoplegend
\startline[reference] \stopline
\startlinecorrection \stoplinecorrection
\startlinenumbering[continue] \stoplinenumbering
\startlines \stoplines
\startlocal \stoplocal
\startlocalenvironment \stoplocalenvironment
\startlocalfootnotes \stoplocalfootnotes
# \startlocalsetups \stoplocalsetups
\startmakeup[name][settings] \stopmakeup
\startmarginblock \stopmarginblock
\startmarginrule[number] \stopmarginrule
# \startmode \stopmode
# \startMPpage \stopMPpage
\startnamemakeup \stopnamemakeup
\startnarrower[left|middle|right] \stopnarrower
# \startnointerference \stopnointerference
# \startnotmode \stopnotmode
\startopposite \stopopposite
\startoverlay{text}{text} \stopoverlay
\startoverview[names] \stopoverview
\startpacked[blank] \stoppacked
\startparagraph \stopparagraph
\startpositioning \stoppositioning
\startpostponing \stoppostponing
\startproduct file \stopproduct
\startprofile[names] \stopprofile
\startproject file \stopproject
\startquotation[left|middle|right] \stopquotation
\startregister[text]{text+text+text} \stopregister
# \startsetups \stopsetups
# \startstandardmakeup \stopstandardmakeup
\startsymbolset[name] \stopsymbolset
\startsynchronization \stopsynchronization
\starttable[text|name] \stoptable
\starttables[text|name] \stoptables
\starttabulate[text][settings] \stoptabulate
# \startTEXpage \stopTEXpage
# \starttext \stoptext
# \starttextbackground \stoptextbackground
# \starttextdata \stoptextdata
\starttextrule[top|bottom]{text} \stoptextrule
\starttyping \stoptyping
\startunpacked \stopunpacked
\startversion[numbers] \stopversion
# \startXMLdata \stopXMLdata
# \startXMLignore \stopXMLignore
# \startXMLmapping \stopXMLmapping
\stretched{text}
# \strut
# \strutdepth
# \strutheight
# \struttedbox
\sub[references]
\subject[references]{text}
\subsection[references]{text}
\subsubject[references]{text}
\subsubsection[references]{text}
\subsubsubject[references]{text}
\switchtobodyfont[font settings]
\switchtorawfont[name]
\sym{text}
\symbol[name][name

[NTG-context] white around descriptions

2007-06-30 Thread Hans van der Meer

I find a get a lot of whitespace around my defined descriptions.
Setting
\setupdescriptions[\c!before=,\c!inbetween=,\c!after=]
does not much help.
Is there something else that can be done. Preferably without  
resorting to wild guesses like before=\godown[-10pt] or the like.

Or is there something else I fail to see.
A sample of the code involved(don't mind the \@@exm.. parameters,  
they are defined elsewhere, annotationtext is a token register):


\definedescription[annotationblock][margin=no,location=top,width=broad,%
before=,inbetween=,after=\strut,%
headstyle=\@@exmintrostyle,style=\@@exmstyle,%
text=\placeannotationstart]
\def\annotation#1\par{\global\annotationtext={#1}}%
\long\def\startannotation#1\stopannotation{\global\annotationtext={#1}}%
%...
% placing the annotation indicator in the annotationblock description
\def\placeannotationstart{% no white above and below rule
\vboxinsideframedtext{%
\setuptextrules[style=\@@exmintrostyle]%
\textrule{\WWord{\Note

Hans van der Meer


___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] textrules

2006-10-21 Thread Thomas A. Schmitz
On Oct 20, 2006, at 1:32 AM, Aditya Mahajan wrote:

 \textrule[top] does

 before
 --- (rule)
 inbetween

 \textrule[bottom] does

 inbetween
 --
 after

 \textrule with no argumet is equal to \textrule[bottom]

 There is a \domiddletextrule that does

 inbetween
 
 inbetween

 but this is not interfaced with \textrule. It only becomes active
 inside a \starttextrule.

 \starttextrule{whatever}
 \input knuth
 \textrule
 \input knuth
 \stoptextrule


 To use this, you can define your own rule as

 \def\midtextrule{\dosinglegroupempty\domiddletextrule}

 \setuptextrules[inbetween={\blank[big]}]

 And midtextrule will use inbetween on both side.

 Hans, does it make sense to add this to core-rul?

 \def\complextextrule[#1]%
{\processaction
   [#1]
   [  \v!top=\let\next\dotoptextrule,
  \v!bottom=\let\next\dobottomtextrule,
  middle=\let\next\domiddletextrule, %--- Added
\s!default=\let\next\dobottomtextrule,
\s!unknown=\let\next\dobottomtextrule]%
 \dosinglegroupempty\next}


 Aditya

Aditya,

thanks for this in-depth explanation! One mystery solved! I have now  
tweaked my output so it looks the way it should.

Best

Thomas

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


Re: [NTG-context] textrules

2006-10-20 Thread Hans Hagen
Aditya Mahajan wrote:
 On Thu, 19 Oct 2006, Thomas A. Schmitz wrote:

   
 On Oct 19, 2006, at 5:04 PM, Peter Rolf wrote:

 
 Hi Thomas,


   
 add

 \showskips

 to your source (better a small one). I just tested a bit (between my
 current mp examples) and 'inbetween={\blank[2*big]}' and
 'after={\blank[2*big]}' should do the job. If you dare, ask Hans about
 the meaning of 'before' ;)


 Greetings, Peter

   
 Thanks Peter,

 that was very helpful. I still had to tweak a bit, but by combining
 inbetween and after, I got an acceptable result. So the mystery
 thickens: what is before? :-)
 


 \textrule[top] does

 before
 --- (rule)
 inbetween

 \textrule[bottom] does

 inbetween
 --
 after

 \textrule with no argumet is equal to \textrule[bottom]

 There is a \domiddletextrule that does

 inbetween
 
 inbetween

 but this is not interfaced with \textrule. It only becomes active 
 inside a \starttextrule.

 \starttextrule{whatever}
 \input knuth
 \textrule
 \input knuth
 \stoptextrule


 To use this, you can define your own rule as

 \def\midtextrule{\dosinglegroupempty\domiddletextrule}

 \setuptextrules[inbetween={\blank[big]}]

 And midtextrule will use inbetween on both side.

 Hans, does it make sense to add this to core-rul?

 \def\complextextrule[#1]%
{\processaction
   [#1]
   [  \v!top=\let\next\dotoptextrule,
  \v!bottom=\let\next\dobottomtextrule,
  middle=\let\next\domiddletextrule, %--- Added
   
\v!middle -)

added
\s!default=\let\next\dobottomtextrule,
\s!unknown=\let\next\dobottomtextrule]%
 \dosinglegroupempty\next}


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


-- 

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

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


[NTG-context] textrules

2006-10-19 Thread Thomas A. Schmitz
Hi all, 

I want two paragraphs separated by a rule which has the same distance to
the preceding and the following line (yes, I know that this is fuzzy,
it's just the optical impression that counts). I can't get my head
around the \setuptextrules command, which should allow to do this. I
tried this:


\def\smallblank{\blank[line]}
\def\bigblank{\blank[2*line]}

\setuptextrules[inbetween=\bigblank,
before=\bigblank
]

but I realize that the before, after, and inbetween keywords either
don't do what I want or plain do nothing. Could somebody explain what
their expected behavior is (and if I should use a different approach
than textrule?).

Thanks

Thomas

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


Re: [NTG-context] textrules

2006-10-19 Thread Peter Rolf
Hi Thomas,

Thomas A. Schmitz wrote:
 Hi all, 
 
 I want two paragraphs separated by a rule which has the same distance to
 the preceding and the following line (yes, I know that this is fuzzy,
 it's just the optical impression that counts). I can't get my head
 around the \setuptextrules command, which should allow to do this. I
 tried this:
 
 
 \def\smallblank{\blank[line]}
 \def\bigblank{\blank[2*line]}
 
 \setuptextrules[inbetween=\bigblank,
 before=\bigblank
 ]
 
 but I realize that the before, after, and inbetween keywords either
 don't do what I want or plain do nothing. Could somebody explain what
 their expected behavior is (and if I should use a different approach
 than textrule?).

add

\showskips

to your source (better a small one). I just tested a bit (between my
current mp examples) and 'inbetween={\blank[2*big]}' and
'after={\blank[2*big]}' should do the job. If you dare, ask Hans about
the meaning of 'before' ;)


Greetings, Peter

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

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


Re: [NTG-context] textrules

2006-10-19 Thread Aditya Mahajan
On Thu, 19 Oct 2006, Thomas A. Schmitz wrote:


 On Oct 19, 2006, at 5:04 PM, Peter Rolf wrote:

 Hi Thomas,



 add

 \showskips

 to your source (better a small one). I just tested a bit (between my
 current mp examples) and 'inbetween={\blank[2*big]}' and
 'after={\blank[2*big]}' should do the job. If you dare, ask Hans about
 the meaning of 'before' ;)


 Greetings, Peter


 Thanks Peter,

 that was very helpful. I still had to tweak a bit, but by combining
 inbetween and after, I got an acceptable result. So the mystery
 thickens: what is before? :-)


\textrule[top] does

before
--- (rule)
inbetween

\textrule[bottom] does

inbetween
--
after

\textrule with no argumet is equal to \textrule[bottom]

There is a \domiddletextrule that does

inbetween

inbetween

but this is not interfaced with \textrule. It only becomes active 
inside a \starttextrule.

\starttextrule{whatever}
\input knuth
\textrule
\input knuth
\stoptextrule


To use this, you can define your own rule as

\def\midtextrule{\dosinglegroupempty\domiddletextrule}

\setuptextrules[inbetween={\blank[big]}]

And midtextrule will use inbetween on both side.

Hans, does it make sense to add this to core-rul?

\def\complextextrule[#1]%
   {\processaction
  [#1]
  [  \v!top=\let\next\dotoptextrule,
 \v!bottom=\let\next\dobottomtextrule,
 middle=\let\next\domiddletextrule, %--- Added
   \s!default=\let\next\dobottomtextrule,
   \s!unknown=\let\next\dobottomtextrule]%
\dosinglegroupempty\next}


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


[NTG-context] setupthinrules

2006-01-23 Thread Hans van der Meer

Doing thinrules one can place a number of them.
However the interlinespace seems fixed to whatever has been chosen  
for small, medium, big.
I looked into the code but could not find a more flexible mechanism,  
as for example

interlinedistance=dimension

Trying to get the rules close to one another I tried
\setupthinrules[height=2pt,depth=0pt,interlinespace=medium]
\thinrule\godown[1pt]\thinrule
But the natural height of the lines then interfers. Setting \godown 
[negative amount] will work, of course, but seems unnatural to me.
At least I feel it condems me to trial and error between the rule  
dimensions and the amount of backspace.


I therefore suggest making the interlinespace accessible as a  
distance settable by the user and being the separation between the  
bottom of the upper and the top of the lowerline in the case of  
\thinrules[n=2].


By the way, doesn't that give thinrules then the same option as in  
setuptextrules[distance=dimension]?


yours sincerely,
dr. H. van der Meer



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


RE: [NTG-context] How can I minimize the vertical space taken bya \textrule

2005-10-31 Thread Nicolas Grilly


Hello,

I agree with the idea that documentation of ConTeXt's commands and
parameters is rather incomplete.

I'm wondering if it's possible to have a documentation system like Java's
Javadoc. We can put comments just before commands definitions and use a
little preprocessor written in Perl or Python that parse TeX files in order
to build a ConTeXt documentation like the manual titled ConTeXt commands.

I'm looking forward your opinion about this.

Nicolas

-Message d'origine-
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la
part de Gerben Wierda
Envoyé : vendredi 28 octobre 2005 00:06
À : mailing list for ConTeXt users
Objet : Re: [NTG-context] How can I minimize the vertical space taken bya
\textrule



On Oct 27, 2005, at 21:00, Peter Rolf wrote:

 I already had

 \setuptextrules
 [before=,after=,inbetween=]

 but that does not work. It seems that inside my paragraph 
 environment, the settings made outside it are ignored. I also do not  
 have my \setupinterlinespace[medium] there (see other thread). Looks  
 like a startstopparagraph problem to me.

 I've tested it without an environment, so maybe you are right.
 Have you tried to add some setups (\setuptexrules,..) to

 \setupparagraphs[...][...][before=??? or command=???]

I had tried about everything I could think of. That's the one big problem
with ConTeXt, it's most of the tim ea matter of trial and error and a
difficult process of trial and error even. Documentation often does only
mentions the existence of something without an explanation (arguments to
commands are seldomly adequately explained). I have been fighting with
layout parameters yesterday for a document I needed to keep within one page.

 I'm sure there is a (context-)way (but I have not used this command 
 'til today).

Someone should fund Hans for writing true documentation.

G

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





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


Re: [NTG-context] How can I minimize the vertical space taken by a \textrule

2005-10-27 Thread Peter Rolf
Gerben Wierda wrote:
 I have a after={\textrule} in my \setupparagraphs but it takes too much
 space for my purpose. What can I do about that?
 
\setuptextrules[
  before=,
  after=, % {\blank[small]}
  ]

Peter

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

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


Re: [NTG-context] How can I minimize the vertical space taken by a \textrule

2005-10-27 Thread Gerben Wierda

On 27 Oct 2005, at 16:02, Peter Rolf wrote:


Gerben Wierda wrote:

I have a after={\textrule} in my \setupparagraphs but it takes too  
much

space for my purpose. What can I do about that?



\setuptextrules[
  before=,
  after=, % {\blank[small]}
  ]


I already had

\setuptextrules
[before=,after=,inbetween=]

but that does not work. It seems that inside my paragraph  
environment, the settings made outside it are ignored. I also do not  
have my \setupinterlinespace[medium] there (see other thread). Looks  
like a startstopparagraph problem to me.


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


Re: [NTG-context] How can I minimize the vertical space taken by a \textrule

2005-10-27 Thread Peter Rolf
Gerben Wierda wrote:
 On 27 Oct 2005, at 16:02, Peter Rolf wrote:
 
 Gerben Wierda wrote:

 I have a after={\textrule} in my \setupparagraphs but it takes too  much
 space for my purpose. What can I do about that?


 \setuptextrules[
   before=,
   after=, % {\blank[small]}
   ]
 
 
 I already had
 
 \setuptextrules
 [before=,after=,inbetween=]
 
 but that does not work. It seems that inside my paragraph  environment,
 the settings made outside it are ignored. I also do not  have my
 \setupinterlinespace[medium] there (see other thread). Looks  like a
 startstopparagraph problem to me.

I've tested it without an environment, so maybe you are right.
Have you tried to add some setups (\setuptexrules,..) to

\setupparagraphs[...][...][before=??? or command=???]

I'm sure there is a (context-)way (but I have not used this command 'til
today).

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

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


Re: [NTG-context] How can I minimize the vertical space taken by a \textrule

2005-10-27 Thread Gerben Wierda

On Oct 27, 2005, at 21:00, Peter Rolf wrote:


I already had

\setuptextrules
[before=,after=,inbetween=]

but that does not work. It seems that inside my paragraph  
environment,

the settings made outside it are ignored. I also do not  have my
\setupinterlinespace[medium] there (see other thread). Looks  like a
startstopparagraph problem to me.


I've tested it without an environment, so maybe you are right.
Have you tried to add some setups (\setuptexrules,..) to

\setupparagraphs[...][...][before=??? or command=???]


I had tried about everything I could think of. That's the one big 
problem with ConTeXt, it's most of the tim ea matter of trial and error 
and a difficult process of trial and error even. Documentation often 
does only mentions the existence of something without an explanation 
(arguments to commands are seldomly adequately explained). I have been 
fighting with layout parameters yesterday for a document I needed to 
keep within one page.


I'm sure there is a (context-)way (but I have not used this command 
'til today).


Someone should fund Hans for writing true documentation.

G

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


Re: [NTG-context] line break

2005-07-20 Thread Jörg Hagmann
Some time ago, I inquired about the problem of an unwanted linebreak.  
The linebreak is inserted after an \inothermargin command, if at the  
same time there is a figure occupying the margin and some part of the  
textarea on the opposite side (a type of figure here called  
vignette). When I run the .tex file (see below) on the wiki, I get  
the same result as on my computer.
Could somebody tell me whether there is an abvious mistake in what I  
did or that's the way it is, and nothing can be done (I include the  
complete setuparea, just to be sure).

Thanks a lot, Jörg.


can you make a minimal complete example


\enableregime [il1]
\mainlanguage [de]

\usemodule[greek]
\usemodule[units]

\setuplayout[height=26.5cm,backspace=2cm,topspace=1.7cm,footer=1.2cm]
\setupbodyfont[11pt]
\setuppagenumbering[alternative=doublesided,location=footer]
\setupheader[state=none]

\setuptolerance[tolerant, stretch]
\setupwhitespace[medium]

\setupitemize[headstyle=italic]

\definehead[Bookchapter][chapter]
\setuphead[Bookchapter][page=yes,conversion=Character]

\setuptables[bodyfont=small]

%Figures partially in margin
\definefloat[vignette][figure]
\setupfloat[vignette][leftmargindistance=- 
\outermargintotal,rightmargindistance=- 
\outermargintotal,default={outer,none,low}]

\setupcaption[vignette][number=no]

%Figures digestion_chapter
\setupexternalfigures[directory=./FIGURES/]
\useexternalfigure[fig:acidsecr][di_acidsecr]
\useexternalfigure[fig:di_cascade][di_cascade][width=0.5\textwidth]
\useexternalfigure[fig:di_proteins][di_proteins]
\useexternalfigure[fig:di_carbo][di_carbo][width=\textwidth]
\useexternalfigure[fig:di_lipids][di_lipids]

\setuptextrules[style=\ss]

\showframe

\starttext

\placevignette{}{\externalfigure[di_B12_marg][width=4cm]}
Die Resorption des {\em wasserloeslichen} Vitamins B\low{12} (=  
Cobalamin, s. Formel) faellt aus dem Rahmen: B\low{12} wird nur als  
Komplex mit dem \quotation{Intrinsic Factor}, einem Glycoprotein aus  
den Belegzellen des Magens, {\em im Ileum} aufgenommen (Intrinsic, weil  
der Faktor aus dem Koerper stammt -- dazu passend bezeichnet man  
B\low{12} auch als \quotation{Extrinsic Factor}).\inothermargin{\ssd  
Pa} Vitamin B\low{12} wird von Bakterien synthetisiert und stammt  
ausschliesslich aus tierischer Nahrung; Veganer/innen, die nicht nur  
auf Fleisch, sondern auch auf Eier und Milchprodukte verzichten,  
besitzen einen entsprechend niedrigen Vorrat des Vitamins. Haeufigste  
Ursache fuer die {\em pernizioese Anaemie}, die klassische  
B\low{12}-Mangelkrankheit, ist allerdings nicht eine Fehlernaehrung,  
sondern eine verminderte Resorption im Ileum, entweder weil dessen  
Schleimhaut entzuendet ist (Sprue), oder weil eine erkrankte  
Magenschleimhaut zuwenig Intrinsic Factor produziert.


\stoptext

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


Re: [NTG-context] line break

2005-07-14 Thread Jörg Hagmann

Dear Hans,


works ok here

can you make a minimal complete example


Assuming that means including the code before \starttext:

\enableregime [il1]
\mainlanguage [de]

\usemodule[greek]
\usemodule[units]

\setuplayout[height=26.5cm,backspace=2cm,topspace=1.7cm,footer=1.2cm]
\setupbodyfont[11pt]
\setuppagenumbering[alternative=doublesided,location=footer]
\setupheader[state=none]

\setuptolerance[tolerant, stretch]
\setupwhitespace[medium]

\setupitemize[headstyle=italic]

\definehead[Bookchapter][chapter]
\setuphead[Bookchapter][page=yes,conversion=Character]

\setuptables[bodyfont=small]

%Figures partially in margin
\definefloat[vignette][figure]
\setupfloat[vignette][leftmargindistance=- 
\outermargintotal,rightmargindistance=- 
\outermargintotal,default={outer,none,low}]

\setupcaption[vignette][number=no]

%Figures digestion_chapter
\setupexternalfigures[directory=./FIGURES/]
\useexternalfigure[fig:acidsecr][di_acidsecr]
\useexternalfigure[fig:di_cascade][di_cascade][width=0.5\textwidth]
\useexternalfigure[fig:di_proteins][di_proteins]
\useexternalfigure[fig:di_carbo][di_carbo][width=\textwidth]
\useexternalfigure[fig:di_lipids][di_lipids]

\setuptextrules[style=\ss]

%\showframe

\starttext

\placevignette{}{\externalfigure[di_B12_marg][width=4cm]}
Die Resorption des {\em wasserloeslichen} Vitamins B\low{12} (=  
Cobalamin, s. Formel) faellt aus dem Rahmen: B\low{12} wird nur als  
Komplex mit dem \quotation{Intrinsic Factor}, einem Glycoprotein aus  
den Belegzellen des Magens, {\em im Ileum} aufgenommen (Intrinsic, weil  
der Faktor aus dem Koerper stammt -- dazu passend bezeichnet man  
B\low{12} auch als \quotation{Extrinsic Factor}).\inothermargin{\ssd  
Pa} Vitamin B\low{12} wird von Bakterien synthetisiert und stammt  
ausschliesslich aus tierischer Nahrung; Veganer/innen, die nicht nur  
auf Fleisch, sondern auch auf Eier und Milchprodukte verzichten,  
besitzen einen entsprechend niedrigen Vorrat des Vitamins. Haeufigste  
Ursache fuer die {\em pernizioese Anaemie}, die klassische  
B\low{12}-Mangelkrankheit, ist allerdings nicht eine Fehlernaehrung,  
sondern eine verminderte Resorption im Ileum, entweder weil dessen  
Schleimhaut entzuendet ist (Sprue), oder weil eine erkrankte  
Magenschleimhaut zuwenig Intrinsic Factor produziert.


\stoptext

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