Meet the MathML language

Η MathML is a markup language that can be used to display math performances on your web pages. It is especially useful when you want to show more than a simple mathematical symbolism on your web pages, and is very easy to use because of its simplicity and similarity to HTML.

mathml logo

Η MathML has two kinds of signage, presentation (for layout) and content (meaningful). Since of the browsers are only supported by the presentation, this is the only kind of markup that can be used with HTML. You can also use MathML in CSS and JavaScript just like you would in HTML.

Understanding MathML

There is a list of them commands of MathML στην ιστοσελίδα Mozilla . You will also find a list of the commands at the end of this article.

Η βασική εντολή που με αυτό ο browser σας καταλαβαίνει ότι αρχίζει ο προγραμματισμός της ΜathML είναι η . Έτσι όταν γράφετε ΜathML στην HTML, θυμηθείτε να τον βάλετε μέσα σε ετικέτες.

Οι βασικές εντολές είναι οι ,,, και αντιπροσωπεύουν ένα αναγνωριστικό, χειριστή, αριθμό και ένα string αντίστοιχα. Σημειώστε ότι όλες οι εντολές ΜathML κάτω ξεκινούν με το γράμμα «m».

Let's look at some simple examples.

Exponential Number (or number in N force)

Η αντίστοιχη εντολή για την εμφάνιση του εκθέτη είναι η . H είναι η αντίστοιχη για δείκτη.


    
        n
        7
    

It will give us the form:

1

Show fractions


    
        7
        26
    

It will give us the form:

ex2

Show integer root

Here's another simple example for displaying mathematical functions.


    
        -678
        5
    

It will give us the shape

: ex3

Για τετραγωνική ρίζα μόνο υπάρχει η έτοιμη εντολή  .

Display way

Now let's move on to more complex representations, let's show a matrix.
To build a table, we need to have a table structure for rows and columns. For this purpose, we use the commands , and .

Πέρα από αυτό, θα χρησιμοποιήσουμε και το tag για να προσθέσετε τα σύμβολα [ και ] γύρω από τη μήτρα, και τέλος τα βάζουμε όλα μέσα στην εντολή .

Here is the final result:


 
   [ 
  
    
       0 
       4 
       10 
    
    
       5 
       2 
       X 
    
    
       9 
       11 
       1 
    
  
   ] 
 

Also see that we played a bit with CSS so we can make red "X" to stand out in the womb.

mi {color: red; }

In the end you will get the shape

: ex4

How to display equations

We think we can go one step further, to more advanced examples, so let's make a complex equation. In our example we will make an integral (those who do not know what an integral is wait until the 3rd Lyceum). The corresponding command here is <mmultiscripts>
ex5

As with HTML, MathML also has special characters and symbols, one of which is used in the example to show the Greek symbol φ. Here is the code to display the above integral:


    
        
            f
            (
            x
            )
        
        =
        
            
                
                a
                b
            
            
                K
                (
                x
                ,
                t
                )
            
            
                Phi
                (
                t
                )
            
            d
            t
        
    

 

For a list of symbols and special characters of MathML you can find it in W3C website.

MathML Features

In addition to features that are the same as HTML (like id), MathML also has a number of its own features. OR Mozilla Developer Website has a collection of MathML features. For extra knowledge, you can use the JavaScript library  MathJax. If you need more , check this link too here.

All of the above examples can be seen again below. Try the HTML, CSS, and Result Switches:

 

iGuRu.gr The Best Technology Site in Greecefgns

every publication, directly to your inbox

Join the 2.087 registrants.

Written by Dimitris

Dimitris hates on Mondays .....

Leave a reply

Your email address is not published. Required fields are mentioned with *

Your message will not be published if:
1. Contains insulting, defamatory, racist, offensive or inappropriate comments.
2. Causes harm to minors.
3. It interferes with the privacy and individual and social rights of other users.
4. Advertises products or services or websites.
5. Contains personal information (address, phone, etc.).