ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* URLs in color including underbar
@ 2015-05-17 18:07 Alexander Shukaev
  2015-05-18  9:32 ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander Shukaev @ 2015-05-17 18:07 UTC (permalink / raw)
  To: ntg-context


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

Hello,

So far I came up with the following solution:

\setupurl[
  style={\mono\underbar},
  color={blue},
]

\def
\url{%
  \dosingleargument
  \dourl
}

\def
\dourl[#1]{%
  \begingroup
    \setupbar[%
      style={\urlparameter{style}},
      color={\urlparameter{color}},
    ]%
    \from[#1]%
  \endgroup
}

Is there a more natural way to make URLs appear in blue color including
underbar?  Thanks.

Kind regards,
Alexander

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

* Re: URLs in color including underbar
  2015-05-17 18:07 URLs in color including underbar Alexander Shukaev
@ 2015-05-18  9:32 ` Hans Hagen
  2015-05-18 14:49   ` Alexander Shukaev
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2015-05-18  9:32 UTC (permalink / raw)
  To: ntg-context

On 5/17/2015 8:07 PM, Alexander Shukaev wrote:
> Hello,
>
> So far I came up with the following solution:
>
> \setupurl[
>    style={\mono\underbar},
>    color={blue},
> ]
>
> \def
> \url{%
>    \dosingleargument
>    \dourl
> }
>
> \def
> \dourl[#1]{%
>    \begingroup
>      \setupbar[%
>        style={\urlparameter{style}},
>        color={\urlparameter{color}},
>      ]%
>      \from[#1]%
>    \endgroup
> }
>
> Is there a more natural way to make URLs appear in blue color including

maybe just:

\definebar[urlbar][underbar]

\setupurl[style=\mono\urlbar,color=blue]



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

* Re: URLs in color including underbar
  2015-05-18  9:32 ` Hans Hagen
@ 2015-05-18 14:49   ` Alexander Shukaev
  0 siblings, 0 replies; 3+ messages in thread
From: Alexander Shukaev @ 2015-05-18 14:49 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

>
> ​​
> \definebar[urlbar][underbar]
>
> \setupurl[style=\mono\urlbar,color=blue]
>

​Interesting, thank you, Hans, it indeed works as expected.  Could you
supplement this with some explanations, i.e. why this one works compared to
using plain `underbar'?​  I assume that the `color' key is overridden
by `setupurl' in the case of `urlbar' but not in the case of `underbar',
why?

Regards,
Alexander

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

end of thread, other threads:[~2015-05-18 14:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-17 18:07 URLs in color including underbar Alexander Shukaev
2015-05-18  9:32 ` Hans Hagen
2015-05-18 14:49   ` Alexander Shukaev

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).