ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Keith J. Schultz" <keithjschultz@web.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: need defaults for \definehighlight
Date: Sun, 8 Feb 2015 13:56:54 +0100	[thread overview]
Message-ID: <74705FB5-2212-43D9-9DC4-462E9CCCC91C@web.de> (raw)
In-Reply-To: <54D60AB4.5020904@wxs.nl>


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

Hi Hans, Irdis, All,

It might sound like splitting hairs, but I find we should be careful how we call this beast!

Basically, a highlight allows one so setup a font style and color to be applied
to it contents.

The problem is that is this REALLY a Highlight! 

A style and color is applied so, what we have is a use color and style!

would it not be better to call it
definecharstyle
or
definetextstyle

For compatibility we could use keep the definehighlight as a synonym.

As to setting up defaults, the question is their a generic usage of such ways of
for so called highlights. These are, basically, by those that:
1) like this much fluff
2) idiosyncratic terminology

1) is supposed to avoided! And basically makes ConTeXt look like Word!

The use of another way of defining a command for the standard font styles
is proof enough for 2. Also, not everybody would want the predefined styles and colors
so they will have to be changed in the setuphighlight anyway!

The use of such a command is convient, but we should think about the nomenclature!
The nomenclature should reflect what it does. We can have synonyms to satisfy the
semantic usage of it!

regards
	Keith


> Am 07.02.2015 um 13:53 schrieb Hans Hagen <pragma@wxs.nl>:
> 
[snip, snip]

> Anyway, the problem with predefined highlights is that we won't overload existing commands by default, so redefining is not an option in the core.
> 
> An option is to provide a set like:
> 
> \unprotect
> 
> \definehighlight[\v!italic    ][\c!command=\v!no,\c!style=\v!italic]
> \definehighlight[\v!bold      ][\c!command=\v!no,\c!style=\v!bold]
> \definehighlight[\v!bolditalic][\c!command=\v!no,\c!style=\v!bolditalic]
> \definehighlight[\v!mono]      [\c!command=\v!no,\c!style=\v!mono]
> \definehighlight[\v!monobold]  [\c!command=\v!no,\c!style=\v!monobold]
> 
> \definehighlight[important]    [\c!command=\v!no,\c!style=\v!bold]
> \definehighlight[unimportant]  [\c!command=\v!no,\c!color=darkgray]
> \definehighlight[warning] [\c!command=\v!no,\c!style=\v!bold,\c!color=darkblue]
> \definehighlight[error] [\c!command=\v!no,\c!style=\v!bold,\c!color=darkred]
> 
> \protect
> 
> \starttext
> 
>    \highlight[italic]     {italic}
>    \highlight[bolditalic] {bolditalic}
>    \highlight[bold]       {bold}
>    \highlight[mono]       {mono}
>    \highlight[monobold]   {monobold}
>    \highlight[important]  {important}
>    \highlight[unimportant]{unimportant}
>    \highlight[warning]    {warning}
>    \highlight[error]      {error}
> 
> \stoptext
> 
> Keep in mind that coding in terms of 'emph' is rather useless with respect to highlights. Highlights relate to structure (while \it doesn't) so you need tags like 'important' and so.


[-- Attachment #1.2: Type: text/html, Size: 25444 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
___________________________________________________________________________________

  parent reply	other threads:[~2015-02-08 12:56 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-07  1:07 Idris Samawi Hamid ادريس سماوي حامد
2015-02-07 12:53 ` Hans Hagen
2015-02-07 19:33   ` Idris Samawi Hamid ادريس سماوي حامد
2015-02-07 19:34     ` Idris Samawi Hamid ادريس سماوي حامد
2015-02-08 12:56   ` Keith J. Schultz [this message]
2015-02-08 14:01     ` Hans Hagen
2015-02-08 14:40       ` Idris Samawi Hamid ادريس سماوي حامد
2015-02-08 17:38         ` Hans Hagen
2015-02-08 19:08           ` Idris Samawi Hamid ادريس سماوي حامد
2015-02-08 21:51             ` Hans Hagen
2015-02-08 22:42               ` Idris Samawi Hamid ادريس سماوي حامد
2015-02-09 13:34               ` Keith Schultz
2015-02-09 13:46                 ` Wolfgang Schuster
2015-02-08 19:17         ` Wolfgang Schuster
2015-02-08 19:28           ` Idris Samawi Hamid ادريس سماوي حامد
2015-02-08 23:42       ` Keith Schultz
2015-02-09  8:03         ` Hans Hagen
2015-02-08 14:24     ` Idris Samawi Hamid ادريس سماوي حامد
2015-02-08 18:51     ` Wolfgang Schuster
2015-02-09  8:46     ` Alan BRASLAU

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=74705FB5-2212-43D9-9DC4-462E9CCCC91C@web.de \
    --to=keithjschultz@web.de \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).