Editing Math Formulas

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • lbrtchx@hotmail.com

    Editing Math Formulas

    I am trying to write up a page with Math formulas (statistical ones)
    ~
    Latest news coverage, email, free stock quotes, live scores and video are just the beginning. Discover more every day at Yahoo!

    ~
    The thing is that I am not able to make it look OK using HTML. I
    would like to somehow mark up parenthesis using the character entities
    for vertical bars and solid front and back slashes, but
    ~
    <td align="left">&# 124;</td>
    ~
    doesn't appear to be working
    ~
    Does it make sense to waste your time learning MathML (http://
    www.w3.org/TR/REC-MathML/) or is it better using a format like PDF?
    ~
    Also I would prefer to use and authoring tool like scribus and save
    files as PDF. Any tutorials that make sense out there. I have had
    cases in which "Google" made me waste time. This is why I would rather
    ask
    ~
    lbrtchx

  • fred wang

    #2
    Re: Editing Math Formulas

    On Apr 8, 6:36 pm, lbrt...@hotmail .com wrote:
    I am trying to write up a page with Math formulas (statistical ones)
    ~
    Latest news coverage, email, free stock quotes, live scores and video are just the beginning. Discover more every day at Yahoo!

    ~
    The thing is that I am not able to make it look OK using HTML. I
    would like to somehow mark up parenthesis using the character entities
    for vertical bars and solid front and back slashes, but
    ~
    <td align="left">|</td>
    ~
    doesn't appear to be working
    ~
    Does it make sense to waste your time learningMathML(http://www.w3.org/TR/REC-MathML/) or is it better using a format like PDF?
    ~
    Also I would prefer to use and authoring tool like scribus and save
    files as PDF. Any tutorials that make sense out there. I have had
    cases in which "Google" made me waste time. This is why I would rather
    ask
    ~
    lbrtchx
    You should better use MathML than HTML to code mathematical formulae.
    The W3C specification indicates that MathML is not supposed to be
    coded directly. You can use a WYSIWYG editor such as Amaya.

    Fred

    Comment

    • Jukka K. Korpela

      #3
      Re: Editing Math Formulas

      Scripsit lbrtchx@hotmail .com:
      I am trying to write up a page with Math formulas (statistical ones)
      I'd suggest checking http://www.cs.tut.fi/~jkorpela/math/ which might give
      you both a general idea and some specific hints. The general idea is that
      you can't do much with mathematical expressions beyond simple linear or
      linearized expressions.
      You're trying to present a general sum (with a summation symbol and with
      index expressions below and above it) as well as a two-dimension division,
      though a very simple one (1 over N). This gets rather complicated. Although
      it can be arranged, to some extent and with some reservations, things get
      awkward if you need lots of similar or more complicated expressions.

      Using a different strategy, created a demo page for a way to present your
      expression:

      It gives a reasonably good appearance on IE 7 but falls apart on other
      browsers, since they don't support display: inline-block. (The technique
      creates two-dimensional constructs from <spanelements wrapped inside an
      outer <span>, making the outer <spanan inline block and the inner <span>s
      blocks with small widths.) With considerable care and extra markup, you
      could probably make it degrade gracefully into something readable and
      correct, though flat, on other browsers.

      In this case, I'd suggest something simple and linear, like

      <p>&mu;<sub>N </sub= (&sum;x<sub>i </sub>)/N,
      with i = 1, &hellip;, N</p>

      This works reasonably, does not depend on CSS, and produces a readable
      presentation. Anyone who can understand the nice two-dimensional equation
      can probably understand this flattened presentation as well.

      (Note: For simplicity, I haven't added any markup for making variables
      appear in italics here.)
      The thing is that I am not able to make it look OK using HTML. I
      would like to somehow mark up parenthesis using the character entities
      for vertical bars and solid front and back slashes, but
      ~
      <td align="left">&# 124;</td>
      ~
      doesn't appear to be working
      Using a character reference like &#124; is not relevant here. You could just
      as well, or better, use the character | itself. But the problem is that you
      are trying to construct a parenthesis-like symbol from \, |, and /. That
      would not result in a good rendering even under the best circumstances. You
      could use the parenthesis character itself in a large font.

      On the other hand, when you have just 1 over N as a multiplier, you could
      just omit the parentheses and perhaps put a multiplication sign (&times;)
      after it.

      Using a monospace font doesn't make a good impression. It may superficially
      solve some problems, but it really won't take you far.
      Does it make sense to waste your time learning MathML (http://
      www.w3.org/TR/REC-MathML/) or is it better using a format like PDF?
      No. Not for purposes like this. What you use depends on what you aim at and
      how complicated your material is.

      Notes on characters (my favorite topic):

      You've used &#181;, which denotes the micro sign. It is historically based
      on the Greek letter small mu but logically distinct from it, and may look
      different, too.

      You have used &mdash;&mdas h; which is a bit tricky way, and other approaches
      produce a long line more reliably. If you need the construct in other
      contexts, note that em dashes are not joining in all fonts, i.e. there may
      be a small gap between two consecutive dashes (at least unless you set their
      font suitably).

      --
      Jukka K. Korpela ("Yucca")


      Comment

      • Jukka K. Korpela

        #4
        Re: Editing Math Formulas

        Scripsit fred wang:
        You should better use MathML than HTML to code mathematical formulae.
        Why? How many browsers render MathML at all? If you present something in
        MathML format on the web, how many people will be able and willing to view
        it a) instantly without installing new software or b) at all?

        If HTML (and CSS) isn't enough for your math purposes, then use some
        software to generate math formulas as images (as needed - e.g. MathWorld
        uses this approach extensively even for simple formulas where it's not
        needed).
        The W3C specification indicates that MathML is not supposed to be
        coded directly.
        Well, it's surely not suitable for that, since it's a confusing mixture of
        logical and physical markup.

        --
        Jukka K. Korpela ("Yucca")


        Comment

        • fred wang

          #5
          Re: Editing Math Formulas

          Why? How many browsers renderMathMLat all? If you present something inMathMLformat on the web, how many people will be able and willing to view
          it a) instantly without installing new software or b) at all?
          Yes, it is the major reproach we can do to MathML : it is not widely
          used (personnaly only a third of people visiting my website uses
          Firefox and so are able to view Mathml). Nevertheless is it really a
          good reason not to use it ? W3C made MathML not only to solve the HTML
          difficulties to display mathematical formulae but also for some
          important issues such as accessibility, interaction with computer
          algebra system, search engine for mathematical formulae (such as
          MathWebSearch). .. If nobody starts to use it then all this good plans
          will never be applied.
          If HTML (and CSS) isn't enough for your math purposes, then use some
          software to generate math formulas as images (as needed - e.g. MathWorld
          uses this approach extensively even for simple formulas where it's not
          needed).
          >
          The W3C specification indicates thatMathMLis not supposed to be
          coded directly.
          >
          Well, it's surely not suitable for that, since it's a confusing mixture of
          logical and physical markup.
          I disagree with the approach you propose. As I said, MathML is the
          right way to display mathematical formulae wheras it is not the
          purpose of HTML+CSS. You seem to know a lot about CSS so you can
          understand that it is as if somebody uses <tableinstead of CSS for
          the layout of his webpage. This does not correspond at all to the idea
          of "semantic web".
          Moreover, if MathML code is difficult to produce by hand, making
          formulae with CSS doesn't appear easier. You admit that your method
          could not be applied for more complex formulae and propose images, but
          let me tell you that it is worse : bad printing quality, size on
          server, time to load pictures, layout not adpated with surrounded
          text, problems for visually impaired (Firevox already exists for
          MathML), impossibility to zoom in/out...

          The fact it could not be displayed by the browser the most used is
          really a problem, but we can take great advantages from MathML, so
          isn't it worth ?

          Cordially,

          Fred

          Comment

          • Sherm Pendley

            #6
            Re: Editing Math Formulas

            lbrtchx@hotmail .com writes:
            Also I would prefer to use and authoring tool like scribus and save
            files as PDF.
            If you want PS or PDF output, you should have a look at TeX or LaTeX.

            sherm--

            --
            Web Hosting by West Virginians, for West Virginians: http://wv-www.net
            Cocoa programming in Perl: http://camelbones.sourceforge.net

            Comment

            • Scott Bryce

              #7
              Re: Editing Math Formulas

              lbrtchx@hotmail .com wrote:
              Does it make sense to waste your time learning MathML (http://
              www.w3.org/TR/REC-MathML/) or is it better using a format like PDF?
              I use PDF, but there is another reason I use PDF. I generate output that
              is intended to be printed, rather than read on screen.

              I can't comment on MathML. In the few occasions where I have needed math
              formulas on screen, and HTML was not adequate, I have used images.
              Also I would prefer to use and authoring tool like scribus and save
              files as PDF.
              I spent a couple of weeks reading the PDF spec published by Adobe, and
              just trying things out using Perl scripts to generate the output. It was
              not easy, so it may not be the best approach for you. A good place to
              ask about your options would be comp.text.pdf.

              Comment

              • lbrtchx@hotmail.com

                #8
                Re: Editing Math Formulas

                I see korpela knows exactly where it hurst ;-), but I also clearly
                see Fred's point and since as they say "the client is always right", I
                will have to author two files one as mathml and the other as pdf
                ~
                I spent a couple of weeks reading the PDF spec published by Adobe, and
                just trying things out using Perl scripts to generate the output.
                ~
                You might know about this OS project, but you should check out
                http://podofo.sourceforge.net/ they even have a "PDF browser"
                ~

                ~
                lbrtchx

                Comment

                • Jukka K. Korpela

                  #9
                  Re: Editing Math Formulas

                  Scripsit lbrtchx@hotmail .com:
                  I see korpela knows exactly where it hurst ;-), but I also clearly
                  see Fred's point and since as they say "the client is always right", I
                  will have to author two files one as mathml and the other as pdf
                  And what would you then offer to the World Wide Web?

                  Firefox is still a minority browser and will probably remain that way.
                  Besides, its MathML support does not impress me. When viewing e.g. the
                  MathML examples at

                  (most of which are fairly simple, often nothing more than a sequence of
                  characters that could be written simply in HTML), I find some good
                  renderings, many tolerable renderings, and some real failures.

                  If you really have professional-quality math papers to be distributed as
                  printed, though in electronic format, then use some flavor of TeX _or_ use
                  some software that produces PDF for you. It wouldn't really be authoring for
                  the WWW - just using HTTP as the transport protocol.

                  If you wish to author for the WWW, you have to adapt to the current and
                  near-future limitations. There's a lot less you can do than in, say, AMSTeX
                  in the hands of a competent user, but considerably more than in plain text.

                  --
                  Jukka K. Korpela ("Yucca")


                  Comment

                  • fred wang

                    #10
                    Re: Editing Math Formulas

                    I see korpela knows exactly where it hurst ;-), but I also clearly
                    see Fred's point and since as they say "the client is always right", I
                    will have to author two files one as mathml and the other as pdf
                    I don't know a lot about LaTeX, but I think it is a good choice if you
                    simply want to produce printable documents. The only reproach I find
                    is that it is not really accessible for beginners, as you have to
                    learn its syntax. Nevertheless, it is widespread enough, so you will
                    not have many problems to find help and tools to produce pdf files.

                    Now korpela asks "And what would you then offer to the World Wide Web?
                    ". As I said, World Wide Web philosophy is a bit different than
                    printable documents (that finally is equivalent to the CSS method
                    proposed) and the choice of MathML is more appropriate. To make web
                    pages readable by Firefox, you should save it as xml file. Here is an
                    example : http://www.maths-informatique-jeux.c...set_theory.xml
                    .. To create web pages, the W3C's web browser/editor can be found
                    here : http://www.w3.org/Amaya/ .

                    Fred

                    Comment

                    • lbrtchx@hotmail.com

                      #11
                      Re: Editing Math Formulas

                      I think I will end up going for a three prompt strategy
                      ~
                      1._ using LaTeX to author Math documents and produce pdf printer-
                      friendly docs.
                      I really don't think that the web was design as the next "TV set" or
                      "book" to me the web is just a "click and go" medium. Besides most
                      tech people I know like to print out their own papers and jot down
                      their own notes on them
                      ~
                      Even the firefox people recommend to use LaTeX
                      // __ http://www.mozilla.org/projects/mathml/
                      "The lingua franca for formula-intensive documents is TeX/LaTeX and
                      the use of MathML is not yet widespread."
                      ~
                      2._ use these off and online LaTeX MathML translation packages
                      // __ http://pear.math.pitt.edu/mathzilla/
                      ~
                      3._ Advising people to install Firefox (which is my site's designed
                      for and preferred browser)
                      ~
                      lbrtchx

                      Comment

                      • Scott Bryce

                        #12
                        Re: Editing Math Formulas

                        lbrtchx@hotmail .com wrote:
                        3._ Advising people to install Firefox (which is my site's designed
                        for and preferred browser)
                        This really isn't a good option. You will be making your site too
                        cumbersome to read for those who do not already have FireFox installed.

                        Besides most
                        tech people I know like to print out their own papers and jot down
                        their own notes on them
                        If this is the way you expect the output from your site to be used, just
                        go with PDF.

                        Comment

                        • fred wang

                          #13
                          Re: Editing Math Formulas

                          On Apr 9, 3:55 pm, lbrt...@hotmail .com wrote:
                          I think I will end up going for a three prompt strategy
                          ~
                          1._ using LaTeX to author Math documents and produce pdf printer-
                          friendly docs.
                          I really don't think that the web was design as the next "TV set" or
                          "book" to me the web is just a "click and go" medium. Besides most
                          tech people I know like to print out their own papers and jot down
                          their own notes on them
                          ~
                          Even the firefox people recommend to use LaTeX
                          // __http://www.mozilla.org/projects/mathml/
                          "The lingua franca for formula-intensive documents is TeX/LaTeX and
                          the use ofMathMLis not yet widespread."
                          ~
                          2._ use these off and online LaTeX >MathMLtranslat ion packages
                          // __http://pear.math.pitt. edu/mathzilla/
                          ~
                          3._ Advising people to install Firefox (which is my site's designed
                          for and preferred browser)
                          ~
                          lbrtchx
                          ok, good luck ! And don't forget to save your page in xml format.

                          Fred

                          Comment

                          • Paul Hirose

                            #14
                            Re: Editing Math Formulas

                            "fred wang" <fwsmail35@gmai l.comwrote in message
                            news:1176052759 .595175.98310@y 80g2000hsf.goog legroups.com...
                            You should better use MathML than HTML to code mathematical
                            formulae.
                            The W3C specification indicates that MathML is not supposed to be
                            coded directly. You can use a WYSIWYG editor such as Amaya.
                            Thanks for motivating me to fix my MathPlayer installation. A few
                            months ago it quit working after I updated to Internet Explorer 7.
                            (Not a big deal since normally I use Firefox.) I never got around to
                            repairing it till seeing your postings. It was time to get a fresh
                            download anyway; I hadn't been keeping up with the updates. It only
                            took a few minutes on dial up. Seems to be working fine.

                            One annoyance is that my IE 7 security settings are fairly strict, and
                            they block MathML content unless the site is on my "trusted" list. But
                            I get much the same deal from Firefox: it tells me some content is
                            blocked, and I have to explicitly give permission to let it through.
                            Even so, I like equations in MathML better than images.

                            Just for entertainment I have used Windows Notepad to manually create
                            the MathML for some horrendous equations. It can be done. The secret
                            is to first do all of the topmost level, then fill in the detail one
                            level down, etc. In anything complicated it's too easy to get lost if
                            you try to code the equation in one pass from left to right.

                            --
                            Paul Hirose <jvcmz89uwf@ear INVALIDthlink.n et>
                            To reply by email remove INVALID

                            Comment

                            • fwsmail35@aol.com

                              #15
                              Re: Editing Math Formulas

                              >Thanks for motivating me to fix my MathPlayer installation. A few
                              >months ago it quit working after I updated to Internet Explorer 7.
                              >(Not a big deal since normally I use Firefox.) I never got around to
                              >repairing it till seeing your postings. It was time to get a fresh
                              >download anyway; I hadn't been keeping up with the updates. It only
                              >took a few minutes on dial up. Seems to be working fine.
                              >One annoyance is that my IE 7 security settings are fairly strict, and
                              >they block MathML content unless the site is on my "trusted" list. But
                              >I get much the same deal from Firefox: it tells me some content is
                              >blocked, and I have to explicitly give permission to let it through.
                              >Even so, I like equations in MathML better than images.
                              I also had this problem with IE7, but I didn't try to update
                              Mathplayer. I'm a bit surprised that MathML content are blocked with
                              your browsers... BTW, I forgot to say that IE7 seems to refuse
                              application/xhtml+xml content, so it could be a problem if MathML is
                              in a xml file. On my website, I send a text/html header to IE7 thanks
                              to a PHP script.
                              >Just for entertainment I have used Windows Notepad to manually create
                              >the MathML for some horrendous equations. It can be done. The secret
                              >is to first do all of the topmost level, then fill in the detail one
                              >level down, etc. In anything complicated it's too easy to get lost if
                              >you try to code the equation in one pass from left to right.
                              At the beginning, I generated some fragments of MathML with Amaya, I
                              completed manually, I made several copy/paste etc. I know this is
                              possible, but I don't think I is a good idea when you have to make
                              complex formulae. In the W3C MathML specification, it is said a
                              WYSIWYG editor should better be used. I agree with it and that's why I
                              contribute to the W3C's editor.

                              Comment

                              Working...