Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Ordinals and cardinals spelled out from counters and references
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Peter Flynn  
View profile  
 More options Feb 11, 12:16 pm
Newsgroups: comp.text.tex
From: Peter Flynn <pe...@silmaril.ie>
Date: Sat, 11 Feb 2012 17:16:52 +0000
Local: Sat, Feb 11 2012 12:16 pm
Subject: Ordinals and cardinals spelled out from counters and references
The packages nth (Donald Arseneau) and engord (Heiko Oberdiek) handle
the formatting of LaTeX counters as ordinal numbers (1st, 2nd, 3rd,
etc). Raymond Chen's (obsolete?) inwords package* will format counters
as spelled-out cardinal numbers (forty two), but not ordinals.

However, many English-language publishers use the principle that values
up to and including 10 must be spelled in full, both for cardinal and
ordinal use; and the numbers over 10 use the digits (and for ordinals,
the ordinal suffixes). Some set the boundary at 12, not 10.

This means:

1       one     first
2       two     second
3       three   third
4       four    fourth
...     ...     ...
9       nine    ninth
10      ten     tenth
11      11      11th
12      12      12th
13      13      13th
...etc

When generating LaTeX from (eg) XML, it would be useful to be able to
represent counter values in a way that would be formatted to this kind
of requirement.

I haven't found a package that does this. If I have missed it, does
anyone have a pointer?

Otherwise, might I ask if the developers of current packages could
consider adding this as an option?

Bonus points if it also works with the refcount and calc packages :-)

Use case:

Think of a long description list with the end of the list set as
\label{finalitem} and the item you want to reference, known to be close
to the end, as \label{mine}; then

...as can be seen in the \ordinwords{\refcount{finalitem} -
\refcount{mine} + 1} item from last in the list ending on
p.\pageref{finalitem}..."

Chocolate cake for implementing a \distance function the will take any
item in a list, especially an itemized or description list, where
enumeration is not visible, and express it as the nth _or_ the
nth-from-last, according to its proximity to the start or end of the list...

///Peter

* My copy of inwords.sty has comments and code by Donald and "RmS",
implementing suggestions due to Bernd Raichle; and also quotes a c.t.t
posting from Georg Kraml in a thread "Counting in words" on Wed, 23 Jan
2002 23:43:39 +0100, with alternative code.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Wilson  
View profile  
 More options Feb 11, 2:03 pm
Newsgroups: comp.text.tex
From: Peter Wilson <herries.pr...@earthlink.net>
Date: Sat, 11 Feb 2012 19:03:05 +0000
Local: Sat, Feb 11 2012 2:03 pm
Subject: Re: Ordinals and cardinals spelled out from counters and references
On 11/02/12 17:16, Peter Flynn wrote:

The memoir class can spell out ordinals. It can produce either `1st' or
`first' or `First', etc.,  but you have to tell it which form you want.

Peter W.

Peter W.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Le TeXnicien de surface  
View profile  
 More options Feb 11, 3:27 pm
Newsgroups: comp.text.tex
From: Le TeXnicien de surface <TeXnicien.de.surf...@chezmoi.invalid>
Date: Sat, 11 Feb 2012 21:27:07 +0100
Local: Sat, Feb 11 2012 3:27 pm
Subject: Re: Ordinals and cardinals spelled out from counters and references
Le 11/02/2012 18:16, Peter Flynn a écrit :

> The packages nth (Donald Arseneau) and engord (Heiko Oberdiek) handle
> the formatting of LaTeX counters as ordinal numbers (1st, 2nd, 3rd,
> etc). Raymond Chen's (obsolete?) inwords package* will format counters
> as spelled-out cardinal numbers (forty two), but not ordinals.

There is also numname.sty
http://www.ctan.org/tex-archive/macros/latex/contrib/numname
which seems to do at least partially what you require.

I think I've met a package by Nicola Talbot, the name of which (the
package) escapes me at the moment, which could be of use. If ever the
aformentioned name is kind enough to pop up once more in my head, I'll
tell you.

Hih

--
Yvon Henel, TeXnicien de surface


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Le TeXnicien de surface  
View profile  
 More options Feb 11, 3:33 pm
