# A rational approach to fractions

#### Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

•  Subject
• Author
• Posted on
Jukka presents several ways to write fractions at
http://www.cs.tut.fi/~jkorpela/math/#twodim

A main problem is to suite all situations: with CSS,
without CSS, text browsers. My idea is to write

<tr style=3D"display: none">
<td>&mdash;&mdash;&mdash;

for the fraction bar in text browsers and

.numerator   { border-bottom: 1px solid black }
.denominator { border-top:    1px solid black }

for CSS browsers. An example is at the bottom of
http://www.user.uni-hannover.de/nhtcapri/mathematics.html
or (temporarily) at
http://www.user.uni-hannover.de/nhtcapri/temp-2.html

The equals sign is somewhat misplaced in Lynx; but Lynx has
always misbehaved at the table tag. It looks better in w3m.
The fraction itself (without3D=94) displays perfectly in Lynx.

--=20
In memoriam Alan J. Flavell
http://www.alanflavell.org.uk/charset /

## Re: A rational approach to fractions

It would need to be irrational for 2/3

http://www.richardfisher.com

## Re: A rational approach to fractions

In comp.infosystems.www.authoring.html message <95968bbc-3eb2-4d26-872b-
67109c09ca7d@c22g2000yqa.googlegroups.com>, Mon, 19 Sep 2011 10:43:04,

But 2/3 is rational; it is the ratio of two to three, which are natural
numbers.  You are irrational : see
<http://en.wikipedia.org/wiki/Category:Numbers .

--
(c) John Stockton, near London. *@merlyn.demon.co.uk/?.?.Stockton@physics.org
Web  <http://www.merlyn.demon.co.uk/ - FAQish topics, acronyms, and links.
Correct <= 4-line sig. separator as above, a line precisely "-- " (RFC5536/7)
Do not Mail News to me.    Before a reply, quote with ">" or "> " (RFC5536/7)

## Re: A rational approach to fractions

19.9.2011 19:59, Andreas Prilop wrote:

It's a noble goal, but such requirements aren't as important as they
used to be. It's probably more important these days to be screen-reader
compatible.

I can see two problems here (nothing dramatic, as all ideas of
presenting two-dimensional math on web pages suffer from one drawback or
another). When CSS is off,
a) it doesn't work that well in non-visual rendering; how should a
screen reader and or a Braille renderer present a sequence of em dashes
b) in visual rendering, a sequence of em dashes appears, and they may or
may not join, i.e. constitute a continuous line, depending on font.

