|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Phil Cook wrote:
> And lo on Wed, 07 Nov 2007 09:36:17 -0000, Invisible <voi### [at] devnull> did
> spake, saying:
>
>> Well, that'll work... but surely there's some W3C compliant way of
>> doing this transparently without such low-level hacks?
>
> This is a W3C compliant way - HTML+CSS, what's not compliant about it?
> The only thing you can moan about is the use of style in a strict.
It just seems a pitty to have to litter the code with style information
that should be in a seperate stylesheet, that's all.
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...
>> (I still don't understand why having a large box inside doesn't cause
>> the containing box to enlarge itself...)
>
> It does if you use a block rather then an inline element.
But then it adds unwanted linebreaks.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
And lo on Wed, 07 Nov 2007 12:34:50 -0000, Invisible <voi### [at] devnull> did
spake, saying:
> Phil Cook wrote:
>> And lo on Wed, 07 Nov 2007 09:36:17 -0000, Invisible <voi### [at] devnull>
>> did spake, saying:
>>
>>> Well, that'll work... but surely there's some W3C compliant way of
>>> doing this transparently without such low-level hacks?
>> This is a W3C compliant way - HTML+CSS, what's not compliant about it?
>> The only thing you can moan about is the use of style in a strict.
>
> It just seems a pitty to have to litter the code with style information
> that should be in a seperate stylesheet, that's all.
>
> 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. You could have a fixed css file containing the following
html {margin:20px;}
span {border: red 1px solid;}
span {padding:20px;}
span span {padding:18px;}
span span span {padding:16px;}
...
Assuming ten levels max and you would at least have a fixed height for the
equation you're displaying
>>> (I still don't understand why having a large box inside doesn't cause
>>> the containing box to enlarge itself...)
>> It does if you use a block rather then an inline element.
>
> But then it adds unwanted linebreaks.
Yep life's a bitch.
--
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 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
|
|
| |
| |
|
|
|
|
| |