Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #15264 > unrolled thread

MathJax - "typesetting" of maths in Web pages

Started byDr J R Stockton <reply1231@merlyn.demon.co.uk.invalid>
First post2012-08-04 23:08 +0100
Last post2012-08-23 19:40 +0100
Articles 14 on this page of 34 — 9 participants

Back to article view | Back to comp.lang.javascript


Contents

  MathJax - "typesetting" of maths in Web pages Dr J R Stockton <reply1231@merlyn.demon.co.uk.invalid> - 2012-08-04 23:08 +0100
    Re: MathJax - "typesetting" of maths in Web pages "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2012-08-05 08:08 +0300
      Re: MathJax - "typesetting" of maths in Web pages Dr J R Stockton <reply1232@merlyn.demon.co.uk.invalid> - 2012-08-06 20:35 +0100
        Re: MathJax - "typesetting" of maths in Web pages "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2012-08-09 22:27 +0300
          Re: MathJax - "typesetting" of maths in Web pages Dr J R Stockton <reply1232@merlyn.demon.co.uk.invalid> - 2012-08-10 22:59 +0100
            Re: MathJax - "typesetting" of maths in Web pages Martin Leese <please@see.Web.for.e-mail.INVALID> - 2012-08-11 10:30 -0600
              Re: MathJax - "typesetting" of maths in Web pages Dr J R Stockton <reply1232@merlyn.demon.co.uk.invalid> - 2012-08-12 19:20 +0100
            Re: MathJax - "typesetting" of maths in Web pages "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2012-08-11 20:00 +0300
              Re: MathJax - "typesetting" of maths in Web pages Dr J R Stockton <reply1232@merlyn.demon.co.uk.invalid> - 2012-08-12 19:38 +0100
                Re: MathJax - "typesetting" of maths in Web pages "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2012-08-13 08:06 +0300
                  Re: MathJax - "typesetting" of maths in Web pages Dr J R Stockton <reply1233@merlyn.demon.co.uk.invalid> - 2012-08-14 19:29 +0100
        Re: MathJax - "typesetting" of maths in Web pages Norman Peelman <npeelmandog@cfl.rr.com> - 2012-08-12 09:24 -0400
          Re: MathJax - "typesetting" of maths in Web pages Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-08-12 17:44 +0200
          Re: MathJax - "typesetting" of maths in Web pages Dr J R Stockton <reply1233@merlyn.demon.co.uk.invalid> - 2012-08-13 19:23 +0100
            Re: MathJax - "typesetting" of maths in Web pages tlvp <mPiOsUcB.EtLlLvEp@att.net> - 2012-08-14 01:48 -0400
              Re: MathJax - "typesetting" of maths in Web pages "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2012-08-14 09:25 +0300
                Re: MathJax - "typesetting" of maths in Web pages tlvp <mPiOsUcB.EtLlLvEp@att.net> - 2012-08-14 22:44 -0400
                  Re: MathJax - "typesetting" of maths in Web pages Dr J R Stockton <reply1233@merlyn.demon.co.uk.invalid> - 2012-08-16 19:36 +0100
                Re: MathJax - "typesetting" of maths in Web pages Dr J R Stockton <reply1233@merlyn.demon.co.uk.invalid> - 2012-08-15 19:14 +0100
              Re: MathJax - "typesetting" of maths in Web pages Dr J R Stockton <reply1233@merlyn.demon.co.uk.invalid> - 2012-08-15 19:08 +0100
            Re: MathJax - "typesetting" of maths in Web pages Norman Peelman <npeelmandog@cfl.rr.com> - 2012-08-16 18:37 -0400
              Re: MathJax - "typesetting" of maths in Web pages Dr J R Stockton <reply1233@merlyn.demon.co.uk.invalid> - 2012-08-17 20:17 +0100
                Re: MathJax - "typesetting" of maths in Web pages Norman Peelman <npeelmandog@cfl.rr.com> - 2012-08-17 23:26 -0400
                  Re: MathJax - "typesetting" of maths in Web pages Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-08-18 19:54 +0200
                    Re: MathJax - "typesetting" of maths in Web pages Norman Peelman <npeelmandog@cfl.rr.com> - 2012-08-19 06:58 -0400
                  Re: MathJax - "typesetting" of maths in Web pages Dr J R Stockton <reply1233@merlyn.demon.co.uk.invalid> - 2012-08-19 19:06 +0100
    Re: MathJax - "typesetting" of maths in Web pages Norman Peelman <npeelmandog@cfl.rr.com> - 2012-08-16 14:24 -0400
      Re: MathJax - "typesetting" of maths in Web pages Dr J R Stockton <reply1233@merlyn.demon.co.uk.invalid> - 2012-08-17 19:58 +0100
        Re: MathJax - "typesetting" of maths in Web pages Norman Peelman <npeelmandog@cfl.rr.com> - 2012-08-17 23:01 -0400
          Re: MathJax - "typesetting" of maths in Web pages Dr J R Stockton <reply1233@merlyn.demon.co.uk.invalid> - 2012-08-19 19:09 +0100
            Re: MathJax - "typesetting" of maths in Web pages Norman Peelman <npeelmandog@cfl.rr.com> - 2012-08-19 21:26 -0400
              Re: MathJax - "typesetting" of maths in Web pages Dr J R Stockton <reply1234@merlyn.demon.co.uk.invalid> - 2012-08-21 20:34 +0100
                Re: MathJax - "typesetting" of maths in Web pages Norman Peelman <npeelmandog@cfl.rr.com> - 2012-08-21 19:47 -0400
                  Re: MathJax - "typesetting" of maths in Web pages Dr J R Stockton <reply1234@merlyn.demon.co.uk.invalid> - 2012-08-23 19:40 +0100

Page 2 of 2 — ← Prev page 1 [2]


#15379

FromNorman Peelman <npeelmandog@cfl.rr.com>
Date2012-08-16 18:37 -0400
Message-ID<k0jsnr$63q$1@dont-email.me>
In reply to#15353
On 08/13/2012 02:23 PM, Dr J R Stockton wrote:
> In comp.lang.javascript message <k08aq0$ikl$1@dont-email.me>, Sun, 12
> Aug 2012 09:24:15, Norman Peelman <npeelmandog@cfl.rr.com> posted:
>
>>
>>   I'm surprised that MathJax doesn't offer the ability to create static
>> output, but maybe they didn't expect people would have hundreds of
>> equations on a single page... If you could grab the .innerHTML and
>> generated styles for each equation then you could simply include them.
>
> I fear that those might be quite large, possibly larger than a well-
> coded image of the electronically-typeset equations (which would at
> least be better than a cut of the scanned images of the c.19 inky
> printing).
>
> And MathJax's typesetting, while quite good, is likely to improve with
> time, whereas a capture would not.
>
>

   MathJax appears to add a lot of code (both HTML and CSS) to the 
document. Upon closer examination it seems to me that MathJax should 
possibly consolidate the CSS as quite a bit is redundant. Your current 
page alone balloons from ~109KB to ~5.3MB


-- 
Norman
Registered Linux user #461062
AMD64X2 6400+ Ubuntu 10.04 64bit

[toc] | [prev] | [next] | [standalone]


#15389

FromDr J R Stockton <reply1233@merlyn.demon.co.uk.invalid>
Date2012-08-17 20:17 +0100
Message-ID<YayJfCFfjpLQFwRu@invalid.uk.co.demon.merlyn.invalid>
In reply to#15379
In comp.lang.javascript message <k0jsnr$63q$1@dont-email.me>, Thu, 16
Aug 2012 18:37:45, Norman Peelman <npeelmandog@cfl.rr.com> posted:

>On 08/13/2012 02:23 PM, Dr J R Stockton wrote:
>> In comp.lang.javascript message <k08aq0$ikl$1@dont-email.me>, Sun, 12
>> Aug 2012 09:24:15, Norman Peelman <npeelmandog@cfl.rr.com> posted:
>>
>>>
>>>   I'm surprised that MathJax doesn't offer the ability to create static
>>> output, but maybe they didn't expect people would have hundreds of
>>> equations on a single page... If you could grab the .innerHTML and
>>> generated styles for each equation then you could simply include them.
>>
>> I fear that those might be quite large, possibly larger than a well-
>> coded image of the electronically-typeset equations (which would at
>> least be better than a cut of the scanned images of the c.19 inky
>> printing).
>>
>> And MathJax's typesetting, while quite good, is likely to improve with
>> time, whereas a capture would not.
>>
>>
>
>  MathJax appears to add a lot of code (both HTML and CSS) to the
>document. Upon closer examination it seems to me that MathJax should
>possibly consolidate the CSS as quite a bit is redundant. Your current
>page alone balloons from ~109KB to ~5.3MB


It was under 58kB of ASCII when it left here.  That 5.3 MB must be the
size in RAM, which hardly matters.  Page authors can configure aspects
of the loading, which might help there.

At the moment, I first wanted to get it all working in as near a default
setup as I can, and next I want to move the equations into the HTML
representation of the Englished text, at <essai-3c.htm>.  That means
delaying MathJax start until completion of the existing pre-processing.
I gather that it would be easy enough if I first read and remember the
right parts of the documentation.

