summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/mathspic/HELP.txt
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-08-21 23:57:09 +0000
committerKarl Berry <karl@freefriends.org>2011-08-21 23:57:09 +0000
commit9ee7cfba1625748e157c7cda3091549eb0701cbf (patch)
tree54d32aa0aa0b6b3b21ae16cbbd63f38242590549 /Master/texmf-dist/doc/latex/mathspic/HELP.txt
parentcc6dec43bed861394613828f8ed1351b0952d702 (diff)
mathspic (7jun11 and earlier)
git-svn-id: svn://tug.org/texlive/trunk@23640 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/mathspic/HELP.txt')
-rw-r--r--Master/texmf-dist/doc/latex/mathspic/HELP.txt173
1 files changed, 78 insertions, 95 deletions
diff --git a/Master/texmf-dist/doc/latex/mathspic/HELP.txt b/Master/texmf-dist/doc/latex/mathspic/HELP.txt
index 43a72e81f6a..2ecc7547003 100644
--- a/Master/texmf-dist/doc/latex/mathspic/HELP.txt
+++ b/Master/texmf-dist/doc/latex/mathspic/HELP.txt
@@ -1,54 +1,60 @@
+
+
HELP.txt
-A .txt version of the manpage for MS-Windows users
-copyright (c) 2005 A Syropoulos and RWD Nickalls
-mathsPIC February 2005
+A .txt version of the Linux manpage (for use with MS-Windows)
+
+copyright (c) 2010 A Syropoulos and RWD Nickalls
+mathsPIC 1.13 April 26, 2010 mathsPIC perl version
-NAME: mathsPIC (Perl version 1.0)
+NAME: mathsPIC
-AUTHORS: A. Syropoulos and R.W.D. Nickalls
- apostolo[at]<ocean1><ee><duth><gr>
- dicknickalls[at]<compuserve><com>
+AUTHORS: A. Syropoulos and R.W.D. Nickalls (April 26, 2010)
+
+ asyropoulos[at]<yahoo><com>
+ dick[at]<nickalls><org>
DESCRIPTION
-----------
-mathsPIC is a Perl filter program for PiCTeX. mathsPIC has its own macro and macro library capability, and allows use of mathsPIC, PiCTeX, TeX and LaTeX commands. A significant feature of mathsPIC is that it allows access to the command-line, and so allows the user to extend mathsPIC commands by calling Perl and other programs written to perform particular drawing actions. See the package manual for full details and examples. The latest version can be downloaded from
+mathsPIC is a Perl filter program for PiCTeX. mathsPIC has its own macro and macro library capability, and allows use of mathsPIC, PiCTeX, TeX and LaTeX commands. A significant feature of mathsPIC is that it allows access to the command-line, and so allows the user to extend mathsPIC commands by calling Perl and other programs written to perform particular drawing actions. See the package manual for full details and examples. The latest version can be downloaded from
-CTAN: tex-archive/graphics/pictex/mathspic/perl
+ CTAN: tex-archive/graphics/pictex/mathspic/perl
Commands which can be used in the mathsPIC script file fall into four main groups (a)-mathsPIC macro commands (prefixed with %def), (b)-regular mathsPIC commands (do not have a backslash), (c)-regular PiCTeX commands (all have a backslash), and (d)-regular TeX and LaTeX commands (all have a backslash).
+
The following mathematics functions can used (note that decimal fractions having an absolute value less than 1 must have a leading zero). Note also that all the trignometric functions require their argument in radians.
-Trigonometric: sin(), cos(), tan(), asin(), acos(), atan()
+Trigonometric: sin(), cos(), tan(), asin(), acos(), atan()
Remainder: rem(); eg var r=12 rem(5)
-Integer: int(); eg var r= int(3.87) --> 3
-Sign (returns -1, 0, +1): sgn(); eg var s=sgn(-3.27) --> -1
-Square root: sqrt(); eg var s = sqrt(14)
-Exponentiation: **; eg var j = r**2
-Pi constant: _Pi_ and _pi_ (3.14159...)
-e constant: _E_ and _e_ (2.71828...)
-Linethickness: _linethickness_ ; eg var t = _linethickness_
+Integer: int(); eg var r= int(3.87) --> 3
+Sign (returns -1, 0, +1): sgn(); eg var s=sgn(-3.27) --> -1
+Square root: sqrt(); eg var s = sqrt(14)
+Exponentiation: **; eg var j = r**2
+Pi constant (3.14159...): _Pi_ and _pi_
+e constant (2.71828...): _E_ and _e_
+Linethickness: _linethickness_ ; eg var t = _linethickness_
COMMAND-LINE USE
-----------------
+-----------------
+
perl mathspic.pl [-b] [-c] [-h] [-o <outfile>] <infile>
- -b enables beep if mathsPIC detects an error
- -c disables the writing of comments to output file
- -h displays the help file
- -o defines the output file name
+ -b enables beep if mathsPIC detects an error
+ -c disables the writing of comments to output file
+ -h displays the help file
+ -o defines the output file name
+
MACRO COMMANDS
--------------
-macro definition commands are prefixed with %def and can take either 0, 1, or more parameters. Macros will generally be used as part of a
-var command as shown below. Macros are deleted using the %undef command.
+macro definition commands are prefixed with %def and can take either 0, 1, or more parameters. Macros will generally be used as part of a var command as shown below. Macros are deleted using the %undef command.
-----syntax:
%def MACRONAME(parameters)<macrodefinition>
%undef MACRONAME(parameters)
-----notes:
- Notes: (a)-the () must be used in the definition even if no parameters are used, (b)-the name can be any combination of upper and lower case characters and numbers, (c)-when the macro is used in a command it is prefixed by a & symbol, (d)-it is a good idea to always place a % symbol at the end of the definition, (e)-comments (prefixed by a % symbol) can be placed after the macro definition just as in TeX or LaTeX.
+ Notes: (a) the () must be used in the definition even if no parameters are used, (b) the name can be any combination of upper and lower case characters and numbers, (c) when the macro is used in a command it is prefixed by a & symbol, (d) it is a good idea to always place a % symbol at the end of the definition, (e) comments (prefixed by a % symbol) can be placed after the macro definition just as in TeX or LaTeX.
-----examples:
%def d2r()_pi_/180% % degrees2radians
@@ -62,8 +68,7 @@ var command as shown below. Macros are deleted using the %undef command.
GENERAL COMMANDS
----------------
- NUMERICAL EXPRESSIONS
-
+ NUMERICAL EXPRESSIONS
When dealing with commands we will refer frequently to the term `numerical expression' by which is meant either (a) a number (integer or decimal), (b) a numeric variable or constant (defined using the var or const command), (c) any mathsPIC function, macro, or mathematical expression which evaluates to a number, or (d) a pair of point names (e.g. AB) representing the Pythagorean distance between the two points. A leading zero must be used with decimal fractions less than one.
In general, if a command's argument accepts a number then it will also accept a `numerical expression' (<expr>) as defined above. Sometimes a following <unit> is associated with the number or numerical expression, in which case the number or numerical expression can be delimited by a round bracket (or separated from the unit by a <space>), as shown in the following examples.
@@ -74,39 +79,25 @@ GENERAL COMMANDS
ArrowShape(h mm, 20, 40)
ArrowShape((2*h)mm,20,40)
- ==============================
+=============================
- BACKSLASH \
+ BACKSLASH \
A leading backslash without a following space indicates that it is part of a PiCTeX, TeX or LaTeX command, in which case mathsPIC simply copies the whole line verbatim into the output file. A leading backslash followed by one or more spaces makes mathsPIC copy the whole line verbatim into the output file but without the backslash.
- ==============================
+=============================
- USING THE COLOR PACKAGE
+ USING THE COLOR PACKAGE
The standard COLOR package can be used with mathsPIC, but note that it is important to load the COLOR package after the mathsPIC package.
It is best to place a comment symbol % at the end of LaTeX and TeX commands to limit white space at the end.
- In order to prevent color commands in a diagram from influencing any following text (in the document) we recommend that the \normalcolor command is used as a delimiter within the \beginpicture... \endpicture environment as shown in the example below. i.e.-use two \normalcolor commands; one just after the \beginpicture command, and one just before the \endpicture command.
-
- -----example:
- \usepackage{mathspic, color}
- ...
- \beginpicture
- \normalcolor
- ...
- \color{red}%
- drawline{AB}
- \color{blue}%
- drawcircle(C,5)
- ...
- \normalcolor
- \endpicture
+ In the event of any colour-spill from a diagram into any following text (this used to be a problem in early TeX implementations) consider using the \normalcolor command as a delimiter within the \beginpicture...\endpicture environment.
==============================
- ARROWSHAPE
+ ARROWSHAPE
This command defines the shape of an arrowhead, and allows
different arrowheads to be customised.
@@ -124,7 +115,7 @@ This default arrowhead shape can be reset using the Arrowshape(default) command,
==============================
- beginLOOP...endLOOP
+ beginLOOP...endLOOP
This is an environment which cycles a block of code a specified number of times.
@@ -141,15 +132,16 @@ This default arrowhead shape can be reset using the Arrowshape(default) command,
...
endLoop
+
==============================
- beginSKIP...endSKIP
+ beginSKIP...endSKIP
- This is an `environment' within which commands are not actioned. It is useful in development for testing isolated commands and excluding other commands.
+ This is an `environment' within which commands are not actioned. It is useful in development for testing isolated commands and excluding other commands.
==============================
- CONST
+ CONST
The const command is used to define scalar constants. Note that a constant-name must begin with a single letter (either upper or lower case), and may have up to a maximum of three following digits. Note that constants, variables and points have the same name structure, and a constant could have the same name as a point (and so we suggest points have uppercase letters and variables and constants have lowercase letters). The scalar argument can be any numeric expression. New values cannot be re-allocated to existing constant-names. If this occurs mathsPIC will issue an error message.
@@ -161,7 +153,7 @@ This default arrowhead shape can be reset using the Arrowshape(default) command,
==============================
- DashArray
+ DashArray
The dasharray command takes an arbitrary number of paired arguments that are used to specify a dash pattern.
@@ -180,10 +172,10 @@ This default arrowhead shape can be reset using the Arrowshape(default) command,
==============================
- DrawAngleArc
+ DrawAngleArc
This command draws an arc in the specified angle, a distance <radius> from the angle. The angle is either <internal> (less than 180 deg) or <external> (greater than 180 deg). The direction of the arc is either <clockwise> or <anticlockwise>, and this direction must correspond with the letter sequence specified for the angle.
-Strange and unexpected results will be produced if the four parameters are not internally consistent. The option order angle/radius/internal/clockwise is important. The <radius> parameter can be any numerical expression.
+Strange and unexpected results will be produced if the four parameters are not internally consistent. The option order angle/radius/internal or external/clockwise or anticlockwise is important. The <radius> parameter can be any numerical expression.
-----syntax:
DrawAngleArc{angle(), radius(), external, clockwise}
@@ -195,7 +187,7 @@ Strange and unexpected results will be produced if the four parameters are not i
==============================
- DrawAngleArrow
+ DrawAngleArrow
This command draws a curved arrow in the specified angle, a distance <radius> from the angle. The angle is either <internal> (less than 180 deg) or <external> (greater than 180 deg). The direction of the arrow is either <clockwise> or <anticlockwise>, and this direction must correspond with the letter sequence specified for the angle.
Strange and unexpected results will be produced if the four parameters are not internally consistent. The option order angle/radius/internal/clockwise is important. The <radius> parameter can be any numerical expression.
@@ -210,7 +202,7 @@ Strange and unexpected results will be produced if the four parameters are not i
==============================
- DrawArrow
+ DrawArrow
This command draws an arrow(s) joining two points. The direction of the arrow is in the point order specified.
@@ -226,7 +218,7 @@ Strange and unexpected results will be produced if the four parameters are not i
==============================
- DrawCircle
+ DrawCircle
This command draws a circle defined by its radius and the point-name of its centre. The <radius> can be any numerical expression. If the units of the X and Y axes are different, circles may be drawn strangely, and mathsPIC therefore generates a warning message to this effect.
@@ -241,7 +233,7 @@ Strange and unexpected results will be produced if the four parameters are not i
==============================
- DrawCircumcircle
+ DrawCircumcircle
This command draws the circumcircle of a triangle.
@@ -253,7 +245,7 @@ Strange and unexpected results will be produced if the four parameters are not i
==============================
- DrawCurve
+ DrawCurve
This command draws a smooth quadratic curve through three points in the point order specified. Note that curves drawn using this command do not break to avoid line-free zones associated with the points.
@@ -265,7 +257,7 @@ Strange and unexpected results will be produced if the four parameters are not i
==============================
- DrawExcircle
+ DrawExcircle
This command draws the excircle touching one side of a triangle.
@@ -277,7 +269,7 @@ Strange and unexpected results will be produced if the four parameters are not i
==============================
- DrawIncircle
+ DrawIncircle
This command draws the incircle of a triangle.
@@ -289,9 +281,9 @@ Strange and unexpected results will be produced if the four parameters are not i
==============================
- DrawLine
+ DrawLine
- This command draws a line joining two or more points. Use the Linethickness command to vary thickness.
+ This command draws a line joining two or more points. Use the Linethickness command to vary thickness. This command uses the PiCTeX \putrule command for horizontal and vertical lines, and the \plot command for all other orientations.
-----syntax:
DrawLine( <points> [, <points>] )
@@ -309,7 +301,7 @@ Strange and unexpected results will be produced if the four parameters are not i
==============================
- DrawPerpendicular
+ DrawPerpendicular
This command draws the perpendicular from a point to a line.
@@ -321,7 +313,7 @@ Strange and unexpected results will be produced if the four parameters are not i
==============================
- DrawPoint
+ DrawPoint
This command draws the point-symbol at the point-location. Commas must not be used to separate point names. The default point-symbol is \$\bullet\$, unless an optional point-symbol (or string of characters) is specified in the associated point command.
@@ -335,7 +327,7 @@ Strange and unexpected results will be produced if the four parameters are not i
==============================
- DrawRightangle
+ DrawRightangle
This command draws the standard right-angle symbol in the internal angle specified at the size specified by <expr>.
@@ -353,7 +345,7 @@ Strange and unexpected results will be produced if the four parameters are not i
==============================
- DrawSquare
+ DrawSquare
This command draws a square defined by its side and the point-name of its centre. The <sidelength> can be any numerical expression.
@@ -369,7 +361,7 @@ Strange and unexpected results will be produced if the four parameters are not i
==============================
- DrawThickArrow
+ DrawThickArrow
This command draws a thick arrow(s) joining two points. The direction of the arrow is in the point order specified. The shape of the arrowhead is controlled by the ArrowShape command.
@@ -382,7 +374,7 @@ Strange and unexpected results will be produced if the four parameters are not i
==============================
- DrawThickLine
+ DrawThickLine
This command draws a thick line(s) joining two points. The direction of the line is in the point order specified. Use the Linethickness command to vary thickness of a line.
@@ -395,17 +387,15 @@ Strange and unexpected results will be produced if the four parameters are not i
==============================
- InputFile
+ InputFile
- This command inputs a plain text file containing mathsPIC commands. Optionally, the file can be input several times, in which case this command functions like a DO--LOOP.
-The <loopnumber> can be any numerical expression. If the <loopnumber> is not an integer then mathsPIC will round the value down to the nearest integer.
+ This command inputs a plain text file containing mathsPIC commands. Optionally, the file can be input several times, in which case this command functions like a DO--LOOP. The <loopnumber> can be any numerical expression. If the <loopnumber> is not an integer then mathsPIC will round the value down to the nearest integer. See also the beginLOOP ... endLOOP commands.
-----syntax:
inputFile[*](<filename>)[<loopnumber>]
-----notes:
- The inputfile* command is used to input a file in verbatim, i.e. a file with no mathsPIC commands, for example, a file containing only PiCTeX commands or data-points
-for plotting etc. Note that the inputfile* command has no <loopnumber> option.
+ The inputfile* command is used to input a file in verbatim, i.e. a file with no mathsPIC commands, for example, a file containing only PiCTeX commands or data-points for plotting etc. Note that the inputfile* command has no <loopnumber> option. Note also that PiCTeX requires a ODD number of points.
-----examples:
inputFile(myfile.dat)[4]
@@ -413,7 +403,7 @@ for plotting etc. Note that the inputfile* command has no <loopnumber> option.
==============================
- LineThickness
+ LineThickness
This command sets a particular linethickness. The command linethickness(default) restores the working linethickness to the default value of 0.4pt.
The current value of the linethickness (in current units) can be accessed using the var command (this can be useful when drawing figures using thick lines) .
@@ -424,7 +414,7 @@ The current value of the linethickness (in current units) can be accessed using
var t = _linethickness_
-----notes:
- This command also sets the font to \verb!cmr! and plotsymbol to \CM . and also sets the rule thickness for drawing horizontal and vertical lines. It is important to include a leading zero with decimal fractions less than one.
+ This command also sets the font to cmr and plotsymbol to \CM . and also sets the rule thickness for drawing horizontal and vertical lines. It is important to include a leading zero with decimal fractions less than one.
-----examples:
linethickness(2pt)
@@ -439,7 +429,7 @@ The current value of the linethickness (in current units) can be accessed using
==============================
- PAPER
+ PAPER
Defines the plotting area in terms of the options units(), xrange(), yrange(), axes(), and ticks(). The units() argument must contain a numeric value and a valid TeX length unit mm, cm, pt, pc(pica), in(inch), bp(big point), dd(didot), cc(cicero), sp(scaled point). The X and Y axes can have different units (see second example below). The axes() arguments XYTBLR refer to the X and Y axes, and the Top, Bottom, Left and Right axes. A * following one of the axes disables ticks on that axis. The X and Y axes pass through the zeros.
@@ -452,7 +442,7 @@ The current value of the linethickness (in current units) can be accessed using
==============================
- POINT
+ POINT
Defines a new point by allocating coordinates to a new point name. The * option re-allocates coordinates to an existing point name.
@@ -461,10 +451,10 @@ The current value of the linethickness (in current units) can be accessed using
POINT[*](<name>){<location>}[symbol=<chars>, radius=<expr>]
-----notes:
- <name> one leading letter plus maximum of three trailing digits
+ <name> one leading letter plus maximum of four trailing digits
<chars> any TeX string allowed in an \hbox{}
<expr> any numerical expression
- The polar(r,theta) option defaults to radians for the angle theta. To work in degrees then must append <deg> eg: polar(r,theta deg). Can use <direction()> and <directiondeg()> to replace theta.
+ The polar(r,theta) option defaults to radians for the angle theta. To work in degrees then must append <deg> eg: polar(r,theta deg). Can use <direction()> and <directiondeg()> to replace theta. Note that the term vector(AB) means use same (r, theta) as AB.
-----examples:
point(A){5,5}
@@ -495,7 +485,7 @@ The current value of the linethickness (in current units) can be accessed using
==============================
- PointSymbol
+ PointSymbol
This command allows the default point-symbol \bullet (with zero line-free radius) to be changed. The PointSymbol command is particularly useful where a set of points uses the same point-symbol, for example, when drawing graphs. The point-symbol can be reset to the default \bullet using the command PointSymbol(default).
@@ -513,7 +503,7 @@ The current value of the linethickness (in current units) can be accessed using
==============================
- SYSTEM
+ SYSTEM
This command allows the user to access the command line and execute standard Linux commands. A important use for this command is to run a Perl program.
@@ -529,7 +519,7 @@ The current value of the linethickness (in current units) can be accessed using
==============================
- SHOW....
+ SHOW....
This command makes mathsPIC return the value of a calculation or specified parameter; for example, the value of a particular angle, or the length of a line. The result is shown in the output-file as a commented line. This allows mathsPIC commands to be adjusted in the light of calculations. There are currently five such commands as follows.
@@ -543,7 +533,7 @@ The current value of the linethickness (in current units) can be accessed using
==============================
- TEXT
+ TEXT
This command places a text-string at a specific location. By default the text is centered vertically and horizontally at the specified point. Optionally, text can be placed relative to a point using appropriate combinations of the PiCTeX `position' options l t r B b to align the (l)eft edge, (r)ight edge, (t)op edge, (B)aseline, (b)ottom edge respectively of the text box with the point-location.
@@ -564,9 +554,9 @@ The current value of the linethickness (in current units) can be accessed using
==============================
- VAR
+ VAR
- The var command is used to define scalar variables. It can be any numerical expression. A variable-name must begin with a single letter (either upper or lower case), and may have up to a maximum of three following digits. If a more detailed variable name is required, then a simple alternative is to use a mathsPIC macro---as any string can be allocated via macros (see the beginning of this chapter for details on macros).
+ The var command is used to define scalar variables. It can be any numerical expression. A variable-name must begin with a single letter (either upper or lower case), and may have up to a maximum of four following digits. If a more detailed variable name is required, then a simple alternative is to use a mathsPIC macro---as any string can be allocated via macros (see the beginning of this chapter for details on macros).
Note that variables, constants and points have the same name structure, and a variable can have the same name as a point (and so we suggest points have uppercase letters and variables and constants have lowercase letters). New values can be re-allocated to existing variable-names; however, when this occurs then mathsPIC does not issue a warning message to hightlight this fact.
@@ -599,17 +589,10 @@ The current value of the linethickness (in current units) can be accessed using
var d1 = directiondeg(PQ)
==============================
-
SEE ALSO
- --------
-
The mathsPIC package manual and examples
-==============================
-
BUGS
- ----
-
-Please report bugs to Dick Nickalls (see manual and above for address)
+Please report bugs to Dick Nickalls (dick [AT] nickalls [dot] org) or to Apostolos Syropoulos
-------------------------END---------------------
+================END================= \ No newline at end of file