|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Phil Cook wrote:
> And lo on Wed, 07 Nov 2007 12:34:50 -0000, Invisible <voi### [at] devnull> did
> spake, saying:
>
>> What I *could* do is this:
>>
>> style {padding: 1em;}
>> style style {padding: 2em;}
>> style style style {padding: 3em;}
>> etc.
>>
>> But that still seems a crying shame...
>
> Wrong way round.
Gah. o_O
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Tue, 06 Nov 2007 18:21:42 +0000, Orchid XP v7 wrote:
> (This is basically for printing out expressions containing insane
> numbers of brackets. I want to use borders to help untangle the mess in
> some kind of visually-sane way...)
Try MathML. It helps greatly at least if your formula contains divisions.
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<mn>log</mn>
<mo>(</mo>
<mfrac>
<mrow>
<mn>sqrt</mn>
<mo>(</mo>
<mn>5</mn>
<mo>)</mo>
</mrow>
<mrow>10</mrow>
</mfrac>
<mo>)</mo>
</mrow>
</math>
MathML can be embedded in XHTML, but you need to pass
the right Content-type header (xhtml+xml).
--
Joel Yliluoma - http://bisqwit.iki.fi/
: comprehension = 1 / (2 ^ precision)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Joel Yliluoma wrote:
> On Tue, 06 Nov 2007 18:21:42 +0000, Orchid XP v7 wrote:
>> (This is basically for printing out expressions containing insane
>> numbers of brackets. I want to use borders to help untangle the mess in
>> some kind of visually-sane way...)
>
> Try MathML. It helps greatly at least if your formula contains divisions.
>
> <math xmlns="http://www.w3.org/1998/Math/MathML">
> <mrow>
> <mn>log</mn>
> <mo>(</mo>
> <mfrac>
> <mrow>
> <mn>sqrt</mn>
> <mo>(</mo>
> <mn>5</mn>
> <mo>)</mo>
> </mrow>
> <mrow>10</mrow>
> </mfrac>
> <mo>)</mo>
> </mrow>
> </math>
>
> MathML can be embedded in XHTML, but you need to pass
> the right Content-type header (xhtml+xml).
OK, let's see the MathML for the following expression:
S(S(KS)K)(S(S(KS)K)I)(S(S(KS)K)(S(S(KS)K)(S(S(KS)K)I)))(S(S(KS)K)(S(S(KS)K)(S(S(KS)K)(S(S(KS)K)I))))
Care to tell me where one subexpression ends and the next one begins? ;-)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
And lo on Fri, 09 Nov 2007 09:54:59 -0000, Invisible <voi### [at] devnull> did
spake, saying:
> Joel Yliluoma wrote:
>> On Tue, 06 Nov 2007 18:21:42 +0000, Orchid XP v7 wrote:
>>> (This is basically for printing out expressions containing insane
>>> numbers of brackets. I want to use borders to help untangle the mess
>>> in some kind of visually-sane way...)
>> Try MathML. It helps greatly at least if your formula contains
>> divisions.
>> <math xmlns="http://www.w3.org/1998/Math/MathML">
>> <mrow>
>> <mn>log</mn> <mo>(</mo>
>> <mfrac>
>> <mrow>
>> <mn>sqrt</mn>
>> <mo>(</mo>
>> <mn>5</mn>
>> <mo>)</mo> </mrow>
>> <mrow>10</mrow>
>> </mfrac>
>> <mo>)</mo>
>> </mrow>
>> </math>
>> MathML can be embedded in XHTML, but you need to pass
>> the right Content-type header (xhtml+xml).
>
> OK, let's see the MathML for the following expression:
>
>
> S(S(KS)K)(S(S(KS)K)I)(S(S(KS)K)(S(S(KS)K)(S(S(KS)K)I)))(S(S(KS)K)(S(S(
KS)K)(S(S(KS)K)(S(S(KS)K)I))))
>
> Care to tell me where one subexpression ends and the next one begins?
;-)
Just for fun with spans
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<style>
html {margin:20px;}
div {height:40px;}
span {padding:20px; border: red 1px solid;}
span span {padding:18px; border: orange 1px solid;}
span span span {padding:16px; border: yellow 1px solid;}
span span span span {padding:14px; border: green 1px solid;}
span span span span span {padding:12px; border: blue 1px solid;}
span span span span span span {padding:10px; border: red 1px dotted;}
span span span span span span span {padding:8px; border: orange 1px
dotted;}
span span span span span span span span {padding:6px; border: yellow 1px
dotted;}
span span span span span span span span span {padding:4px; border: green
1px dotted;}
span span span span span span span span span span {padding:2px; border:
blue 1px dotted;}
span span span span span span span span span span span {padding:0px;
border: black 1px dotted;}
</style>
<div>S(S(KS)K)(S(S(KS)K)I)(S(S(KS)K)(S(S(KS)K)(S(S(KS)K)I)))(S(S(KS)K)(S
(S(KS)K)(S(S(KS)K)(S(S(KS)K)I))))</div>
<div>S<span>S<span>KS</span>K</span><span>S<span>S<span>KS</span>K</span
>I</span><span>S<span>S<span>KS</span>K</span><span>S<span>S<span>KS</sp
an>K</span><span>S<span>S<span>KS</span>K</span>I</span></span></span><s
pan>S<span>S<span>KS</span>K</span><span>S<span>S<span>KS</span>K</span>
<span>S<span>S<span>KS</span>K</span><span>S<span>S<span>KS</span>K</spa
n>I</span></span></span></span></div>
</html>
that's using a simple find replace on () for <span></span>
--
Phil Cook
--
I once tried to be apathetic, but I just couldn't be bothered
http://flipc.blogspot.com
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Phil Cook wrote:
> And lo on Fri, 09 Nov 2007 09:54:59 -0000, Invisible <voi### [at] devnull> did
> spake, saying:
>
>> OK, let's see the MathML for the following expression:
>>
>>
S(S(KS)K)(S(S(KS)K)I)(S(S(KS)K)(S(S(KS)K)(S(S(KS)K)I)))(S(S(KS)K)(S(S(KS)K)(S(S(KS)K)(S(S(KS)K)I))))
>>
>>
>> Care to tell me where one subexpression ends and the next one begins? ;-)
>
> Just for fun with spans
Looks good! (Although possibly the spacing is a little *too* generous.)
Certainly a lot easier to find subexpressions than in the raw text
above. Just a pitty it takes so many miles of CSS...
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
And lo on Fri, 09 Nov 2007 14:40:17 -0000, Invisible <voi### [at] devnull> did
spake, saying:
> Phil Cook wrote:
>> And lo on Fri, 09 Nov 2007 09:54:59 -0000, Invisible <voi### [at] devnull>
>> did spake, saying:
>>
>>> OK, let's see the MathML for the following expression:
>>>
>>>
S(S(KS)K)(S(S(KS)K)I)(S(S(KS)K)(S(S(KS)K)(S(S(KS)K)I)))(S(S(KS)K)(S(S(KS)K)(S(S(KS)K)(S(S(KS)K)I))))
>>> Care to tell me where one subexpression ends and the next one begins?
>>> ;-)
>> Just for fun with spans
>
> Looks good! (Although possibly the spacing is a little *too* generous.)
Well it's allowing for 11 levels with enough of a gap so that lines don't
blend, but it's adjustable.
> Certainly a lot easier to find subexpressions than in the raw text
> above. Just a pitty it takes so many miles of CSS...
Well the CSS is fixed so just dump it into a separate file and all you'll
have is the spans
--
Phil Cook
--
I once tried to be apathetic, but I just couldn't be bothered
http://flipc.blogspot.com
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Phil Cook wrote:
> And lo on Fri, 09 Nov 2007 14:40:17 -0000, Invisible <voi### [at] devnull> did
> spake, saying:
>
>> Certainly a lot easier to find subexpressions than in the raw text
>> above. Just a pitty it takes so many miles of CSS...
>
> Well the CSS is fixed so just dump it into a separate file and all
> you'll have is the spans
True.
I'm wondering if I could do something weird with inheritance and
percentage units...
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Phil Cook wrote:
>> And lo on Fri, 09 Nov 2007 14:40:17 -0000, Invisible <voi### [at] devnull>
>> did spake, saying:
>>
>>> Certainly a lot easier to find subexpressions than in the raw text
>>> above. Just a pitty it takes so many miles of CSS...
>>
>> Well the CSS is fixed so just dump it into a separate file and all
>> you'll have is the spans
>
> True.
>
> I'm wondering if I could do something weird with inheritance and
> percentage units...
All you need is server-side scripting. Count the parentheses levels and
generate the CSS with that many levels. But a pure CSS method would be nice.
Still, you should really use MathML. That's what it's made for...
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Nicolas Alvarez wrote:
> All you need is server-side scripting. Count the parentheses levels and
> generate the CSS with that many levels. But a pure CSS method would be
> nice.
Nah; just generate a file with 20 levels of nesting. If there's more
than that, you won't be able to disentangle it visually anyway. (And
it's not like the program will crash; it'll just show less clean output.)
> Still, you should really use MathML. That's what it's made for...
What, drawing pretty lines around bits of text?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
And lo on Fri, 09 Nov 2007 15:08:59 -0000, Nicolas Alvarez
<nic### [at] gmailisthebestcom> did spake, saying:
>> Phil Cook wrote:
>>> And lo on Fri, 09 Nov 2007 14:40:17 -0000, Invisible <voi### [at] devnull>
>>> did spake, saying:
>>>
>>>> Certainly a lot easier to find subexpressions than in the raw text
>>>> above. Just a pitty it takes so many miles of CSS...
>>>
>>> Well the CSS is fixed so just dump it into a separate file and all
>>> you'll have is the spans
>> True.
>> I'm wondering if I could do something weird with inheritance and
>> percentage units...
>
> All you need is server-side scripting. Count the parentheses levels and
> generate the CSS with that many levels.
Which was my first suggestion :-)
> But a pure CSS method would be nice.
>
> Still, you should really use MathML. That's what it's made for...
But little use unless you can serve it as application/xhtm+xml whereas
html is always served as text/html without the need for a dedicated server
component.
--
Phil Cook
--
I once tried to be apathetic, but I just couldn't be bothered
http://flipc.blogspot.com
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |