ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: Define a new command from the command \periods[n]
@ 2015-01-06 11:29 Couvreur Fabrice
  0 siblings, 0 replies; 14+ messages in thread
From: Couvreur Fabrice @ 2015-01-06 11:29 UTC (permalink / raw)
  To: ntg-context

Hi Alan,
 What should I include ?
Fabrice
Envoyé de mon iPad
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Define a new command from the command \periods[n]
  2015-01-19  9:35               ` Hans Hagen
@ 2015-01-19 16:13                 ` Fabrice
  0 siblings, 0 replies; 14+ messages in thread
From: Fabrice @ 2015-01-19 16:13 UTC (permalink / raw)
  To: ntg-context

Hi Hans,
It works perfectly, thank you.
Fabrice
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Define a new command from the command \periods[n]
  2015-01-18 21:01             ` Fabrice
@ 2015-01-19  9:35               ` Hans Hagen
  2015-01-19 16:13                 ` Fabrice
  0 siblings, 1 reply; 14+ messages in thread
From: Hans Hagen @ 2015-01-19  9:35 UTC (permalink / raw)
  To: ntg-context

On 1/18/2015 10:01 PM, Fabrice wrote:
> Hi Hans,
> The size of the float does not center the frame unless I replace by
> \dorecurse{5}{\filler[dots]} by \dorecurse{10}{\filler[dots]}.
> Is there a better way ?
> Thanks,
> Fabrice
>
>> % macros=mkvi
>>
>> \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]
>>
>> \definecolor[Border][c=0.00, m=0.00, y=0.00, k=0.25]
>>
>> \startuniqueMPgraphic{borderline}
>> path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
>> draw p withcolor \MPcolor{Border} dashed evenly withpen pencircle scaled
>> 1.2pt ;
>> \stopuniqueMPgraphic
>>
>> \defineoverlay[borderline][\uniqueMPgraphic{borderline}]
>>
>> \defineframedtext
>>   [Myframed]
>>   [width=0.6\textwidth,
>>    foregroundstyle={\switchtobodyfont[10pt]},
>>    align={high,flushleft},
>>    frame=off,
>>    framecolor=0.625white,
>>    background=borderline,
>>    location=middle,
>>    offset=.5ex]
>>
>> \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
>>
>> \startbuffer
>> \input ward
>> \stopbuffer
>> \startMyframed
>> \getbuffer
>> \stopMyframed
>>
>> \stoptext

\placerecipe
    {}
    {\myframed{\getbuffer}}

\startitemize[n][stopper={.},style=bold]
      \startitem
          \dorecurse{5}{\filler[dots]}
      \stopitem
\stopitemize

\flushsidefloats

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Define a new command from the command \periods[n]
  2015-01-05 21:49           ` Hans Hagen
  2015-01-06 10:01             ` Alan BRASLAU
@ 2015-01-18 21:01             ` Fabrice
  2015-01-19  9:35               ` Hans Hagen
  1 sibling, 1 reply; 14+ messages in thread
From: Fabrice @ 2015-01-18 21:01 UTC (permalink / raw)
  To: ntg-context

Hi Hans,
The size of the float does not center the frame unless I replace by 
\dorecurse{5}{\filler[dots]} by \dorecurse{10}{\filler[dots]}.
Is there a better way ?
Thanks,
Fabrice

> % macros=mkvi
>
> \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]
>
> \definecolor[Border][c=0.00, m=0.00, y=0.00, k=0.25]
>
> \startuniqueMPgraphic{borderline}
> path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
> draw p withcolor \MPcolor{Border} dashed evenly withpen pencircle scaled
> 1.2pt ;
> \stopuniqueMPgraphic
>
> \defineoverlay[borderline][\uniqueMPgraphic{borderline}]
>
> \defineframedtext
>   [Myframed]
>   [width=0.6\textwidth,
>    foregroundstyle={\switchtobodyfont[10pt]},
>    align={high,flushleft},
>    frame=off,
>    framecolor=0.625white,
>    background=borderline,
>    location=middle,
>    offset=.5ex]
>
> \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
>
> \startbuffer
> \input ward
> \stopbuffer
> \startMyframed
> \getbuffer
> \stopMyframed
>
> \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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Define a new command from the command \periods[n]
@ 2015-01-06 11:28 Couvreur Fabrice
  0 siblings, 0 replies; 14+ messages in thread
From: Couvreur Fabrice @ 2015-01-06 11:28 UTC (permalink / raw)
  To: ntg-context

I am impressed !
Best regards,
Fabriçe

Envoyé de mon iPad
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Define a new command from the command \periods[n]
  2015-01-05 21:49           ` Hans Hagen
@ 2015-01-06 10:01             ` Alan BRASLAU
  2015-01-18 21:01             ` Fabrice
  1 sibling, 0 replies; 14+ messages in thread
From: Alan BRASLAU @ 2015-01-06 10:01 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Define a new command from the command \periods[n]
  2015-01-05 17:58         ` Fabrice
@ 2015-01-05 21:49           ` Hans Hagen
  2015-01-06 10:01             ` Alan BRASLAU
  2015-01-18 21:01             ` Fabrice
  0 siblings, 2 replies; 14+ messages in thread
From: Hans Hagen @ 2015-01-05 21:49 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Define a new command from the command \periods[n]
  2014-05-20 18:05       ` Wolfgang Schuster
  2014-05-20 20:48         ` Fabrice
@ 2015-01-05 17:58         ` Fabrice
  2015-01-05 21:49           ` Hans Hagen
  1 sibling, 1 reply; 14+ messages in thread
From: Fabrice @ 2015-01-05 17:58 UTC (permalink / raw)
  To: ntg-context

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Define a new command from the command \periods[n]
  2014-05-20 18:05       ` Wolfgang Schuster
@ 2014-05-20 20:48         ` Fabrice
  2015-01-05 17:58         ` Fabrice
  1 sibling, 0 replies; 14+ messages in thread
From: Fabrice @ 2014-05-20 20:48 UTC (permalink / raw)
  To: ntg-context

Perfect !
thank you,
Fabrice
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Define a new command from the command \periods[n]
  2014-05-20 17:50     ` Fabrice
@ 2014-05-20 18:05       ` Wolfgang Schuster
  2014-05-20 20:48         ` Fabrice
  2015-01-05 17:58         ` Fabrice
  0 siblings, 2 replies; 14+ messages in thread
From: Wolfgang Schuster @ 2014-05-20 18:05 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 20.05.2014 um 19:50 schrieb Fabrice <couvreur.fabrice@wanadoo.fr>:

> Hello,
> @ Luigi @Wolfgang Thanks for your suggestions.
> 
> Since I want to continue my learning ConTeXt, I will use the command \filler[dots].
> Can we do the same thing if there is no text in the beginning ?

You can add “left=\dontleavehmode” to the filler definition:

    \definefiller[dots][left=\dontleavehmode,right=\hskip\zeropoint]

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Define a new command from the command \periods[n]
  2014-05-20 12:46   ` Wolfgang Schuster
@ 2014-05-20 17:50     ` Fabrice
  2014-05-20 18:05       ` Wolfgang Schuster
  0 siblings, 1 reply; 14+ messages in thread
From: Fabrice @ 2014-05-20 17:50 UTC (permalink / raw)
  To: ntg-context

Hello,
@ Luigi @Wolfgang Thanks for your suggestions.