-- 
 (c) John Stockton, nr London, UK.    ?@merlyn.demon.co.uk     Turnpike v6.05.
 Website  <http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
 PAS EXE etc. : <http://www.merlyn.demon.co.uk/programs/> - see in 00index.htm
 Dates - miscdate.htm estrdate.htm js-dates.htm pas-time.htm critdate.htm etc.

[toc] | [prev] | [next] | [standalone]


#15398

FromNorman Peelman <npeelmandog@cfl.rr.com>
Date2012-08-17 23:26 -0400
Message-ID<k0n21a$l94$1@dont-email.me>
In reply to#15389
On 08/17/2012 03:17 PM, Dr J R Stockton wrote:
> In comp.lang.javascript message <k0jsnr$63q$1@dont-email.me>, Thu, 16
> Aug 2012 18:37:45, Norman Peelman <npeelmandog@cfl.rr.com> posted:
>
>> On 08/13/2012 02:23 PM, Dr J R Stockton wrote:
>>> In comp.lang.javascript message <k08aq0$ikl$1@dont-email.me>, Sun, 12
>>> Aug 2012 09:24:15, Norman Peelman <npeelmandog@cfl.rr.com> posted:
>>>
>>>>
>>>>    I'm surprised that MathJax doesn't offer the ability to create static
>>>> output, but maybe they didn't expect people would have hundreds of
>>>> equations on a single page... If you could grab the .innerHTML and
>>>> generated styles for each equation then you could simply include them.
>>>
>>> I fear that those might be quite large, possibly larger than a well-
>>> coded image of the electronically-typeset equations (which would at
>>> least be better than a cut of the scanned images of the c.19 inky
>>> printing).
>>>
>>> And MathJax's typesetting, while quite good, is likely to improve with
>>> time, whereas a capture would not.
>>>
>>>
>>
>>   MathJax appears to add a lot of code (both HTML and CSS) to the
>> document. Upon closer examination it seems to me that MathJax should
>> possibly consolidate the CSS as quite a bit is redundant. Your current
>> page alone balloons from ~109KB to ~5.3MB
>
>
> It was under 58kB of ASCII when it left here.  That 5.3 MB must be the
> size in RAM, which hardly matters.  Page authors can configure aspects
> of the loading, which might help there.
>

   Saving the 'generated' source (after MathJax does it's thing) results 
in a 5.3MB text file. All the generated <scripts> are left in even 
though they aren't needed anymore and many of the <span>s created 
contains duplicate inline styles.

> At the moment, I first wanted to get it all working in as near a default
> setup as I can, and next I want to move the equations into the HTML
> representation of the Englished text, at <essai-3c.htm>.  That means
> delaying MathJax start until completion of the existing pre-processing.
> I gather that it would be easy enough if I first read and remember the
> right parts of the documentation.
>

   It all looks very good so far.


-- 
Norman
Registered Linux user #461062
AMD64X2 6400+ Ubuntu 10.04 64bit

[toc] | [prev] | [next] | [standalone]


#15429

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2012-08-18 19:54 +0200
Message-ID<6163400.TXUiaJx4aB@PointedEars.de>
In reply to#15398
Norman Peelman wrote:

> On 08/17/2012 03:17 PM, Dr J R Stockton wrote:
>> In comp.lang.javascript message <k0jsnr$63q$1@dont-email.me>, Thu, 16
>> Aug 2012 18:37:45, Norman Peelman <npeelmandog@cfl.rr.com> posted:
>>>   MathJax appears to add a lot of code (both HTML and CSS) to the
>>> document. Upon closer examination it seems to me that MathJax should
>>> possibly consolidate the CSS as quite a bit is redundant. Your current
>>> page alone balloons from ~109KB to ~5.3MB
>>
>> It was under 58kB of ASCII when it left here.  That 5.3 MB must be the
>> size in RAM, which hardly matters.  Page authors can configure aspects
>> of the loading, which might help there.
> 
>    Saving the 'generated' source (after MathJax does it's thing) results
> in a 5.3MB text file. All the generated <scripts> are left in even
> though they aren't needed anymore

That is to be expected, as the document is not expected to be saved as 
rendered, but as it was.  Furthermore, there is no reliable method to remove 
all SCRIPT element nodes from a document tree once they are not needed 
anymore.

> and many of the <span>s created contains duplicate inline styles.

That would be suboptimal, indeed.  MathJax should use CSS classes, which 
would reduce the footprint considerably.


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

[toc] | [prev] | [next] | [standalone]


#15450

FromNorman Peelman <npeelmandog@cfl.rr.com>
Date2012-08-19 06:58 -0400
Message-ID<k0qgt6$a8m$1@dont-email.me>
In reply to#15429
On 08/18/2012 01:54 PM, Thomas 'PointedEars' Lahn wrote:
> Norman Peelman wrote:
>
>> On 08/17/2012 03:17 PM, Dr J R Stockton wrote:
>>> In comp.lang.javascript message <k0jsnr$63q$1@dont-email.me>, Thu, 16
>>> Aug 2012 18:37:45, Norman Peelman <npeelmandog@cfl.rr.com> posted:
>>>>    MathJax appears to add a lot of code (both HTML and CSS) to the
>>>> document. Upon closer examination it seems to me that MathJax should
>>>> possibly consolidate the CSS as quite a bit is redundant. Your current
>>>> page alone balloons from ~109KB to ~5.3MB
>>>
>>> It was under 58kB of ASCII when it left here.  That 5.3 MB must be the
>>> size in RAM, which hardly matters.  Page authors can configure aspects
>>> of the loading, which might help there.
>>
>>     Saving the 'generated' source (after MathJax does it's thing) results
>> in a 5.3MB text file. All the generated <scripts> are left in even
>> though they aren't needed anymore
>
> That is to be expected, as the document is not expected to be saved as
> rendered, but as it was.  Furthermore, there is no reliable method to remove
> all SCRIPT element nodes from a document tree once they are not needed
> anymore.
>
>> and many of the <span>s created contains duplicate inline styles.
>
> That would be suboptimal, indeed.  MathJax should use CSS classes, which
> would reduce the footprint considerably.
>
>

   It does use classes... it's all the slightly different <span>s with 
classes and inline styles (25400+)... removing the <script> .. 
</script>s and the obvious duplicate styles only saves about 100k... it 
renders in ~2 secs or so and the layout is correct but the fonts are 
borked... for some reason the @font classes aren't getting transfered... 
hmmm, thought I was on to something there for a moment. Btw, it did 
render nicely on my Android phone... only the context menu didn't work.

[toc] | [prev] | [next] | [standalone]


#15454

FromDr J R Stockton <reply1233@merlyn.demon.co.uk.invalid>
Date2012-08-19 19:06 +0100
Message-ID<oA5lp8CtsSMQFw+z@invalid.uk.co.demon.merlyn.invalid>
In reply to#15398
In comp.lang.javascript message <k0n21a$l94$1@dont-email.me>, Fri, 17
Aug 2012 23:26:32, Norman Peelman <npeelmandog@cfl.rr.com> posted:

>
>  Saving the 'generated' source (after MathJax does it's thing) results
>in a 5.3MB text file. All the generated <scripts> are left in even
>though they aren't needed anymore and many of the <span>s created
>contains duplicate inline styles.

That will be alleviated in the final version.

<http://www.merlyn.demon.co.uk/essai-3c.htm> is currently a full
translation with dummy equations generated by an internal pre-processor.
One sees the equations by downloading the original French PDF scan from
Belgium (5MB),

<http://www.merlyn.demon.co.uk/esai-jax.htm> is currently a full
transcription of Lagrange's equations into TeX/LaTeX, with MathJax auto-
started.

<http://www.merlyn.demon.co.uk/p231-jax.htm> is currently a one-page
translation with dummy equations generated by an internal pre-processor,
but when a button is pressed the dummy equations rapidly turn into
TeX/LaTeX which after cogitation are turned into typeset style.

The present plan is to polish what I have for a little while, and then
to apply to the translation page, or to a copy of it, the equations of
esai-jax and the code of p231-jax.

Then you will be able to load and save the page without pressing the
button, to get (estimated) less than 150kB saved - and whenever you
inflate it you will get the latest MathJax used.  Then you can "Save As"
that to get a quick-load version.

-- 
 (c) John Stockton, nr London, UK.    ?@merlyn.demon.co.uk     Turnpike v6.05.
 Website  <http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
 PAS EXE etc. : <http://www.merlyn.demon.co.uk/programs/> - see in 00index.htm
 Dates - miscdate.htm estrdate.htm js-dates.htm pas-time.htm critdate.htm etc.

[toc] | [prev] | [next] | [standalone]


#15376

FromNorman Peelman <npeelmandog@cfl.rr.com>
Date2012-08-16 14:24 -0400
Message-ID<k0jdto$6qq$1@dont-email.me>
In reply to#15264
On 08/04/2012 06:08 PM, Dr J R Stockton wrote:
> I recently followed a link to a Scholarpedia page, and observed in it
> some "properly typeset" equations which were not images.  Right-clicking
> such an equation shows a substitute context menu (cf. CLJ FAQ item) with
> a link to <http://www.mathjax.org/help-v2/user/>.
>
> It uses a JavaScript include file to edit the transmitted body of the
> page; there is a perceptible delay.
>
> Any experience of using MathJax?  Any advice?  Is LaTex or MathML or
> AsciiMath the better option?  Which is easier?  Will support continue?
> Do browsers have a reliable alternative?
>
> There are better demonstrations at <http://www.mathjax.org/>, but my own
> test page (using TeX) is growing at
>          <http://www.merlyn.demon.co.uk/math-jax.htm>.
>

Your updated page takes ~46 seconds to load and render all the equations 
(on my system). I think you have an error on page 290.


-- 
Norman
Registered Linux user #461062
AMD64X2 6400+ Ubuntu 10.04 64bit

[toc] | [prev] | [next] | [standalone]


#15388

FromDr J R Stockton <reply1233@merlyn.demon.co.uk.invalid>
Date2012-08-17 19:58 +0100
Message-ID<OLecbRDuRpLQFwT2@invalid.uk.co.demon.merlyn.invalid>
In reply to#15376
In comp.lang.javascript message <k0jdto$6qq$1@dont-email.me>, Thu, 16
Aug 2012 14:24:55, Norman Peelman <npeelmandog@cfl.rr.com> posted:

>On 08/04/2012 06:08 PM, Dr J R Stockton wrote:
>> I recently followed a link to a Scholarpedia page, and observed in it
>> some "properly typeset" equations which were not images.  Right-clicking
>> such an equation shows a substitute context menu (cf. CLJ FAQ item) with
>> a link to <http://www.mathjax.org/help-v2/user/>.
>>
>> It uses a JavaScript include file to edit the transmitted body of the
>> page; there is a perceptible delay.
>>
>> Any experience of using MathJax?  Any advice?  Is LaTex or MathML or
>> AsciiMath the better option?  Which is easier?  Will support continue?
>> Do browsers have a reliable alternative?
>>
>> There are better demonstrations at <http://www.mathjax.org/>, but my own
>> test page (using TeX) is growing at
>>          <http://www.merlyn.demon.co.uk/math-jax.htm>.
>>
>
>Your updated page takes ~46 seconds to load and render all the
>equations (on my system).

Without knowing what your system is, that is of little help.

> I think you have an error on page 290.

What do you mean by that?  is the algebra wrong? does it disagree with
Serrat's c.19 version? have I missed an equation out? ...  In Chrome 21,
the bar of a fraction is, or can be, too long (that's a known
MathJax/Chrome bug, in hand).  Aha - last line, first equation, RHS,
second term, shows '\muf' in red, should be 'uf' in black, with 'u'
there representing Greek 'mu'.  A possible token such as "\mu" is
terminated by the first non-letter, so the code must be "\mu f", not
"\muf", but the next equation can use "\mu'f".  Thanks.

-- 
 (c) John Stockton, nr London, UK.  For Mail, see Home Page.  Turnpike, WinXP.
 Web  <http://www.merlyn.demon.co.uk/> - FAQ-type topics, acronyms, and links.
 Command-prompt MiniTrue is useful for viewing/searching/altering files. Free,
 DOS/Win/UNIX now 2.0.6; see <URL:http://www.merlyn.demon.co.uk/pc-links.htm>.

[toc] | [prev] | [next] | [standalone]


#15397

FromNorman Peelman <npeelmandog@cfl.rr.com>
Date2012-08-17 23:01 -0400
Message-ID<k0n0hp$eo8$1@dont-email.me>
In reply to#15388
On 08/17/2012 02:58 PM, Dr J R Stockton wrote:
> In comp.lang.javascript message <k0jdto$6qq$1@dont-email.me>, Thu, 16
> Aug 2012 14:24:55, Norman Peelman <npeelmandog@cfl.rr.com> posted:
>
>> On 08/04/2012 06:08 PM, Dr J R Stockton wrote:
>>> I recently followed a link to a Scholarpedia page, and observed in it
>>> some "properly typeset" equations which were not images.  Right-clicking
>>> such an equation shows a substitute context menu (cf. CLJ FAQ item) with
>>> a link to <http://www.mathjax.org/help-v2/user/>.
>>>
>>> It uses a JavaScript include file to edit the transmitted body of the
>>> page; there is a perceptible delay.
>>>
>>> Any experience of using MathJax?  Any advice?  Is LaTex or MathML or
>>> AsciiMath the better option?  Which is easier?  Will support continue?
>>> Do browsers have a reliable alternative?
>>>
>>> There are better demonstrations at <http://www.mathjax.org/>, but my own
>>> test page (using TeX) is growing at
>>>           <http://www.merlyn.demon.co.uk/math-jax.htm>.
>>>
>>
>> Your updated page takes ~46 seconds to load and render all the
>> equations (on my system).
>
> Without knowing what your system is, that is of little help.
>

Hmmm, I thought for sure my sig was included... any way, it's an AMDX2 
6400+ (dual core, DDR2)


>> I think you have an error on page 290.
>

Sorry about the vagueness...

> What do you mean by that?  is the algebra wrong? does it disagree with
> Serrat's c.19 version? have I missed an equation out? ...  In Chrome 21,
> the bar of a fraction is, or can be, too long (that's a known
> MathJax/Chrome bug, in hand).  Aha - last line, first equation, RHS,
> second term, shows '\muf' in red, should be 'uf' in black, with 'u'
> there representing Greek 'mu'.  A possible token such as "\mu" is
> terminated by the first non-letter, so the code must be "\mu f", not
> "\muf", but the next equation can use "\mu'f".  Thanks.
>

:)

-- 
Norman
Registered Linux user #461062
AMD64X2 6400+ Ubuntu 10.04 64bit

[toc] | [prev] | [next] | [standalone]


#15455

FromDr J R Stockton <reply1233@merlyn.demon.co.uk.invalid>
Date2012-08-19 19:09 +0100
Message-ID<+gdghtD$uSMQFw$2@invalid.uk.co.demon.merlyn.invalid>
In reply to#15397
In comp.lang.javascript message <k0n0hp$eo8$1@dont-email.me>, Fri, 17
Aug 2012 23:01:12, Norman Peelman <npeelmandog@cfl.rr.com> posted:

>
>Hmmm, I thought for sure my sig was included... any way, it's an AMDX2
>6400+ (dual core, DDR2)

So it was ...

Would you care to look at <http://www.merlyn.demon.co.uk/linxchek.htm>,
using Linux?  I find it very useful when shuffling parts of my Web site.

To get it to work properly on any machine, it is necessary first to read
the included instructions - and that needs testing.

To get it to work properly on any machine, it is necessary to provide a
directory file.  The instructions for that, written for Windows, are in
the section "Directory File".  For Windows, it is just necessary to run,
in the right folder, DIR /B /S > $DIR.TXT .

For UNIX, I don't know.  Perhaps something like the suggested
                find /current ! -type d -print
will do it, though that can hardly be sufficient - it would need to give
a format sufficiently like the windows one.  Alternatively, it might be
necessary to alter the JavaScript that processes the file.  Then the
instructions can have a UNIX section.

The position is that my JavaScript can load files into an iframe, but it
has no means of recognising that a file is missing, and will try to use
whatever it seems to have got.

Of course, if there is a cross-browser cross-OS cross-server way of
recognising missingness, I can use that instead, which will be better
all round.

-- 
 (c) John Stockton, nr London, UK.  For Mail, see Home Page.  Turnpike, WinXP.
 Web  <http://www.merlyn.demon.co.uk/> - FAQ-type topics, acronyms, and links.
 Command-prompt MiniTrue is useful for viewing/searching/altering files. Free,
 DOS/Win/UNIX now 2.0.6; see <URL:http://www.merlyn.demon.co.uk/pc-links.htm>.

[toc] | [prev] | [next] | [standalone]


#15458

FromNorman Peelman <npeelmandog@cfl.rr.com>
Date2012-08-19 21:26 -0400
Message-ID<k0s3ot$f69$1@dont-email.me>
In reply to#15455
On 08/19/2012 02:09 PM, Dr J R Stockton wrote:
> In comp.lang.javascript message <k0n0hp$eo8$1@dont-email.me>, Fri, 17
> Aug 2012 23:01:12, Norman Peelman <npeelmandog@cfl.rr.com> posted:
>
>>
>> Hmmm, I thought for sure my sig was included... any way, it's an AMDX2
>> 6400+ (dual core, DDR2)
>
> So it was ...
>
> Would you care to look at <http://www.merlyn.demon.co.uk/linxchek.htm>,
> using Linux?  I find it very useful when shuffling parts of my Web site.
>
> To get it to work properly on any machine, it is necessary first to read
> the included instructions - and that needs testing.
>
> To get it to work properly on any machine, it is necessary to provide a
> directory file.  The instructions for that, written for Windows, are in
> the section "Directory File".  For Windows, it is just necessary to run,
> in the right folder, DIR /B /S > $DIR.TXT .
>
> For UNIX, I don't know.  Perhaps something like the suggested
>                  find /current ! -type d -print
> will do it, though that can hardly be sufficient - it would need to give
> a format sufficiently like the windows one.  Alternatively, it might be
> necessary to alter the JavaScript that processes the file.  Then the
> instructions can have a UNIX section.
>

find $PWD > <filename>

will generate a file listing of the type you are looking for...

/var/www/example/index.htm
/var/www/example/images/example.jpg


> The position is that my JavaScript can load files into an iframe, but it
> has no means of recognising that a file is missing, and will try to use
> whatever it seems to have got.
>
> Of course, if there is a cross-browser cross-OS cross-server way of
> recognising missingness, I can use that instead, which will be better
> all round.
>

  Actually, Google Chrome is the only browser that showed it had read 
the dir file (with an erro msg to use different browser)... FF14 
wouldn't even load a local file (dunno what's up with that) and Opera 
and Konqueror show EMPTY. Don't have Safari and didn't install the 
optional scripts but will look at it tomorrow maybe.


-- 
Norman
Registered Linux user #461062
AMD64X2 6400+ Ubuntu 10.04 64bit

[toc] | [prev] | [next] | [standalone]


#15483

FromDr J R Stockton <reply1234@merlyn.demon.co.uk.invalid>
Date2012-08-21 20:34 +0100
Message-ID<FsjuCWCFL+MQFwZD@invalid.uk.co.demon.merlyn.invalid>
In reply to#15458
In comp.lang.javascript message <k0s3ot$f69$1@dont-email.me>, Sun, 19
Aug 2012 21:26:52, Norman Peelman <npeelmandog@cfl.rr.com> posted:

>On 08/19/2012 02:09 PM, Dr J R Stockton wrote:
>> In comp.lang.javascript message <k0n0hp$eo8$1@dont-email.me>, Fri, 17
>> Aug 2012 23:01:12, Norman Peelman <npeelmandog@cfl.rr.com> posted:
>>
>>>
>>> Hmmm, I thought for sure my sig was included... any way, it's an AMDX2
>>> 6400+ (dual core, DDR2)
>>
>> So it was ...
>>
>> Would you care to look at <http://www.merlyn.demon.co.uk/linxchek.htm>,
>> using Linux?  I find it very useful when shuffling parts of my Web site.
>>
>> To get it to work properly on any machine, it is necessary first to read
>> the included instructions - and that needs testing.
>>
>> To get it to work properly on any machine, it is necessary to provide a
>> directory file.  The instructions for that, written for Windows, are in
>> the section "Directory File".  For Windows, it is just necessary to run,
>> in the right folder, DIR /B /S > $DIR.TXT .
>>
>> For UNIX, I don't know.  Perhaps something like the suggested
>>                  find /current ! -type d -print
>> will do it, though that can hardly be sufficient - it would need to give
>> a format sufficiently like the windows one.  Alternatively, it might be
>> necessary to alter the JavaScript that processes the file.  Then the
>> instructions can have a UNIX section.
>>
>
>find $PWD > <filename>
>
>will generate a file listing of the type you are looking for...
>
>/var/www/example/index.htm
>/var/www/example/images/example.jpg

That should be acceptable, if those strings are OK for loading an iframe
with 'src = <string>'.


>> The position is that my JavaScript can load files into an iframe, but it
>> has no means of recognising that a file is missing, and will try to use
>> whatever it seems to have got.
>>
>> Of course, if there is a cross-browser cross-OS cross-server way of
>> recognising missingness, I can use that instead, which will be better
>> all round.
>>
>
> Actually, Google Chrome is the only browser that showed it had read
>the dir file (with an erro msg to use different browser)... FF14
>wouldn't even load a local file (dunno what's up with that) and Opera
>and Konqueror show EMPTY. Don't have Safari and didn't install the
>optional scripts but will look at it tomorrow maybe.

I've upgraded those messages.

All browsers loaded "EMPTY" (EMPTY is now CLEARED).  Cooperative
browsers rapidly replace it with something else - a web page, if I
recall aright.

The page processes about 180 of my pages per minute, on my P4/3GHz WinXP
Firefox.

-- 
 (c) John Stockton, nr London, UK.  Mail via homepage.  Turnpike v6.05  MIME.
  Web  <http://www.merlyn.demon.co.uk/> - FAQqish topics, acronyms and links;
  Astro stuff via astron-1.htm, gravity0.htm ; quotings.htm, pascal.htm, etc.

[toc] | [prev] | [next] | [standalone]


#15486

FromNorman Peelman <npeelmandog@cfl.rr.com>
Date2012-08-21 19:47 -0400
Message-ID<k116n3$70u$1@dont-email.me>
In reply to#15483
On 08/21/2012 03:34 PM, Dr J R Stockton wrote:
> In comp.lang.javascript message <k0s3ot$f69$1@dont-email.me>, Sun, 19
> Aug 2012 21:26:52, Norman Peelman <npeelmandog@cfl.rr.com> posted:
>
>> On 08/19/2012 02:09 PM, Dr J R Stockton wrote:
>>> In comp.lang.javascript message <k0n0hp$eo8$1@dont-email.me>, Fri, 17
>>> Aug 2012 23:01:12, Norman Peelman <npeelmandog@cfl.rr.com> posted:
>>>
>>>>
>>>> Hmmm, I thought for sure my sig was included... any way, it's an AMDX2
>>>> 6400+ (dual core, DDR2)
>>>
>>> So it was ...
>>>
>>> Would you care to look at <http://www.merlyn.demon.co.uk/linxchek.htm>,
>>> using Linux?  I find it very useful when shuffling parts of my Web site.
>>>
>>> To get it to work properly on any machine, it is necessary first to read
>>> the included instructions - and that needs testing.
>>>
>>> To get it to work properly on any machine, it is necessary to provide a
>>> directory file.  The instructions for that, written for Windows, are in
>>> the section "Directory File".  For Windows, it is just necessary to run,
>>> in the right folder, DIR /B /S > $DIR.TXT .
>>>
>>> For UNIX, I don't know.  Perhaps something like the suggested
>>>                   find /current ! -type d -print
>>> will do it, though that can hardly be sufficient - it would need to give
>>> a format sufficiently like the windows one.  Alternatively, it might be
>>> necessary to alter the JavaScript that processes the file.  Then the
>>> instructions can have a UNIX section.
>>>
>>
>> find $PWD > <filename>
>>
>> will generate a file listing of the type you are looking for...
>>
>> /var/www/example/index.htm
>> /var/www/example/images/example.jpg
>
> That should be acceptable, if those strings are OK for loading an iframe
> with 'src = <string>'.
>

/var is a mount point such as C:\

>
>>> The position is that my JavaScript can load files into an iframe, but it
>>> has no means of recognising that a file is missing, and will try to use
>>> whatever it seems to have got.
>>>
>>> Of course, if there is a cross-browser cross-OS cross-server way of
>>> recognising missingness, I can use that instead, which will be better
>>> all round.
>>>
>>
>> Actually, Google Chrome is the only browser that showed it had read
>> the dir file (with an erro msg to use different browser)... FF14
>> wouldn't even load a local file (dunno what's up with that) and Opera
>> and Konqueror show EMPTY. Don't have Safari and didn't install the
>> optional scripts but will look at it tomorrow maybe.
>
> I've upgraded those messages.
>
> All browsers loaded "EMPTY" (EMPTY is now CLEARED).  Cooperative
> browsers rapidly replace it with something else - a web page, if I
> recall aright.
>

