Using TeX Notation 3: Difference between revisions
Colin Fraser (talk | contribs) |
m Text replacement - "class="nicetable"" to "class="wikitable"" |
||
| Line 11: | Line 11: | ||
Circles are easy to make. | Circles are easy to make. | ||
{| class=" | {| class="wikitable" | ||
|- | |- | ||
| [[Image:cfmimetex20.gif|left]] | | [[Image:cfmimetex20.gif|left]] | ||
| Line 23: | Line 23: | ||
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 and run in an anti-clockwise direction. | 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 and run in an anti-clockwise direction. | ||
{| class=" | {| class="wikitable" | ||
|- | |- | ||
| [[Image:cfmimetex21a.gif|left]] | | [[Image:cfmimetex21a.gif|left]] | ||
| Line 50: | Line 50: | ||
'''NOTE:''' The brace is used to enclose each set of required starting point coordinates. Inside each set of braces, another set of braces is used to isolate each set of coordinates from the other, and those coordinates use their proper brackets and backslash. Count the opening and closing brackets, be careful of the position, | '''NOTE:''' The brace is used to enclose each set of required starting point coordinates. Inside each set of braces, another set of braces is used to isolate each set of coordinates from the other, and those coordinates use their proper brackets and backslash. Count the opening and closing brackets, be careful of the position, | ||
{| class=" | {| class="wikitable" | ||
|- | |- | ||
| [[Image:cfmimetex24a.gif|left]] | | [[Image:cfmimetex24a.gif|left]] | ||
| Line 84: | Line 84: | ||
---- | ---- | ||
{| class=" | {| class="wikitable" | ||
|- | |- | ||
| [[Image: cfmimetex26.gif|frame|left| a couple of lines]] | | [[Image: cfmimetex26.gif|frame|left| a couple of lines]] | ||
| Line 108: | Line 108: | ||
There should be a square box tool, and there is, but unless it has something inside it, it does not display. It is actually easier to make a square using the \line command. | There should be a square box tool, and there is, but unless it has something inside it, it does not display. It is actually easier to make a square using the \line command. | ||
{| class=" | {| class="wikitable" | ||
|- | |- | ||
| [[Image: line03.gif|left]] | | [[Image: line03.gif|left]] | ||
| Line 139: | Line 139: | ||
We have a point from which we want to draw a line that is on an angle. The notation used at this point can be positive, positive or positive, negative or negative, positive or negative, negative. Think of it like a number plane or a graph, using directed numbers. The 0,0 point is in the centre, and we have four quadrants around it that give us one of the previously mentioned results. | We have a point from which we want to draw a line that is on an angle. The notation used at this point can be positive, positive or positive, negative or negative, positive or negative, negative. Think of it like a number plane or a graph, using directed numbers. The 0,0 point is in the centre, and we have four quadrants around it that give us one of the previously mentioned results. | ||
{| class=" | {| class="wikitable" | ||
|- | |- | ||
| rowspan="4"|[[Image:co-ordquadrants.png|left]] | | rowspan="4"|[[Image:co-ordquadrants.png|left]] | ||
| Line 157: | Line 157: | ||
Essentially, what these points boil down to is that anything above the insertion point is a positive on the y axis, anything below is a negative. Anything to the left of the insertion point is a negative while everything to the right is a positive. | Essentially, what these points boil down to is that anything above the insertion point is a positive on the y axis, anything below is a negative. Anything to the left of the insertion point is a negative while everything to the right is a positive. | ||
{| class=" | {| class="wikitable" | ||
|- | |- | ||
|[[Image:line06e.gif|left]] | |[[Image:line06e.gif|left]] | ||
| Line 171: | Line 171: | ||
You can set up an intersecting pair easily enough, using the \picture control sequence. | You can set up an intersecting pair easily enough, using the \picture control sequence. | ||
{| class=" | {| class="wikitable" | ||
|- | |- | ||
| [[Image:cfmimetex31.gif|left]] | | [[Image:cfmimetex31.gif|left]] | ||
| Line 203: | Line 203: | ||
Combining lines and arcs is a serious challenge actually, on a number of levels. For example lets take an arc from the first page on circles. | Combining lines and arcs is a serious challenge actually, on a number of levels. For example lets take an arc from the first page on circles. | ||
{| class=" | {| class="wikitable" | ||
|- | |- | ||
| [[Image: line11.gif|left]] | | [[Image: line11.gif|left]] | ||
| Line 235: | Line 235: | ||
This triangle has been developed for a Trigonometry page - but the additional notation should provide insight into how you can use it. | This triangle has been developed for a Trigonometry page - but the additional notation should provide insight into how you can use it. | ||
{| class=" | {| class="wikitable" | ||
|- | |- | ||
| [[Image:line16.gif|left]] | | [[Image:line16.gif|left]] | ||
| Line 244: | Line 244: | ||
{| class=" | {| class="wikitable" | ||
|- | |- | ||
| The triangle shows like: | | The triangle shows like: | ||
Latest revision as of 15:23, 10 August 2021
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.
![]() |
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 and run in an anti-clockwise direction.
![]() |
$$ \circle(120;90,180)$$ | ![]() |
$$ \circle(120;0,90)$$ |
![]() |
$$ \circle(120;180,270)$$ | ![]() |
$$ \circle(120;270,360)$$ |
This structure breaks down into the \circle command followed by the diameter, not the radius, of the circle, followed by a semi-colon, then the demarcation of the arc, the nomination of the start and end points in degrees from the 0, East, start point. Note that the canvas is the size of the diameter nominated by the circle's parameters.
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){(x co-ordinate, y co-ordinate){\shape to draw(size or x co-ordinate, y co-ordinate)})
NOTE: The brace is used to enclose each set of required starting point coordinates. Inside each set of braces, another set of braces is used to isolate each set of coordinates from the other, and those coordinates use their proper brackets and backslash. Count the opening and closing brackets, be careful of the position,
Lines
Warning: Drawing lines in TeX Notation in Moodle is an issue, go to the Using Text Notation for more information. If the line is not noted properly then the parser will try to correctly draw the line but will not 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 or next image.
While this explains the structure of a line, there is a couple of elements that you need to go through to do more with them.
Squares and Rectangles
Drawing squares and rectangles is similar, but only slightly different.
There should be a square box tool, and there is, but unless it has something inside it, it does not display. It is actually easier to make a square using the \line command.
Controlling Angles
Controlling angles is a little different. They involve a different perception, but not one that is unfamiliar. Consider this:
We have a point from which we want to draw a line that is on an angle. The notation used at this point can be positive, positive or positive, negative or negative, positive or negative, negative. Think of it like a number plane or a graph, using directed numbers. The 0,0 point is in the centre, and we have four quadrants around it that give us one of the previously mentioned results.
Essentially, what these points boil down to is that anything above the insertion point is a positive on the y axis, anything below is a negative. Anything to the left of the insertion point is a negative while everything to the right is a positive.
Intersecting Lines
You can set up an intersecting pair easily enough, using the \picture control sequence.
Lines and Arcs
Combining lines and arcs is a serious challenge actually, on a number of levels. For example lets take an arc from the first page on circles.
Triangles
Of all the drawing objects, it is actually triangles that present the most challenge. For example:
This triangle has been developed for a Trigonometry page - but the additional notation should provide insight into how you can use it.






