[...9

Also on graphic browsers with CSS disabled. Using the valign attribute
would help here (and would summon all the demons that send accusations

--
Yucca, http://www.cs.tut.fi/~jkorpela /

## Re: A rational approach to fractions

On Mon, 19 Sep 2011, Jukka K. Korpela wrote:

An alternative is  <td><hr></td> . Only lynx (but not w3m) draws
the horizontal line across the whole screen.

In most fonts they join. It looks much better than your examples
with ASCII hyphens.

Which browser? I always see the equals sign aligned with the fraction bar.

My understanding was that  <td valign=3Dmiddle>  is the default.
And that=92s what I observe in all browsers except lynx.

## Re: A rational approach to fractions

On Tue, 20 Sep 2011, I wrote:

Indeed, the default in HTML 4 is  valign=middle .

## Re: A rational approach to fractions

20.9.2011 18:09, Andreas Prilop wrote:

A screen reader might render <hr> as a pause, as suggested in HTML
specs, but I don't think that would be appropriate for a fraction bar.

Yes, but not in Cambria, for example.

> It looks much better than your examples

No doubt about that. And underline "_" would work even better.

I noticed the effect on Firefox 6 when I disabled CSS. The lower stroke
in "=" is on the same line as the fraction bars, so the "=" is a bit too
low. Taking a closer look now, I see that with CSS on, there's an almost
opposite deviation: the lower stroke of "=" is almost in line with the
fraction bars.

I don't think this is a big issue, but I couldn't help noticing.

That's right, valign as such would not help here. Rather, the cell that
contains "=" and that spans three rows could be split into three cells
(two of them empty). But I'm not sure whether that would help, and it
would break the logical structure somewhat.

--
Yucca, http://www.cs.tut.fi/~jkorpela /

## Re: A rational approach to fractions

On Tue, 20 Sep 2011, Jukka K. Korpela wrote:

When you inspect my example web pages (rather than my posting)
you will see that I have
<td><tt>&mdash;&mdash;&dash;

Anyway, when em-dashes don=92t join, we should blame the font creator.
Longer dashes (rules) are usually written with two or three
em-dashes in succession.

But the vertical position is bad. The whole thing would look
like three lines; the second line being empty and the third
line being overlined.

No, the equals sign must always be visible. The middle TR
is invisible with CSS.

## Re: A rational approach to fractions

On Tue, 20 Sep 2011, Jukka K. Korpela wrote:

The vertical positions of em-dash and equals sign depend on the typeface.
But this is only a microscopic problem.

In Lynx, the equals sign aligns with the numerators.

## Re: A rational approach to fractions

On Mon, 19 Sep 2011, Jukka K. Korpela wrote:

|| http://www.user.uni-hannover.de/nhtcapri/temp-2.html

OK let=92s write

td  { speak: none }

<table summary=3D"( &radic;5 &minus; 1 ) &divide; 2 &nbsp;
= &nbsp; 2 &divide; ( &radic;5 + 1 )">

## Re: A rational approach to fractions

21.9.2011 18:50, Andreas Prilop wrote:

Some screen readers support the summary attribute, but
a) it is being phased out in HTML5
b) it is not used much, so there is not much pressure for support
d) I don't think summary is meant to be used that way, as a
_replacement_ for the contents of the table
e) there isn't much support to aural style sheets
f) there is such a thing as trying too hard. :-)

I think that for math expressions, the only reasonable way to cover
character cell browsers, screen readers, Braille renderings, and other
viewing situations that differ from common graphic browsing is to
provide links to alternative formats. What you say in those formats
depends on the nature of the expressions and on the intended audiences.

--
Yucca, http://www.cs.tut.fi/~jkorpela /

## Re: A rational approach to fractions

On Wed, 21 Sep 2011, Jukka K. Korpela wrote:

I was inspired by
http://www.cs.tut.fi/~jkorpela/math/#twodim
;-)

## Re: A rational approach to fractions

Andreas Prilop wrote:

# aptitude install gnome-orca
[…]
# ^D
\$ orca

I have now.

GNOME Orca 2.30.2, having used the Tab key to focus the viewport in

"Fractions – Iceweasel [the document title; the ed.], frame.  Square root
five minus one divide by two equals two divide by square root five plus one.
HTML content."

One wonders how some got the impression that screenreaders were not good at
reading special characters.  It literally *sounds* good to me.

PointedEars
--
Anyone who slaps a 'this page is best viewed with Browser X' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee

## Re: A rational approach to fractions

22.9.2011 17:46, Thomas 'PointedEars' Lahn wrote:

people who actually use screenreaders for surfing.

--
Yucca, http://www.cs.tut.fi/~jkorpela /

## Re: A rational approach to fractions

Jukka K. Korpela wrote:

So far there is insufficient evidence to support your contention.

PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
)  // Plone, register_function.js:16

## Re: A rational approach to fractions

You need an irrational approach for the fraction 2/3

## Re: A rational approach to fractions

In comp.infosystems.www.authoring.html message <Pine.LNX.4.64.1109191826
230.27879@zen.rrzn.uni-hannover.de>, Mon, 19 Sep 2011 18:59:14, Andreas

The word "canvas" appears (once).  It would be better, now that HTML has
the "canvas" element, to re-phrase that occurrence.

Ignoring MSIE8, one can also script an equation onto the canvas element.
For a single equation, the code will be relatively bulky.  However, for
a sequence of related equations, it will be possible to make use of
parameterised functions to draw near-repeated parts - and to update them
all at once.  Note that the equation(s) can be constructed on the
readers' systems, or on the author's system and sent as an image.

"at present", etc., are somewhat uncertain of meaning.  It still
supports Netscape 4.

There needs to be a document indicating how likely it is that relevant
features (fonts, glyphs, script, canvas, etc.) are available in the