Note: You are currently viewing documentation for Moodle 2.6. Up-to-date documentation for the latest stable version of Moodle may be available here: Using MimeTeX 3.

Using MimeTeX 3: Difference between revisions

From MoodleDocs
m (redirect)
 
(20 intermediate revisions by one other user not shown)
Line 1: Line 1:
==Brackets==
#redirect [[Using TeX Notation 3]]
 
As students advance through Maths, they come into contact with brackets. Algebraic notation depends heavily on brackets. The usual keyboard values of ( and ) are useful, for example:
 
  <math>d = 2 \ \times \ (4 \ - \ j)</math>
 
This is written as:
 
  $$ d = 2 \ \times \ (4 \ - \ j) $$
 
Usually, these brackets are enough for most formulae but they will not be in some circumstances. Consider this:
 
  <math>4x^3 \ + \ (x \ + \ \frac{42}{1 + x^4})</math>
 
Is OK, but try it this way:
 
  <math>4x^3 \ + \ \left(x \ + \ \frac{42}{1 + x^4}\right)</math>
 
This can be achieved by:
 
  $$ 4x^3 \ + \ \left(x \ + \ \frac{42}{1 + x^4}\right) $$
 
A simple change using the \left( and \right) symbols instead. Note the actual bracket is both named and presented.
 
==Ellipsis==
 
The Ellipsis is a simple code:
 
  <math>x_1, \ x_2, \ \ldots, \ x_n</math>
 
Written like:
 
  $$ x_1, \ x_2, \ \ldots, \ x_n  $$
 
A more practical application could be:
 
Question:
  "Add together all the numbers from 1 <math>\ldots</math> 38.
  What is an elegant and simple solution to this problem?
  Can you create an algebraic function to explain this solution?
  Will your solution work for all numbers?"
 
Answer:
The question uses an even number to demonstrate a mathematical process and generate an algebraic formula.
 
{| class = "nicetable"
|-
| Part 1:
| Part 2.
| Part 3.
|-
|
<math>1. \ 1 \ + \ 38 \ = \ 39</math>
 
<math>2. \ 2 \ + \ 37 \ = \ 39</math>
 
<math>3. \ 3 \ + \ 36 \ = \ 39</math>
 
<math>\ldots</math>
 
<math>19. 19 \ + \ 20 \ = \ 39 </math>
 
<math>\therefore x \ = \ 39 \ \times \ 19 </math>
 
<math>\therefore x \ = \ 741 </math>
 
 
|An algebraic function might read something like:
<math>t = (1 + n) \times n/2 </math>
 
Where t = total and n = the last number.
 
|The solution is that, using the largest and the smallest numbers, the numbers are added and then multiplied by the number of different combinations to produce the same result adding the first and last numbers.
The answer must depend on the number, <math>\frac{n}{2}</math> being a whole number. Therefore, the solution will not work for an odd range of numbers, only an even range.
 
|}
 
==Geometric Shapes==
 
There are two ways to produce geometric shapes, one is with circles and the other is with lines. Each take a bit of practice to get right, but they can provide some simple geometry. It may be easier to produce the shapes in Illustrator or Paint Shop Pro or any one of a number of other drawing packages and use them to illustrate your lessons, but sometimes, some simple diagrams in Moodle will do a better job.
 
==Circles==
 
Circles are easy to make.
 
{| class="nicetable"
|-
| [[Image:cfmimetex20.gif|left]]
| Circles are easily created, and only needs a number to determine how large the circle is.
To create the circle use $$ \circle(150) $$. This makes a circle of 150 pixels in diameter.
|}
 
==Creating Arcs==
 
Arcs are also easy to produce, but require some additional parameters. The same code structure used in circles create the basic shape, but the inclusion of a start and end point creates only the arc. However, notice where the 0 point is, not at the true North, but rather the East.
 
{| class="nicetable"
|-
| [[Image:cfmimetex21a.gif|left]]
| $$ \circle(120;90,180)$$
| [[Image:cfmimetex21b.gif|left]]
| $$ \circle(120;0,90)$$
|-
| [[Image:cfmimetex21c.gif|left]]
| $$ \circle(120;180,270)$$
| [[Image:cfmimetex21d.gif|left]]
| $$ \circle(120;270,360)$$
|}
 
==The \picture Command==
 
Using circles and arcs as shown above is somewhat limiting. The \picture command allows you to use a frame in which to build a picture of many layers. Each part of the picture though needs to be in its own space, and while this frame allows you to be creative, to a degree, there are some very hard and fast rules about using it.
 
All elements of a picture need to be located within the picture frame. Unexpected results occur when parts of an arc, for example, runs over the border of the frame. (This is particularly true of lines, which we will get to next, and the consequences of that overstepping of the border can cause serious problems.)
 
The \picture command is structured like:
  \picture(100){(50,50){\circle(200)}}
    \command(size of frame)  position of element   
{| class="nicetable"
|-
| [[Image:cfmimetex24a.gif|left]]
| $$ \picture(100){(50,50){\circle(200)}}&&
 
The picture frame brings elements together that you may not otherwise see.
 
Because of the frame size of 100px and the centre point of the circle in the mid-point of the frame, the 200px circle will be squashed. Unexpected results occur when sizes are not correct.
| [[Image:cfmimetex24b.gif|left]]
|
Using the picture frame, you can place circles
and lines inside each other, or can intersect.
 
$$ \picture(100){(50,50){\circle(99)} (50,50){\circle(80,80)}} $$
|-
| [[Image:cfmimetex24c.gif|left]]
| You may want to see an image of a circle with a dot in the middle.
You may have to try to place the centre dot correctly , but the
ordering of the elements in the image may have an impact.
 
$$ \picture(100){(48,46){\bullet}(50,50){\circle(99)}} $$
| [[Image:cfmimetex24d.gif|left]]
| Using the same ideas as above, you can make semi-circles.
 
$$\picture(150){(50,50){\circle(100;0,180)}(100,50){\circle(100;180,360)}}$$
|}
 
==Lines==
 
----
 
'''Warning:''' Drawing lines in MimeTeX is an issue in Moodle. If the line is not drawn properly then the parser is trying to correctly draw the line but cannot successfully complete it. This means that every image that needs be drawn will be drawn until it hits the error. When the error is being converted, it fails, so no subsequent image is drawn. Be careful and make sure your line works BEFORE you move to the next problem.
 
----
 
==See Also==
 
* [[Using MimeTeX]]
* [[Using MimeTeX 2]]
 
 
[[Category: Mathematics]]

Latest revision as of 16:31, 13 July 2010