[NTG-context] Define a new command from the command \periods[n]

Alan BRASLAU alan.braslau at cea.fr
Tue Jan 6 11:01:58 CET 2015


On the subject of recipes, Fabrice clearly should have come to the 8th
ConTeXt Meeting that took place on September 8-13, 2014 at Bassange,
Belgium...

;-)

Alan


On Mon, 5 Jan 2015 22:49:39 +0100
Hans Hagen <pragma at wxs.nl> wrote:

> On 1/5/2015 6:58 PM, Fabrice wrote:
> > Hi,
> > How to make the dotted lines "stop" at the edge of the frame?
> >
> >> \definefiller[dots][left=\dontleavehmode,right=\hskip\zeropoint]
> >> \definecolor[H1prime][c=0.50, m=0.00, y=1.00, k=0.00]
> >> \definecolor[H4][c=0.07, m=0.00, y=0.15, k=0.00]
> >> \starttext
> >> \startitemize[n][stopper={.},style=bold]
> >> \placefigure[right,none]{}{
> >> \startframedtext[
> >>     width=6cm,
> >>     frame=on,
> >>     framecolor=H1prime,
> >>     location=middle,
> >>     background=color,
> >>     backgroundcolor=H4]
> >> \switchtobodyfont[10pt]
> >> Ingrédients (pour 4 personnes)
> >> \startitemize[1]
> >> \item \unit{1 kg} de pommes de terre
> >> \item \unit{60 g} de fromage râpé
> >> \item \unit{25 Centiliter} de crème fraîche
> >> \stopitemize
> >> \stopframedtext
> >> }
> >> \item
> >> \filler[dots]
> >>
> >> \filler[dots]
> >>
> >> \filler[dots]
> >>
> >> \filler[dots]
> >>
> >> \stopitemize
> >> \stoptext
> > Best regards,
> > Fabrice
> 
> \definefiller[dots][left=\dontleavehmode,right=\hskip\zeropoint\par]
> 
> \definefloat
>    [recipe]
>    [figure]
> 
> \setupfloat
>    [recipe]
>    [default={right,none}]
> 
> \defineframed
>    [myframed]
>    [width=6cm,
>     foregroundstyle={\switchtobodyfont[10pt]},
>     align={high,flushleft},
>     frame=on,
>     framecolor=red,
>     background=color,
>     backgroundcolor=lightgray]
> 
> \starttext
> 
> \startbuffer
>      Ingrédients (pour 4 personnes)
>      \startitemize[1]
>          \startitem \unit{1 kg} de pommes de terre \stopitem
>          \startitem \unit{60 g} de fromage râpé \stopitem
>          \startitem \unit{25 Centiliter} de crème fraîche \stopitem
>      \stopitemize
> \stopbuffer
> 
> \placerecipe
>    {}
>    {\myframed{\getbuffer}}
> 
> \startitemize[n][stopper={.},style=bold]
>      \startitem
>          \dorecurse{5}{\filler[dots]}
>      \stopitem
> \stopitemize
> 
> \stoptext



More information about the ntg-context mailing list