need defaults for \definehighlight
Dear gang, Thinking of present and future documents (maximum flexibility in converting from format to format), I'm moving from the standard {\em text} to something like \definehighlight[emph][style=italic]. Here's the question: Does ConTeXt contain some default highlights that need not be defined by the user? It seems that some of the basic ones should have presets. This helps with at least two things: 1. Document portability (independent of a given style or env file); 2. Editor setups. As an example of the latter: If I select text in Notepad++ I can do Right-Click -> ConTeXt Typography -> Emphasize where Emphasize is defined as {\em } Right now, whenever I release an update to the N++ editor package (now years overdue, I know) any user can depend upon this right-click feature. But if I define \definehighlight[emph][style=italic] and set up the editor to implement it; then there is no guarantee that other users will use the same definition. As issues of conversion from one format to another become ever more urgent and common, it makes more sense to use tagged and exportable versions of the common typographical functions and to standardize a few. So my suggestion is that we develop a set of default or "official" highlights for commonly used cases, with a list made available somewhere such as the wiki. Perhaps redefine some existing 1-parameter typography commands (\emph, \bold, \scap, etc.) as highlights. Some of these should be kept short (such as \emph, \bold) given their very frequent use. Best wishes Idris -- Idris Samawi Hamid Professor of Philosophy Colorado State University Fort Collins, CO 80523
On 2/7/2015 2:07 AM, Idris Samawi Hamid ادريس سماوي حامد wrote:
Dear gang,
Thinking of present and future documents (maximum flexibility in converting from format to format), I'm moving from the standard {\em text} to something like \definehighlight[emph][style=italic]. Here's the question:
Does ConTeXt contain some default highlights that need not be defined by the user? It seems that some of the basic ones should have presets. This helps with at least two things:
1. Document portability (independent of a given style or env file); 2. Editor setups.
As an example of the latter: If I select text in Notepad++ I can do
Right-Click -> ConTeXt Typography -> Emphasize
where Emphasize is defined as {\em }
Right now, whenever I release an update to the N++ editor package (now years overdue, I know) any user can depend upon this right-click feature. But if I define
\definehighlight[emph][style=italic]
and set up the editor to implement it; then there is no guarantee that other users will use the same definition.
As issues of conversion from one format to another become ever more urgent and common, it makes more sense to use tagged and exportable versions of the common typographical functions and to standardize a few. So my suggestion is that we develop a set of default or "official" highlights for commonly used cases, with a list made available somewhere such as the wiki. Perhaps redefine some existing 1-parameter typography commands (\emph, \bold, \scap, etc.) as highlights. Some of these should be kept short (such as \emph, \bold) given their very frequent use.
Well, if you talk about automatic injection of commands 'short' is irrelevant and also likely to clash. 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. Also, by defining highlights with the command = no option will provide a bit more protection. But we need to agree on some kind of reasonable set first. 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 -----------------------------------------------------------------
Hi Hans,
On Sat, 07 Feb 2015 05:53:08 -0700, Hans Hagen
Well, if you talk about automatic injection of commands 'short' is irrelevant and also likely to clash.
Ok, fair enough. There is also function auto-completion...
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.
Yes, but when precisely used emphasis is just as structural as important. Put another way, important is a species of the genus emphasis. But instead of, say, 'lightemphasis', something like 'emphasis' should not cause confusion. Or we could do 'important' and 'veryimportant'. The defaults could be something like \definehighlight[important] [\c!command=\v!no,\c!style=\v!italic] \definehighlight[veryimportant] [\c!command=\v!no,\c!style=\v!bold] \definehighlight[extraimportant] [\c!command=\v!no,\c!style=\v!bolditalic]
Also, by defining highlights with the command = no option will provide a bit more protection.
Could you explain? Or give an example?
But we need to agree on some kind of reasonable set first.
Ok, take a look at this iteration: =============== \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[\v!smallcaps] [\c!command=\v!no,\c!style=\v!smallcaps] \definehighlight[important] [\c!command=\v!no,\c!style=\v!italic] \definehighlight[veryimportant] [\c!command=\v!no,\c!style=\v!bold] \definehighlight[extraimportant] [\c!command=\v!no,\c!style=\v!smallcaps] % \definehighlight[extraimportant] [\c!command=\v!no,\c!style=\v!bolditalic] % smallcaps is a better default for extraimportant than bolditalic \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] \definehighlight[emphasis] [\c!command=\v!no,\c!style=\v!italic] % Does Hans prefer slanted here for default?? \definehighlight[booktitle] [\c!command=\v!no,\c!style=\v!italic] \definehighlight[abbreviation] [\c!command=\v!no,\c!style=\v!smallcaps] \definehighlight[propername] [\c!command=\v!no,\c!style=\v!smallcaps] %% Use-mention distinction % \definehighlight[concept] [\c!command=\v!no,\c!command=\v!\quotation] % doesn't work! % \definehighlight[expression] [\c!command=\v!no,\c!command=\v!\quote] % doesn't work! \definehighlight[typing] [\c!command=\v!no,\c!style=\v!mono] \protect \starttext \highlight[italic] {italic} \highlight[bolditalic] {bolditalic} \highlight[bold] {bold} \highlight[mono] {mono} \highlight[monobold] {monobold} \highlight[smallcaps] {smallcaps} {\sc smallcaps} % this works \smallcaps{smallcaps} % this command doesn't work!! \highlight[important] {important} \highlight[veryimportant] {very important} \highlight[extraimportant] {extra important} \highlight[unimportant] {unimportant} \highlight[warning] {warning} \highlight[error] {error} \highlight[emphasis] {emphasis} \highlight[abbreviation] {abbreviation} \highlight[booktitle] {Book Title} \highlight[propername] {Proper Name} % \highlight[concept] {concept} % \highlight[expression] {expression} \highlight[typing] {typing} \stoptext =============== Note the comments on smallcaps, quotation, quote, concept, and expression. These need to be fixed somehow. Thanks and Best wishes Idris -- Idris Samawi Hamid Professor of Philosophy Colorado State University Fort Collins, CO 80523
On Sat, 07 Feb 2015 12:33:00 -0700, Idris Samawi Hamid ادريس سماوي حامد
\definehighlight[extraimportant] [\c!command=\v!no,\c!style=\v!bolditalic]
\definehighlight[extraimportant] [\c!command=\v!no,\c!style=\v!smallcaps] % \definehighlight[extraimportant] [\c!command=\v!no,\c!style=\v!bolditalic] % smallcaps is a better default for extraimportant than bolditalic -- Idris Samawi Hamid Professor of Philosophy Colorado State University Fort Collins, CO 80523
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
:
[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.
On 2/8/2015 1:56 PM, Keith J. Schultz wrote:
Basically, a highlight allows one so setup a font style and color to be applied to it contents.
the only reason why highlight exists is that it can be used to tag stuff that is otherwise untagged in the exporter to xml which is why there is nothing predefined 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 -----------------------------------------------------------------
On Sun, 08 Feb 2015 07:01:31 -0700, Hans Hagen
the only reason why highlight exists is that it can be used to tag stuff that is otherwise untagged in the exporter to xml
Ok, so I suppose \quote and \quotation already work in the exporter. The following iteration then: ============= \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[\v!smallcaps] [\c!command=\v!no,\c!style=\v!smallcaps] \definehighlight[emphasis] [\c!command=\v!no,\c!style=\v!italic] % Does Hans prefer slanted here for default?? \definehighlight[important] [\c!command=\v!no,\c!style=\v!bold] \definehighlight[veryimportant] [\c!command=\v!no,\c!style=\v!smallcaps] \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] \definehighlight[booktitle] [\c!command=\v!no,\c!style=\v!italic] \definehighlight[abbreviation] [\c!command=\v!no,\c!style=\v!smallcaps] \definehighlight[propername] [\c!command=\v!no,\c!style=\v!smallcaps] \definehighlight[typing] [\c!command=\v!no,\c!style=\v!mono] \protect \starttext \highlight[italic] {italic} \highlight[bolditalic] {bolditalic} \highlight[bold] {bold} \highlight[mono] {mono} \highlight[monobold] {monobold} \highlight[smallcaps] {smallcaps} {\sc smallcaps} % this works \smallcaps{smallcaps} % this command doesn't work!! {\smallcaps smallcaps} % this command doesn't work!! \highlight[important] {important} \highlight[veryimportant] {very important} \highlight[extraimportant] {extra important} \highlight[unimportant] {unimportant} \highlight[warning] {warning} \highlight[error] {error} \highlight[emphasis] {emphasis} \highlight[abbreviation] {abbreviation} \highlight[booktitle] {Book Title} \highlight[propername] {Proper Name} \highlight[typing] {typing} \stoptext ============= There seems to be a bug with \smallcaps. Otherwise I think the above makes a good default set to start with. Best wishes Idris -- Idris Samawi Hamid Professor of Philosophy Colorado State University Fort Collins, CO 80523
On 2/8/2015 3:40 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
On Sun, 08 Feb 2015 07:01:31 -0700, Hans Hagen
wrote: the only reason why highlight exists is that it can be used to tag stuff that is otherwise untagged in the exporter to xml
Ok, so I suppose \quote and \quotation already work in the exporter. The following iteration then:
============= \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[\v!smallcaps] [\c!command=\v!no,\c!style=\v!smallcaps]
i don't like these as tags (you can define start-stops if needed)
\definehighlight[emphasis] [\c!command=\v!no,\c!style=\v!italic] % Does Hans prefer slanted here for default??
depends \em would do
\definehighlight[important] [\c!command=\v!no,\c!style=\v!bold] \definehighlight[veryimportant] [\c!command=\v!no,\c!style=\v!smallcaps] \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]
\definehighlight[booktitle] [\c!command=\v!no,\c!style=\v!italic] \definehighlight[abbreviation] [\c!command=\v!no,\c!style=\v!smallcaps] \definehighlight[propername] [\c!command=\v!no,\c!style=\v!smallcaps]
we have an abbreviations mechanism already
\definehighlight[typing] [\c!command=\v!no,\c!style=\v!mono]
we have a typing environment already
\protect
\starttext
\highlight[italic] {italic} \highlight[bolditalic] {bolditalic} \highlight[bold] {bold} \highlight[mono] {mono} \highlight[monobold] {monobold} \highlight[smallcaps] {smallcaps}
{\sc smallcaps} % this works \smallcaps{smallcaps} % this command doesn't work!! {\smallcaps smallcaps} % this command doesn't work!!
\highlight[important] {important} \highlight[veryimportant] {very important} \highlight[extraimportant] {extra important} \highlight[unimportant] {unimportant} \highlight[warning] {warning} \highlight[error] {error}
\highlight[emphasis] {emphasis} \highlight[abbreviation] {abbreviation} \highlight[booktitle] {Book Title} \highlight[propername] {Proper Name}
\highlight[typing] {typing} \stoptext =============
There seems to be a bug with \smallcaps. Otherwise I think the above makes a good default set to start with.
Best wishes Idris
-- ----------------------------------------------------------------- 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 -----------------------------------------------------------------
On Sun, 08 Feb 2015 10:38:14 -0700, Hans Hagen
On 2/8/2015 3:40 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
On Sun, 08 Feb 2015 07:01:31 -0700, Hans Hagen
wrote: the only reason why highlight exists is that it can be used to tag stuff that is otherwise untagged in the exporter to xml
Ok, so I suppose \quote and \quotation already work in the exporter. The following iteration then:
============= \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[\v!smallcaps] [\c!command=\v!no,\c!style=\v!smallcaps]
i don't like these as tags (you can define start-stops if needed)
You don't like them? But these were in your original sample file!
\definehighlight[emphasis] [\c!command=\v!no,\c!style=\v!italic] % Does Hans prefer slanted here for default??
depends \em would do
Ah, \em can go outside now... So we have \definehighlight[emphasis] [\c!command=\v!no,\c!style=\em] % without the 'v!'
\definehighlight[important] [\c!command=\v!no,\c!style=\v!bold] \definehighlight[veryimportant] [\c!command=\v!no,\c!style=\v!smallcaps] \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]
\definehighlight[booktitle] [\c!command=\v!no,\c!style=\v!italic] \definehighlight[abbreviation] [\c!command=\v!no,\c!style=\v!smallcaps] \definehighlight[propername] [\c!command=\v!no,\c!style=\v!smallcaps]
we have an abbreviations mechanism already
Ok
\definehighlight[typing] [\c!command=\v!no,\c!style=\v!mono]
we have a typing environment already
Ok. It's clear that I'm doing a lot of guessing, so question: Can you specify exactly what does *not* get tagged in xml-export? What exactly do we need to worry about? Then we can go from there... [snip]
There seems to be a bug with \smallcaps.
Can you look at \smallcaps? Thanks and Best wishes Idris -- Idris Samawi Hamid Professor of Philosophy Colorado State University Fort Collins, CO 80523
On 2/8/2015 8:08 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
Ok. It's clear that I'm doing a lot of guessing, so question: Can you specify exactly what does *not* get tagged in xml-export? What exactly do we need to worry about? Then we can go from there...
everything that has some structure or meaning gets tagged font/colors have no meaning they're appearance so they don't get tagged highlights are for the few things left ... but often one can also use \startelement for that 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 -----------------------------------------------------------------
On Sun, 08 Feb 2015 14:51:44 -0700, Hans Hagen
On 2/8/2015 8:08 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
Ok. It's clear that I'm doing a lot of guessing, so question: Can you specify exactly what does *not* get tagged in xml-export? What exactly do we need to worry about? Then we can go from there...
everything that has some structure or meaning gets tagged
font/colors have no meaning they're appearance so they don't get tagged
Ok, but here: http://wiki.contextgarden.net/Export it says, ====== Also note that switches like \em don’t translate into output structure, you need to \definehighlight[emph][style=italic] and use as \emph{emphasized}. ====== Now \em does have structural meaning (emphasis) so either the wiki is wrong or we have some inconsistency here -)
highlights are for the few things left ... but often one can also use \startelement for that
Do you have any good examples for using \start-stopelement? Thanks and Best wishes Idris -- Idris Samawi Hamid Professor of Philosophy Colorado State University Fort Collins, CO 80523
Hi Hans, Idris, All, fonts and color are as such appearance. But, when one uses different fonts and colors or mix then then we add meaning or as you tend to call it structure. If their use does not add to the structure, then only one font style and color is needed. So actually, in the end they should be tagged, too! Wolfgang has mentioned that we have definestyle is that tagged or not! Furthermore, it is possible in ConTeXt to setup for example the style italic, etc to what ever one cares to! for example one could make and italic style be mono or bold! (naturally, it is nonsense to do this). Also, many authors of text, do think along the lines of markup in their coding and do use \em, but simply \it, \bf for emphasis! Similarly, many use quotation characters/glyphs in stead of \quotation and \quote. If we are exporting to xml then we should catch these cases! Basically, any switch of style or font is the designation of the intention of an author for a structural change! That is to make something stand out for one reason or the other. regards Keith.
Am 08.02.2015 um 22:51 schrieb Hans Hagen
: On 2/8/2015 8:08 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
Ok. It's clear that I'm doing a lot of guessing, so question: Can you specify exactly what does *not* get tagged in xml-export? What exactly do we need to worry about? Then we can go from there...
everything that has some structure or meaning gets tagged
font/colors have no meaning they're appearance so they don't get tagged
highlights are for the few things left ... but often one can also use \startelement for that
Am 09.02.2015 um 14:34 schrieb Keith Schultz
: Hi Hans, Idris, All,
fonts and color are as such appearance. But, when one uses different fonts and colors or mix then then we add meaning or as you tend to call it structure.
If their use does not add to the structure, then only one font style and color is needed.
So actually, in the end they should be tagged, too!
Wolfgang has mentioned that we have definestyle is that tagged or not!
No.
Furthermore, it is possible in ConTeXt to setup for example the style italic, etc to what ever one cares to! for example one could make and italic style be mono or bold! (naturally, it is nonsense to do this).
\definefontfamily[mixed][rm][Latin Modern Roman][tf=style:bold,it=style:bolditalic,bf=style:italic,bi=style:normal] \setupbodyfont[mixed] \starttext Upright, {\it Italic,} {\bf Bold,} {\bi BoldItalic} \stoptext Wolfgang
Am 08.02.2015 um 15:40 schrieb Idris Samawi Hamid ادريس سماوي حامد
: […]
There seems to be a bug with \smallcaps. Otherwise I think the above makes a good default set to start with.
Hans changed the effect of “style=smallcaps”, in the ConTeXt used \sc when you did this setups but now ConTeXt just enables small capitals in the active font. The problem here is that ConTeXt’s default font Latin Modern uses a separate file for small capitals unlike other fonts like TeX Gyre Pagella. What you can do to avoid this problem with Latin Modern is to use “style=\sc” in your setup. Wolfgang
Hi Wolfgang,
On Sun, 08 Feb 2015 12:17:11 -0700, Wolfgang Schuster
Am 08.02.2015 um 15:40 schrieb Idris Samawi Hamid ادريس سماوي حامد
: […]
There seems to be a bug with \smallcaps. Otherwise I think the above makes a good default set to start with.
Hans changed the effect of “style=smallcaps”, in the ConTeXt used \sc when you did this setups but now ConTeXt just enables small capitals in the active font. The problem here is that ConTeXt’s default font Latin Modern uses a separate file for small capitals unlike other fonts like TeX Gyre Pagella.
What you can do to avoid this problem with Latin Modern is to use “style=\sc” in your setup.
Thanks for this pointer! Yes, it does work now (tried both LM and TeX-Gyre). And I see that \smallcaps works in TeX-Gyre but not LM... an interesting subtlety. So to sum: \sc [etc. I presume] is defined for the typescript and \smallcaps [etc. I presume] is defined for the font itself (where can add and subtract opentype features etc.). Thanks again and Best wishes Idris -- Idris Samawi Hamid Professor of Philosophy Colorado State University Fort Collins, CO 80523
Hi Hans, Idris, All, Then we should call it definetag of definestyletag ! It would describe its function better! Like I said I find the command highlight nice because it is alot easier than define my own commands for setting styles with color! regards Keith.
Am 08.02.2015 um 15:01 schrieb Hans Hagen
: On 2/8/2015 1:56 PM, Keith J. Schultz wrote:
Basically, a highlight allows one so setup a font style and color to be applied to it contents.
the only reason why highlight exists is that it can be used to tag stuff that is otherwise untagged in the exporter to xml which is why there is nothing predefined
Hans
On 2/9/2015 12:42 AM, Keith Schultz wrote:
Hi Hans, Idris, All,
Then we should call it definetag of definestyletag ! It would describe its function better!
Like I said I find the command highlight nice because it is alot easier than define my own commands for setting styles with color!
it's no problem to use the command for that (after all export is a rather special thing) in fact, you can use the description mechanism for non-descriptions and itemizes for non-itemizes too etc 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 -----------------------------------------------------------------
Hi Keith,
On Sun, 08 Feb 2015 05:56:54 -0700, Keith J. Schultz
Also, not everybody would want the predefined styles and colors so they will have to be changed in the setuphighlight anyway!
Indeed, but the point is not to predefine the styles but to predefine the highlights. E.g., \highlight[emphasis]: The user can redefine/setup the style anyway one likes, but the tag 'emphasis' should be standard. Put another way: We need some standard tags for maximum portability and fancy editor setups. Best wishes Idris -- Idris Samawi Hamid Professor of Philosophy Colorado State University Fort Collins, CO 80523
Am 08.02.2015 um 13:56 schrieb Keith J. Schultz
: 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!
There is a \definestyle command (you can disable the creation of command [e.g. \strong] when you add “method=” to \definestyle) but it doesn’t add tags in the export command. \definestyle [strong] [style=bold] \definestyle [emphasized] [style=italic] \starttext Strong: You can use \style[strong]{strong} or \strong{strong} or \startstyle[strong]strong\stopstyle. Emphasized: You can use \style[emphasized]{emphasized} or \emphasized{emphasized} or \startstyle[emphasized]emphasized\stopstyle. \stoptext Wolfgang
On Sun, 8 Feb 2015 13:56:54 +0100
"Keith J. Schultz"
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!
Indeed, it is very poor writing style to make abusive use of visuals. Alan
participants (6)
-
Alan BRASLAU
-
Hans Hagen
-
Idris Samawi Hamid ادريس سماوي ح امد
-
Keith J. Schultz
-
Keith Schultz
-
Wolfgang Schuster