Chrome gave me the contents of the dir list...

> The page processes about 180 of my pages per minute, on my P4/3GHz WinXP
> Firefox.
>

-- 
Norman
Registered Linux user #461062
AMD64X2 6400+ Ubuntu 10.04 64bit

[toc] | [prev] | [next] | [standalone]


#15535

FromDr J R Stockton <reply1234@merlyn.demon.co.uk.invalid>
Date2012-08-23 19:40 +0100
Message-ID<VkvqApFwknNQFwjF@invalid.uk.co.demon.merlyn.invalid>
In reply to#15486
In comp.lang.javascript message <k116n3$70u$1@dont-email.me>, Tue, 21
Aug 2012 19:47:46, Norman Peelman <npeelmandog@cfl.rr.com> posted:

>
>Chrome gave me the contents of the dir list...
>

That means, of course, that Chrome has read that file.  It does not, of
itself, mean that JavaScript has been able to read from the iframe.  If
JavaScript fails, try..catch, to read from the iframe, there should be
an alert.  But if it reads an empty body element ??? <test> it would
have stopped for no evident reason.

What did the status line say?  That's the line between the textarea and
the iframe, under the long green button?  What do the Chrome developer
tools indicate?  For me, they are accessed by Spanner, Tools.

If you do not have a file matching the entry in the "Starting Page"
control, the browser should give some sort of "file not found" message.

I've added a few status calls in the region where your run seems to have
stopped.

Thanks for your interest.

-- 
 (c) John Stockton, Surrey, UK.  ?@merlyn.demon.co.uk   Turnpike v6.05   MIME.
   Web  <http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
 Proper <= 4-line sig. separator as above, a line exactly "-- " (SonOfRFC1036)
 Do not Mail News to me. Before a reply, quote with ">" or "> " (SonOfRFC1036)

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | comp.lang.javascript


csiph-web