#25 ✓ resolved
David Reese

Dimensions in feet and inches should use correct typographic characters

Reported by David Reese | July 27th, 2008 @ 04:08 PM | in 4.0.2

Just a quick correction on some typography -- hopefully this is a quick fix?

Formatting for feet and inches (my house is 6'3" x 3'4") should be single and double primes. If we got this right, Dean would be proud:

′ ′ ′ ′ prime = minutes = feet

″ ″ ″ ″ double prime = seconds = inches

This rule is referenced briefly in the oft-referenced Em and En ALA article, http://www.alistapart.com/articl..., or see, ten typographic mistakes anyone makes

Was going to clone & submit a pull request, but after five minutes of looking at the ragel i realized it was futile.

If it requires writing up entirely new rules, maybe it's not worth it? Five people in the world will see the difference.

Comments and changes to this ticket

  • Jason Garber

    Jason Garber July 28th, 2008 @ 04:59 PM

    So prime is #8242 and double prime is #8243.

    I'd like to see this be implemented too. The current problem is that the final number in a dimension sequence like 2x3x4 isn't part of the sequence. For the dimension pattern, 2x is captured and it looks ahead to verify a digit comes next. That's one "dim." Then 3x is captured and it looks ahead to see the 4. That's another one. But then the 4 is captured as just a normal phrase, so a prime or double prime after it wouldn't be able to be transformed.

    I've tried to make a pattern that matches a number (with optional decimal and ' or ") followed by one or more of x and that digit pattern again, but it must be too ambiguous because it's always omitting the factors after the first one.

    I'd like to see the entire dim phrase be captured and then use gsub in the formatter method to do the required x, prime, and double-prime transformations.

    I'm going to leave it alone for a bit and hope someone comes up with a patch so I don't have to. :-)

  • Jason Garber

    Jason Garber August 8th, 2008 @ 04:51 PM

    • State changed from “new” to “open”

    I've tried several times to implement this and have failed. Going to just leave it open until someone smarter than me can figure it out.

  • Jason Garber

    Jason Garber August 14th, 2008 @ 05:30 PM

    • Milestone set to 4.0.2

    Ha! Figured out a workaround to make the pattern deterministic.

  • Jason Garber

    Jason Garber August 14th, 2008 @ 05:30 PM

    • State changed from “open” to “resolved”

    (from [1f8bea1e34fca058d92b68f5da5d863a0b1ddc12]) Dimensions in feet and inches use correct typographic characters. [#25 state:resolved] http://github.com/jgarber/redclo...

  • David Reese

    David Reese August 15th, 2008 @ 01:17 PM

    Nice work! In less than a week too. Wish i could help, but i couldn't even decipher the fix, even staring at it for a few minutes. One of these days i'll learn ragel, it looks like, um, lots of "fun".

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

RedCloth is a Ruby library for converting Textile into HTML

Shared Ticket Bins

People watching this ticket

Tags

Referenced by

Pages