ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Old-Style numerals command (\os) breaks conversion of hyphens to dashes
@ 2020-09-20 21:14 Art Chimes
  2020-09-21  6:35 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Art Chimes @ 2020-09-20 21:14 UTC (permalink / raw)
  To: ConTeXt Mailing List

I have a fairly large document, 50-60 pp, with lots of numerals,
including hundreds of dates. I wanted to see how it would look with
old-style numbers and I assumed I could bracket the whole text section
of the document within braces and apply the \os command. I didn't turn
out as I expected, however. It did convert the numbers to old-style
digits. But it also unexpectedly changed the em and en dashes back to
hyphens, as they were entered in the source .tex document.

MWE follows below.

I could possibly do a search-and-replace but I am hoping there is a
simpler way to do it.. I am using Libertinus Serif (which does support
old style numerals) and columns, if that matters.  Thank you.

\starttext

First two examples:  Brackets surround text including digits, grouped
hyphens are {\emph not} converted to en and em dashes.

{\os
Ford--Chevy 12345

Chrysler---Plymouth 67890
}
\blank[line]
Next two examples: Brackets surround just the digits, the grouped
hypehns {\emph are} correctly converted to en and em dashes

Honda--Toyota {\os 12345}

Renault---Volkswagen {\os 67890}

\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Old-Style numerals command (\os) breaks conversion of hyphens to dashes
  2020-09-20 21:14 Old-Style numerals command (\os) breaks conversion of hyphens to dashes Art Chimes
@ 2020-09-21  6:35 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2020-09-21  6:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Art Chimes

On 9/20/2020 11:14 PM, Art Chimes wrote:
> I have a fairly large document, 50-60 pp, with lots of numerals,
> including hundreds of dates. I wanted to see how it would look with
> old-style numbers and I assumed I could bracket the whole text section
> of the document within braces and apply the \os command. I didn't turn
> out as I expected, however. It did convert the numbers to old-style
> digits. But it also unexpectedly changed the em and en dashes back to
> hyphens, as they were entered in the source .tex document.
> 
> MWE follows below.
> 
> I could possibly do a search-and-replace but I am hoping there is a
> simpler way to do it.. I am using Libertinus Serif (which does support
> old style numerals) and columns, if that matters.  Thank you.
> 
> \starttext
> 
> First two examples:  Brackets surround text including digits, grouped
> hyphens are {\emph not} converted to en and em dashes.
> 
> {\os
> Ford--Chevy 12345
> 
> Chrysler---Plymouth 67890
> }
> \blank[line]
> Next two examples: Brackets surround just the digits, the grouped
> hypehns {\emph are} correctly converted to en and em dashes
> 
> Honda--Toyota {\os 12345}
> 
> Renault---Volkswagen {\os 67890}
> 
> \stoptext
\os is an old style dumb font switch (only oldstyle feature) while
\oldstyle does what you want: enable the oldstyle feature on top of others

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2020-09-21  6:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-20 21:14 Old-Style numerals command (\os) breaks conversion of hyphens to dashes Art Chimes
2020-09-21  6:35 ` Hans Hagen

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