PreTeXtBook / pretext

PreTeXt: an authoring and publishing system for scholarly documents
https://pretextbook.org
Other
266 stars 208 forks source link

nth #214

Closed Alex-Jordan closed 3 years ago

Alex-Jordan commented 8 years ago

Another feature request. Should be an easy project for someone tackling low hanging fruit. An nth markup. So <nth>1</nth> would produce 1st with superscripted "st". Authors who don't like that could just not use it.

rbeezer commented 8 years ago

I like the name, but maybe too "mathy"?

So I thought, maybe "ordinal". Then, why don't we just say "first"? 1-st is a bit odd once you stop and think about it. But I bet you are doing addresses.

As proposed, this will get complicated in different languages. SI unit translation is fine but don't want something even moreso.

I have thought to handle this with a text superscript and subscript, active inside paragraphs and friends. What do you think?

Rob

On March 17, 2016 7:57:13 PM AST, Alex Jordan notifications@github.com wrote:

Another feature request. Should be an easy project for someone tackling low hanging fruit. An nth markup. So <nth>1</nth> would produce 1st with superscripted "st". Authors who don't like that could just not use it.


You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rbeezer/mathbook/issues/214

Alex-Jordan commented 8 years ago

It's actually coming up for me with a book that is 3rd edition. That's how it's written on the cover, not "third", so I thought to stay true to that. I think I sometimes format dates this way too, although perhaps that is bad style.

Here is XSL that works for English (in the accepted answer): http://stackoverflow.com/questions/1202581/how-to-transform-a-number-1-2-3-etc-into-an-ordinal-number-1st-2nd-3rd-et

It could be modified to use text superscript.

LaTeX has the nth package, where \nth{3} outputs as "3rd" (no superscript), unless you have used the super option and then the "rd" would be in superscript. I never understood the point of it if you don't use the superscript, unless you just wanted the flexibility to switch styling quickly.

If you are interested (I'm guessing not), there is also XSL to translate numbers with digits to words for those numbers: http://www.getsymphony.com/download/xslt-utilities/view/20486/

Properly modified, it could produce ordinal words. So depending on options, <ordinal>3</ordinal> could output

3rd (no superscript) 3rd (superscript) third Third

Obviously, even more English dependent.

On Fri, Mar 18, 2016 at 9:34 AM, Rob Beezer notifications@github.com wrote:

I like the name, but maybe too "mathy"?

So I thought, maybe "ordinal". Then, why don't we just say "first"? 1-st is a bit odd once you stop and think about it. But I bet you are doing addresses.

As proposed, this will get complicated in different languages. SI unit translation is fine but don't want something even moreso.

I have thought to handle this with a text superscript and subscript, active inside paragraphs and friends. What do you think?

Rob

On March 17, 2016 7:57:13 PM AST, Alex Jordan notifications@github.com wrote:

Another feature request. Should be an easy project for someone tackling low hanging fruit. An nth markup. So <nth>1</nth> would produce 1st with superscripted "st". Authors who don't like that could just not use it.


You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rbeezer/mathbook/issues/214

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/rbeezer/mathbook/issues/214#issuecomment-198442228

Alex Jordan Mathematics Instructor Portland Community College

davidfarmer commented 8 years ago

The Chicago Manual of Style, which is one of the appropriate choices for academic writing, says:

"The letters in ordinal numbers should not appear as superscripts"

And it (and many other style guides) suggest "first" instead of "1st" in most instances, and similarly for other small numbers. For some guides small is < 10, others < 100.

So this is a feature that will be misused at least as much as it is used. We must always keep in mind that most MBX authors do not have the luxury of a competent line editor -- something that was standard back when commercial publishers made good books. And most authors never consult a style guide.

If you do implement this, at least allow a processing flag that puts the numbers inline instead of superscripts.

On Fri, 18 Mar 2016, Rob Beezer wrote:

I like the name, but maybe too "mathy"?

So I thought, maybe "ordinal". Then, why don't we just say "first"? 1-st is a bit odd once you stop and think about it. But I bet you are doing addresses.

As proposed, this will get complicated in different languages. SI unit translation is fine but don't want something even moreso.

I have thought to handle this with a text superscript and subscript, active inside paragraphs and friends. What do you think?

Rob

On March 17, 2016 7:57:13 PM AST, Alex Jordan notifications@github.com wrote:

Another feature request. Should be an easy project for someone tackling low hanging fruit. An nth markup. So <nth>1</nth> would produce 1st with superscripted "st". Authors who don't like that could just not use it.


You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rbeezer/mathbook/issues/214

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub[AAM6LKTrThf1HtvGIew4H2bHtvcp7jY4ks5putQRgaJpZM4Hzdwa.gif]

davidfarmer commented 8 years ago

If the motivation is a particular type of graphical element (or typesetting) in the title of a book, then maybe it is better to just solve that problem.

Would it be crazy to implement the analogues of "sup" and "sub" in html?

rbeezer commented 8 years ago

That is exactly my plan (I think an earlier reply went only to Alex as my current client is not helpful).

We should warn authors abot superscripted "st" etc.

On March 19, 2016 8:06:12 AM AST, davidfarmer notifications@github.com wrote:

If the motivation is a particular type of graphical element (or typesetting) in the title of a book, then maybe it is better to just solve that problem.

Would it be crazy to implement the analogues of "sup" and "sub" in html?


You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/rbeezer/mathbook/issues/214#issuecomment-198691700

Alex-Jordan commented 3 years ago

I'm closing this one, since I opened it :) I'm convinced that not using superscript is best for ordinal numbers.