Since I want to continue my learning ConTeXt, I will use the command 
\filler[dots].
Can we do the same thing if there is no text in the beginning ?
Fabrice
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Define a new command from the command \periods[n]
  2014-05-20  8:47 ` luigi scarso
@ 2014-05-20 12:46   ` Wolfgang Schuster
  2014-05-20 17:50     ` Fabrice
  0 siblings, 1 reply; 14+ messages in thread
From: Wolfgang Schuster @ 2014-05-20 12:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1364 bytes --]


Am 20.05.2014 um 10:47 schrieb luigi scarso <luigi.scarso@gmail.com>:

> 
> 
> 
> On Tue, May 20, 2014 at 10:30 AM, Fabrice Couvreur <fabrice1.couvreur@gmail.com> wrote:
> Hi, 
> Is it possible to redefine the command \periods[n] to have a line that goes from the end of the word to the edge of the page without having to play on the number n ? 
> Regards, 
> Fabrice
> 
> \starttext
> \startitemize[a][stopper=),style=bold]
> \item $x\mapsto -x^2+x+1$ : \periods[66]
> \item $x\mapsto 2x^3+4x-7$ : \periods[65]
> \item $x\mapsto x^2-3$ : \periods[70]
> \item $x\mapsto \frac{x^2+x}2$ : \periods[72]
> \item $x\mapsto (x-2)^2$ : \periods[69]
> \stopitemize
> \stoptext
> 
> 
> 
> They are called leaders
> http://tex.stackexchange.com/questions/38423/want-to-fill-line-with-repeating-string
> 
> \showframe
> \starttext
> \startitemize[a][stopper=),style=bold]
> \item $x\mapsto -x^2+x+1$ : \leavevmode\xleaders\hbox{.}\hfill\kern0pt %\periods[66]
> \item $x\mapsto 2x^3+4x-7$ : \periods[65]
> \item $x\mapsto x^2-3$ : \periods[70]
> \item $x\mapsto \frac{x^2+x}2$ : \periods[72]
> \item $x\mapsto (x-2)^2$ : \periods[69]
> \stopitemize
> \stoptext

ConTeXt has a user level interface for leaders which is called \filler.

\definefiller[dots][right=\hskip\zeropoint]

\starttext
text \filler[dots]
\stoptext

Wolfgang

[-- Attachment #1.2: Type: text/html, Size: 3292 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Define a new command from the command \periods[n]
  2014-05-20  8:30 Fabrice Couvreur
@ 2014-05-20  8:47 ` luigi scarso
  2014-05-20 12:46   ` Wolfgang Schuster
  0 siblings, 1 reply; 14+ messages in thread
From: luigi scarso @ 2014-05-20  8:47 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1051 bytes --]

On Tue, May 20, 2014 at 10:30 AM, Fabrice Couvreur <
fabrice1.couvreur@gmail.com> wrote:

> Hi,
> Is it possible to redefine the command \periods[n] to have a line that
> goes from the end of the word to the edge of the page without having to
> play on the number n ?
> Regards,
> Fabrice
>
> \starttext
> \startitemize[a][stopper=),style=bold]
> \item $x\mapsto -x^2+x+1$ : \periods[66]
> \item $x\mapsto 2x^3+4x-7$ : \periods[65]
> \item $x\mapsto x^2-3$ : \periods[70]
> \item $x\mapsto \frac{x^2+x}2$ : \periods[72]
> \item $x\mapsto (x-2)^2$ : \periods[69]
> \stopitemize
> \stoptext
>



They are called leaders
http://tex.stackexchange.com/questions/38423/want-to-fill-line-with-repeating-string

\showframe
\starttext
\startitemize[a][stopper=),style=bold]
\item $x\mapsto -x^2+x+1$ : \leavevmode\xleaders\hbox{.}\hfill\kern0pt
%\periods[66]
\item $x\mapsto 2x^3+4x-7$ : \periods[65]
\item $x\mapsto x^2-3$ : \periods[70]
\item $x\mapsto \frac{x^2+x}2$ : \periods[72]
\item $x\mapsto (x-2)^2$ : \periods[69]
\stopitemize
\stoptext


-- 
luigi

[-- Attachment #1.2: Type: text/html, Size: 2625 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Define a new command from the command \periods[n]
@ 2014-05-20  8:30 Fabrice Couvreur
  2014-05-20  8:47 ` luigi scarso
  0 siblings, 1 reply; 14+ messages in thread
From: Fabrice Couvreur @ 2014-05-20  8:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 468 bytes --]

Hi,
Is it possible to redefine the command \periods[n] to have a line that goes
from the end of the word to the edge of the page without having to play on
the number n ?
Regards,
Fabrice

\starttext
\startitemize[a][stopper=),style=bold]
\item $x\mapsto -x^2+x+1$ : \periods[66]
\item $x\mapsto 2x^3+4x-7$ : \periods[65]
\item $x\mapsto x^2-3$ : \periods[70]
\item $x\mapsto \frac{x^2+x}2$ : \periods[72]
\item $x\mapsto (x-2)^2$ : \periods[69]
\stopitemize
\stoptext

[-- Attachment #1.2: Type: text/html, Size: 1344 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2015-01-19 16:13 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-06 11:29 Define a new command from the command \periods[n] Couvreur Fabrice
  -- strict thread matches above, loose matches on Subject: below --
2015-01-06 11:28 Couvreur Fabrice
2014-05-20  8:30 Fabrice Couvreur
2014-05-20  8:47 ` luigi scarso
2014-05-20 12:46   ` Wolfgang Schuster
2014-05-20 17:50     ` Fabrice
2014-05-20 18:05       ` Wolfgang Schuster
2014-05-20 20:48         ` Fabrice
2015-01-05 17:58         ` Fabrice
2015-01-05 21:49           ` Hans Hagen
2015-01-06 10:01             ` Alan BRASLAU
2015-01-18 21:01             ` Fabrice
2015-01-19  9:35               ` Hans Hagen
2015-01-19 16:13                 ` Fabrice

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).