WIMS technical documentation
This document is currently under integral style.
You may change it to
indexed or
folding style. There is also
a general help and
a paper
on WIMS.
-------- Table of Contents --------
What is wims?
WIMS (Www
Interactive
Multipurpose
Server)
is an internet server system designed for mathematical and other educational purposes.
The Wims server is composed of a kernel program which is a cgi program
(wims.cgi), plus various activity units called ``modules''.
The client accesses the server via a http request to wims.cgi, with
parameters specifying the name of the module to request, the type of the
request, and eventually parameters for the module. Upon request, wims.cgi
processes the requested module, passing the user parameters to it, and sends
the result returned by the module back to the client.
A module may consist of a number of script files grouped in one directory.
These scripts are written in a special scripting language recognizable
by wims.cgi.
The script language contains also commands which allow it to call external
programs (especially various mathematical softwares) to make sophisticated
computations. Such commands are processed by wims.cgi and sent through
interface programs which filters the request, checks for security breaches,
and sends back a filtered output.
Table of Contents
Examples of the capabilities of wims
The current version 4.01e of wims has several applications which
demonstrates (non-exhaustively) what one can do with a wims system.
- Take a look at the
animated plotter: it allows you to plot curves and surfaces with zooming, deforming and rotating
effects, more easily as you may possibly imagine.
- The game
Q-Puzzle gives a very good idea of how wims can provide a convenient way to combine
multimedia means and abstract mathematical notions.
- The game-exercise
Coincidence-freehand shows the possibility to create interactive graphic exercises of a new
style.
- The exercise
Correspondance gives an idea of the possibility of embedding javascript interactivity
into a wims application.
- The exercise
Accordance shows the possibility of linking different wims applications:
except for the easiest level,
such an exercise is practical only if the user can use computer to
solve a linear system. Now such a solver (another wims application)
is available directly in the
exercise page, via a hypertext link. In order to teach the student to
choose the appropriate tool, some irrelevant links are also added.
Please notice that the lack of direct data communication between the two
modules is only a choice of the design of the module, in order to make
the student type the matrices.
- The tool
Function illustrates the possibility to create pages which are at the same time
powerful and easy to use. By linking a plotter (gnuplot), a symbolic
calculator (Maxima) and a numerical calculator
(pari) at backend level, it allows the user to click on a root (or a
local extremum) he sees on the curve, and get the value of the root (or
local extremum) at arbitrary precision.
To achieve this, softwares are dynamically called at backend. First,
gnuplot is used to draw the curve in the given interval. When the user
clicks on a point, gp is called to try to find a root in the neighborhood
of the point. If it fails, Maxima is called to compute the formal
derivative of the function, and gp is called again to find a root of the
derivative in the neighborhood (which will be the local extremum).
- This document itself is an illustration to the fact that wims can
provide an easy way to dynamically reorganise contents of a document. By
changing a parameter, contents of the document can be grouped, split, or
chosen, in various ways. (Remark that this document is itself a wims module.)
Table of Contents
Comparing with other approaches
Advantage of wims versus locally installed softwares
- No need of software installation and/or update by users.
All installation and/or update of background software is done on the
server side, which can be anywhere on the internet. On the client
machine, only a common web browser is required (which needs not to be
very up to date).
- No need to learn the usage and the syntax of a particular software package.
As wims uses the html standard for user interface, a user, in particular
a student, has only to use his usual knowledge of html browsing (which
is now a common knowledge), in order to work on wims applications.
This is not the case for any of current mathematics softwares; all of
them require a training period before the user can work on it. This
training period may be more or less lengthy, but we remark that the
knowledge of using a particular software is not a universal knowledge,
and such a knowledge usually has a short lifespan.
Moreover, teaching knowledge about a commercial software contradicts
with the principle of commercial neutrality of a public education
institution.
- It provides a means to collect the knowledge and experience
of the whole educational community.
Wims is a modular system, where each application is a separated module
whose links with other modules are done in the usual html way.
This allows modules
to be developped independently and remotely. It is our hope that as many
educators as possible will add their knowledge and experience to the
system by contributions in the form of new modules or improvements of
existing ones.
- It allows student - teacher interactions in several ways.
Organized under the structure of
classes,
a wims system allows teacher
to assign works for his students, and get reliable informations about
the progress (and/or difficulty) of the student in real time. This may
allow the teacher to give more personalised guide to the student.
The big advantage of such a system based on internet is that there is
no site restriction: any work done from any site (local or remote) is
valid, and is taken into account.
- It provides a dynamic interaction between different components, e.g.
between exercises and computing tools.
For example, practically no software dedicated to exercises can
interface a computational tool as easily as wims does.
- It can be more powerful than any given software for certain works.
Because wims can use different (dedicated) software as backend engine,
even several softwares for one application or one request.
Disadvantage of wims versus locally installed softwares
- Low speed of reaction.
Because usually every wims response has to travel through internet.
This will improve when internet speed improves.
- Limited computational power and programming capability.
If a user has a heavy computational job and/or has to design a complicated
script to get his job done, he should work directly on the appropriate
software. It is not at all the intention of wims to interface such
activities.
- Limited capability of the graphical interface.
The html graphical user interface is not very suited for interactive
works.
Advantage of wims versus hand calculators
- Easier to use.
A html page used by wims for user interface is much more comprehensible
than any hand calculator.
- (Much) more powerful.
Disadvantage of wims versus hand calculators
- Non-portability.
Wims is accessible only to computers connected to internet.
Advantage of wims versus interactive web applications based
only on java or javascript
- More powerful and more versatile.
As wims can embed java or javascript programs in its applications, a
wisely designed wims application just extends the capability of java or
javascript.
And wims can really do more:
even if it is theoretically possible to develop java applications which
has the same power as a software used as a backend engine for wims, it
would take too much effort to develop (is it reasonable to re-write TeX
in java?), and would be so big that it would take forever for an http
query to load.
- Easier to develop.
Because wims language is first based on html (easy to learn), with an
extension specifically designed for this purpose.
- Allows student-supervisor interaction.
The design of server-based interactivity for users allows the back-end
communication with supervisors, and much more (performance analysis,
automatic intervention from supervisors, etc).
Disadvantage of wims versus interactive web applications based
on java or javascript
- Lower speed of reaction.
Because usually every wims response has to travel through internet.
This will improve when internet speed improves. One can also use
embedded javascript or java in a wims application, in places where
response speed is important.
Table of Contents
Current features of wims
- Write html pages with a programmability extension: substitution of
variables, conditional branching, etc.
This wims programmability extension to html does not require any
addon or plugin at the browser side, as all the wims commands are treated
by the wims server before sending the result to the browser, which will
be a standard html page.
For example, this allows you to define style macros which can be
dynamically changed.
And this extension can cohabit with all the current (and hopefully
future) html standards, including java applets, javascripts, embedded
objects,
dhtml... This is because the wims extension follows a strict line
discipline (i.e. a wims command must start at the first word of a line),
while html standard is not line-oriented.
This means that you can even embed wims extensions into javascripts,
applets, dhtml...
- Dynamic insertions of paints, plots and TeX formatted mathematical
formulas into html pages.
For example, you may insert the following line into your wims-extended html
page. At the browser side, the visitor will see a TeX formatted matrix
whose content varies with the value of the variable $matrix:
!instex $$ \left( $matrix \right) $$
Moreover, this implementation of dynamic insertions makes future updates
possible without modification at module's level. (For example when a
better way to render mathematical formula is available, a simple
modification at server's level will immediately let all !instex
lines take benefit of the new standard.)
- Insplot is now animated!
Exemple: the tool
Tracés Animés .
- Direct interfaces to powerful external software packages.
For example, you may define a variable `factor' by the following line:
factor=!exec pari print(factor($number))
Upon execution of this line, the variable will be replaced by
its current value, then the software package `PARI' will be called
with the string `print(factor(<value of $number>))' as command to
execute. The output of the program, with the overheads stripped, will
be placed as the value of the variable `factor'.
Interfaces provided in version 4.01e of wims: PARI, Maxima, MuPAD,
Coq, Povray, gnuplot, PostgreSQL, Fly (gif drawing), CALC (by Keith Matthew).
- Simple and versatile language.
The language used for wims modules is an extension of the existing and
popular html language. This extension is designed to be simple,
easy to use and close to natural language. Synonymes are accepted
whenever necessary. For example, to include the content of another
file, you don't have to remember whether the command is
include as in C, or input as in TeX,
because both are valid.
- Convenient directives for string manipulations:
replace with regular
expression capability, extraction of a subset from a list of items,
shuffle, evaluation of mathematical expressions, etc.
- Easy inline mathematical symbols:
simply type $m_pi for
, $m_RR for
, $m_eufM for
, $m_le for
, $m_Rightarrow for
, etc.
- Intelligent treatment of mathematical expressions:
built-in translation routines to allow error-tolerant expressions
like 2y (instead of 2*y) or (x+1)(x-1)
(instead of (x+1)*(x-1)), and translations of raw mathematical
expressions into beautified html sources (x^3-3*x^2+1*x-5
will become
x3-3x2+x-5 ,
etc.), or TeX sources, etc.
- Powerful random capabilities:
random permutation (shuffle), random
record from a datafile, random filename, etc.
Table of Contents
Online development of activities
The system includes several facilities allowing you to create and develop
WIMS activities directly online. To do so, you have only to click on the
respective links from the home page of the server.
The easiest is the creation of simple interactive exercises
which does not really require the knowledge about a computer language, but
exercises that can be written in this way have limited power and versatility.
On the other hand, you can also develop full-power WIMS modules
by working entirely on line. For obvious security reasons, you will need a
login/password pair which you must ask the site manager to attribute to you.
Once logged in, you can create and modify as many modules as you like, in a
special development zone. When you have finished the development of a
module, you can ask the site manager to move it to a public place.
Table of Contents
Basic structure of wims
The central piece of a wims server is a cgi program, usually in the name of
wims.cgi. It takes all the http calls to the server, then does the following
work:
- Call the module asked by the user, and process parameters and variables
according to what is defined in the module.
- Session management.
- Send the result of the process to the user.
- Write to different log files.
Modules of wims
A wims server is a modular system, with different applications as modules.
At each new call to wims, the user has to specify which module he want to
access.
A wims module may be an interactive course or interactive exercise (of any
level), a computational tool, a dictionary, a mathematical game, a database,
or a mixture of the above.
Wims modules are independent from each other. Each module has its own
directory, which serves as its address, and contains all the files of this
module. Different modules have different authors and different maintainers,
and may follow different copyright policies.
There is no relation between modules in a same wims site, except hypertext
links which allows one module to access another in various ways.
How to access a wims server
Wims is accessed by a request to the main cgi program, for example
http://wims.unice.fr/wims/wims.cgi
which usually should be followed by parameters. A call to the main wims.cgi
program without parameter will bring up the wims homepage of the site.
Parameters of wims.cgi is a usual http name=value pair, where the
name field may be one of the following:
- cmd: the value is the command of the call.
Valid commands:
| parameter string | meaning
|
| cmd=intro | get introduction page of the module
|
| cmd=new | open new working session
|
| cmd=renew | restart working session
|
| cmd=reply | send reply to the module
|
| cmd=next | get next exercise (in a working session)
|
| cmd=config | set preferences
|
| cmd=help | get contextual help
|
| cmd=hint | get contextual hint
|
| cmd=resume | resume work (e.g. after help)
|
| cmd=getins | get dynamic insertions: internal use
by the server. Not to be used by modules.
|
- module. the value is the name of the module
which the user wants to access.
- session: the value is the number of the current
session of the user.
The session number is automatically generated by wims.cgi, and is usually
automatically contained in the pages sent by the server. Tampering with this
parameter by the user (e.g. in order to spy into others' work) is not
allowed and has practically no chance to get through.
- lang: the value defines the prefered language
of the user.
- user: the value is the user name (for
registered users; reserved for internal use).
- useropts: the value contains user options for the
server. The format is coded and may varie from version to version.
- worksheet: reserved for internal use, for
determining user works assigned by worksheets.
- special_parm: this parameter is reserved for
special requests (help, etc).
- Any variables accepted by the module on which the user is working on (or
wants to work on).
Example:
http://wims.unice.fr/~wims/wims.cgi?cmd=new&module=tool/algebra/factor.en
calls the wims server at wims.unice.fr, with `new' as the value of `cmd',
`tool/algebra/factor.en' as the module name.
How to use the supervisor-side interface
Supervisors of registered classes can maintain their classes and consult
results of students via the same web address (the main cgi program), just
by logging in as supervisor. All the options are then available via html
links and buttons.
Table of Contents
Structure of a wims module
Each wims module has a private home directory in which go all the files
of this module.
A module must have at least the following files:
- A variable definition file var.def.
This file defines external variables of the module. A parameter given by the
user must have a name declared in this file, except parameter names reserved by
wims (cmd, session, module, ...). And exactly variables declared in this
file will be saved in the session directory (to be recalled at the next
request from the same session).
- A variable processing file var.proc.
This file is processed at EACH request of the module (except special
requests: when cmd=intro or getins).
- A main phtml file main.phtml.
This file will be processed at avery request to the module, except under
special commands (when cmd=intro or getins)
- An indexing file INDEX, which defines the application's nature.
This file will be used by wims database for searching available modules.
And it may often contain the following (optional) files too:
- A variable initialisation file var.init.
This file has the same syntax as the file var.proc, and is processed
exactly at requests with cmd=new or cmd=renew.
- A introductory page intro.phtml.
This is a phtml file, which is processed when the module is
accessed with cmd=intro. It is usually used to introduce the content of the
module, and to let the user choose starting options.
There may be any number of other files, like a README file, one or more
help pages, an about page, one or more graphics files, files called by one
of the above mandatory or optional files, etc.
Variable processing files
The files var.init and var.proc,
as well as any files called by these two
files, are variable processing files.
A variable processing file is divided into lines, separated by
non-escaped new-line characters. A new-line character can be escaped by the
character \, in which case it does not separate the two lines
before and after it.
Every line of a variable processing file must be one of the following:
- A comment line, whose first non-space character is either the character
#, or ! followed by another !.
- A variable definition line, in the form of
name=value. The content of
value may be a string (if this string contains a new-line
character, it must be escaped by the character \), or a wims
variable command (which must then start with the character !).
- A command line, whose first non-space character is the character
!, followed by the command name and optional parameters.
If the command produces an output string, this output will be ignored.
- A label line, whose first non-space character is the character
:, followed by the name of the label. Anything following the
label name will be considered as comment and ignored by the interpreter.
Label is used in conjunction with the jumping command
!goto.
A label starting with the character '*' is catch-all, matching any
!goto label.
- Any line not fitting into one of the above 4 will generate a wims error
message.
Phtml files
The files main.phtml and intro.phtml, as well as any files called by these
two files, are phtml files (programmable html).
A phtml file is an ordinary html file, except for lines whose
first non-space character is a ! or a :.
Lines can be escaped by \, just as in the case of a variable
processing file.
A line starting with : is a label line, as in the case of a
variable processing file.
A line starting with ! is a command line, as in the case of a
variable processing file. To the difference that if the command produces an
output string, this output will be inserted into the html page, at the place
of the line.
Lines not of the above two types will be sent to the http client, after
substitution of variables.
Table of Contents
Variables in a module
Definition and substitution of variables
Wims variables has only one type: they are all string variables. Numerical
evaluation can be done on variables via the variable command
!eval.
A variable may be defined or modified in a variable processing file, or by
the commands
!let and
!default.
Variable names can contain any alphanumeric character, as well as the
underscore character _. There is a limit to the length of
variable names, and a limit to the length of values. (Limits depending on
server configuration.)
Variable substitution can be done anywhere in a variable processing file or
a phtml file (even in the name field of a variable definition
line). A word preceeded by the character $
is considered to be a variable name, and will be replaced by its value when
the line containing it is processed.
Special rules of variable substitution:
- If the character $ is followed by a space, it will be
discarded.
- The string $$ is replaced by a single $.
- If the character $ is followed by the left parenthesis
(, the matching ) will be located, the content
of the pair of parentheses substituted. The result of the substitution
will then be used as the name of variable, and finally the whole thing
will be replaced by the value of the last variable. This allows nested
substitutions, as well as substitution of a variable which is followed
by an alphanumeric character.
Example: if the variable i has value 3
and the variable alpha3beta has value pi,
the string
3*$(alpha$(i)beta)*x
will become
3*pi*x
after substitution.
Array addressing: if the variable l contains a
comma-separated list a,b,c,d,e, then the string
$(i[3]) gives c after substitution, and
$(i[2 to 4]) tives b,c,d, etc.
Two-dimensional array addressing is also available: if
$M=x,y,z;a,b,c
(a 2x3 matrix), then
$(M[1;3,2])=z,y
- If the character $ is followed by the left bracket
[, the matching ] will be located, the content
of the pair of brackets substituted then evaluated to a real number value whose
precision depends on the value of print_precision.
This value will replace the whole thing
together with the leading $.
It can be used for array subscripts.
Example: if the variable i has value 3
and the variables
a1 has value 3 and
a2 has value pi,
then the string
$(a$[$i-1])*x+$(a$[$i-2])
will become
pi*x+3
after substitution.
- If the value of a variable being substituted contains the character
$, this value will again be substituted, until no more
substitution is needed. The server has a built-in limit of nested
substitutions; infinite nested substitions will violate this limit and
generate an error message.
Reserved variable names
The following names are reserved for their special meanings. They should not be
used for internal needs of any module.
- Do not use variables with names consisting only of numbers. They are
reserved for future enhancements of the language.
- Variables named
cmd,
module,
session,
lang,
special_parm,
user,
useropts,
worksheet,
are reserved for special parameter passing by the user. A module's variable
processing files or phtml files can read but cannot set them.
Refer to the section Basic structure of wims for the meaning of
these variables.
- The variable no_name has a special use:
Parameters in the user query string with no name (for example when the
coordinate of a mappable image is passed this way to the http server) will
be registered under this variable. For this reason, it should not be used
for other purposes.
- All variable names starting with wims_ will have special
meanings for wims server. A module should read or write them only for the
special meanings they are designed for.
- Variable names starting with m_ are reserved for inline
mathematical fonts. The module programmer may redefine them, but then their
original meaning will be lost.
- The variable module_dir has a value preset to the directory
of the current module (with respect to the public home directory of the
server). This value is usually $module_dir=module/$module
(but may vary with the config of the installation).
- Variable names starting with module_ will have special
meanings: they are used to hold variables defined in the module's INDEX
file. Currently implemented variables:
| module_title | title of the module
|
| module_description | short description of the module
|
| module_author | name(s) of author(s) of the module
|
| module_address | e-mail address of the (principal) author
|
| module_copyright | copyright notice of the module
|
| module_version | current version of the module
|
| module_wims_version | minimal wims version required
to run this module
|
| module_language | language of the module (en, fr, de, or ...)
|
| module_category | category of the module
(exercise, tool, course, pedia, recreation, adm, other)
|
| module_level | level of the module
|
| module_domain | algebra, analysis, geometry, ...
|
| module_keywords | keywords, to be placed in the html header
|
| module_scoring | = yes if the module gives scores according
to wims standard
|
Also, variables module_has_intro,
module_has_help and
module_has_about
have value "yes" if the module's directory contains the respective
.phtml file. These variables are used in the command !homeref.
- Certain environment variables setup by httpd are readable by wims
modules under names starting with httpd_. For example, the
environment variable REMOTE_HOST becomes
httpd_REMOTE_HOST under wims.
Please refer to httpd protocol specifications for details of such variables.
- All variable names starting with ins_,
insplot_, instex_ will have special meanings for the
corresponding dynamic insertion engines. A module should read or write them
only for the special meanings they are designed for.
- If your module uses an external package (e.g. pari),
variable names starting with the name of the interface to that external
package followed by _ will have special meanings for that
interface, and should be reserved for that purpose.
Table of Contents
Variables with special meanings
Variables for general purposes by wims server
- The variable wims_exec_error is used to store error messages
of the external program called by
!exec.
For this reason,
this variable will be overwritten each time a !exec
command is executed.
- The variable wims_module_log is used for individual
module's log files: if this variable is non-empty, wims.cgi will put its
content into the module's log file, at the end of the process of the
user request.
- The variable wims_version has a value preset to the
current version of the wims server.
- The variable wims_version_date has a value preset to the
last compile date of the server program.
- The variable wims_site_manager contains the electronic address of the
site manager, as defined in the configuration file
wims.conf of the site. Modules should not modify this
variable.
- The variable wims_print_precision defines the printing precision when a
result of evaluation (via !eval or NaN) is converted to
a character string. Default value: 8
(may be modified in wims.conf).
- The variable wims_warn_... is ...
- The variable wims_compare_precision is used to define error tolerance
when wims compares two numerical values. Formula: !ifval a=b will
return TRUE if
abs(a-b)*$wims_compare_precision<abs(a+b)+1/$wims_compare_precision.
Default value: 10000 (may be modified in wims.conf).
- The variable wims_texsize can be used to modify TeX sizes for the
module. Default value is 0 (no change). Maybe 1,2,... (increase TeX size) or
-1,-2... (decrease TeX size).
- The variable wims_homeref_parm is reserved for future use in the command
!homeref.
wims_homeref_bgcolor is...
wims_rawmath_functions is used to tell rawmath routine that
the words contained in the variable value should be treated as function names.
These words can be separated either by white space or by comma.
wims_rawmath_variables is used to tell rawmath routine that
the words contained in the variable value should be treated as math variable
names. These words can be separated either by white space or by comma.
- The variable wims_ref_target defines the target of the command
!href, !homeref, !form. Its value is not automatically
reset to empty after the commands. (Defaults to empty string, meaning that
the target is the current document.)
- The variable wims_html_header is the standardised html header for all
its modules' html outputs. Its value is defined in the file
html/header.phtml. It is highly recommended that modules use this variable
to define their html headers.
- The variable wims_expire is used to define expiration dates of the
pages sent to clients. Don't touch it if you don't know what this means.
- The variable module_init_parm is...
Variables reserved for dynamic insertions
- The variable ins_align defines the manner in which the inline picture
is aligned with respect to the line. Possible values: bottom, middle or top.
Default is empty (which means bottom).
- The variable ins_attr is used to define miscallaneous attributes of a
dynamic insertion. Examples:
ins_attr = align=middle
(aligns the middle of the image with the baseline for the current
textline), or
ins_attr = ismap
(coordinates of the click will be passed back to the server; if the link
of the element is the wims server, the coordinates will be registered
under the variable no_name.)
This variable is reset to empty after a dynamic insertion.
- The variable ins_border is used to define border width of the html
element IMG
resulted from the dynamic insertion. Its value should be a positive
number.
This variable is reset to empty after a dynamic insertion.
- The variable ins_density is used to define the density of the dynamic
insertions. Default value: 100x100 .
Avoid using this variable! We are planning to
suppress it. Will be replaced by a server-managed variable.
- The variable ins_format can be used to determine the format of the
graphics file of the dynamic insertion: its value should be either
gif or jpg. The default value of this variable is
gif (which can be changed by modifying the file
wims.conf; but such change is not recommended).
Some types of dynamic insertions may not be affected by this variable.
- The variable ins_quality is used to define quality of the graphics
convertion used in dynamic insertions. Its value should be between 0 and
100. Affects only dynamic insertions whose graphics format is jpg.
- The variable ins_tag is used for dynamic insertions within a form.
In this case define
ins_tag=form name
where name is the name of the html element IMG
within the form (optional).
This variable is reset to empty after a dynamic insertion.
- The variable insdraw_size is ...
- The variable insplot_data is ...
- The variable insplot_font is ...
- The variable insplot_set is ...
- The variable insplot_split is ...
- The variable insplot_transparent is used to define transparent color
for insertions. Default is empty (no transparency). Usual value: 255,255,255
(white is transparent).
Table of Contents
Data structure
Arrays
There is no special syntax in wims language for arrays. However, it is
possible to design array-like variable structures, with integer or even
string subscripts. This can be done using nested variable substitutions. For
example, ...
Fields in a string
Wims variables are all string variables. There are three different ways to
split a string into fields:
- As a list of words, separated by white-space characters. Consecutive
white-spaces are considered as one field separator.
- As a list of lines, separated by new-line characters. Consecutive
new-lines are considered as separating empty lines.
- As a list of items, separated by commas ( , ). Consecutive
commas are considered as separating empty items.
This section is not yet finished. Sorry.
Table of Contents
List of commands
Wims commands can be used in variable processing files and phtml files. A
command is a word preceeded by the character !.
Commands has two types:
- Execution commands, which are placed as the first word of a line.
- Variable commands, which are placed at the beginning of a definition of
a variable.
Some commands can be used both as execution command and as variable command.
Commands may accept parameters which are words following it. Parameter
fields are separated by white spaces or special words (depending on the command).
Here is the list of all commands.
-
append
Type: both execution and variable command
Syntax: !append object s1 to str
Meaning: String manipulation: append object s1 to the
string str. object maybe item,
word or line.
-
bound
Type: execution command
Syntax: !bound vname between [integer]
v1 and v2 [default defaultvalue]
or
!bound vname within list [default
defaultvalue]
Meaning: bound the range of the variable vname. Usually
this is used on user-submitted variables.
The first syntax is usually for numerical variables (integer or real,
defaults to real). In this case v1 and v2
supplies the lower and upper bounds for the value of
vname.
In the second syntax, the value of vname is compared with
each item of list. If no occurrence is found, the value of
vname is replaced either by defaultvalue or
the first item of list, according to whether
defaultvalue is defined.
In any case, defaultvalue is optional.
-
changeto
Type: execution command
Syntax: !changeto file [ parm]
Meaning: Abandon the current file, changing processing to
file. file is as in read.
And the parameter parm can be accessed from within
the new file under the variable name
wims_read_parm.
-
char
Type: both execution and variable command
Aliases: chars
Syntax: !char numlist of string
Meaning: Outputs selected characters of string, according to
numlist.
numlist can be a single integer, a comma-separated list of
integers, or a range of integers.
A positive integer denotes the number of character in string
counted from the beginning,
with 1 corresponding to the first
character. A negative integer denotes the number of character from
the end of string: -1
means the last character, -2 means
the next-to-last character, etc.
The syntax for a range of integers is
n1 to n2
For example, 2 to -2
means the whole string except the first
and the last characters.
-
charcnt
Type: variable command
Aliases: charcount, charno, charnum, lengthof
Syntax: !charcnt string
Meaning: Returns the number of characters in string.
-
checkdata
Type: variable command
Aliases: checkdatamodule
Syntax: !checkdata
Meaning: This command is used to check whether datamodules required by
the present module are installed on the server. It returns "yes" if every
required datamodule is installed or if no datamodule is required. Otherwise
it returns the address of the first missing datamodule.
If your module depends on datamodules to run, declare them in the INDEX
file, then use this command to check the presence of the datamodules. If
the answer is "no", you can take actions to lock further access to your
module and/or show error messages.
-
column
Type: both execution and variable command
Aliases: columns
Syntax: !column numlist of string
Meaning: Outputs selected (comma-separated) columns of
a matrix string,
according to numlist. Rows of the matrix can be separated
either by new lines or by semi-colon ``;''.
numlist can be a single integer, a comma-separated list of
integers, or a range of integers.
A positive integer denotes the number of column in string
counted from the beginning,
with 1 corresponding to the first
column. A negative integer denotes the number of column from
the end of string: -1
means the last column, -2 means
the next-to-last column, etc.
The syntax for a range of integers is
n1 to n2
For example, 2 to -2
means the whole string except the first
and the last columns.
The output is separated by commas if only one column is selected, or
separated in the same way as the matrix string otherwise.
-
date
Type: both execution and variable command
Syntax: !date parm
Meaning: This is simply an interface to the Linux date
utility. parm is the parameter string to the Linux command
date, please refer to the man page of date for
its syntax. The command returns the output of the date
utility.
-
deaccent
Type: both execution and variable command
Syntax: !deaccent string
Meaning: Returns string with all accented letters (such as
é, à, ï) folded to their unaccented counterparts.
-
debug
Type: both execution and variable command
Syntax: !debug parms
Meaning: This command is for debugging purposes: it substitutes the
parameter parms, and stops the execution with a module error
sent to the user. The content of the error message contains the result
of the substitution.
-
declosing
Type: both execution and variable command
Syntax: !declosing string
Meaning: Strips off enclosing pair of parentheses ((),[],{})
in string. Useful for treatment of user-input
vectors or sets, where some users use enclosing parentheses and other
don't.
-
default
Type: execution command
Syntax: !default name=value
Meaning: put value into the variable name,
if name is not already defined.
value may be a variable command (together with optional parameters).
-
defof
Type: both execution and variable command
Aliases: definitionof, getdef
Syntax: !defof vname in fname
Meaning: Returns the definition of variables vname in the file
fname.
When vname contains several names, the values of each will
be returned with the same separators as for the names.
-
detag
Type: both execution and variable command
Syntax: !detag string
Meaning: Removes html tags in string. It is very rudimentary
and should be used with care. Very useful for security enhancement in some
occasions (apply to user-supplied strings).
-
distribute
Type: execution command
Syntax: !distribute type string into
namelist
Meaning: Distribute the content of string into variables
namelist. The distribution can be done word by word, item by
item, character by character or line by line, according to the word
type. type can be one of the following:
words, items, lines, chars.
For example, if type is words, then the first
(resp. second, etc.) variable in namelist will be set
to the first (resp. second, etc.) word of string.
-
embraced
Type: both execution and variable command
Syntax: !embraced opword string
Meaning: executes an operation opword in each
substring of string enclosed in a pair of curly braces.
The curly braces in string can be nested, but
the execution runs from outmost pair to innermost pair.
Available opword:
- randitem. Random item in every embraced text.
- extract. Extracts the first (outmost) embraced text.
- delete. Deletes all embraced contents (encluding the
curly braces).
-
eval
Type: variable command
Aliases: evalue
Syntax: !eval expr
Meaning: Returns the numerical value of the expression expr.
expr must evaluate to a real number (under the
current version of wims). The evaluation is internally done in double
precision, but the print precision can be changed by setting the variable
wims_print_precision (whose default value is 8).
If an error is found in the expression expr, 0 is returned.
(I know that this is very bad; I just have no time to make everything right.)
-
evalsubst
Type: both execution and variable command
Aliases: evalsubstit, evalsubstitute, evaluesubst,
evaluesubstit, evaluesubstitute
Syntax: !evalsubst name=val in
expr
Meaning: Manipulation of mathematical expressions: substitute variable
name by val in expr, then
evaluate the expression to a real number.
No regular expression is allowed in name.
See also the commands
!mathsubst,
!replace.
-
exchange
Type: execution command
Syntax: !exchange var1 and
var2
or exchange var1, var2
Meaning: Exchanges the values of the variables var1
and var2.
-
exec
Type: both execution and variable command
Aliases: execute, run, call
Syntax: !exec command parms
Meaning: execute external command command with optional
parameters parms. command must be a valid
program name in the wims-public directory bin.
When used as variable command, returns the output of the called program.
-
exit
Type: execution command
Aliases: return
Syntax: !exit
Meaning: Abandon the current file. If current file is called by another
file, return to the latter.
-
fileappend
Type: execution command
Aliases: appendfile
Syntax: !fileappend fname content
Meaning: Append content to file fname.
fname is a file residing in the module's directory, under the
subdirectory writable.
A new line will be added at the end of the content.
Special case: if the file name starts with getfile/, the file
is written to the getfile subdirectory of the session. This file is then
accessible via the command
!href cmd=getfile&special_parm=fname_without_getfile_prefix
,
or a complete url
$wims_ref_name?session=$session&cmd=getfile&special_parm=fname_without_getfile_prefix
-
filewrite
Type: execution command
Aliases: writefile
Syntax: !filewrite fname content
Meaning: Write content to file fname.
fname is a file residing in the module's directory, under the
subdirectory writable.
A new-line character will be added at the end of the content.
Special case: if the file name starts with getfile/, the file
is written to the getfile subdirectory of the session. This file is then
accessible via the command
!href cmd=getfile&special_parm=fname_without_getfile_prefix
,
or a complete url
$wims_ref_name?session=$session&cmd=getfile&special_parm=fname_without_getfile_prefix
-
for
Type: execution command
Syntax: !for var = start to end
[step st ]
or
!for var from start to end
[step st ]
or
!for var in list
... (multi-line content)
!next
Meaning: For loop. In the first two forms, var goes from
start to end, with optional step
st.
In the last form, var takes successively items in the list
list. list is a list of items separated by
commas.
The command
!break
within the for loop breaks it. continue is not yet
implemented in this version.
It is recommended that the variable name var be added to the
!next line. This has no effect for the time being, but may be
used in future versions of wims.
-
form
Type: execution command
Syntax: !form cmdvar
Meaning: Creates a html form pointing to the wims server.
Whenever possible, this command should be used instead of a direct use of
html tag <form>.
This command will create a <form> tag pointing to the wims server, adding
<input> fields to pass session number (and other reserved things in the
future). In lines which follow, other input (or select) fields may be
added to the form. A final </form> tag should also be added by the
programmer.
cmdvar is an optional parameter. Its value should be a valid
value for the variable cmd. In this case the value
cmdvar will be automatically submitted to the variable cmd
. If this parameter is missing or is invalid, then the programmer
should add a <input type=hidden name=cmd value=...> tag before the
final </form>.
The target of the form can be controlled by the variable
wims_ref_target. It can also be defined via an optional word
target=.... Note that in this case the target must start with
wims_.
The variable wims_form_method which must be either `get' or
`post' controls the method of the form.
This method defaults to `post' for tool modules, and to `get' for all
other modules.
-
formbar
Type: execution command
Aliases: formradiobar, htmlbar, htmlradiobar
Syntax: !formbar name from n1
to n2
or
!formradio name list
selectlist
Meaning: Creates a bar of radio buttons under a previously defined html form.
This bar should be arranged to represent values from small to big. No
prompt is given to the user, except the indication that left is smaller.
In the parameters, name defines the
name field of the menu, and the values of the menu are either integers
going from n1 to n2 (in the first syntax), or
items in the list selectlist.
The default of the menu will be the current value of the variable
$name.
-
formcheckbox
Type: execution command
Aliases: htmlcheckbox
Syntax: !formcheckbox name from n1
to n2 prompt promptlist
or
!formcheckbox name list
selectlist prompt promptlist
Meaning: Creates a checkbox list menu under a previously defined html form.
This command speeds up the creation of checkboxed menus, as well as simplifies
the source files. In the parameters, name defines the
name field of the menu, and the values of the menu are either integers
going from n1 to n2 (in the first syntax), or
items in the list selectlist.
The optional parameter promptlist can be used to generate
user prompts for each items in the list. If promptlist is
empty or is shorter than selectlist, the undefined prompts
will be replaced by the value. If it is longer, the rest will be ignored.
The default of the menu will be the current value of the variable
$name.
-
formradio
Type: execution command
Aliases: htmlradio
Syntax: !formradio name from n1
to n2 prompt promptlist
or
!formradio name list
selectlist prompt promptlist
Meaning: Creates a radio button list menu under a previously defined html form.
This command speeds up the creation of radio buttoned menus, as well as simplifies
the source files. In the parameters, name defines the
name field of the menu, and the values of the menu are either integers
going from n1 to n2 (in the first syntax), or
items in the list selectlist.
The optional parameter promptlist can be used to generate
user prompts for each items in the list. If promptlist is
empty or is shorter than selectlist, the undefined prompts
will be replaced by the value. If it is longer, the rest will be ignored.
The default of the menu will be the current value of the variable
$name.
-
formselect
Type: execution command
Aliases: htmlselect
Syntax: !formselect name from n1
to n2 prompt promptlist
or
!formselect name list
selectlist prompt promptlist
Meaning: Creates a select menu under a previously defined html form.
This command speeds up the creation of select menus, as well as simplifies
the source files. In the parameters, name defines the
name field of the menu, and the values of the menu are either integers
going from n1 to n2 (in the first syntax), or
items in the list selectlist.
The optional parameter promptlist can be used to generate
user prompts for each items in the list. If promptlist is
empty or is shorter than selectlist, the undefined prompts
will be replaced by the value. If it is longer, the rest will be ignored.
The default of the menu will be the current value of the variable
$name.
The variable wims_formselect_switch may be used to set
switches (for example by letting wims_formselect_switch=multiple,
the selection will be multiple.
-
getopt
Type: both execution and variable command
Syntax: !getopt name in string
Meaning: This command allows to extract the definition of a word in
string under the form name=value.
It returns the defined value in the string, or the
name itself if it appears in string but
if there is no = sign following it, or an empty string
if name does not appear in string as a word.
value can be a multi-word string, if it is enclosed by a
pair of parentheses, brackets, curly braces or double quotes. The enclosing
parentheses etc. will be removed from the output.
Spaces are allowed before and/or after the = sign.
-
goto
Type: execution command
Syntax: !goto label
Meaning: Unconditionally jump to label . label
must be a valid label in the current file.
-
header
Type: execution command
Aliases: htmlheader, wimsheader
Syntax: !header parm
Meaning: Standardized header for html page outputs. Includes the variable
wims_html_header and the commands !headmenu
and !title.
parm is reserved for future implementation.
-
headmenu
Type: execution command
Syntax: !headmenu
Meaning: Creates a standardised menu bar, usually to be included on the
top of the page.
-
hex
Type: both execution and variable command
Aliases: tohex
Syntax: !hex string
Meaning: Returns a new string replacing every character in
string by its hexadecimal code.
In particular, the result can be used as part of a variable
name whatever the content of string is (as
long as it is not too long).
-
homeref
Type: execution command
Aliases: wimsref
Syntax: !homeref parm
Meaning: Creates a standardised table of links to wims homepage (and
eventually other things).
parm is reserved for future implementation.
-
href
Type: execution command
Syntax: !href parms text
Meaning: Creates a hypertext reference pointing to the wims server.
Whenever possible, this command should be used instead of a direct use of
html tag <a href=...>.
parms is the string of parameters to the call to wims server,
which should not contain white spaces.
Usually a cmd=... pair should be at least present; on the
other hand, the session number and prefered language will be directly
added by the server.
text is the text on which the hypertext link sits. It can be
any text or a <IMG ...> tag, but dynamic insertions are not accepted yet.
There is no need to add the end tag </a>.
The target of the reference can be controlled via the variable
wims_ref_target. It can also be defined via an optional word
target=.... Note that in this case the target must start with
wims_.
-
htmlmath
Type: both execution and variable command
Syntax: !htmlmath expr
Meaning: Translate the raw mathematical expression expr,
into a form which can be best possibly rendered via html tags.
-
if
Type: execution command
Syntax: !if string1 relation string2
... (multi-line content)
!endif
Meaning: Conditional branching: execute the multi-line content between
!if line and !endif line, if
relation is verified.
The leading and trailing spaces of string1 and
string2 will be stripped before making comparisons.
All comparisons are made on strings: string1 rel string2.
Comparisons can be joined using and and or. Parentheses may
be used to build complex comparison logics.
Valid relations rel:
| relation | condition
|
| = or == | true if string1
and string2 are identical.
|
| != or <>
| true if string1
and string2 are NOT identical.
|
| < | true if (the numerical evaluation of)
string1 is < string2 .
|
| <= | true if (the numerical evaluation of)
string1 is string2 .
|
| > | true if (the numerical evaluation of)
string1 is > string2 .
|
| >= | true if (the numerical evaluation of)
string1 is string2 .
|
| isin | true if string1
is a substring of string2 .
|
| notin | true if string1
is NOT a substring of string2 .
|
| iswordof | true if string1
is a word of string2 .
|
| notwordof | true if string1
is NOT a word of string2 .
|
| isvarof | true if string1
is a (mathematical) variable of the expression
string2 .
|
| notvarof | true if string1
is NOT a (mathematical) variable of the expression
string2 .
|
| isvariableof | true if string1
is a (mathematical) variable of the expression
string2 .
|
| notvariableof | true if string1
is NOT a (mathematical) variable of the expression
string2 .
|
| isitemof | true if string1
is an item of the list string2 .
|
| notitemof | true if string1
is NOT an item of the list string2 .
|
| islineof | true if string1
is a line of the list string2 .
|
| notlinedof | true if string1
is NOT a line of the list string2 .
|
| issamecase | true if string1
and string2 are the same text by a comparison
insensitive to multiple spaces but case-sensitive.
|
| notsamecase | true if string1
and string2 are NOT the same text by a comparison
insensitive to multiple spaces but case-sensitive.
|
| issametext | true if string1
and string2 are the same text by a comparison
insensitive to cases, multiple spaces and accented letters.
|
| notsametext | true if string1
and string2 are NOT the same text by a comparison
insensitive to cases, multiple spaces and accented letters.
|
-
ifval
Type: execution command
Same as the command
if,
but = (==),
!= compares the
numerical values of string1 and string2
rather than the strings themselves.
-
increase
Type: execution command
Aliases: advance
Syntax: !increase var
Meaning: Increase the value of var by one. The value
of var is first rounded to an integer.
-
insdraw
Type: execution command (only valid for phtml files)
Aliases: inspaint
Syntax: !insdraw drawsource
Meaning: The server will call a paint program
( flydraw), submit drawsource
as its command (with variables substituted),
and insert the result into the page.
-
insmath
Type: execution command (only valid for phtml files)
Syntax: !insmath formula
Meaning: According to the complicatedness of formula ,
the server will either render it as beautifully as possible using html
tags, or translate formula into TeX source then call TeX
to compile and finally transform the TeX result into a picture. The latter
is inserted into the page (at the place of the command).
If the user browser knows mathml, then the formula is simply
translated into mathml and sent to the browser.
-
insplot
Type: execution command (only valid for phtml files)
Syntax: !insplot plotsource
Meaning: The server program will call an external plotting program
(gnuplot for the current version), submit plotsource
as the 2D plot command (with variables substituted),
and insert the result into the page.
The syntax of plotsource is that of the plot
command of gnuplot.
-
insplot3d
Type: execution command (only valid for phtml files)
Syntax: !insplot3d plotsource
Meaning: As for
insplot,
but plotsource
is in the syntax of the splot command of gnuplot, and a 3D
surface will be plotted.
-
instex
Type: execution command (only valid for phtml files)
Syntax: !instex texsource
Meaning: The server program will call TeX to process the (plain) TeX
source texsource (after variable substitution),
translate the result into a picture, and
insert it into the page (at the place of the command).
A tip: avoid using substituted variables in texsource
whenever possible. In this case Wims will use static instex, improving
performance dramatically over dynamic instex.
The font color of the inserted text can be controled either by the variable
instex_color, or by a \special{color=...} string
in the texsource.
-
instexstatic
Type: execution command (only valid for phtml files)
Aliases: instexst, staticinstex, stinstex
Syntax: !instexstatic gifname texsource
Meaning: This command is obsolete, and will be dropped in future versions.
Use
!instex
instead.
-
item
Type: both execution and variable command
Aliases: items
Syntax: !item numlist of string
Meaning: Outputs selected (comma-separated) items of string,
according to numlist.
numlist can be a single integer, a comma-separated list of
integers, or a range of integers.
A positive integer denotes the number of item in string
counted from the beginning,
with 1 corresponding to the first
item. A negative integer denotes the number of item from
the end of string: -1
means the last item, -2 means
the next-to-last item, etc.
The syntax for a range of integers is
n1 to n2
For example, 2 to -2
means the whole string except the first
and the last items.
-
itemcnt
Type: variable command
Aliases: itemcount, itemno, itemnum
Syntax: !itemcnt list
Meaning: Returns the number of items in list.
-
items2lines
Type: both execution and variable command
Aliases: itemstolines, list2lines, listtolines
Syntax: !items2lines string
Meaning: This command changes multiple items in string into
multiple lines.
-
items2words
Type: both execution and variable command
Aliases: itemstowords, list2words, listtowords
Syntax: !items2words string
Meaning: This command changes multiple items in string into
multiple words.
-
let
Type: execution command
Aliases: def, define, set
Syntax: !let name=value
Meaning: put value into the variable name.
value may be a variable command (together with optional parameters).
-
leveldata
Type: both execution and variable command
Aliases: levelpoints
Syntax: !leveldata size xsize,ysize
ranges x1,x2,y1,y2 function f(x,y)
[levels l1,l2,...]
Meaning: Computes coordinates of points on the level curve of
f(x,y), at levels l1,l2,... (defaults to one
level 0).
The computation is made from (x1,y1) to
(x2,y2), and points are computed as integer positions in a
picture with size xsize,ysize.
Order of the fields is not important. All the fields except levels are
mandatory.
-
line
Type: both execution and variable command
Aliases: lines
Syntax: !line numlist of string
Meaning: Outputs selected lines of string, according to
numlist.
numlist can be a single integer, a comma-separated list of
integers, or a range of integers.
A positive integer denotes the number of line in string
counted from the beginning,
with 1 corresponding to the first
line. A negative integer denotes the number of line from
the end of string: -1
means the last line, -2 means
the next-to-last line, etc.
The syntax for a range of integers is
n1 to n2
For example, 2 to -2
means the whole string except the first
and the last lines.
-
linecnt
Type: variable command
Aliases: linecount, lineno, linenum
Syntax: !linecnt string
Meaning: Returns the number of lines in string.
-
lines2items
Type: both execution and variable command
Aliases: linestoitems, lines2list, linestolist
Syntax: !lines2items string
Meaning: This command changes multiple lines in string into
multiple items.
-
lines2words
Type: both execution and variable command
Aliases: linestowords
Syntax: !lines2words string
Meaning: This command changes multiple lines in string into
multiple words.
-
listcomplement
Type: both execution and variable command
Syntax: !listcomplement list1 in list2
Meaning: Returns items appearing in list2 but not in
list1. Repetitive occurrences are eliminated.
-
listfile
Type: both execution and variable command
Aliases: listfiles, filelist, ls, dir
Syntax: !listfile filespec
Meaning: list files specified in filespec. Options to Linux
command ls are accepted. The base directory is the base of
the wims server. So if you want to list files in the current module, type
!listfile $module_dir
Only trusted modules can use this command.
-
listintersect
Type: both execution and variable command
Aliases: listintersection
Syntax: !listintersect list1 and list2
Meaning: Returns items appearing in both list1 and
list2. Repetitive occurrences are eliminated.
-
listunion
Type: both execution and variable command
Syntax: !listunion list1 and list2
Meaning: Returns items appearing in either list1 or
list2. Repetitive occurrences are eliminated.
-
listuniq
Type: both execution and variable command
Aliases: listunique
Syntax: !listuniq list
Meaning: Returns items in list, with repetitive occurrences
eliminated.
-
lookup
Type: both execution and variable command
Syntax: !lookup defname in fname
Meaning: Returns the definition of word defname in the file
fname which must be a dictionary file in the same syntax as
for the program translator (not necessarily sorted).
fname may be either in the module directory (in this case the
module directory need not be specified), or in the directory bases/.
-
lower
Type: both execution and variable command
Aliases: lowercase, tolower
Syntax: !lower string
Meaning: Returns string with all upper case letters
replaced by their lowercase counterparts.
-
mailto
This command is only available for trusted modules of the
site.
Type: execution command
Syntax: !mailto ...
Meaning: sends a email to a person whose address is the first line of
the parameter.
The second line is the subject of the message.
And the rest is the body of the message.
-
mailurl
Type: both execution and variable command
Syntax: !mailurl address name ...
Meaning: Creates a javascript-crypted email interface that is difficult
for spammer-robot to decrypt.
The first word of the first line in the parameter should be the email
address.
The rest of the first line is the recepient name (default to email address).
The second line and up is the mail subject.
This command calls, in the order of priority, one of the following files:
- "mailurl.proc" in the module directory.
- "mailurl.proc" in the current theme.
- "scripts/mailurl.proc".
This allows site managers and authors to define different address encryption
methods.
Mail addresses are not encrypted when the user is within a virtual class.
This command collapses some variables beginning with "mailurl_".
-
makelist
Type: both execution and variable command
Syntax: !makelist templ for v= v1
to v2 [step st ], or
!makelist templ for v in
v1,v2,v3,...
Meaning: Outputs a list consisting of templ with
variable v successively substituted by values v1,
..., v2.
In the second syntax, the substitutions are done with respect to each item in
the list v1,v2,....
The variable v should appear in templ
as a math variable (that is, with no preceeding character).
For example, the command
!makelist [x;x+1;xx] for x in a,x and y,1,(2,3)
gives the result
[a;a+1;xx],[x and y;x and y+1;xx],[1;1+1;xx],[(2,3);(2,3)+1;xx]
-
mathsubst
Type: both execution and variable command
Aliases: mathsubstit, mathsubstitute
Syntax: !mathsubst name=val in
expr
Meaning: Manipulation of mathematical expressions: substitute variable
name by val in expr.
No regular expression is allowed in name.
See also the commands
!evalsubst,
!replace.
-
mexec
This command is only available for trusted modules of the
site.
Type: both execution and variable command
Syntax: !mexec command parms
Meaning: execute a module-private external command command
with optional parameters parms. command must
be a valid program name in the module's home directory. But the command is
executed from the base directory of the server.
When used as variable command, returns the output of the called program.
-
module
Type: both execution and variable command
Syntax: !module defname modname
Meaning: Returns the definition for defname of the module
modname. The most common use of this command is to get the
title of a module ( defname=title).
The INDEX file of the module modname will be parsed to look
for the definition of defname.
-
msg
Type: execution command
Syntax: !msg error [ parm]
Meaning: Put an error message of type error, with eventual
parm depending on error.
-
nonempty
Type: both execution and variable command
Aliases: non_empty
Syntax: !nonempty obj content
Meaning: obj can be item or line.
The non-empty items or lines in content will be extracted.
-
nospace
Type: both execution and variable command
Syntax: !nospace string
Meaning: Collapses all space characters (' ', tab, newline) in
string.
-
nosubst
Type: variable command
Syntax: !nosubst string
Meaning: Returns string `as-is', without variable
substitution.
-
pedia
Type: both execution and variable command
Aliases: encyclopedia, encyclo
Syntax: !pedia keyword, name
Meaning: Creates a hypertext link pointing to an online encyclopedia.
keyword will be the name under which the reference is looked
for, and should be a phrase with one or several words separated by space.
Examples: finite field or linear transformation.
name is the name of the link (i.e. what people see in their
page, and can click on).
Actually wims use
Wikipedia
as the standard reference encyclopedia.
-
positionof
Type: both execution and variable command
Aliases: position, positions
Syntax: !positionof [type] s in
string
Meaning: Reports the positions of the object s in
string.
type can be char, word, item or
line. If it is specified, then the comparison only takes place for
corresponding objects of string which are identical to
s.
The output of the command is a list of positions (char, word, item or
line, according to the value of type) where s
is found in string.
If type is missing, then s is searched in
string as a substring, and the positions reported are
character positions.
-
product
Type: both execution and variable command
Aliases: prod, multiply
Syntax: !product fn for v= v1
to v2 [step st ], or
!product fn for v in
v1,v2,v3,...
Meaning: Computes the product of a function fn(v) with
variable v replaced successively by values v1,
..., v2.
In the second syntax, the values are given with respect to each item in
the list v1,v2,....
-
randchar
Type: variable command
Syntax: !randchar str
Meaning: Returns a random character in str.
-
randfile
Type: variable command
Aliases: randrecord
Syntax: !randfile fname
Meaning: Returns a random record in the datafile fname.
A datafile is a plain text file whose content is split into a number of
records. Records are separated by tag strings "\n:" (a new-line
character immediately followed by `:'). Lines before the first tag string
are treated as comments.
-
randint
Type: variable command
Syntax: !randint n1 , n2
Meaning: Returns a random integer between n1 and
n2 (inclusive).
Substitution and evaluation are done on n1 and n2
before applying random.
If n2 is missing, returns random integer between
1 and
n1 (inclusive).
If both n1 and n2 are missing, returns 0.
You can also type !random n1,n2 repeat i to repeatedly generate
i random numbers.
-
randitem
Type: variable command
Syntax: !randitem list
Meaning: Returns a random item in list. (Items are
separated by commas.)
-
randline
Type: variable command
Syntax: !randline str
Meaning: Returns a random line in str.
-
random
Type: variable command
Aliases: randdouble, randfloat
Syntax: !random n1 , n2
Meaning: Returns a random real number between n1 and
n2 .
Substitution and evaluation are done on n1 and n2
before applying random.
If n2 is missing, returns random number between 0 and
n1 .
If both n1 and n2 are missing, returns 0.
You can also type !random n1,n2 repeat i to repeatedly generate
i random numbers.
-
randword
Type: variable command
Syntax: !randword str
Meaning: Returns a random word in str.
-
rawmath
Type: both execution and variable command
Syntax: !rawmath expr
Meaning: Translate the mathematical expression expr,
possibly with common user errors, into a machine-understandable
mathematical expression.
It will replace (x+1)(x-1) into (x+1)*(x-1),
5x^3 into 5*x^3, etc.
-
rawmatrix
Type: both execution and variable command
Syntax: !rawmatrix expr
Meaning: Translate the matrix expr,
possibly with common user errors, into a machine-understandable
matrix expression.
-
reaccent
Type: both execution and variable command
Syntax: !reaccent string
Meaning: Replace accented letter compositions in string
by accented letters (replacing e' by é, a` by à,
i" by ï, o^ by ô, etc.)
The only exception is that ç and Ç are composed from c~
and C~ respectivement.
-
read
Type: execution command
Aliases: include, input
Syntax: !read file [ parm]
Meaning: Insert the content of file, and process it.
file must be a valid file name with the module's home
directory as base directory. (directory structure may be specified in
file, but backtracing to parent directories is prohibited.)
And the parameter parm can be accessed from within
the called file under the variable name
wims_read_parm.
WIMS will try to cache the file for repeated use, unless the filename
is preceded by "./".
-
readproc
Type: execution command
Syntax: !readproc file [ parm]
Meaning: Include a variable processing file file.
file must be a valid file name with the module's home
directory as base directory. (directory structure may be specified in
file, but backtracing to parent directories is prohibited.)
And the parameter parm can be accessed from within
the called file under the variable name
wims_read_parm.
-
record
Type: both execution and variable command
Aliases: records
Syntax: !record numlist of fname
Meaning: Outputs selected records of the datafile fname,
according to numlist.
numlist can be a single integer, a comma-separated list of
integers, or a range of integers.
A positive integer denotes the number of record in fname
counted from the beginning,
with 1 corresponding to the first
record. A negative integer denotes the number of record from
the end of fname: -1
means the last record, -2 means
the next-to-last record, etc.
The syntax for a range of integers is
n1 to n2
For example, 2 to -2
means the whole fname except the first
and the last records.
A datafile is a plain text file whose content is split into a number of
records. Records are separated by tag strings "\n:" (a new-line
character immediately followed by `:'). Lines before the first tag string
are treated as comments.
-
recordcnt
Type: variable command
Aliases: recordcount, recordno, recordnum
Syntax: !recordcnt fname
Meaning: Returns the number of records in the datafile fname.
A datafile is a plain text file whose content is split into a number of
records. Records are separated by tag strings "\n:" (a new-line
character immediately followed by `:'). Lines before the first tag string
are treated as comments.
-
recursion
Type: both execution and variable command
Syntax: !recursion fn for v= v1
to v2 [step st ], or
!recursion fn for v in
v1,v2,v3,...
Meaning: Computes the outcome of a recursion using the function
fn in which the
variable v is replaced successively by values v1,
..., v2.
In the second syntax, the values are given with respect to each item in
the list v1,v2,....
The function fn should use the variable last
to indicate the value of the previous recursion step.
And the starting value can be put into the WIMS variable
$recursion_start.
-
reinput
Type: both execution and variable command
Syntax: !reinput string
Meaning: Prepares string to be inserted into a form input
or textarea.
Browsers translate & primitives into corresponding (special) characters
even when these primitives occur in input or textarea fields. Also, if
string contains html tags, they may confuse browsers. You can
use this command on the string (usually derived from an earlier user input)
before inserting them back into a input or textarea, to avoid the above
problems.
-
rename
Type: both execution and variable command
Syntax: !rename f
Meaning: Changes the reference to a file f, such as a
graphics file reachable by direct http, into one with a different name using
the method !getfile.
This command is useful with exercises where important information is carried
by multimedia files (pictures, audios, movies). It can be used to hide the
name of the multimedia file that otherwise would give clues to the solution
of the problem.
The renamed file must be located within the module, and the
filename f should start with $module_dir.
The command returns a string which is the new URL. The file is not
effectively copied or renamed on the server.
-
replace
Type: both execution and variable command
Syntax: !replace [internal] s1 by s2 in
string
or !replace obj ident by
s in string
Meaning: String manipulation.
Under the first syntax, variable substitution is first done on
string. Then all occurences of substring s1
are replaced by s2.
When the keyword internal is absent,
the Linux utility sed is called to make the replacements,
therefore regular expressions are accepted in s1 and
s2. Please refer to the man page of sed for
details.
Under the second syntax, obj can be char,
word,
item or line. Then the word, item or line
identified by ident in string is replaced
by s, after variable substitutions.
ident can be a string, in this case all objects
(words, items or lines) matching
ident will be replaced. It can also be a number (positive or
negative integer n), preceded
by the word number. In this case the object
number n will be replaced. (In the case where n<0,
it is the last -n'th object which is replaced.)
-
reset
Type: execution command
Syntax: !reset name1 [
,name2,...]
Meaning: erase the content of the variable(s) name1,
name2...
-
restart
Type: execution command
Syntax: !restart parm
Meaning: Restart from a new request with parameters
parm, usually for jumping to another module.
This command is only available to trusted modules, and can be only used
before output starts. Repeated restart is disabled, to avoid infinite loops.
-
select
Type: both execution and variable command
Syntax: !select data where condition
Meaning: Outputs rows of a matrix data,
according to condition. Rows of the matrix can be separated
either by new lines or by semi-colon ``;''.
The condition can use words column 1, column 2, etc. to
designate comma-separated columns in each row.
-
setdef
Type: execution command
Syntax: !setdef defstr in fname
Meaning: Set definitions defstr in the file
fname.
defstr maybe multiple line, each being a definition
string.
-
shuffle
Type: variable command
Aliases: randperm, randpermute
Syntax: !shuffle [even|odd] n , or
!shuffle [even|odd] list
Meaning: Randomly permutes a set of n elements. n
must be a positive integer not greater than 1024 in the first
usage, or is the number of items in list in the second
usage.
For the first usage, the command
returns a comma-separated list i1, i2, ...,
in, where the items ik are
randomly ordered elements of the set {1,2,...,n}.
This command can be used in conjunction with commands
!item,
!line,
!word,
!char,
to randomly permute items, lines, words, or characters in a string.
For the second usage, a new list with randomly permuted items in
list is returned.
In any case, the variable wims_shuffle_order is set to be
the list i1, i2, ...,
in.
When the optional word even or
odd is present, only even/odd permutations are produced.
-
singlespace
Type: both execution and variable command
Syntax: !singlespace string
Meaning: Returns string with all space characters (space,
tab, newline) replaced by ' ', and multiple occurrences of space characters
collapsed into single one.
Leading and ending spaces are not removed. You can use this command in
conjunction with
trim if you want also to
remove leading and ending spaces.
This command is especially useful for comparisons between multi-word
strings.
-
solve
Type: both execution and variable command
Aliases: rootof
Syntax: !solve fn for v= v1
to v2
Meaning: Find out (real simple) roots of the function/equation
fn
for the variable v between v1 and
v2.
fn may have several roots in the interval [v1,v2], but
roots too close to each other may be overlooked.
-
sort
Type: both execution and variable command
Syntax: !sort [nocase] [reverse] [numeric] type [of]
string
Meaning: Sort string. The type of the sort
may be char, word, list or line.
After this command is executed, the sort order is stored in the variable
wims_sort_order (as a list). This can therefore be used
for relational sorting, in conjunction with commands
!item,
!line,
!word or
!char.
-
sum
Type: both execution and variable command
Aliases: add
Syntax: !sum fn for v= v1
to v2 [step st ], or
!sum fn for v in
v1,v2,v3,...
Meaning: Computes the sum of a function fn(v) with
variable v replaced successively by values v1,
..., v2.
In the second syntax, the values are given with respect to each item in
the list v1,v2,....
-
tail
Type: execution command
Syntax: !tail parm
Meaning: Standardized ending for html page outputs. Includes the
command !homeref.
parm is reserved for future implementation.
-
texmath
Type: both execution and variable command
Aliases: TeXmath
Syntax: !texmath expr
Meaning: Translate the mathematical expression expr
into a TeX source.
-
text
Type: both execution and variable command
Syntax: !text operation parameter
Meaning: This is intended to be a very powerful text manipulation tool,
allowing very sophisticated processing of long text strings with high speed.
Many of the operations accept masks. A mask is a string
composed of '0's and '1's. For operations
which accept a mask, only characters at positions whose corresponding
character in the mask is not a '0' are processed. (In this sense positions
corresponding to '0's are masked.) Empty mask is considered
as of being entirely composed of '1's.
A mask which is too short repeats itself, unless it terminates with a '+',
in which case it fills the rest with '1's, or with a '-', in which case
it fills the rest with '0's.
For the time being, implemented operations are as follows.
- !text common text1 and text2
[mask maskstring]
Extracts characters in text1 one by one, for those identical
to the corresponding characters in text2 and whose
positions are not masked by maskstring.
- !text compare text1 and text2
Compares the strings text1 and text2
character by character, and returns a mask string with '0's on
positions where the corresponding characters in text1
and text2 are equal, and '1's otherwise.
- !text copy text
[mask maskstring]
Returns non-masked characters in text.
- !text count charlist in text
[mask maskstring]
Returns the number of characters in text whose positions
are not masked by maskstring, and who appear in
charlist.
- !text diff text1 from text2
[mask maskstring]
Extracts characters in text1 one by one, for those different
to the corresponding characters in text2 and whose
positions are not masked by maskstring.
(Synonyme of diff: differ).
- !text expand text using maskstring
Produces a string, where positions corresponding to '0's in
maskstring are filled by ' ' (the space character),
and where positions corresponding to '1's in maskstring
are filled by characters of text. The
characters in text are used one by one, and the
resulting string stops when all the characters in text
are exhausted (or when the string reaches the length limit).
- !text insert text1 into text2
[mask maskstring]
Returns text2 with non-masked characters replaced by
characters text1. Characters in text1
are used one by one (without taking into account the masking), and
the replacement stops when there is no character left in
text1.
- !text interact text1 and text2
table itab [mask maskstring]
Returns a new text which is result of interactions of characters
in corresponding positions in text1 and
text2. The rule of the interaction is defined in
itab.
itab contains n+1 lines, each of n characters.
The first line defines the characters corresponding to each position
in the following n lines which defines the multiplication table.
The multiplication table needs not to be symmetric. In this case, the
rows correspond to characters in text1, and the columns
correspond to characters in text2.
If text1 or text2 contains a character
not in the first line of itab, the interaction at
the corresponding position is considered as empty. Also, masked
positions are ignored.
If text1 and text2 have different
lengths, the longer is cut to fit the shorter.
- !text mark charlist in text
Returns a mask string with '1's on positions where the
corresponding character in text appears in
charlist, and with '0's on other positions.
- !text max text1 and text2
[mask maskstring]
Returns a string which at each position is the character with highest
ASCII code between corresponding characters in text1
and text2. The length of the result is that of the
longest of the two. Masked positions are skipped.
- !text min text1 and text2
[mask maskstring]
Returns a string which at each position is the character with lowest
ASCII code between corresponding characters in text1
and text2. The length of the result is that of the
shortest of the two. Masked positions are skipped.
- !text occur charlist in text
[mask maskstring]
Returns characters in charlist which occur in
unmasked positions in text.
(Synonymes of occur: appear, occurrence).
- !text remove charlist in text
[mask maskstring]
Returns text in which masked characters and characters
appearing in charlist are removed.
(Synonymes of remove: drop, delete).
- !text reorder text by orderlist
Returns a reordered text using the order list
orderlist. Reordering is cyclic if orderlist
is shorter than text.
orderlist must be a list of n positive integers, which
is a permutation of the set {1,...,n}. If orderlist contains
items other than integers within the bound, empty string is returned.
However, unicity check is not performed on items of
orderlist.
- !text repeat text to len
Repeat the string text cyclicly, up to length
len.
- !text reverse text
Reverse the order of text, with the last character coming
first, etc.
- !text select charlist in text
[mask maskstring]
Returns text in which masked characters and characters
not appearing in charlist are removed.
(Synonymes of select: pick, pickup).
-
title
Type: execution command
Aliases: htmltitle, wimstitle
Syntax: !title parm
Meaning: Puts page's title in a standardized format.
parm is reserved for future implementation.
-
translate
Type: both execution and variable command
Syntax: !translate [internal] s1 to s2 in
string
or !translate [internal] s1 in string
to s2
Meaning: String manipulation: variable substitution is first done on
string. Then all occurences of the first (resp. second, ...)
character of s1 is replaced by the first (resp. second, ...)
character of s2.
When the keyword internal is absent,
the Linux utility tr is called to make the translations,
therefore regular expressions are accepted in s1 and
s2. Please refer to the man page of tr for
details.
-
trim
Type: variable command
Syntax: !trim string
Meaning: Returns string with leading and trailing spaces
stripped off.
-
upper
Type: both execution and variable command
Aliases: uppercase, toupper
Syntax: !upper string
Meaning: Returns string with all lower case letters
replaced by their uppercase counterparts.
-
values
Type: both execution and variable command
Syntax: !values fns for v= v1
to v2 [step st ], or
!values fns for v in
v1,v2,v3,...
Meaning: Outputs a list of values of fns with
variable v replaced successively by values v1,
..., v2.
In the second syntax, the values are given with respect to each item in
the list v1,v2,....
fns may be a comma-separated list of functions.
This command can also be used to make recursions. If the functions
fns contain a variable named last, this variable
will take the value of the last step each time. And the starting value
can be put into the WIMS variable $recursion_start.
-
varlist
Type: both execution and variable command
Aliases: listvar
Syntax: !varlist [nofn] formula
Meaning: Manipulation of mathematical expressions: returns list of variable
names (and function names) appearing in the formula.
If the switch nofn is present, function names will not be
listed.
-
warn
Type: execution command
Aliases: warning
Syntax: !warn subject
Meaning: Outputs a warning message related to subject.
Does nothing if no warning message about subject is present.
-
while
Type: execution command
Syntax: !while string1 relation string2
... (multi-line content)
!endwhile
Meaning: Conditional branching: execute the multi-line content between
!while line and !endwhile line, until
relation is no longer verified.
The leading and trailing spaces of string1 and
string2 will be stripped before making comparisons.
The syntax is the same as for
if.
-
whileval
Type: execution command
Same as the command
while,
but = (==),
!= compares the
numerical values of string1 and string2
rather than the strings themselves.
-
word
Type: both execution and variable command
Aliases: words
Syntax: !word numlist of string
Meaning: Outputs selected words of string, according to
numlist.
numlist can be a single integer, a comma-separated list of
integers, or a range of integers.
A positive integer denotes the number of word in string
counted from the beginning,
with 1 corresponding to the first
word. A negative integer denotes the number of word from
the end of string: -1
means the last word, -2 means
the next-to-last word, etc.
The syntax for a range of integers is
n1 to n2
For example, 2 to -2
means the whole string except the first
and the last words.
-
wordcnt
Type: variable command
Aliases: wordcount, wordno, wordnum
Syntax: !wordcnt string
Meaning: Returns the number of words in string.
-
words2items
Type: both execution and variable command
Aliases: wordstoitems, words2list, wordstolist
Syntax: !words2items string
Meaning: This command changes multiple words in string into
multiple items.
-
words2lines
Type: both execution and variable command
Aliases: wordstolines
Syntax: !words2lines string
Meaning: This command changes multiple words in string into
multiple lines.
Table of Contents
List of inline mathematical symbols
The symbol names are based on corresponding TeX names.
| Symbol | Name
|
|---|
, , ,... ,...
| $m_alpha,$m_beta,$m_gamma...$m_pi...$m_omega
, , , , , , ,
, , ,
| $m_Gamma, $m_Delta, $m_Lambda, $m_Phi, $m_Psi, $m_Pi,
$m_Sigma, $m_Theta, $m_Upsilon, $m_Xi, $m_Omega
, , , , ,
| $m_varepsilon, $m_varphi, $m_wp, $m_ell, $m_Re, $m_Im
, , ,
| $m_aleph, $m_infty, $m_nabla, $m_partial
, , , , ...
| $m_AA, $m_CC, $m_RR, $m_QQ, $m_ZZ ...
, ,... ,...
| $m_calA, $m_calB,... $m_calM,... $m_calZ
, ,... ,...
| $m_eufA, $m_eufB,... $m_eufM,... $m_eufZ
, ,... ,...
| $m_eufa, $m_eufb,... $m_eufm,... $m_eufz
, , , ,
| $m_le, $m_ge, $m_pm, $m_times, $m_div
, , ,
| $m_neq, $m_equiv, $m_cong, $m_approx
, , ,
, ,
| $m_leftarrow, $m_rightarrow, $m_mapsto,
$m_Leftarrow, $m_Rightarrow, $m_Leftrightarrow
, , ,
| $m_exists, $m_forall, $m_in, $m_emptyset
, , , ,
, , ,
| $m_subset, $m_supset, $m_subseteq, $m_supseteq,
$m_cap, $m_cup, $m_prec, $m_succ
, , ,
| $m_sum, $m_prod, $m_coprod, $m_surd
, , , ,
| $m_int, $m_oint, $m_Vert, $m_oplus, $m_otimes
, , ,
| $m_bigtriangleup, $m_bigtriangledown, $m_bigvee, $m_bigwedge
| | | | | | | | | | | | | | | |
Besides, large parentheses are available under the name of
$m_leftpar2, $m_leftpar3,..., $m_leftpar10 and
$m_rightpar2, $m_rightpar3,..., $m_rightpar10. They can be used
to inclose matrices of 2,3,...,10 rows. Ditto for leftbrace
and rightbrace.
Table of Contents
List of slib (library of scripts)
Scripts in this library can be called from modules using the command
!read (or !readproc from within a phtml file).
For example, the line
!read slib/matrix/random 3, 5, 10
generates a 3×5 matrix with random integer coefficients in [-5, 5].
The result is placed in the variable slib_out.
To call an slib script from OEF exercises, documents or forum
messages, use the function slib().
Only variables prefixed by slib_ are modified by these scripts.
Available scripts in slib
| Name | Effect |
| chemistry/chemeq_add | Computes a combination of chemical equations
[detail] |
| chemistry/chemeq_compare | Comparing chemical equations
[detail] |
| chemistry/chemeq_components | Chemical components
[detail] |
| chemistry/chemeq_el | Returns the number of electrons in a redox reaction
[detail] |
| chemistry/chemeq_equilibrium | Analysing the equilibrium in chemical formulas
[detail] |
| chemistry/chemeq_mass | Molar Mass
[detail] |
| chemistry/chemeq_rev | Returns a chemical equation reversed
[detail] |
| chemistry/chemeq_rq | Typeset reaction quotients and Nernst laws for chemical equations
[detail] |
| chemistry/chemeq_tex | Typeset molecules and chemical equations
[detail] |
| chemistry/molarmass | Molar Mass
[detail] |
| chemistry/molecule | Periodic table
[detail] |
| chemistry/moleculeViewer | Java Molecule Viewer
[detail] |
| circuits/complist | List available circuit components
[detail] |
| circuits/comppos | Component position information of a circuit type.
[detail] |
| circuits/draw | Draw circuit scheme according a circuit type.
[detail] |
| circuits/drawcomp | Draw circuit components according to a circuit type.
[detail] |
| circuits/drawwire | Draw the fixed circuit wiring of a given circuit type.
[detail] |
| circuits/range | Size and range information of a circuit type.
[detail] |
| data/columnsort | Sort data according to a column
[detail] |
| data/randline | Take a random line of a data file
[detail] |
| data/random | Randomly selects a number of (different) objects
[detail] |
| data/randrec | Take a random field of a record file
[detail] |
| draw/brokenlinegraph | Trace une fonction affine par morceaux continue en connaissant les points de changement de pente
[detail] |
| draw/clock | Draw a clock according to given time
[detail] |
| draw/convpixel | Conversion pixels
[detail] |
| draw/drtgraduee | Droite graduée
[detail] |
| draw/range | Range
[detail] |
| draw/repdroite | Calcule les coordonnées des deux points extrêmes pour tracer une droite dans un repère
[detail] |
| draw/repere | Trace un repère
[detail] |
| function/bounds | The bound of a real function of one variable within an interval [x1,x2]
[detail] |
| function/bounds2 | The bound of a real function of two variables within a rectangle [x1,x2],[y1,y2]
[detail] |
| function/integrate | Indefinite or definite integration of a function of one variable
[detail] |
| geo2D/geogebra3 | Geogebra Applet
[detail] |
| geo3D/3Dviewer | 3D Viewer
[detail] |
| geo3D/CaR | 3D applet with C.a.R
[detail] |
| geo3D/Convex3D | Polyhedron applet with Convex3D
[detail] |
| geo3D/draw | Polyedron in flydraw
[detail] |
| geo3D/off2xyz | Format off to xyz
[detail] |
| geo3D/polyhedra | Polyhedra applet in C.a.R
[detail] |
| geo3D/polyhedradual | Polyhedra applet and its dual in C.a.R
[detail] |
| geo3D/threeD | ThreeD Applet
[detail] |
| graph/connexcomponent | Connex component of a vertex in a graph
[detail] |
| graph/connexity | Connex components of a simple graph
[detail] |
| graph/distance | Matrix of diameter of a graph
[detail] |
| graph/draw | Graph draw
[detail] |
| graph/drawcc | Graph draw with one colored connex component
[detail] |
| graph/drawtree | Tree draw
[detail] |
| graph/gpt | Oriented graph without circuit
[detail] |
| graph/randomconnex | random connex graph
[detail] |
| graph/randomeuler | random eulerian graph
[detail] |
| graph/randtree | Random tree
[detail] |
| graph/shortpath | Shortest path of a graph
[detail] |
| graphpaper/correct_milli | Graphic paper sheet with red correct plot preloaded
[detail] |
| graphpaper/func | One function plot, ready to append to a previously made graph paper
[detail] |
| graphpaper/func_milli | Graphic paper sheet with function plot and red correct plot preloaded
[detail] |
| graphpaper/millimetre | Graphic paper sheet
[detail] |
| graphpaper/strings | Prepare strings to be written on a graphic paper sheet
[detail] |
| graphpaper/whereclick | Utility for a clickable graphic paper sheet
[detail] |
| lang/enword2ipa | IPA transcription of english words
[detail] |
| lang/epd2ipa | IPA transcription according to epd ascii codage (for english)
[detail] |
| lang/fname | A random first name
[detail] |
| lang/fraccord | Accord of French adjectives and names
[detail] |
| lang/frapostrophe | Apostrophe reduction of a French text
[detail] |
| lang/frartdef | Transform a French noun into definit form
[detail] |
| lang/frcodcoi | Find a random complement of a French verb
[detail] |
| lang/frverbconj | The conjugation of a French verb
[detail] |
| lang/randomword | Output random words in the dictionary
[detail] |
| lang/sampa2ipa | IPA transcription according to Sampa Ascii codage (for english)
[detail] |
| lang/swac | Insertion of words (audio) from the swac packs
[detail] |
| life/frcommodity | Give a random commodity with given price, French
[detail] |
| list/selshuf | Selective shuffle
[detail] |
| matrix/concate | concatenation
[detail] |
| matrix/det | The determinant of a square matrix
[detail] |
| matrix/givenrank | Generates a random matrix of given rank
[detail] |
| matrix/inverse | The inverse of a square matrix
[detail] |
| matrix/invertible | Generates a random invertible matrix
[detail] |
| matrix/itriangular | Generates a random invertible triangular matrix
[detail] |
| matrix/non0 | Generates a random matrix with non-zero coefficients
[detail] |
| matrix/orthogonal | Generates a random orthogonal matrix
[detail] |
| matrix/random | Generates a random matrix
[detail] |
| matrix/trace | The trace of a square matrix
[detail] |
| matrix/transpose | The transpose of a matrix
[detail] |
| matrix/triangular | Generates a random triangular matrix
[detail] |
| matrix/unimodular | Generates a random unimodular matrix
[detail] |
| media/audio | Audio insertion
[detail] |
| media/dewplayer | Audio insertion with dewplayer
[detail] |
| media/player | Audio insertion with hbs_mp3_player
[detail] |
| numeration/ecriturenombre | Ecriture d'un nombre avec regroupement des chiffres par trois.
[detail] |
| oef/codelim | OEF code length limit register
[detail] |
| oef/codename | Register OEF code reply name allow/deny
[detail] |
| oef/env | Get an OEF environment variable
[detail] |
| oef/insfilename | Output the file name of the last insert
[detail] |
| oef/postsrc | OEF code input postpender
[detail] |
| oef/presrc | OEF code input prepender
[detail] |
| polynomial/random | Random polynomial
[detail] |
| stat/1d | Computes 1-dimensional statistical data
[detail] |
| stat/arithmean | Arithmetic mean of statistical data
[detail] |
| stat/beta | Generation of beta random data
[detail] |
| stat/betacdf | Cumulative density function of Beta law
[detail] |
| stat/betainv | Quantiles of Beta law
[detail] |
| stat/betapdf | Probability density function of Beta law
[detail] |
| stat/binomial | Generation of binomial random data
[detail] |
| stat/binomialcdf | cumulative distribution function of Binomial law
[detail] |
| stat/binomialinv | Quantile of Binomial law
[detail] |
| stat/binomialpdf | Binomial law
[detail] |
| stat/cauchy | Generation of Cauchy random data
[detail] |
| stat/cauchycdf | cumulative distribution function of Cauchy law
[detail] |
| stat/cauchyinv | Quantile of Cauchy law of parameters lambda and sigma
[detail] |
| stat/cauchypdf | Probability density function of Cauchy law
[detail] |
| stat/chi2 | Generation of chi2 random data
[detail] |
| stat/chi2cdf | Cumulative distribution function of chi2
[detail] |
| stat/chi2inv | Quantile of cumulative chi2 distribution
[detail] |
| stat/chi2pdf | Probability density function of chi2
[detail] |
| stat/correlation | Matrix of correlation
[detail] |
| stat/covariance | Matrix of covariance
[detail] |
| stat/deviation | Deviation of statistical data
[detail] |
| stat/discretelaw | Generation of a discrete law with nonnegative coefficients
[detail] |
| stat/effectif | Effectifs of statistical series in classes
[detail] |
| stat/empiric | Generation of random numbers with a discrete law
[detail] |
| stat/expo | Generation of exponential random numbers
[detail] |
| stat/exponential | Generation of exponential random numbers
[detail] |
| stat/exponentialcdf | cumulative distribution function of exponential law
[detail] |
| stat/exponentialinv | Quantile of exponential law
[detail] |
| stat/exponentialpdf | Probability density function of Exponential law
[detail] |
| stat/fisher | Generation of Fisher random data
[detail] |
| stat/fishercdf | Cumulative density function of Fisher law
[detail] |
| stat/fisherinv | Quantiles of Fisher law
[detail] |
| stat/fisherpdf | Probability density function of Fisher law
[detail] |
| stat/freq | Frequencies of statistical data
[detail] |
| stat/gamma | Generation of Gamma random data
[detail] |
| stat/gammacdf | Cumulative distribution function of Gamma law
[detail] |
| stat/gammainv | Quantile of cumulative gamma distribution
[detail] |
| stat/gammapdf | Probability density function of gamma law
[detail] |
| stat/geomean | Geometric mean of data
[detail] |
| stat/geometric | Generation of random data with geometric law on N
[detail] |
| stat/geometric1 | Generation of random data with geometric law on N*
[detail] |
| stat/geometric1cdf | cumulative distribution function of geometric law on N*
[detail] |
| stat/geometric1inv | Quantiles of a Geometric law on N*
[detail] |
| stat/geometric1pdf | Probability density function of Geometric law on N*
[detail] |
| stat/geometriccdf | cumulative distribution function of geometric law on N
[detail] |
| stat/geometricinv | Quantiles of a Geometric law on N
[detail] |
| stat/geometricpdf | Probability density function of Geometric law on N
[detail] |
| stat/harmonic | Harmonic mean of statistical data
[detail] |
| stat/histo | Histogram
[detail] |
| stat/hypergeometric | Generation of Hypergeometric random data
[detail] |
| stat/hypergeometriccdf | cumulative distribution function of hypergeometric law
[detail] |
| stat/hypergeometricinv | Quantile of hypergeometric law inverse
[detail] |
| stat/hypergeometricpdf | Probability density function of Hypergeometric law
[detail] |
| stat/hypergeominv | Hypergeometric law inverse
[detail] |
| stat/laplace | Generation of Laplace random data
[detail] |
| stat/laplacecdf | Probability cumulative distribution of laplace law
[detail] |
| stat/laplaceinv | Quantiles of laplace law
[detail] |
| stat/laplacepdf | Probability density function of laplace law
[detail] |
| stat/linearcong | Generation of linear congruential random integers
[detail] |
| stat/logistic | Generation of logistic random data
[detail] |
| stat/logisticcdf | Probability cumulative density function of logistic law
[detail] |
| stat/logisticinv | Quantile of logistic law
[detail] |
| stat/logisticpdf | Probability density function of logistic law
[detail] |
| stat/lognormal | Generation of lognormal random data
[detail] |
| stat/lognormalcdf | Cumulative distribution function of log-normal law
[detail] |
| stat/lognormalinv | Quantile of of Log-normal law
[detail] |
| stat/lognormalpdf | Probability density function of log-normal law
[detail] |
| stat/median | Data median
[detail] |
| stat/multinomial | Generation of multinomial random data
[detail] |
| stat/normal | Generation of Gaussian random data
[detail] |
| stat/normalcdf | Cumulative distribution function of the normal distribution
[detail] |
| stat/normalinv | Quantile of Normal law
[detail] |
| stat/normalpdf | Probability density function of Normal law
[detail] |
| stat/pascal | Generation of Pascal random data
[detail] |
| stat/pascalcdf | cumulative distribution function of Binomial law
[detail] |
| stat/pascalinv | Quantile of Negative Binomial law
[detail] |
| stat/pascalpdf | Negative Binomial law (Pascal law)
[detail] |
| stat/poisson | Generation of random numbers with Poisson law
[detail] |
| stat/poissoncdf | cumulative distribution function of Poisson law
[detail] |
| stat/poissoninv | Quantile of Poisson law
[detail] |
| stat/poissonpdf | Probability density function of Poisson law
[detail] |
| stat/posdiscretelaw | Generation of a discrete law with positive coefficients
[detail] |
| stat/prod | Product of data
[detail] |
| stat/quadratic | Quadratic mean
[detail] |
| stat/random | Generation of random numbers
[detail] |
| stat/range | Data range
[detail] |
| stat/student | Generation of Student random data
[detail] |
| stat/studentcdf | Probability cumulative density function of Student law
[detail] |
| stat/studentinv | Quantile of Student law
[detail] |
| stat/studentpdf | Probability density function of Student law
[detail] |
| stat/sum | Data sum
[detail] |
| stat/variance | Variance
[detail] |
| stat/weibull | Generation of Weibull random data
[detail] |
| stat/weibullcdf | cumulative distribution function of Weibull law
[detail] |
| stat/weibullinv | Quantile of Weibull law
[detail] |
| stat/weibullpdf | Probability density function of Weibull law
[detail] |
| text/cdecomment | Extract comment from a c source code.
[detail] |
| text/cutchoice2 | Cut out embedded choices for OEF
[detail] |
| text/cutchoices | Cut out embedded choices for OEF
[detail] |
| text/markerror | For marking words with mistake
[detail] |
| text/markgroup | For marking group of words with given explanation
[detail] |
| text/marktext | Texte for use with type mark for OEF (word)
[detail] |
| text/marktextpartial | For marking some group of words with given explanation
[detail] |
| text/markword | For use with type mark in OEF
[detail] |
| text/matrixtex | Matrix in Tex
[detail] |
| text/maximamatrix | Transform a matrix to maxima format
[detail] |
| text/octavematrix | Transform an octave output matrix into standard format
[detail] |
| text/sigunits | make a representation of a physical quantity with a given number of significative digits
[detail] |
| text/whitespace | Replace white spaces
[detail] |
| triplerelation/tabular | Double entry table for training to relations between three quantities
[detail] |
| utilities/nopaste | No copy-paste
[detail] |
| utilities/notepad | Notepad
[detail] |
| utilities/tooltip | Tooltip containing an html text which appears when the mouse points on a word.
[detail] |
Table of Contents
Interfaces to external software packages
This section is not yet available. Sorry.
Table of Contents
This page is not in its usual appearance because WIMS is unable to recognize your
web browser.
Please take note that WIMS pages are interactively generated; they are not ordinary
HTML files. They must be used interactively ONLINE. It is useless
for you to gather them through a robot program.
Description: documentation of WWW Interactive Multipurpose Server This is the main site of WIMS (WWW Interactive Multipurpose Server): interactive exercises, online calculators and plotters, mathematical recreation and games
Keywords: wims, mathematics, mathematical, math, maths, interactive mathematics, interactive math, interactive maths, mathematic, online, calculator, graphing, exercise, exercice, puzzle, calculus, K-12, algebra, mathématique, interactive, interactive mathematics, interactive mathematical, interactive math, interactive maths, mathematical education, enseignement mathématique, mathematics teaching, teaching mathematics, algebra, geometry, calculus, function, curve, surface, graphing, virtual class, virtual classes, virtual classroom, virtual classrooms, interactive documents, interactive document, , wims