ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Change the dots of the macro \periods[n]
@ 2015-03-06 17:42 Fabrice Couvreur
  2015-03-06 19:01 ` Wolfgang Schuster
  2015-03-06 19:02 ` Hans Hagen
  0 siblings, 2 replies; 6+ messages in thread
From: Fabrice Couvreur @ 2015-03-06 17:42 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Hi,
Is it possible to change the shape of the dots of  macro \periods[n] to be like
the dots of  macro \definefiller[dots][left=\dontleavehmode, right=\hskip\
ZeroPoint\par] ?
Best regards,
Fabrice

[-- Attachment #1.2: Type: text/html, Size: 864 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] 6+ messages in thread

* Re: Change the dots of the macro \periods[n]
  2015-03-06 17:42 Change the dots of the macro \periods[n] Fabrice Couvreur
@ 2015-03-06 19:01 ` Wolfgang Schuster
  2015-03-06 19:02 ` Hans Hagen
  1 sibling, 0 replies; 6+ messages in thread
From: Wolfgang Schuster @ 2015-03-06 19:01 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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


> Am 06.03.2015 um 18:42 schrieb Fabrice Couvreur <fabrice1.couvreur@gmail.com>:
> 
> 
> Hi,
> Is it possible to change the shape of the dots of  macro \periods[n] to be like the dots of  macro \definefiller[dots][left=\dontleavehmode, right=\hskip\ZeroPoint\par] ?


You can change the width of each period with the \periodswidth commands.

\starttext

\periods \quad {\def\periodswidth{0.25em}\periods}

\periods \quad {\def\periodswidth{0.50em}\periods}

\periods \quad {\def\periodswidth{0.75em}\periods}

\periods \quad {\def\periodswidth{1.00em}\periods}

\stoptext

Wolfgang


[-- Attachment #1.2: Type: text/html, Size: 2105 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] 6+ messages in thread

* Re: Change the dots of the macro \periods[n]
  2015-03-06 17:42 Change the dots of the macro \periods[n] Fabrice Couvreur
  2015-03-06 19:01 ` Wolfgang Schuster
@ 2015-03-06 19:02 ` Hans Hagen
  2015-03-06 19:18   ` Wolfgang Schuster
  1 sibling, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2015-03-06 19:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 3/6/2015 6:42 PM, Fabrice Couvreur wrote:
>
> Hi,
> Is it possible to change the shape of the dots of macro \periods[n] to
> be like the dots of macro \definefiller[dots][left=\dontleavehmode,
> right=\hskip\ZeroPoint\par] ?

% in cont-new.mkiv :

\unprotect

\def\periodsymbol  {.}

\unexpanded\def\enco_periods[#1]%
   {\dontleavehmode
    \hbox\bgroup
    \enco_periods_indeed[#1,\periodsymbol,]}

\unexpanded\def\enco_periods_indeed[#1,#2,#3]%
   {\setbox\scratchbox\hbox to \periodswidth{\hss#2\hss}%
    \dorecurse{\iffirstargument#1\else\periodsdefault\fi}{\copy\scratchbox}%
    \egroup}

\protect

test:

\starttext
     \startlines
         x\periods x
         x\periods[10]x
         x\periods[10,{,}]x
         x\periods[10,{!}]x
     \stoplines
\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] 6+ messages in thread

* Re: Change the dots of the macro \periods[n]
  2015-03-06 19:02 ` Hans Hagen
@ 2015-03-06 19:18   ` Wolfgang Schuster
  2015-03-06 19:30     ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Schuster @ 2015-03-06 19:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users


> Am 06.03.2015 um 20:02 schrieb Hans Hagen <pragma@wxs.nl>:
> 
> On 3/6/2015 6:42 PM, Fabrice Couvreur wrote:
>> 
>> Hi,
>> Is it possible to change the shape of the dots of macro \periods[n] to
>> be like the dots of macro \definefiller[dots][left=\dontleavehmode,
>> right=\hskip\ZeroPoint\par] ?
> 
> % in cont-new.mkiv :
> 
> \unprotect
> 
> \def\periodsymbol  {.}
> 
> \unexpanded\def\enco_periods[#1]%
>  {\dontleavehmode
>   \hbox\bgroup
>   \enco_periods_indeed[#1,\periodsymbol,]}
> 
> \unexpanded\def\enco_periods_indeed[#1,#2,#3]%
>  {\setbox\scratchbox\hbox to \periodswidth{\hss#2\hss}%
>   \dorecurse{\iffirstargument#1\else\periodsdefault\fi}{\copy\scratchbox}%
>   \egroup}
> 
> \protect
> 
> test:
> 
> \starttext
>    \startlines
>        x\periods x
>        x\periods[10]x
>        x\periods[10,{,}]x
>        x\periods[10,{!}]x
>    \stoplines
> \stoptext

Why the weird syntax, something like \periods[n=10,symbol=!] would fit better.

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] 6+ messages in thread

* Re: Change the dots of the macro \periods[n]
  2015-03-06 19:18   ` Wolfgang Schuster
@ 2015-03-06 19:30     ` Hans Hagen
  2015-03-07  8:48       ` Fabrice
  0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2015-03-06 19:30 UTC (permalink / raw)
  To: ntg-context

On 3/6/2015 8:18 PM, Wolfgang Schuster wrote:
>
>> Am 06.03.2015 um 20:02 schrieb Hans Hagen <pragma@wxs.nl>:
>>
>> On 3/6/2015 6:42 PM, Fabrice Couvreur wrote:
>>>
>>> Hi,
>>> Is it possible to change the shape of the dots of macro \periods[n] to
>>> be like the dots of macro \definefiller[dots][left=\dontleavehmode,
>>> right=\hskip\ZeroPoint\par] ?
>>
>> % in cont-new.mkiv :
>>
>> \unprotect
>>
>> \def\periodsymbol  {.}
>>
>> \unexpanded\def\enco_periods[#1]%
>>   {\dontleavehmode
>>    \hbox\bgroup
>>    \enco_periods_indeed[#1,\periodsymbol,]}
>>
>> \unexpanded\def\enco_periods_indeed[#1,#2,#3]%
>>   {\setbox\scratchbox\hbox to \periodswidth{\hss#2\hss}%
>>    \dorecurse{\iffirstargument#1\else\periodsdefault\fi}{\copy\scratchbox}%
>>    \egroup}
>>
>> \protect
>>
>> test:
>>
>> \starttext
>>     \startlines
>>         x\periods x
>>         x\periods[10]x
>>         x\periods[10,{,}]x
>>         x\periods[10,{!}]x
>>     \stoplines
>> \stoptext
>
> Why the weird syntax, something like \periods[n=10,symbol=!] would fit better.

ok, i'll make a nice one then

Hans



-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

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

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

* Re: Change the dots of the macro \periods[n]
  2015-03-06 19:30     ` Hans Hagen
@ 2015-03-07  8:48       ` Fabrice
  0 siblings, 0 replies; 6+ messages in thread
From: Fabrice @ 2015-03-07  8:48 UTC (permalink / raw)
  To: ntg-context

Hi Hans and Wolfgang,
Thank you for your suggestions. It meets my expectations, but I'll try 
to understand the codes later!
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] 6+ messages in thread

end of thread, other threads:[~2015-03-07  8:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-06 17:42 Change the dots of the macro \periods[n] Fabrice Couvreur
2015-03-06 19:01 ` Wolfgang Schuster
2015-03-06 19:02 ` Hans Hagen
2015-03-06 19:18   ` Wolfgang Schuster
2015-03-06 19:30     ` Hans Hagen
2015-03-07  8:48       ` 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).