473,795 Members | 3,358 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Editing Math Formulas

I am trying to write up a page with Math formulas (statistical ones)
~
http://www.geocities.com/tekmonk2005/OnLineStats02.html
~
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 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

Apr 8 '07 #1
15 4701
On Apr 8, 6:36 pm, lbrt...@hotmail .com wrote:
I am trying to write up a page with Math formulas (statistical ones)
~
http://www.geocities.com/tekmonk2005/OnLineStats02.html
~
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

Apr 8 '07 #2
Scripsit lb*****@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.
http://www.geocities.com/tekmonk2005/OnLineStats02.html
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:
http://www.cs.tut.fi/~jkorpela/math/mean.html
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">|</td>
~
doesn't appear to be working
Using a character reference like | 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 µ, 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")
http://www.cs.tut.fi/~jkorpela/

Apr 8 '07 #3
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")
http://www.cs.tut.fi/~jkorpela/

Apr 8 '07 #4
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

Apr 8 '07 #5
lb*****@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
Apr 8 '07 #6
lb*****@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.
Apr 8 '07 #7
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"
~
http://prdownloads.sourceforge.net/p...ar.gz?download
~
lbrtchx

Apr 8 '07 #8
Scripsit lb*****@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
http://www.zvon.org/HowTo/Output/
(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")
http://www.cs.tut.fi/~jkorpela/

Apr 9 '07 #9
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

Apr 9 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
2207
by: Harlan Messinger | last post by:
I am reviewing a set of pages, some of which include in-line mathematical formulas represented as images. I am addressing the accessibility issues behind those images. (Conformance to Section 508 of the applicable US government regulations is required.) Ick--at least, I suppose, until MathML is generally supported. One approach would be to set the ALT attribute to be a linearized version of the equation. But this gets to be tough if...
3
2478
by: schwehr | last post by:
Done any one have a way (and examples) of how to do math markups in the docstrings of function and class definitions such that the equations get typeset in the generated html documentation? I'll take any markup system that'll do the job... MathML or LaTeX possible? I'd like to start doing a better job of documenting the equations and units being used in pmag-py (http://schwehr.org/software/pmag) for processing paleomagnetic data. AND...
4
2246
by: Sehri | last post by:
Hi all, I have just started developing a math companion tool with VS2005 and I just ran into a problem when trying to add the description of a formula. Doed anyone know how can I add math formulas and math characters in .NET? Maybe this is the same for everywhere, I just don't know the answer. I appreciate your help. Thanks, Sehri
11
1685
by: rob | last post by:
I have the following scenario. A user requests some math calculations from a server. The data and a library of basic formulas reside on the server. Now the user should be able to create more complex formulas based on the basic built in formulas as well as other complex formulas that the user created himself. These formulas will be either stored on the server or client and will be applied to the data on the server. Some of the formulas will...
1
1318
by: jonceramic | last post by:
Hi, I couldn't find a reference to this with a simple google search. I'm on Access 2003, and every once in a while. (Like now! Grrrr!) I get my editing stuck to where everything in either a formula field or a query field is selected from the right of the text. Meaning, when I click in to edit, say CustomField: +
0
1306
by: Artem Ploujnikov | last post by:
Hello everyone I'm building an adaptive quiz system that uses some non-trivial math formulas, and I would like to figure out the most widely supported way of handling arbitrary-precision math (or at least "ridiculous precision" math). It appears that the "decimal" type is not supported by the Math class (e.g. you can't extract the square root of a decimal without first converting it to a Double). The Java SDK has a class called...
0
9672
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10435
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10213
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10163
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9037
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6779
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5436
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.