Newsgroups: comp.text.tex
From: Le TeXnicien de surface <TeXnicien.de.surf...@chezmoi.invalid>
Date: Sat, 11 Feb 2012 21:33:58 +0100
Local: Sat, Feb 11 2012 3:33 pm
Subject: Re: Ordinals and cardinals spelled out from counters and references
Le 11/02/2012 21:27, Le TeXnicien de surface a écrit :

Found it: http://www.ctan.org/tex-archive/macros/latex/contrib/fmtcount

Hih again :)

--
Yvon Henel, TeXnicien de surface


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Flynn  
View profile  
 More options Feb 11, 3:54 pm
Newsgroups: comp.text.tex
From: Peter Flynn <pe...@silmaril.ie>
Date: Sat, 11 Feb 2012 20:54:22 +0000
Local: Sat, Feb 11 2012 3:54 pm
Subject: Re: Ordinals and cardinals spelled out from counters and references
On 11/02/12 19:03, Peter Wilson wrote:

> On 11/02/12 17:16, Peter Flynn wrote:
[snip]
> The memoir class can spell out ordinals. It can produce either `1st' or
> `first' or `First', etc., but you have to tell it which form you want.

Unfortunately the immediate application is to generate .dtx package and
class files, and I don't think there is an equivalent for ltxdoc in
memoir (is there?). But thank you, that's a very useful contribution.

///Peter


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Flynn  
View profile  
 More options Feb 11, 6:46 pm
Newsgroups: comp.text.tex
From: Peter Flynn <pe...@silmaril.ie>
Date: Sat, 11 Feb 2012 23:46:13 +0000
Local: Sat, Feb 11 2012 6:46 pm
Subject: Re: Ordinals and cardinals spelled out from counters and references
On 11/02/12 20:27, Le TeXnicien de surface wrote:

> Le 11/02/2012 18:16, Peter Flynn a écrit :
>> The packages nth (Donald Arseneau) and engord (Heiko Oberdiek) handle
>> the formatting of LaTeX counters as ordinal numbers (1st, 2nd, 3rd,
>> etc). Raymond Chen's (obsolete?) inwords package* will format counters
>> as spelled-out cardinal numbers (forty two), but not ordinals.

> There is also numname.sty
> http://www.ctan.org/tex-archive/macros/latex/contrib/numname
> which seems to do at least partially what you require.

Aha!

> I think I've met a package by Nicola Talbot, the name of which (the
> package) escapes me at the moment, which could be of use. If ever the
> aformentioned name is kind enough to pop up once more in my head, I'll
> tell you.

[...]
 > Found it: http://www.ctan.org/tex-archive/macros/latex/contrib/fmtcount

Thank you very much: that's just what I needed. I obviously wasn't using
search terms that occurred in the names or descriptions :-)

///Peter


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robin Fairbairns  
View profile  
 More options Feb 11, 7:10 pm
Newsgroups: comp.text.tex
From: Robin Fairbairns <r...@cl.cam.ac.uk>
Date: Sun, 12 Feb 2012 00:10:58 +0000
Local: Sat, Feb 11 2012 7:10 pm
Subject: Re: Ordinals and cardinals spelled out from counters and references
Le TeXnicien de surface <TeXnicien.de.surf...@chezmoi.invalid> writes:

> Le 11/02/2012 18:16, Peter Flynn a écrit :
>> The packages nth (Donald Arseneau) and engord (Heiko Oberdiek) handle
>> the formatting of LaTeX counters as ordinal numbers (1st, 2nd, 3rd,
>> etc). Raymond Chen's (obsolete?) inwords package* will format counters
>> as spelled-out cardinal numbers (forty two), but not ordinals.

> There is also numname.sty
> http://www.ctan.org/tex-archive/macros/latex/contrib/numname
> which seems to do at least partially what you require.

> I think I've met a package by Nicola Talbot, the name of which (the
> package) escapes me at the moment, which could be of use. If ever the
> aformentioned name is kind enough to pop up once more in my head, I'll
> tell you.

the package doc of nicola's fmtcount package describes macros
\numberstring and \ordinalstring (both come in several variants).  quite
whether this helps is beyond me.

(i thought i had read that doc, but these functions either managed to
duck under my gaze, or my recollection is wrong.)
--
Robin Fairbairns, Cambridge
my address is @cl.cam.ac.uk, regardless of the header.  sorry about that.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »