[go: up one dir, main page]

0% found this document useful (0 votes)
20 views80 pages

Multi Docs Primer

Uploaded by

Thapelo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views80 pages

Multi Docs Primer

Uploaded by

Thapelo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 80

MultiDocs Primer

Getting Up To Speed With This Amazing New Technology!


Table of Contents
Introduction ...................................................................................................................................................................... 3
MultiDocs Edition Vrs Classic Edition ................................................................................................................................ 4
What is a MultiDoc And Why Are They So Good? ............................................................................................................ 4
Adding The MultiDocs Toolbar To Word ........................................................................................................................... 5
Creating and Editing Graphics/Equations ......................................................................................................................... 7
Parameters - The Basic Idea ............................................................................................................................................ 10
Regenerating Parameter Based Documents - MultiDocs ................................................................................................ 11
Creating Your First MultiDoc ........................................................................................................................................... 14
Efofex Parameters ........................................................................................................................................................... 22
Commonly Used Parameters........................................................................................................................................... 24
Introducing References (Important!) .............................................................................................................................. 26
Parameters Which Use References ................................................................................................................................. 27
Parameters Which Modify Other Parameters ................................................................................................................. 29
Multi Parameters (For Multiple Choice Questions) ........................................................................................................ 31
More On References ....................................................................................................................................................... 32
Data Parameters.............................................................................................................................................................. 35
Less Commonly Used Parameters ................................................................................................................................... 42
Managing Parameters ..................................................................................................................................................... 43
Creating Parametized Questions - Hints & Tips .............................................................................................................. 50
The Inline Calculator ....................................................................................................................................................... 57
Specialised Calculator Functions ..................................................................................................................................... 60
Text Functions ................................................................................................................................................................. 62
Date/Time Functions....................................................................................................................................................... 62
Display Functions ............................................................................................................................................................ 63
If/Then Statements and Conditions ................................................................................................................................ 65
Boolean Commands For Conditions................................................................................................................................ 67
Function Analysis Functions ............................................................................................................................................ 69
Statistical Functions ........................................................................................................................................................ 70
Data Parameter Functions............................................................................................................................................... 75
Algebraic Analysis Functions ........................................................................................................................................... 76
FX Library......................................................................................................................................................................... 77
Converting Classic Mode Graphics .................................................................................................................................. 78
Upgrading Modern Mode Graphics ................................................................................................................................ 79
Changing Fonts ................................................................................................................................................................ 79
Working With Mixed Mode Documents ......................................................................................................................... 80

MultiDocs Primer - Copyright © 2023 – Efofex – Page 2


Introduction
MultiDocs is an incredibly powerful new way of using Efofex’s FX Draw and FX Equation. It is simply the most
productive way for a teacher to create tests, examinations and worksheets.

This primer introduces you to the crucial ideas underlying MultiDocs. It is a structured approach to learning about
this versatile new toolset. It is designed to be read in order and you can “tap-out” at any stage. Just make sure that
you cover these basic ideas…

 How to Use the New Toolbar to Create and Edit Graphics and Equations (Page 7)
 How to Regenerate an Existing MultiDoc (Page 11).
 Try Creating Your Own MultiDoc (Page 14)
 The Basic Parameters (Page 22)
 The Inline Calculator (Page 57)
And, if you are feeling adventurous…

 Parameter References (Page 26)


 Data Parameters (Page 35)

MultiDocs Primer - Copyright © 2023 – Efofex – Page 3


MultiDocs Edition Vrs Classic Edition
When Efofex products were first designed in 1989, they only ran on Windows and used a Windows specific
technology (called OLE) to integrate into Word. Thousands of teachers have spent decades using this old
system, which we now call Classic Edition, to create millions of graphics and equations.

As teachers expanded their use of other products, like Google Docs and Mac machines, we need to develop
a new way of using our products in these contexts. MultiDocs was the result of these changes.

In 2020, we developed a way of fully integrating graphics into Word on both Windows and Mac machines. If
you use Word as your word-processing platform, we now recommend that you move all activities over to
the new, MultiDocs integrated system. While we will not remove the old, Classic system we now consider it
as obsolete.

What is a MultiDoc And Why Are They So Good?


A MultiDoc is just a Word document that contains Efofex drawings and equations.

The good bit is that the Efofex drawings and equations can be "programmed" to produce new versions of
themselves. You don't HAVE to do this but, if you do, you are creating a document that knows how to
rewrite itself, with new versions of questions and solutions. We have added buttons to the Efofex toolbar
that allow you to Regenerate one question, or the whole document.

MultiDocs allows you to create a test, worksheet or exam that can have multiple versions at the push of a
button - you can even update the solutions at the same time. The is almost no limit to what you can create.
You can, for example, turn this, into this

MultiDocs Primer - Copyright © 2023 – Efofex – Page 4


Adding The MultiDocs Toolbar To Word
First, make sure that you have downloaded the MultiDocs edition of FX Draw Tools!

Depending on how your software has been installed, you may find that the Efofex toolbar has already been
added to Word. If you start Word and the toolbar isn't present, you can add the toolbar by following these
instructions.

 Close Word. Word only loads new toolbars when it first starts so we need to close Word to install a new
toolbar.
 Load any Efofex product.
 Go to the Help menu and choose Manage Word Integration

 Place a check mark in MultiDocs (Modern Mode)

MultiDocs Primer - Copyright © 2023 – Efofex – Page 5


 On Mac machines you do not have the option of adding Classic Mode Integration as this mode is not
supported on Macs

 Press OK and your computer will report success. Any errors reported are almost always the result of Word
being left open.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 6


Creating and Editing Graphics/Equations
This the basic usage of the new toolbar.

Start FX Draw and FX Equation


Before we start creating or editing a MultiDoc, we need to do two things:

1. Start FX Draw and FX Equation.


2. Start up Word.

Our old system started and stopped FX Draw and FX Equation as required. This has a major drawback - it is
slow! Our MultiDocs toolbar requires you to start FX Draw and FX Equation and have them running, ready to
be used. The new system is up to ten times faster for basic operations!

The Word toolbar will remind you to start FX Draw and FX Equation if you forget.

The easiest way to start the two products is the use the FX MultiDocs app.

This opens FX Draw and FX Equation, as well as telling them that they are running in MultiDocs mode.
Running the FX MultiDocs app should be your first step when starting an editing session.

You can find the FX MultiDocs app in the Windows Start Menu or Mac Launchpad.

HINT: The toolbar is only updated when you move the selection in your document (this is done to make
things faster). If you run the FX MultiDocs app and the toolbar is still showing the "Start FX Draw and FX
Equation" warning message, move to another location in the document. This will trigger an update to the
toolbar and enable the FX Draw and FX Equation buttons.

Adding A New Graphic/Equation


 Make sure that the product you wish to use is open and running on your computer. If the product is NOT
running, a product's button will be greyed out.
 Open Word and change to the Efofex tab.
 Push the Insert button for the product you wish to insert.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 7


 Once you have created your graphic/equation, press the green check mark button.

 Your graphic/equation will automatically be placed in your Word document


This process is almost identical to the old Classic process. The only difference is that you need to have the
Efofex program running on your computer before insertion.
Editing A Graphic/Equation
 Make sure that the product you wish to use is open and running on your computer.
 Open Word and change to the Efofex tab.
 Select the graphic/equation you wish to edit.

 Push the Edit button on the Efofex toolbar.

 Once you have edit your graphic/equation, press the green check mark button.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 8


Your edited graphic/equation will automatically be placed in your Word document

This process is almost identical to the old Classic process. The only differences are that you need to have the
Efofex program running on your computer before insertion and you press the Edit button instead of double-
clicking to edit.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 9


Parameters - The Basic Idea
MultiDocs are built around the concept of parameters.

$p
Parameter names start with a $ sign, followed by a letter, and then optionally letters/numbers. Note that
single letter parameter names are easier to manage than multiple letter names. Using longer parameter
names can create unwieldy equations.

$p, $h, $x, $height, $length,$p2


are examples of valid parameter names.

Parameters replace numbers (and other text) in equations and when defining drawings. They allow you to
put variation into your questions. When you use them in an equation, they are automatically replaced by a
number or string when the equation is rendered.

For example, you might type

$px2+$qy2=$r

If you have previously defined the parameters $p=4, $q=9 and $r=144, this might be rendered as

In FX Equation, this might look like this

FX Equation has replaced the three parameters with the three numbers. So far, so good, but this is not very
"dynamic". Things begin to get dynamic when we start using the different types of parameters and the inline
calculator. We will look at this later.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 10


Regenerating Parameter Based Documents - MultiDocs
Any FX Draw or FX Equation object can include parameters. Authors can use these parameters to create self-
modifying documents - MultiDocs.

If you are using a MultiDoc, you will want to create new versions of questions and other materials. There are
three ways of doing this.

Regenerate A Single Question


Recommended

If a question is regeneratable, select one object in the question (either an FX Draw graphic or an FX Equation
equation) and then press the Regenerate button.

The MultiDocs toolbar will regenerate the parameters for this object and then go and apply the new
parameters to any other objects in the document which share the same parameters.

This process is recommended as it isolates changes to one particular question. We always recommend
checking a question after regeneration. Creating parameter-based questions is not simple and you might
find that the regeneration does not produce the result that you were after. This process limits any potential
problems to one question at a time.

Regenerate All Questions


This is a one button solution to parameter regeneration. Push the button and Efofex Parameters will
regenerate all parameters in your document and update all the relevant Efofex objects. The process takes a
little time, but you can create a totally new version of a test, worksheet or exam with one button.

This feature is extremely powerful, but we strongly recommend that you carefully review the document
after using it to detect any questions that have not been updated to your requirements.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 11


Syncing Changes (Advanced)
Sync Changes Across a Document

When you are editing an object, you have the option to generate new parameters for that object.
Sometimes this occurs automatically as you define new parameters.

When you return this graphic to the document, with its new parameter values, you will have created a
situation where different objects in your documents have been created with different parameter values.

We need to synchronise the parameter values across the whole document. First, go to the Expert version of
the toolbar.

Next, select any Efofex object in the question and press the Sync button.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 12


Efofex Parameters will look at each object in the document and synchronise any objects which share the
parameter.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 13


Creating Your First MultiDoc
MultiDocs are incredibly powerful and allow you to create regeneratable versions of most materials. This
section shows you how to create your very first question and will introduce you to simple parameters and
the use of the inline calculator.

Range - The Simplest Parameter


Before we look at how to add parameters and variation to your documents, we need to discuss the simplest
parameter - the Range parameter.

A Range parameter is defined like this...

$p = range(2,9)

This command (we will look at how to create this later) creates a parameter, $p, that can range between 2
and 9. Every time you regenerate, $p will take on a new value. Range parameters are the most common way
of creating variation for your question.

Let's look at how to include some range parameters into a question.

Start With An Old Question!


Most of the time, the best way to create a regeneratable version of a question is to start with an existing
question - something that is already "doing the job" that you want done. For this example we are going to
use a simple trinomial factorisation question.

At the moment, this is a "static" question. We want to add parameters to the question so it can regenerate
itself.

HINT: It is often best to start with the answer and work back to the question. We will be using this idea.
We are assuming that the equations have previously been written with FX Equation.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 14


Edit The Solution (Or Question - Up To You)
Select the solution and edit it.

Here we can see the equation entered into FX Equation. Next, let's create some parameters! To do this,
push the $p button.

Creating Our First Parameters


We have found that focusing on the solutions is often the best way to parametise a question so we are
going to replace the 4 and 7 with the parameters $p and $q.

HINT: We can give the parameters whatever names we like and we could have, instead, replaced the 11 and
28. This is just the easiest option!

When we push the $p button in FX Equation, we are given the option to create and edit some parameters.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 15


We have just used simple range parameters for $p and $q but we already have 49 possible variations!

HINT: Parameters are defined one per line.

We won't worry about the other parts of this screen yet. For the moment, just remember that we have $p
and $q, each of which can range between 3 and 9. Let's push OK and move on to the next step.

Replace Numbers With Parameters


When we close the parameters screen we can start changing our equation - replacing the 4 and 7 with $p
and $q.

FX Equation automatically replaces the $p and $q with the current values of the parameters - which happen
to be 6 and 4. We are on our way!

But... there is an obvious problem.

The 11 and 28 no longer make sense. We need to work backwards.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 16


Working Backwards
Being good mathematicians, we know that the 11 should be the sum of $p and $q - and the 28 should be
the product of $p and $q.

x2+$p+$qx+$p*$q
but that isn't producing what we want.

What we need is some way of doing a calculation. This time, we are going to do the calculation using the
inline calculator.

Introducing the Inline Calculator


Using the inline calculator is easy... wrap things in braces to calculate.

You probably have a few questions - so here are some answers:

 You don't have to just use parameters in calculations. You can, if you wish, type something like {2pi*3.4^2}
and have the calculator calculate the answer for you.
 You can still get FX Equation to draw a brace if you need to.
 The calculator is extremely powerful - far more powerful than it might first seem.
 You don't have to do all calculations inline.

We are going to look at the last answer in more detail.

Introducing Expression Parameters


You might have noticed that using parameters and the inline calculator made the first line of our equation
quite complex.

x2+{$p+$q}x+{$p*$q}
All of the braces and parameters are getting a little messy - particularly if we want to do the same
calculation somewhere else (spoiler alert... we do!) Let's do this a different way.

Push the $p button and go back to the parameters screen.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 17


Here we have created two more parameters, $b and $c, and made them equal to the sum and product of $p
and $q. Notice that the current values screen is showing the correct values for $b and $c.

We chose $b and $c because they are commonly used in general trinomials (ax^2 + bx + c). Choosing logical
parameter names can make life much simpler. $b and $c are expression parameters because their value is
the result of the calculation of an expression (which usually involves other parameters). The number of
variations remains at 49 because no more variation has been added.

Now that we have created $b and $c, we can use these in our equation.

This is much simpler to look at, with the added bonus that we can use $b and $c elsewhere in our question.

Regenerate, Regenerate, Regenerate!


Now that we have added parameters to our solution, we strongly encourage you to regenerate things a few
times. There are a few spots to do this but we will use FX Equation's regenerate button.

You will see this "Shuffle $p" button in a few places. It forces FX Equation (or FX Draw or Word) to
regenerate the parameters. Every time we do this, we should get a new version of our question/solution!

MultiDocs Primer - Copyright © 2023 – Efofex – Page 18


HINT: Regenerating a LOT at this point will save time later. The system will regenerate as fast as you can
push the button and regenerating will often show up logical faults in your question design or parameter
definitions. You might also decide that some versions are too easy or too hard and find that you need to
change your parameter definitions a bit. Regenerate, regenerate, regenerate!

Update All Of The Question


We are nearly done. We have added parameters to our solution and made sure that everything is working
correctly. But our Word document now looks like this...

The solution is working beautifully, but we haven't yet put the parameters into the original question. Luckily,
we have already done most of the work - we have created $b and $c which we can put straight into the
question. So let's do that!

Well. That wasn't what I was expecting!

So, what's the problem?

MultiDocs Primer - Copyright © 2023 – Efofex – Page 19


The problem is that we created lovely parameters for the solution, but the question doesn't know about
them. We need to link the two equations in some way, so they are using the same parameters. There are a
few ways of doing this but we will use the simplest way.

First, you are almost an expert now, so change to the Expert toolbar.

Next, select the solution equation and Copy the Parameters

Then select the question equation and Paste the Parameters.

The system will work its magic and everything should be updated.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 20


Now we have a question and solution, that are linked together and are regenerating to new versions of the
question. Once you have done this a few times, the process becomes very efficient, and the results are
extremely versatile and powerful.

One Last Check


Now that we have created a MultiDocs, parametised question, it's a good idea to just check that Word can
regenerate it. We have only done one question so we will not "Regenerate All". Instead, select any equation
in the question and press the Regenerate button.

Give Word a few seconds (it can be a little while for a complex question with many linked equations and
graphics) and you should get a new version of the question and solution.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 21


Efofex Parameters
There are over 40 types of parameter available in Efofex products. They all have the same purpose:

Parameters provide variation for your questions.


So far, we have used some range and expression parameters to create a little bit of variation for your
questions. As your confidence in writing MultiDocs materials grows, you will quickly find that you need more
control over what is produced in order to create exactly the sort of question you want. As your needs grow,
you will find that there is already a parameter type designed to suit your needs. For example, the multi
parameter allows you to create multiple choice questions that automatically shuffle the possible answers -
and each answer can be the result of other parameters.

If your experience is anything like ours, most of your parameters will be ranges, lists or expressions - but
don't underestimate the power available to you! Each parameter type has its own role to play in your work.

We have grouped the parameters into similar types and discussed them in order of complexity. You can use
as few or as many as you like!

One Definition Per Line


When defining parameters, each parameter definition needs to exist on its own line. Three parameters =
three lines.

The Three Main Parameter Types


We have already used Range parameters and Expression parameters. In this section we introduce the third,
main parameter type - Lists. We also show you the full power of Ranges.

Range Parameters
Range parameters define a range of values that the parameter can be selected from. Range parameters are
often the most useful parameter type.

Range parameters are defined using the range command.


MultiDocs Primer - Copyright © 2023 – Efofex – Page 22
$p=range(low,high,increment (optional), excludemultiplesof (optional))
Examples:

$p=range(1,100) $p can take any (integer) value from 1 to 100.


$q=range(2,4.5,0.001) $q can take any value from 2 to 4.5 in 0.001 increments.
$r=range(0,3pi,pi/4) $r can take any value from 0 to 3π in increments of π/4. The values will be
inserted as decimals.
$s=range(19,31,1,10) $s can take any value from 19 to 31 EXCLUDING 20 and 30 which are multiples
of 10.

Expression Parameters
Expression parameters define a parameter in terms of other parameters. Any indicated calculations will be
evaluated.

$p = 4
$q = ($p+1)2
$r= $p + $q

Given these definitions, the following equation:

$p + $q + $r

would be rendered as

4 + 25 + 29

where $q is calculated as (4+1)^2 and $r is calculated as 4 + 25.

List Parameters
List parameters define a list of values that the parameter can be selected from. You must list out every
value. Lists are very useful when you have a known number of options that do not follow a specific pattern.
For example, you might use a list to list out the standard television sizes.

Lists can also list out strings which allows you to change words in an equation.

List parameters are defined using the list command.

$p=list(value1,value2,value3,...)

Examples:

$p=list(2,3,5,7,11,13,17,100) $p can be any of the listed values.


$q=list(0,pi/4,pi/2,3pi/4,pi) $q can be any of the listed values (inserted as decimals).
$r=list("red","green","blue") $r can be any of the listed strings.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 23


Commonly Used Parameters
Most questions will be written with range, list and expression parameters but there are situations where
using those parameters makes it difficult to achieve exactly the variation you are after. The following
parameter types are commonly used to help with those situations. Most of these parameter types are the
result of OUR efforts at writing questions.

RangeEx Parameters
We have often found that we wanted to include negative numbers in ranges but we do NOT want 0 (or
sometimes -1 and 1). The RangeEx parameter type is designed for those situations (often algebra questions).

$p=rangeex(low,high,increment (optional), excludemultiplesof (optional))

$p=rangeex(2,5) $p can take any of the integers {-5, -4, -3, -2, 2, 3, 4, 5}.

Prime & PrimeEx Parameters


Prime parameters allow you to easily define just prime numbers in a particular range. This allows you to
easily ensure that you are only using numbers that have no factors.

$p=prime(low,high)

Notes:
 low and high do NOT need to be prime to use the commands.
 The prime command will never return a 1.

Examples:

$p=prime(1,10) $p will be chosen from the set {2,3,5,7}.

$p=primeex(low,high)

You can also use the primeex parameter to include negative numbers.

$p=primeex(1,10) $p will be chosen from the set {-7,-5,-3,-2,2,3,5,7}.

Composite & CompositeEx Parameters


Composite parameters allow you to easily define just composite numbers in a particular range. This allows
you to easily ensure that your numbers will have factors.

$c=composite(low,high)

Notes:
 low and high do NOT need to be composite to use the commands.
 The composite parameter will never return a 1.

Examples:

$c=composite(1,10) $c will be chosen from the set {4,6,8,9,10}.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 24


$c=compositeex(low,high)

You can also use the compositeex commands to include negative numbers.

$c=compositeex(1,10) $c will be chosen from the set {-10,-9,-8,-6,-4,4,6,8,10}.

NoCommonFactor Parameters
NoCommonFactor parameters allow you to access numbers which do not share a common factor. There are
two ways of using this parameter type.

$p=nocommonfactor(number)

This will return a number less than "number" which shares no common factors.

Example:

$p=nocommonfactor(12) $p will be chosen from the set {1,5,7,11}.

More commonly, you will set a low and high value for the returning number.

$p=nocommonfactor(number,low,high)

Notes:
 low and high are optional and do NOT need to be factors of the number.
 low and high can be higher (or lower) than number
 The nocommonfactor command will return 1.

Example:

$p=nocommonfactor(12,10,36) $p will be chosen from the set {11,13,17,19,23,25,29,31,35}.

The most common reason for using a nocommonfactor parameter is to create numerators for fractions
which cannot be simplified. For example, if you use $p=nocommonfactor(12) then the fraction $p/12 will
NEVER be able to be simplified (it will be 1/12, 5/12, 7/12 or 11/12.)

Pronumeral Parameters
Pronumeral parameters allow you to create questions with varying pronumerals. They are useful for
creating algebra questions where the "letters change" as well as the numbers.

$x=pronumeral()
$y=pronumeral()
$z=pronumeral()

The pronumerals above will be selected as a sequential group of three. For example, you might end up with
a,b,c or r,s,t or x,y,z.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 25


Factor Parameters
Factor parameters allow you to easily access factors of a number.

$p=factor(number)
$p=factor(number,low,high)

Notes:
 low and high are optional and do NOT need to be factors of the number.
 Neither command will return a 1.

Examples:

$p=factor(12) $p will be chosen from the set {1,2,3,4,6,12}.


$p=factor(72,10,36) $p will be chosen from the set {12,18,24,36}.

Introducing References (Important!)

So far, all of our parameters have returned one result from the range or list of possible results.

$p=range(1,100)

For example, $p will always return ONE number from the full range of available numbers.

Not all parameters are this simple!

Some parameter types return two or more results. Some parameter values need to be used as a set or a list
of data. What we need is a way of referencing each individual entry in these parameters.

Enter references!

If a parameter contains more than one value, you can reference an individual value using this notation:

$p[1] The first entry


$p[2] The second entry
$p[3] The third entry

and so on.

References add significant power to the parameter system and we will be discussing them in more detail
later on. For the moment, let's look at parameter types that rely on references for their use.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 26


Parameters Which Use References
These are (very useful) parameter types which require you to use references to access their full power.

DivideInto Parameters
DivideInto parameters divide a given number of objects into a given number of groups. It is useful if you
want to generate (for example) three random numbers which ALWAYS add up to 30. This particular job is
quite difficult to do without the divideinto parameter.

$p=divideinto(total,number of groups)

Example:
$p=divideinto(100,4) Divides 100 into four groups. This might result in the values 22,31,15,32 or
10,31,5,54

In this example, the four results will always add up to 100

Individual elements of $p are accessed using references - $p[1], $p[2], $p[3] and $p[4].

Coprime Parameters
Coprime parameters allow you to access sets of coprime numbers. This allows you to quickly create lists of
numbers which share no common factors.

$p=coprimes(low,high)
$p=coprimesex(low,high)

Notes:
 the coprimes command will return AT MOST ten coprime numbers. If the range of available numbers is
less than 20, the number of coprimes returned will be AT MOST half of the available range.
 Individual coprime numbers are accessed using references.
 The coprimesex parameter will return positive and negative coprime numbers.

Examples:
$p=coprimes(2,10) $p will be a random set of AT MOST 4 coprime numbers. It might return
{6,5,7} or {4,9,7,5}.
$p=coprimesex(2,100) $p will be a random set of 10 coprime numbers. It might return {27,-8,-73,49,-
97,71,-41,59,-65,11} or {-67,-5,12,73,-97,31,-89,13,-83,-7}

Using Coprime Parameters

If you just use the parameter $p, you will have the full list of coprimes inserted into your equation. Normally,
you will instead use references to the individual numbers.

$p[1] and $p[2] are coprime might return 6 and 5 are coprime.

You can confidently use $p[1], $p[2] and $p[3] in most situations. If you have a small range of numbers
available, going beyond this can result in undefined references

MultiDocs Primer - Copyright © 2023 – Efofex – Page 27


Deck Parameters
A deck parameter lists out all 52 cards in a standard set of cards, in a fixed order.

$d=deck()

$d will now contain

A♠ 2♠ 3♠ 4♠ 5♠ 6♠ 7♠ 8♠ 9♠ 10♠ J♠ Q♠ K♠ A♥ 2♥ 3♥ 4♥ 5♥ 6♥ 7♥ 8♥ 9♥ 10♥ J♥ Q♥ K♥
A♣ 2♣ 3♣ 4♣ 5♣ 6♣ 7♣ 8♣ 9♣ 10♣ J♣ Q♣ K♣ A♦ 2♦ 3♦ 4♦ 5♦ 6♦ 7♦ 8♦ 9♦ 10♦ J♦ Q♦ K♦

This order does not change so $d[15] will always be the two of hearts.

Decks are not normally used on their own. Typically they are combined with a shuffle command or used with
a selectfrom parameter which are discussed later.

Shuffle Parameter - Shuffling a Range of Values


Shuffle parameters produce a randomized set of values. Shuffle parameters are defined using the shuffle
command.

Note that a shuffle parameter can produce a large set of values - all of which are stored. Shuffle parameters
are always limited to 10000 results to limit the impact that large parameters will have on your computer.

$p=shuffle(low,high,increment (optional))

Examples:
$p=shuffle(1,100) $p will shuffle integers from 1 to 100.
$q=shuffle(2,4.5,0.001) $q will shuffle values from 2 to 4.5 in 0.001 increments.
$r=shuffle(0,3pi,pi/4) $r will shuffle values from 0 to 3π in increments of π/4. The values will be
inserted as decimals.

Using Shuffle Parameters

If you create the parameter $s=shuffle(1,10) and use $s in an equation, the parameter will be replaced by
the shuffled list.

Example:
The horse barrier draw was $s

might be turned into

The horse barrier draw was 5,3,6,1,7,8,2,9,10,4

More commonly, you will use shuffle parameters with references. Using the $s example, you might write.

The results of the race were, first $s[1] followed by $s[2] and $s[3].

which will be transformed into

The results of the race were, first 5 followed by 3 and 6.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 28


Parameters Which Modify Other Parameters
Some parameters perform manipulations on other parameters.

SelectFrom Parameters
A Selectfrom parameter selects n values from an existing parameter.

$s=selectfrom($d,5)

$s will contain 5 values randomly selected from $d

Some examples

$d=range(1,20)
$s=selectfrom($d,3)

$s might contain 4,7,18

$d=deck()
$s=selectfrom($d,5)

$s might contain 6♠ 5♥ J♥ 6♣ 10♦

$d=list("Aaron","Barry","Cyril","Douglas","Egbert","Francis","Gerald","Hector","Ignatius","Jas
per")
$s=selectfrom($d,2)

$s might contain "Cyril","Ignatius"

You access the results of the selectfrom parameter using references.

$s[1], $s[2]... and so on.

Shuffling Data, a Deck or a List


Note that we will look at data parameters later in this document.

You can create a shuffle parameter from an existing Data parameter, Deck parameter or List parameter.

$p=data(5,6,7,9,12)
$s=shuffle($p)

$s will contain a shuffled version of $p

You can also create shuffled versions of data parameters which contain text.

$p=data("x2-4","2x2-3","-x2+7","-2x2-3)
$s=shuffle($p)

MultiDocs Primer - Copyright © 2023 – Efofex – Page 29


$s will contain the three functions in a shuffled state.

Shuffling data parameters could, for example, be used to create a randomly shuffled set of answers to a
question. This might be useful for randomised multi-choice questions.

Using Shuffle Parameters with Decks

Deck parameters contain a fixed list of all 52 cards in a standard deck of cards. Often, you will want to
shuffle the deck to create a random list.

$d=deck()
$s=shuffle($d)

$s will contain a shuffled deck of cards.

Using Shuffle Parameters with Lists

Note that this section uses the $s[] reference notation that is discussed later in this document.

Data parameters and list parameters are almost identical. The only difference is that a data parameter will
report all values at once where a list parameter will only report the current (randomly selected) value.

If you wish to shuffle a list parameter, you need to force the parameter to report all values at once.

$p=list(5,6,7,9,12)
$s=shuffle($p)

In this example, $s will only contain ONE value from $p

$p=list(5,6,7,9,12)
$s=shuffle($p[])

In this example, $s will only contain a shuffled list of ALL values from $p

MultiDocs Primer - Copyright © 2023 – Efofex – Page 30


Multi Parameters (For Multiple Choice Questions)
Multi parameters automate multichoice questions. They use references and add some special references to
hold the answer.

We recommend that you download a sample multichoice question from FX Library so you can see the most
efficient format for writing multichoice questions.

$p=multi(Correct,Incorrect,Incorrect 2,...)

The first value in the parameter must be the correct answer to the question. You can then have as many
incorrect answers / distractors as your question requires. Every time you regenerate, any parameters in the
multi parameter will be replaced and the answers shuffled. This means that you can change both the
answers and the order of the answers.

To use a multi parameter, you might write a question like "What is the square root of 9?" Your parameter
might then be

$m=multi(3,9,1,4)

Where 3 is the correct answer and 9, 1 and 4 are the distractors. The correct answer MUST be first in the
list. In your equation you would then write

What is the square root of 9?

A. $m[1]
B. $m[2]
C. $m[3]
D. $m[4]

Note: You need to refer to the values in order. Do NOT shuffle the list yourself.

When you regenerate, your answers will be automatically shuffled so you might see.

A. 4
B. 3
C. 1
D. 9

You can access the correct answer to the question using the special reference, $m[A]

Answer: $m[A]

which, in this case, will be replaced with B. You can also obtain the reference to the answer using $m[R]. In
this example, the reference is 2.

You can include text in your answers using quotes.

$n=multi("Local Maximum","Local Minimum","Horizontal Point of Inflection")

MultiDocs Primer - Copyright © 2023 – Efofex – Page 31


More On References
We have already seen how references can be used to access individual values in a parameter but they are
far more powerful than this! This section discusses some of the innovative ways you can use references.

Parameters define sets of values which can be used in your questions. A parameter can easily define
hundreds or thousands of possible values. References allow you to access the possible values individually
instead of randomly.

For example, if you define this parameter:

$p=range(1,100,0.1)

$p will take on a random value in the range and there are nearly 1000 possible values it could take. If you
want specify one particular value you can use a reference.

$p[200]

The 200 is the reference and allows you to specify one particular possible value.

Simple References $p[n]


A simple reference allows you to access one specific value from the parameter.

$p=list("red","orange","yellow","green","blue","indigo","violet")

In this example, if you use $p in your equation, it will be replaced with a random color from the set. If you
wanted to specifically use blue, you can reference it with $p[5].

One example usage for references might be with arithmetic progressions.

$a=range(4,1000,3)

This range parameter will select from the values:

4, 7, 10, 13, 16 ... 994, 997, 1000

These numbers are in arithmetic progression.

$a[14] will give you the 14th number in the arithmetic progression (43). In general, $a[n] will give you the
nth number in the arithmetic progression.

Reference Ranges $p[s,f]


You can specify a range of references using the $p[s,f] notation where s is the start of the range and f is the
end of the range.

$p=list("red","orange","yellow","green","blue","indigo","violet")

If you have created this list, you can create a range reference like $p[2,4]. This will list the referenced
elements, in order, separated by your computer's normal separator character (usually a comma).

MultiDocs Primer - Copyright © 2023 – Efofex – Page 32


In this case, $p[2,4] will be replaced by "orange, yellow, green"

One example usage for range references might be with arithmetic progressions.

$a=range(4,1000,3)

This range parameter will select from the values:

4, 7, 10, 13, 16 ... 994, 997, 1000

These numbers are in arithmetic progression.

$a[14] will give you the 14th number in the arithmetic progression (43)

$a[3,10] will produce 10, 13, 16, 19, 22, 25, 28, 31

Specifying a Separator for Reference Ranges


Reference ranges are normally created with your computer's standard separator (either a comma or a
semicolon). Alternatively they can be specified with a separator of your choosing. For example, if you define
the follow parameter.

$a=range(4,1000,3)

$a[3,10] will produce 10, 13, 16, 19, 22, 25, 28, 31

You might like to separate the elements with a + sign to show a series. This can be defined by

$a[3,10,+] or $a[3,10,"+"] (the quotation marks are optional)

Both of these expressions will result in the following

10+13+16+19+22+25+28+31

$p[0] - The Number of Possibilities


References to parameter values begin with 1 so the first value in a parameter is referenced by $p[1]

For example.

$p=list("red","orange","yellow","green","blue","indigo","violet")

$p[1] = red
$p[2] = orange
...
$p[7] = violet

$p[0] is given a special value - the number of possible values in the parameter. In the above example, this
means that $p[0] = 7

Note: you can also use the count command to count the number of possible values in a parameter.
{count($p)} = 7
MultiDocs Primer - Copyright © 2023 – Efofex – Page 33
$p[] - All the Possibilities
Sometimes you will want to create a reference range that references ALL the values the parameter can take.
All references start with 1, but to create your reference range you need to know how many possibilities the
parameter can produce. There are a number of ways of doing this.

For example, if you create the following parameter.

$p=list("red","orange","yellow","green","blue","indigo","violet")

To list all of the values we would write:

$p[1,7] which will produce "red, orange, yellow, green, blue, indigo, violet"

but only because we know that there are 7 entries in our list.

Alternatively, we could write

$p[1,$p[0]] which will produce the same list because $p[0] contains the number of possibilities (7)

but this is a lot to remember and write.

The final option is to create an empty reference.

$p[]

If you include no references, the full list will be automatically output.

$p[...] - Elided Lists For When Things Get Large


Parameters can easily be created that contain hundreds or thousands of possibilities.

$p=range(1,1000)

In this example, $p could be any number from 1 to 1000. If we output the full list of possibilities using
$p[1,$p[0]] or $p[], the resulting string will be huge.

As an alternative, you can output an elided version of the full list.

$p[...]

This will automatically remove the middle of the list, replacing it with an ellipsis.

1, 2, 3, 4, 5, 6, 7, 8 ... 996, 997, 998, 999, 1000

You can also specify a new separator for an elided list. For example

$p[...,+]

will replace the , with a +

1+2+3+4+5+6+7+8+ ... +996+997+998+999+1000


MultiDocs Primer - Copyright © 2023 – Efofex – Page 34
Data Parameters
Data parameters are very similar to list parameters.

Data parameters define a list of values that, together, form a data set. You must list out every value. Data
parameters contain data that are normally accessed as one. For example, you might find the mean of a data
set.

Data parameters are defined using the data command.

$p=data(value1,value2,value3,...)

Examples:

$p=data(2,3,5,7,11,13,17,100)
$q=data(0,pi/4,pi/2,3pi/4,pi)
$r=data("string1","string2","string3")

You can algorithmically create sets of data for statistical questions using the random number parameters.
For example, the RandNormal parameter can create a random set of data that is normally distributed
around a given mean and standard deviation.

You can also create data parameters which contain frequency tables, grouped data and bivariate data using
special formats. These are discussed in the next section.

The Difference Between Lists and Data


Let's say we have created two parameters:

$p1 = list(2,4,6,8,11,15,20,22)
$p2 = data(2,4,6,8,11,15,20,22)

What's the difference?

Lists are designed for situations where you normally need to use ONE possible value from a list of values.
Data is designed for situations where you normally use ALL of the values at the same time.

The most obvious use of a data parameter is to hold a set of data that you are going to perform statistical
calculations on.

Using data and list parameters is subtly different.

If I include $p1 in an equation or calculation, it will be replaced by ONE, randomly chosen value. If I include
$p2 in an equation or calculation, it will always be replaced by the ALL of the values in the parameter.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 35


The effect is particularly obvious when used with the calculator.

Frequency, Group & Bivariate Data


You can create frequency tables, grouped data and bivariate data by using special formats for your data.

$f=data(10:2,11:5,12:4,13,14:2,15:2) Frequency Table


$g=data(10~20:2,20~30:6,30~40:4,40~50:2) Grouped Data
$b=data((11,12)(15,19)(21,28)(13.2,19.4),(8,16)) Bivariate Data

Frequency Tables
You can include frequency information in data parameters using the following format:

You can list these points out in a data parameter, with the values separated by commas (or semicolons if
you use a comma as a decimal point)

$f=data(10:2,11:5,12:4,13,14:2,15:2)

This is equivalent to this frequency table.

x f
10 2
11 5
12 4
13 1
14 2
15 2

All statistical commands (mean, median, standard deviation...) will utilize the frequency information when
calculating their values. You can access individual entries in the data parameter using references. For
example, if you type $f[3], the system will return 12:4. You can access the data value and frequency
components of the table using the datavalue and freq commands in the calculator.

{datavalue($f[3])} will return 12


{freq($f[3])} will return 4

MultiDocs Primer - Copyright © 2023 – Efofex – Page 36


Grouped Data
You can include grouped data information in data parameters using the following format:

You can list these groups out in a data parameter, with the values separated by commas (or semicolons if
you use a comma as a decimal point)

$g=data(10~20:2,20~30:6,30~40:4,40~50:2)

This is equivalent to this grouped data table.

Group f
10 < x <= 20 2
20 < x <= 30 6
30 < x <= 40 4
40 < x <= 50 2

All statistical commands (mean, median, standard deviation...) will utilize the group information when
calculating their values. You can access individual entries in the data parameter using references. For
example, if you type $f[3], the system will return 30~40:4. You can access the group definition and
frequency components of the table using the group and freq commands in the calculator.

{group($g[3])} will return 30~40


{freq($g[3])} will return 4

Bivariate Data
You can include bivariate data information in data parameters using the following format:

You can list these points out in a data parameter, with the values separated by commas (or semicolons if
you use a comma as a decimal point) OR no separator at all.

$b=data((11,12)(15,19)(21,28)(13.2,19.4),(8,16))

There are a number of statistical commands that can work with bivariate data. In particular, regslope,
regintercept and regr.

You can access individual entries in the data parameter using references. For example, if you type $b[3], the
system will return (21,28). You can access the x value and y value components of a point using the xvalue
and yvalue commands in the calculator.

{xvalue($b[3])} will return 21


{yvalue($b[3])} will return 28

MultiDocs Primer - Copyright © 2023 – Efofex – Page 37


Explode Parameters

$e=explode("AUSTRALIA")

An explode parameter is a quick way of constructing a list of data from a word or number. This explode
parameter is equivalent to typing

$d=data("A","U","S","T","R","A","L","I","A")

Once you have created an explode parameter, you can use the inline calculator to perform some useful
operations.

For example:

{sort(unique($e))} will return A, I, L, R, S, T, U

which is the seven unique letters in AUSTRALIA sorted alphabetically.

RandNormal Parameters

$p=RandNormal(mean, sd, number)

Generates number normally distributed scores with a mean of mean and a sample deviation of sd.

For example

$p=RandNormal(60,15,30) might return

71.14, 64.14, 53.42, 60.18, 85.18, 33.88, 77.8, 64.43, 54.79, 40.79, 42.7, 72.37, 69.64, 27.99, 61.92, 49.87,
64.42, 61.74, 71.67, 83.69, 70.52, 54.36, 63, 24.77, 57.12, 77.01, 57.06, 72.68, 66.49, 45.23

A RandNormal parameter is regeneratable. Every time you regenerate, you will be provided with a fresh set
of data. A RandNormal parameter can be used for statistical calculations in the inline calculator. For example
{mean($p)} of the above data will return 60.

RandBetween Parameters

$p=RandBetween(low, high, number)

Generates number random integers between high and low inclusive. The random integers are uniformly
distributed. The RandBetween parameter can quickly produce uniformally distributed data sets from a given
low and high value. You might use a RandBetween parameter to simulate dice rolls for example.

For example

$p=RandBetween(5,10,30) might generate

9, 7, 7, 9, 9, 7, 10, 10, 8, 9, 8, 5, 7, 5, 8, 10, 7, 6, 9, 9, 8, 8, 5, 6, 7, 5, 6, 7, 5, 8

MultiDocs Primer - Copyright © 2023 – Efofex – Page 38


A RandBetween parameter is regeneratable. Every time you regenerate, you will be provided with a fresh
set of data. A RandBetween parameter can be used for statistical calculations in the inline calculator.

RandBinomial Parameters

$p=RandBinomial(attempt,probability,number)

Generates number random binomial trials. RandBinomial returns the number of successful attempts in
attempt attempts where the probability of success on each attempt is probability. For example, when rolling
a die, the probability of rolling a six is one sixth. If you roll a die 10 times, how many sixes will you roll? You
can simulate this problem thirty times using $p=RandBinomial(10,1/6,30) and you might generate the
following data.

2, 2, 1, 1, 1, 0, 1, 3, 0, 1, 2, 1, 4, 5, 2, 1, 1, 1, 0, 3, 1, 1, 1, 1, 2, 2, 2, 1, 4, 1

A RandBinomial parameter is regeneratable. Every time you regenerate, you will be provided with a fresh
set of data. A RandBinomial parameter can be used for statistical calculations in the inline calculator.

RandExponential Parameters

$p=RandExponential(rate, number)

The exponential data generator generates data that fits this probability density function.

Where  is the rate parameter of the function.

A RandExponential parameter is regeneratable. Every time you regenerate, you will be provided with a fresh
set of data. A RandExponential parameter can be used for statistical calculations in the inline calculator.

RandGeometric Parameters

$p=RandGeometric(probability,number)

Generates number random geometric trials. RandGeometric returns the number of attempts before a
success where the probability of success on each attempt is probability. For example, how many rolls of a
die does it take to roll a 6? You can simulate this problem thirty times using $p=RandGeometric(1/6,30) and
you might generate the following data.

16, 3, 6, 9, 7, 10, 10, 3, 5, 11, 1, 9, 2, 6, 5, 7, 20, 21, 4, 2, 5, 5, 2, 10, 6, 2, 13, 1, 1, 10

A RandGeometric parameter is regeneratable. Every time you regenerate, you will be provided with a fresh
set of data. A RandGeometric parameter can be used for statistical calculations in the inline calculator.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 39


RandHyperGeometric Parameters

$p=RandHyperGeometric(select,total,success,number)

Generates number random hypergeometric trials. RandHyperGeometric returns the number of successes
when select selections are made, without replacement, from a total where success successes are present.
For example, five marbles are drawn, without replacement, from a bag of 10 marbles, six red and four
green. How many red marbles will be drawn? You can simulate this problem thirty times using
RandHyperGeometric(5,10,6,30) and you might generate the following data.

3, 2, 3, 4, 1, 4, 2, 3, 3, 3, 3, 3, 3, 5, 4, 4, 3, 3, 3, 3, 2, 3, 3, 3, 2, 3, 4, 2, 3, 3

A RandHyperGeometric parameter is regeneratable. Every time you regenerate, you will be provided with a
fresh set of data. A RandHyperGeometric parameter can be used for statistical calculations in the inline
calculator.

RandNegBinomial Parameters

$p=RandNegBinomial(required, probability, number)

Generates number random negative binomial trials. RandNegBinomial returns the number of attempts
before required successes where the probability of success on each attempt is probability. For example,
how many rolls of a die does it take to roll a total of four 6's? You can simulate this problem thirty times
using $p=RandNegBinomial(4,1/6,30) and you might generate the following data.

19, 18, 23, 18, 14, 25, 52, 69, 17, 24, 21, 29, 12, 36, 52, 36, 17, 22, 8, 30, 8, 26, 11, 41, 18, 13, 41, 18, 30, 25

A RandNegBinomial parameter is regeneratable. Every time you regenerate, you will be provided with a
fresh set of data. A RandNegBinomial parameter can be used for statistical calculations in the inline
calculator.

RandPoisson Parameters

$p=RandPoisson(successes, number)

The Poisson data generator allows you to simulate trials where you know the expected number of successes
in the experiment and you wish to know the actual number of successes. A RandPoisson parameter is
regeneratable. Every time you regenerate, you will be provided with a fresh set of data. A RandPoisson
parameter can be used for statistical calculations in the inline calculator.

RandBivariate Parameters

$p=RandBivariate(lowx, highx, slope, intercept, targetr, number)

Generates number random bivariate data points with the x values ranging from lowx to highx. The data will
approximately fit a linear regression line with the given slope and intercept with a correlation coefficient of
approximately targetr.

If you want data with a negative correlation, you MUST enter a negative slope, NOT a negative targetr.
MultiDocs Primer - Copyright © 2023 – Efofex – Page 40
A RandBivariate parameter is regeneratable. Every time you regenerate, you will be provided with a fresh
set of data. A RandBivariate parameter can be used for statistical calculations in the inline calculator.

Time Series Data Parameters

$p=TimeSeries(cyclelen, yint, slope, number)

Generates number random numbers that have a cycle length of cyclelen and are based on a line with y
intercept of yint and slope of slope. You might use a TimeSeries parameter to simulate seasonal sales for
example.

For example

$p=TimeSeries(4,25,0.5,12) might generate

21, 20.8, 29, 28.7, 24.8, 23, 28.9, 28.6, 27.2, 24.4, 31.9, 31.3

A TimeSeries parameter is regeneratable. Every time you regenerate, you will be provided with a fresh set of
data.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 41


Less Commonly Used Parameters
Sequence Parameters

Sequence parameters define a range of values that the parameter will be selected from sequentially.
Sequence parameters are defined using the sequence command.

$p=sequence(low,high,increment (optional))

Examples:

$p=sequence(1,100) $p will take sequential integer values from 1 to 100.


$q=sequence(2,4.5,0.001) $q will take sequential values from 2 to 4.5 in 0.001 increments.
$r=sequence(0,3pi,pi/4) $r will take sequential values from 0 to 3π in increments of π/4. The values
will be inserted as decimals.

Char Parameters
Char parameters allow you to quickly define a list of characters that can then be accessed randomly when
regenerating. Char parameters are defined using the char command.

$p=char(start character, end character)

Examples:

$p=char(A,Z) $p can be any uppercase letter.


$q=char(a,z) $q can be any lowercase letter.

Greek Letter Parameters


Greek letter parameters allow you to create questions with varying Greek letters.

$x=greek()
$y=greek()
$z=greek()

The Greek letters above will be selected as a sequential group of three. For example, you might end up with
al,be,ga.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 42


Managing Parameters

Parameters are incredibly powerful, but with that power comes a level of complexity that can be a little
difficult to manage. This section introduces you to the tools we have included to help you manage the
parameters as well as providing some tips and tricks to help you get the most out of the parameter system.

Sharing Parameters Between Objects


You will often want to share parameters between two different objects - an FX Draw diagram and an FX
Equation equation for example.

Every set of parameters is allocated a unique identifier. To share parameters we need to point both objects
to the same, uniquely identified parameters.

You can view the unique ID on the parameter definition screen. Don't worry! You do not need to remember
or use this number. It just allows you to check that two objects share the same set of parameters.

You might see this ID in a few different places, particularly on Windows machines.

To create a dynamic question, we need to share parameters between objects in your Word document.
There are three ways of doing this:

MultiDocs Primer - Copyright © 2023 – Efofex – Page 43


Copying and Pasting An Existing Object
The easiest way to create a number of different objects, all sharing the same parameters, is to copy and
paste an Efofex object in Word. This approach is typically used with equations.

For example. Suppose we have created the solutions to a MultiDocs question as an FX Equation in Word
(creating the solution first is often the best way to write a question.)

The parameters for the solution are going to be needed in the diagram (we will do this later) and also in two
locations in the question. These two locations need to be FX Equations sharing the same parameters as the
solution.

What we will do is copy the solution and paste it into the two locations shown. When you copy a FX
Equation, the parameters are copied as well. The result is ugly!

MultiDocs Primer - Copyright © 2023 – Efofex – Page 44


What we need to do now is to edit each of these equations, delete most of the equation, and just leave the
bit we need.

Summary: Copying and pasting an Efofex object copies the parameters as well. You can use this to quickly
link lots of objects. This is typically used for equations.

Copying and Pasting Parameters From the Word Toolbar


To copy our parameters to the FX Draw graphic, the simplest option is to use the Word toolbar. We have
already seen this approach in “Update All Of The Question” when we created our first question. This is the
best way of linking parameters between graphics and equations.

To copy and paste parameters from the Word Toolbar.

1. Select an object that is linked to the parameters.


2. Push the Copy Parameters button on the Word Toolbar.
3. Select an object that needs to be linked to the parameters.
4. Push the Paste Parameters button on the Word Toolbar.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 45


Note that the copy and paste parameter buttons are only available on the Expert Mode toolbar.

Copying and Loading Parameters In Our Products


Copying and loading parameters can also be done outside of Word but this is less common. To copy
parameters from one object:

1. Load the object into FX Draw or FX Equation.


2. Push the copy parameters button.

3. Open the new object in FX Draw or FX Equation. You will be offered the chance to load the
parameters.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 46


Creating Sets of Parameters
Some values need to be used together in sets. For example, you may have a question that needs to use one
of the sets of Pythagorean triples. This can be done using list references. If you create the following
parameters definitions.

$ref=range(1,9)
$a=list(3,5,7,8,9,11,12,13,15)
$b=list(4,12,24,15,40,60,35,84,112)
$c=list(5,13,25,17,41,61,37,85,113)

You can choose a set of values which are Pythagorean triples using these parameters.

Side 1 = $a[$ref]
Side 2 = $b[$ref]
Hypotenuse = $c[$ref]

Every time you refresh the parameters, $ref will be updated with a new random value, and this will select
(by reference) a number from the $a list and the corresponding values from the $b and $c lists.

No Repeats
By default, when regenerating parameters, the parameter system will not allow repeats of the same value.

In this example, no repeats is turned on. When you regenerate these parameters, both $a and $b will be
chosen from the set {2,3,5,7}. Without "no repeats" there is a one in four chance that $a and $b will return
the same value. This is rarely what is intended when you are defining a question. With "no repeats" enabled,
you are guaranteed to have different primes selected for $a and $b

$numvariations
Efofex parameters defines a standard parameter, $numvariations, which contains the current number of
variations available. This standard parameter would typically not be used within a question but might be
used when describing a question. Efofex often uses the parameter when designing FX Library documents.
The description of these documents always contains an estimate of the number of variations available.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 47


Stop Sharing Parameters
You can break the link between parameters shared between two (or more) objects by pushing the break link
button.

Reparametizing - Using Multiple Copies Of A Question


Sometimes, particularly if you are creating a worksheet, you might want to use multiple copies of a question
so your students can practice a skill. For example, you might want to create a worksheet full of simultaneous
equation questions to be done by elimination, resulting in integer solutions like the following.

FX Library contains a parametized question that does exactly this. You can put this into your document
(don't forget the fully worked solutions) and regenerate!

You paste in the question three times, push regenerate and get...

Not quite what you need! But it DOES make sense. Regenerating updates EVERY object in a document that
shares the same set of parameters. All three copies share parameters - so they all get the same update.

What we need to do is to give each version of the question its own set of parameters. To do this, use the
Paste and Reparametize button.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 48


1. Copy the question you want to use to the clipboard.
2. Paste into Word using Paste & Reparametize - do this as many times as needed.

You now have separate questions (and solutions), each with its own set of parameters that can be
regenerated independently.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 49


Creating Parametized Questions - Hints & Tips
Guidance on the best way to create parametized questions based on the hard-won experiences we have
built up writing FX Library materials.

Check For Consistent Difficulty


The most difficult part of writing a parametized question is making the questions consistently difficult. In
order to be valuable to teachers, the question should produce variations that are approximately as "easy" to
do as each other. In order to check for difficulty issues:

 Limit the number of variations.


 Write the solution before you write the question.
 Regularly regenerate the question as you are writing it.

Most difficulty issues will be avoided using this approach.

Don't Try To Create "All-In-One" Questions


It is very tempting to create "all-in-one" questions that cover every possible situation. You keep adding
parameters, allowing for negative cases, making ranges larger. Doing this, you can quickly create questions
which have billions of available variations. This sounds great but comes with a huge cost. You will, almost
inevitably, create versions with wildly different levels of difficulty.

For example, you could design a parametized simultaneous equations question like this.

±$ax ±$by = ±$c


±$dx ±$ey = ±$f

Depending on the ranges set for $a, $b, $c, $d, $e and $f, this question could feasibly produce any two
variable simultaneous equation. If you are not careful, regeneration might produce

2x - y = 6
2x + y = 2

Which is nice and easy to solve - many students will be able to solve it mentally. A second regeneration
might then produce this.

12x - y = 31
7x + 5y = 17

Which students will find SIGNIFICANTLY harder to solve. Including very general parametized questions into a
test can make management of the test much harder as you try to produce different versions of the test at
approximately the same level of difficulty. Usually it is better to produce far more targeted parametized
questions like this...

$ax - y = $b
$cx + y = $d

If you created the following parameters:

MultiDocs Primer - Copyright © 2023 – Efofex – Page 50


$a=range(2,9)
$c=range(2,9)
$x=range(1,20)
$y=range(1,20)
$b=$a*$x-$y
$d=$c*$x+$y

You will produce much more consistent questions to give to students. All of the following are possible.

3x - y = 17
6x + y = 46

8x - y = 10
9x + y = 24

2x - y = 13
5x + y = 36

Each question is solved the same way. Each question will produce positive integer answers. Using this more
targeted version of my question makes the question more useful in a test but there are STILL over 2 million
variations!

Focus On The Solution


One of the best approaches to writing high-quality parametized questions is to focus on the solution to the
problem and work backwards to the question. The simultaneous equation question in the previous section
demonstrated this approach.

$ax - y = $b
$cx + y = $d

Parameters:

$a=range(2,9)
$c=range(2,9)
$x=range(1,20)
$y=range(1,20)

In this question, we have created parameters for $x and $y which represent the solution to the question.
Being parametized, we have full control over the possible solutions. In this example, the solutions will all be
positive integers between 1 and 20. This makes it much easier to create consistently difficult questions.
Focusing on the solution means that we have to calculate parts of the question definition. This can be done
as expression parameters as shown above.

$b=$a*$x-$y
$d=$c*$x+$y

These two lines use $a and $c as well as our solution to create the appropriate values for our question. This
guarantees that the question will always "work".

Focussing on the solution is not always possible or necessary, but is always worth considering.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 51


Regenerate Multiple Times
As you are creating a question, it is advisable to regenerate the question multiple times. This has two
benefits.

 Regenerating will quickly highlight any issues with questions which are not consistently difficult. This is
particularly the case if you have created fully worked solutions.
 Regeneration will also highlight any numbers you should have parametized but have forgotten. Those
numbers will remain static when they should have changed.

Regenerate, regenerate, regenerate.

No Repeats Is Your Friend


Efofex Parameters have a no repeat feature that can greatly simplify the creation of questions.

Turning No Repeats on prevents (if possible) two parameters from being given the same value. For example:

$a=prime(1,100)
$b=prime(1,100)
$c=$a*$b

Both $a and $b will be selected from primes between 1 and 100 and $c will always have two prime factors -
unless $a and $b happen to be the same prime in which case $c will be a square number. This is almost
certainly NOT what you want to occur! Turning on No Repeats will prevent the case of $c being a square
number which greatly increases consistency in your question.

Regenerate To Finish
When you have created a question in Word, regenerate (or sync) the question before you save. This will
ensure that the latest versions of the parameters are saved into the document.

Parameters are stored in multiple locations:

Each graphic and equation stores the latest version of the parameters in its data. This version is updated
whenever a graphic is edited.
The current version of the parameters is also saved in a database on your computer.

If everything is synchronised, all of these copies will agree with each other.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 52


If you now edit ONE of the objects, and create new parameters or new values, the object you edit and the
database will now agree. The older objects will still store the old version of the parameters.

This is not a problem on your computer. The database copy of the data always "wins" so the next time you
edit, regenerate or synchronise, everything is resolved automatically. Problems are very likely to occur,
however, when you send this file to someone else because their database will not know about the
parameters. Their database will rely on the copies of the parameters stored within the objects.

Now the parameters that your new user gets depends on which object they happen to edit first which is
NOT what you wanted!

The solution to the problem is to regenerate or synchronise before saving your document and sending to
the new user. When you synchronise, everything is resolved.

Now, the new user will get the parameters you intended, regardless of which object they edit first.

In summary, regenerate to finish.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 53


Reusing Old Questions
One of the quickest way to create new parametized questions is to modify an old parametized question. You
simply load in the old question, make a few modifications and you have a new question.

You might also create a problem!

Your new question will still be connected to the old parameters and any change you make to the parameters
will eventually be propagated back to the old question.

What we need to do is to create a new parameter set for the new question so the parameters can operate
independently. This process is called reparametization and is available through the Word toolbar.

The easiest way to do this is to use the Paste and Reparametize button to paste your question into a new
document.

Reparametizing will create a copy of the old parameters (with a new ID) and apply the new parameters to
any objects in the document using the old parameter set. This allows us to create a new question without
affecting the old one.

Master Display Styles


The built-in calculator has seven different ways of displaying numbers.

The seven modes: decimal, rounded, scientific, significant figures, fixed, unsimplified exact and exact;
provide you with significant flexibility on how you display numbers.

 Decimal displays numbers using (usually) 6 decimal places.


 Rounded displays numbers rounded to a number of decimal places you determine. The number of decimal
places can be negative which rounds to the nearest 10, 100, 1000...
 Scientific displays numbers in scientific notation.
 Significant figures displays numbers with your specified number of significant figures.
 Fixed displays numbers with a fixed number of decimal places (2 by default). This is particularly useful for
currency.
 Exact will calculate and display numbers exactly if possible. Exact mode supports surds.
 Unsimplified Exact will calculate and display numbers exactly if possible, but will not simplify any fractions.
Unsimplified Exact mode supports surds.
MultiDocs Primer - Copyright © 2023 – Efofex – Page 54
There are two ways of setting the display for a calculation.

Setting The Overall Display Style

FX Equation Allows You to Set Display Style On the Main Screen

You Can Also Set The Display Style On the Main Parameter Screen

The overall display style affects any objects which use the parameter set you change.

Using Display Commands

You can override the overall display style for any part of a calculation using the round, exact, sig, fix, sci and
dec commands within your calculation. You can find more information about Display commands here.

Size Graphics In FX Draw, Not Word


It is tempting to create a graphic in FX Draw, add it to your Word document and then resize it to suit the
space available. This can cause problems when regenerating your questions.

The regeneration routine will always return graphics to 100% size when it returns them to Word. This will
mess up all of your formatting.

If a graphic is not the correct size, open it back up in FX Draw and resize it there. Then return it to Word.
That will avoid the problem of resizing graphics when you regenerate.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 55


Use Create Parameter From Selection
Often, when you are creating solutions to questions, you will find yourself typing the same calculation over
and over. We have added a command that helps you minimize this.

For example, if you are working with a quadratic, your working might look like this.

The expression {$b^2-4*$a*$c} is likely to arise multiple times in your solution so you can save time by
giving it its own parameter.

1. Select the section you want to make a parameter.

2. Right click on the selection and select Create Parameter From Selection

3. Create a suitable parameter name and say OK

FX Equation will create a new expression parameter for the selection and replace it in your equation. If you
select Replace All, FX Equation will search the entire equation and replace all instances. You can now use the
$disc parameter anywhere in any object in the question.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 56


The Inline Calculator
In 2020, we added the ability to perform calculations in line. This allows you to enter a line of text and have
part or all of it resolved. The key component to inline calculations are braces.

The Inline Calculator is particularly useful when combined with parameters. The Inline Calculator can be
used just about everywhere in Efofex's mathematics products. You can, for example, use it in the definition
of a function in the graphing tool.

Braces = Calculation
To perform a calculation within your equation line, wrap the section of the equation you want calculated in
braces.

Anything wrapped in braces will be numerically resolved and displayed in the final output.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 57


Using Parameters In Calculations
Any parameters you include in a calculation will be resolved prior to the calculation being performed. For
example, we have defined $p to be the square root of 2 in the next example.

One equation can contain multiple inline calculations. Combined with parameters, you can build
complicated equations with FX Equation performing most of the calculations automatically.

Controlling The Output of The Inline Calculator


The inline calculator operates at between 6 and 10 decimal places of accuracy but normally, you will not
want to display this number of decimal places. There are two separate ways of controlling the way display
produced.

1. You can control the output of an individual calculation using the built-in round, fix, sig, sci and exact
functions. These will be discussed in the next section.
2. You can control the display of all calculations in an equation using the parameters definition screen.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 58


There are seven different output options.

Dec Decimal display at the largest number of 12.4456743


decimal places available
Rnd (Round) Round the output to the indicted number of eg 12.4456743 becomes 12.446 if
decimal places rounded to 3 decimal places.
Fix Fix the output to the indicated number of eg 12.2025323 becomes 12.20 if fixed to
decimal places, padding with zeros if required. 2 decimal places.
This is often used for currency.
Sci Display the result in scientific notation with eg 135.32454577 becomes 1.354 × 102
the indicated number of decimal places in the when displayed with a 3 decimal place
mantissa mantissa.
Exa Keep the result exact if possible eg (5/2)2 becomes 25/4. 2/10 becomes
1/5.
Sig Shows the output with the indicated number eg 2.403556 becomes 2.40 if shown with
of significant figures 3 significant figures.
Uns Keeps the result as an unsimplified exact eg 2/10 remains as 2/10.
value if possible

MultiDocs Primer - Copyright © 2023 – Efofex – Page 59


Specialised Calculator Functions
The inline calculator has a number of specialised calculator functions.
Numeric Functions
Ceil HCF
ceil(value) hcf(a,b)

Returns the integer above the value. Ceil always Returns the highest common factor (also known
"rounds up". as the greatest common denominator) of a and b

ceil(1243.4034) = 1244 hcf(1071,462) = 21


ceil(-34.322) = -34
LCM
Denominator lcm(a,b)
denominator(a)
Returns the lowest common multiple of a and b
Returns the denominator of the exact value a.
lcm(96,72) = 288
denominator(sin 60) = 2
Max
Div max(a,b)
div(a,b)
Returns the maximum value of a and b
Returns the modulus divisor of a and b
max(2.4,1.2) = 2.4
div(18,4) = 4
If a and b are list parameters, the max command
Floor will compare each element in the lists and return
floor(value) the maximum value of each pair in a new list.

Returns the integer below the value. Floor always $a=1,3,5,6,4,7,2,4,9


"rounds down" and is equivalent to the greatest $b=3,6,5,8,2,3,1,9,8
integer function.
max($a,$b) = 3,6,5,8,4,7,2,9,9
floor(1243.4034) = 1243
floor(-34.322) = -35 Min
min(a,b)
Frac
frac(value) Returns the minimum value of a and b

Returns the fractional part of the value (as a min(2.4,1.2) = 1.2


decimal).
If a and b are list parameters, the min command
frac(1243.4034) = 0.4034 will compare each element in the lists and return
frac(-34.322) = 0.322 the minimum value of each pair in a new list.

$a=1,3,5,6,4,7,2,4,9
$b=3,6,5,8,2,3,1,9,8

min($a,$b) = 1,3,5,6,2,3,1,4,8

MultiDocs Primer - Copyright © 2023 – Efofex – Page 60


Mod PrimeFactorString
mod(a,b) primefactorstring(a, separate(optional))

Returns the modulus (remainder) of a divided by b Returns a string listing the prime factors of a.

mod(18,4) = 2 primefactorstring(75) = 3*5^2

Numerator Adding a non-zero second parameter tells the


numerator(a) primefactor command to separate out repeated
factors instead of using indices.
Returns the numerator of the exact value a.
primefactorstring(75,1) = 3*5*5
numerator(sin 60) = sr3
Sgn
NumFactors sgn(value)
numfactors(a)
Returns the sign of the value. Negative numbers
Returns the number of factors of a. return -1, positive numbers return 1 and zero
return 0.
numfactors(75) = 6
sgn(-25.36) = -1
PrimeFactors sgn(3557.21) = 1
primefactors(a, separate(optional)) sgn(0) = 0

Returns a list value that contains the prime factors Evaluate (Advanced)
of a. The result of this function is normally place Sometimes you will want to enter strings which
should be displayed rather than calculated. You
$p = primefactors(75) = 3, 5:2 might, for example, define the following
parameter.
The factors can be accessed individually using
references $p="3sin 60 - 4cos 45"

$p[1] = 3 The quotes tell our equation editor to just display


$p[2] = 5:2 the string and do not perform any calculations.
Wrapping a string in braces will NOT cause it to be
The notation 5:2 indicates that the factor 5 occurs calculated - it is still a string and will be displayed
with a frequency of 2 (5^2). You can access the as such. This allows you to include strings in
data value and the frequency separately using the calculations, particularly using the if command.
datavalue and freq commands.
{if(d=0,"Undefined",n/d)} This command
{datavalue($p[2])} = 5 shows the division of n by d unless d is 0. If d = 0,
{freq($p[2])} = 2 the if command will display the string
"Undefined".
Adding a non-zero second parameter tells the
primefactor command to separate out repeated The evaluate command allows you to evaluate a
factors instead of using frequencies. string despite the quotes.

primefactors(75,1) = 3, 5, 5 {evaluate($p)} = 5.426503

It is unlikely that you will need to use the evaluate


command.
MultiDocs Primer - Copyright © 2023 – Efofex – Page 61
Text Functions
Capitalise/Capitalize ToLower
capitalise(text) or capitalize(text) tolower(text)

The capitalise command capitalises the first letter The tolower command converts the supplied text
of the first word in the text. to lowercase

capitalise("maximum value") will return tolower("The TURNING POINT is here") will return
"Maximum value" "the turning point is here"

capitalise(text,1) or capitalize(text,1) ToUpper


toupper(text)
The capitalise command with an added 1 value
capitalises the first letter of the every word in the The toupper command converts the supplied text
text. to uppercase

capitalise("maximum value",1) will return toupper("Maximum") will return "MAXIMUM"


"Maximum Value"

Date/Time Functions
CurrentDay Hours
currentday() hours(value, round(optional boolean))

Returns the current day of the month (as a The hours function accepts a decimal value
number). This function can help you automate (measured in hours) and returns the number of
questions so that their included dates are always whole hours. The round parameter is optional
current. (defaults to false for hours) and determines if the
number of hours is rounded.
CurrentMonth
currentmonth() hours(4.5) will return 4
hours(4.67773) will return 4
Returns the current month of the year (as a hours(4.67773,1) will return 5 (rounded to
number). This function can help you automate nearest whole number of hours)
questions so that their included dates are always
current. The hours function is normally used with the
minutes function and the seconds function.
CurrentYear
currentyear()

Returns the current year. This function can help


you automate questions so that their included
dates are always appropriate.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 62


Minutes Seconds
minutes(value, round(optional boolean)) seconds(value, round(optional boolean))

The minutes function accepts a decimal value The seconds function accepts a decimal value
(measured in hours) and returns the number of (measured in hours) and returns the number of
whole minutes. The round parameter is optional whole seconds. The round parameter is optional
(defaults to true for minutes) and determines if (defaults to true for seconds) and determines if
the number of minutes is rounded. the number of seconds is rounded.

minutes(4.5) will return 30 seconds(4.5) will return 0


minutes(4.67773,1) will return 40 (truncated to a seconds(4.67773,0) will return 39 (truncated to a
whole number of minutes) whole number of seconds)
minutes(4.67773) will return 41 (rounded by seconds(4.67773) will return 40 (rounded by
default) default)

The minutes function is normally used with the The seconds function is normally used with the
hours function and the seconds function. hours function and the minutes function.

The minutes function is also useful for situations The seconds function is also useful for situations
involving degrees, minutes and seconds of arc involving degrees, minutes and seconds of arc

Display Functions
Display functions allow you to override the overall display type.

Bin Exact
bin(value) exact(value)

The bin command coverts whole number values IF POSSIBLE, the result will be rendered as an
to binary notation. exact value - either a rational or a surd. Exact
values which are rationals will be rendered as
bin(1949) will display as 11110011101 improper fractions. If you require a mixed
number/fraction, use the mixed(value) function.
Dec
dec(value) exact(1/2+1/3) = 5/6
exact(5sr8/4*3sr12/6) = 5sr6/2
Displays the value using all available decimal
places. This is (rarely) used to override the overall Surds are always shown in the numerator. On the
display style, particularly if it is set to exact. Global Parameters dialog, you can choose to show
only prime surds.

With prime surds turned on

exact(5sr8/4*3sr12/6) = 5sr2sr3/2

MultiDocs Primer - Copyright © 2023 – Efofex – Page 63


Fix Sci
fix(value, dp) sci(value, dp)

Fixes the value to the indicated number of Displays the value in scientific notation with a
decimal places, padding with zeros if required. If mantissa that contains the indicated number of
the number of decimal places is negative, the decimal places
number is rounded to the nearest whole number
and padded with zeros to the left of the decimal sci(134.4034,3) = 1.344 × 102
point.
Sig
fix(134.4034,2) = 134.40 sig(value, sf)
fix(134.4,5) = 134.40000
fix(12.34,-5) = 00012 Displays the value with the indicated number of
significant figures. If the number of significant
Hex figures is zero or missing, the number is displayed
hex(value) with 3 significant figures.

The hex command coverts whole number values sig(1343.4564,2) = 1300


to hexadecimal notation. sig(1343.4564) = 1340
sig(0.005204,3) = 0.00520
hex(1949) will display as 79D
Simplify
Mixed simplify(value)
mixed(value)
IF POSSIBLE, the result will expressed as a
IF POSSIBLE, the result will be rendered as mixed simplified exact value.
numeral/mixed fraction.
simplify(5/25) = 1/5
mixed(1/2+2/3) = 1 1/6
The simplify command only has an effect when
If it is not possible to render the value as a mixed used with the Uns(implified) display style.
numeral, the result will be rendered as an exact
value (if possible). ToEnglish
toenglish(value)

Round Displays the value written as words, in English.


round(value, dp) The ToEnglish command will only convert whole
numbers to English (any decimals will be ignored).
Rounds the value to the indicated number of
decimal places. If the number of decimal places is toenglish(17) will display as seventeen
zero or missing, the number is rounded to the
nearest whole number. If the number of decimal The ToEnglish command will normally be used on
places is negative, the number is rounded to the small numbers but can be used for numbers less
left of the decimal point. than one trillion.

round(134.4564,2) = 134.46 toenglish(-423) negative four hundred and


round(134.4564) = 134 twenty three
round(34325.322,-2) = 34300
You can convert a value to English with the first
letter capitalised using the ToEnglishCap
command
MultiDocs Primer - Copyright © 2023 – Efofex – Page 64
ToEnglishCap IfNotSimple
toenglishcap(value) ifnotsimple(value, value if not simple)

The ToEnglishCap command operates in exactly IfNotSimple is a convenience function that only
the same way as the ToEnglish command, the only includes text if a given value is not already
difference is that the first letter of the returned simplified. It only has an effect when used with
number will be upper case. The ToEnglishCap the Uns(implified) display style.
command is used to add a number to the
beginning of a sentence. The most common usage would be to display a
fractional result of a probability question. For
toenglishcap(17) will display as Seventeen example, you might have a probability question
where the result might be 45/100. In this case,
you might want to display the 45/100 AND the
toenglishcap(3450032) Three million, four simplification 9/20. If the answer was 43/100, you
hundred and fifty thousand and thirty two. do not need to simplify anything.
toenglishcap(-423) Negative four
hundred and twenty three {ifnotsimple($f/$n," which simplifies to
{simplify($f/$n)}")}
ToRoman
toroman(value) This command will result in

The toroman command coverts whole number 45/100 which simplifies to 9/20
values between 1 and 3999 to roman numerals.
or
toroman(1949) will display as MCMXVIX
43/100

depending on the values of $f and $n

If the overall display size is set to Uns

If/Then Statements and Conditions


If is one of the most useful commands in the inline calculator. The If command allows you to construct
extremely complex statements.

The Basic Format Of An If Command


if(condition to be satisfied, value if true, value if false)

For example, an if statement might look like this

{if($n>0,100,-20)}

When this command is run, the inline calculator will look at the value of the $n parameter. If the value is
greater than 0, this statement will be replaced by 100. If the value is less than or equal to 0, the statement
will be replaced by -20.

If commands will often include multiple parameters.

{if($n>0,$p,$q)}
MultiDocs Primer - Copyright © 2023 – Efofex – Page 65
With this command the inline calculator will return the value of either $p or $q, depending on the value of
$n.

Conditions
A condition is a Boolean statement that returns true or false. Conditions often include inequalities:

$s<4
$n>=6
$q=9
$t<>7 ($t is not equal to 7)

These are fairly simple conditions. You can combine these using the And, Or and Not commands as well as
some of the more specialized Boolean commands to produce extremely complicated conditions.

Numbers Or Text
You can use the inline calculator to insert numbers or text into your equation. If you want to insert text into
your equation, you must wrap the text in quotes.

For example:

{if($d=0,"Cannot divide by zero",$n/$d)}

This command will look at the value of $d. If the value is 0, the inline calculator will return the text Cannot
divide by zero. If $d is not zero, the calculator will divide $n by $d and return the result.

Nested If Commands
If commands can be nested.

{if($n=0,"n is zero",if($n<0,"n is negative","n is positive"))}

This command might take a little decoding...

If $n is zero, the command will return n is zero. If $n is not zero, the calculator will return the second result -
which in this case is another if command. The calculator will execute the nested if command and return the
appropriate response. There are no technical limits to the amount of nesting but the expressions can quickly
become unwieldy. Often a better way to nest if commands is to assign commands to parameters. For
example, if you assigned

$p=if($n<0,"n is negative","n is positive")

You could then write the nested if command as

{if($n=0,"n is zero",$p)}

MultiDocs Primer - Copyright © 2023 – Efofex – Page 66


Boolean Commands For Conditions
Conditions will often include inequality statements but you will often want to work with conditions which
are more complicated. The inline calculator provides Boolean logic commands as well as some other
Boolean commands which make it easy to define the conditions you require.

Boolean Logic
And, or, not, xor, nor
And Nor
and($s>4,$p=3) nor($s>4,$p=3)

This will return true if BOTH conditions are true. This will return true if NEITHER condition is true.

Or
or($s>4,$p=3) Xor
xor($s>4,$p=3)
This will return true if EITHER condition is true.
This will return true if EITHER, but not BOTH
conditions are true.

Not
not($s>4)

This will return true if the condition is NOT true.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 67


Other Boolean Commands IsPrime
The inline calculator provides a number of isprime($n)
convenience Boolean commands that can allow
you to quickly construct If statements. Returns true if $n is a prime number. Note that
the inline calculator only checks primes under
IsComposite 1000000.
iscomposite($n)
IsProperSubset
Returns true if $n is a composite number. ispropersubset($a,$b)

IsCoprime Returns true if $b is a proper subset of $a. In most


isCoprime($a, $b) situations, $a and $b will be data parameters or
commands which return data parameters (eg
Returns true if $a and $b are coprime. This is randnormal).
equivalent to the highest common factor of $a
and $b being 1. IsSquare
issquare($n)
IsCube
iscube($n) Returns true if $n is a square number.

Returns true if $n is a cubic number. IsSubset


issubset($a,$b)
IsEven
iseven($n) Returns true if $b is a subset of $a. In most
situations, $a and $b will be data parameters or
Returns true if $n is an even number. commands which return data parameters (eg
randnormal).
IsFactor
isfactor($n, $f) Contains
$d=randbetween(1,20,15)
Returns true if $f is a factor of $n.
contains($d,5)
IsInteger
The contains command searches a data
isinteger($n)
parameter for the indicated value and returns
true if the value is found. In this example, we have
Returns true if $n is an integer.
created a random list of 15 numbers between 1
and 20. Contains($d,5) will return true if this list
IsNatural contains a 5.
isnatural($n)

Returns true if $n is a natural number.

IsOdd
isodd($n)

Returns true if $n is an odd number.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 68


Function Analysis Functions
fnMax fnMin
fnMax(function, low, high) fnMin(function, low, high)

Finds the x value which produces the highest y Finds the x value which produces the lowest y
value between low and high. For example: value between low and high. For example:

fnmax(sinx+cos(x/2)+x,1,3) = 2.164 fnmin(sinx+cos(x/2)+x,2,5) = 4.12


fnmax(sinx+cos(x/2)+x,0,1) = 1 fnmin(sinx+cos(x/2)+x,0,1) = 0

To find the y value of the local maximum, use the To find the y value of the local maximum, use the
fnmaxval function fnminval function

fnMaxVal fnMinVal
fnMaxVal(function, low, high) fnMinVal(function, low, high)

Finds the maximum y value between low and Finds the minimum y value between low and
high. For example: high. For example:

fnmaxval(sinx+cos(x/2)+x,1,3) = 3.463 fnminval(sinx+cos(x/2)+x,2,5) = 2.82


fnmaxval(sinx+cos(x/2)+x,0,1) = 2.735 fnminval(sinx+cos(x/2)+x,0,1) = 0

To find the x value of the local maximum, use the To find the x value of the local minimum, use the
fnmax function fnmin function

MultiDocs Primer - Copyright © 2023 – Efofex – Page 69


fnVal fnZero
fnVal(function, xval) fnZero(function, low, high)

Finds the value of the function at xval. For Finds the first x intercept between low and high.
example: For example:

fnval(sinx+cos(x/2)+x,0.84) = 2.498
fnzero(x2-7,-5,5) = -2.645751
fnzero(x2-7,0,5) = 2.645751
fnzero(x2-7,5,10) = error
Statistical Functions
Statistical functions are designed to operate on data parameters and operate on all possible values of the
parameters at one time. For example, if you define the following data parameter.

$p=randnormal(50,10,12)

$p will contain twelve numbers selected from a distribution with a mean of 50 and a standard deviation of
10. It might contain...

46.92, 65.98, 38.77, 75.58, 39.15, 58.46, 68.3, 65, 47.79, 50.01, 57.12, 59.77

We can use the inline calculator's statistical functions to analyze this data.

{mean($p)} would return 56.070833 and {iqr($p)} would return 18.135

Note that the statistical functions operate on all of the values in the data parameter.

You can also use statistical functions on subsets of a data parameter by using reference ranges.

{mean($p[1,6])} would return 54.143333

If you data is not in a parameter, you can also list all values out manually.

{mean("1,2,4,31")} would return 9.5

MultiDocs Primer - Copyright © 2023 – Efofex – Page 70


Count Freq
count($p) freqs($p)

Finds the count of the values (how many values Returns a list of the frequencies in data parameter
there are) contained in the data parameter $p. $p.
This is equivalent to $p[0]
freq($p[ref])
count($p,val)
Finds the frequency value of a frequency pair. It is
Counts how many of instances of val there are in normally used with data parameters.
the data parameter $p.
For example if you have created the following
DataValue data parameter.
datavalue($p[ref])
$f=data(10:2,11:5,12:4,13,14:2,15:2)
Finds the data value of a frequency pair. It is
normally used with data parameters. You can access the frequency value of one of the
data points.
For example if you have created the following
data parameter. freq($f[3]) will return 4

$f=data(10:2,11:5,12:4,13,14:2,15:2) You can also use the freq command with grouped
data.
You can access the data value of one of the data
points. For example if you have created the following
data parameter.
datavalue($f[3]) will return 12
$g=data(10~20:2,20~30:6,30~40:4,40~50:2)

You can access the frequency value of one of the


data points.

freq($g[2]) will return 6

FreqTable
freqtable($p)

Returns a new data parameter which contains a


frequency table for the data in $p.

For example, if you have a data parameter:

$p = data(3, 2, 5, 4, 3, 1, 6, 3, 2, 5, 4, 6, 1, 2, 3, 6,
5, 3, 3, 2, 4)

freqtable($p) will return a new data parameter

$f = data(1:2, 2:4, 3:6, 4:3, 5:2, 6:3)

MultiDocs Primer - Copyright © 2023 – Efofex – Page 71


Group Max
group($p) max($p)

Automatically groups data stored in $p into Finds the maximum value in the data parameter
groups. This command takes raw data $p

$p=data(12.3, 13.5, 16.8 ... 39.9, 42.2) For example, if $p is the following data parameter.

and groups it into group definitions such as this. $p=data(4,8,1,3,9,6,4,3,7,8)

$g=group($p) max($p) will return 9.

10~20:3, 20~30:5, 30~40:6, 40~50:1 MaxRef


maxref($p)
GroupDefn
groupdefns($p) Finds the reference of the maximum value in the
data parameter $p.
Returns a list of the group definitions for the data
parameter $p. For example, if $p is the following data parameter.

groupdefn($p[ref]) $p=data(4,8,1,3,9,6,4,3,7,8)

Finds the group definition of a group data point. It maxref($p) will return 5 as the maximum value (9)
is normally used with data parameters. is the 5th value in the parameter.

For example if you have created the following Mean


data parameter. mean($p)

$g=data(10~20:2,20~30:6,30~40:4,40~50:2) Finds the mean of the values contained in the


data parameter $p
You can access the group definition of one of the
data points. Median
median($p)
groupdefn($g[3]) will return 30~40
Finds the median of the values contained in the
IQR data parameter $p
iqr($p)
Min
Finds the inter-quartile range of the values min($p)
contained in the data parameter $p
Finds the minimum value in the data parameter
LQ $p
lq($p)
For example, if $p is the following data parameter.
Finds the lower quartile of the values contained in
the data parameter $p $p=data(4,8,1,3,9,6,4,3,7,8)

min($p) will return 1.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 72


MinRef RegIntercept
minref($p) regintercept($p)

Finds the reference of the minimum value in the Finds the y intercept of the regression line for the
data parameter $p. bivariate data parameter $p.

For example, if $p is the following data parameter. You can create a bivariate data parameter either
explicitly using this notation.
$p=data(4,8,1,3,9,6,4,3,7,8)
$b=data((11,12)(15,19)(21,28)(13.2,19.4),(8,16))
minref($p) will return 3 as the minimum value (1)
is the 3rd value in the parameter. or through the use of a randbivariate data
parameter
Mode
mode($p) RegSlope
regslope($p)
Finds the mode of the values contained in the
data parameter $p. Finds the slope of the regression line for the
bivariate data parameter $p.
 The mode command only returns a value if
there is a unique mode. It does not return a You can create a bivariate data parameter either
value for bimodal data. explicitly using this notation.
 The mode command only returns a value for
numerical data. $b=data((11,12)(15,19)(21,28)(13.2,19.4),(8,16))

MPA or through the use of a randbivariate data


mpa($p,ref,cycle) parameter

Finds a moving point average from a data set. RegR


Typically you would use the MPA command on a regr($p)
TimeSeries parameter.
Finds the correlation coefficient for the bivariate
For example data parameter $p.
mpa($p,6,4)
You can create a bivariate data parameter either
The example command finds the MPA of the sixth explicitly using this notation.
data point in the $p parameter assuming a cycle
length of 4. $b=data((11,12)(15,19)(21,28)(13.2,19.4),(8,16))

Range or through the use of a randbivariate data


range($p) parameter

Finds the range (max - min) of the values SD


contained in the data parameter $p. sd($p)

Finds the sample standard deviation of the values


contained in the data parameter $p

MultiDocs Primer - Copyright © 2023 – Efofex – Page 73


SDP Variance
sdp($p) variance($p)

Finds the population standard deviation of the Finds the variance of the values contained in the
values contained in the data parameter $p data parameter $p

Sum XValue
sum($p) xvalue($p[ref])

Finds the sum of the values contained in the data Finds the x value of a bivariate data point. It is
parameter $p normally used with data parameters.

ToBivariate For example if you have created the following


tobivariate($x,$y) data parameter.

Combines two separate data parameters into a $b=data((11,12)(15,19)(21,28)(13.2,19.4),(8,16))


bivariate parameter. The number of data points in
$x and $y must match. You can access the x value of one of the data
points.
If $x=data(1,3,5,6,7,7,9)
xvalue($b[3]) will return 21
and
YValue
$y=data(7,6,6,4,3,2,2) yvalue($p[ref])

$b=toBivariate($x,$y) Finds the x value of a bivariate data point. It is


normally used with data parameters.
=> $b = (1,7) (3,6) (5,6) (6,4) (7,3) (7,2) (9,2)
For example if you have created the following
You can calculate correlation coefficient and data parameter.
regression lines on bivariate parameters using
regr(), regslope() and regintercept(). $b=data((11,12)(15,19)(21,28)(13.2,19.4),(8,16))

UQ You can access the y value of one of the data


uq($p) points.

Finds the upper quartile of the values contained in yvalue($b[3]) will return 28
the data parameter $p

MultiDocs Primer - Copyright © 2023 – Efofex – Page 74


Data Parameter Functions
Complement MostCommon
complement($a,$b) mostcommon($p)

This returns a new data parameter that contains This returns a new data parameter containing the
the elements of $a that are not in $b. most common values of $p.

Consonants For example:


consonants($a)
$v = explode("ENGINEER")
This returns a new data parameter that contains $mc = mostcommon($v)
the consonants in the $a parameter.
$mc will contain "E"
In normal usage, the $a parameter will be an
explode parameter If there are some values which are equally "most
common", all values will be included in the result
$a = explode("RATATOUILLE")
$v = explode("OCEANOGRAPHER")
this is equivalent to defining $a as $mc = mostcommon($v)

$a = $mc will contain "O, E, A, R"


data("R","A","T","A","T","O","U","I","L","L","E")
Sort
{consonants($a)} will return "R, T, T, L, L" sort($p)

 The consonants command will often be This returns a new data parameter with the values
combined with unique or sort of $p sorted in ascending order.
 The consonants command understands English
and Greek consonants Union
 y is not treated as a vowel OR consonant with union($a,$b)
this command.
This returns a new data parameter that contains
Intersection the union of $a and $b.
intersection($a,$b)
Unique
This returns a new data parameter that contains unique($a)
the intersection of $a and $b.
This returns a new data parameter that contains
Join the unique elements of $a.
join($a,$b)
If $a= "5, 6, 2, 8, 2, 6, 1, 7, 2, 2, 1, 5" unique($a)
This returns a new data parameter that contains will contain "5, 6, 2, 8, 1, 7"
the values of $a and $b.
You will often combine unique with sort

sort(unique($a))

will return "1, 2, 5, 6, 7, 8"

MultiDocs Primer - Copyright © 2023 – Efofex – Page 75


Vowels
vowels($a)

This returns a new data parameter that contains


the vowels in the $a parameter.

In normal usage, the $a parameter will be an


explode parameter

$a = explode("RATATOUILLE")

this is equivalent to defining $a as

$a =
data("R","A","T","A","T","O","U","I","L","L","E")

{vowel($a)} will return "A, A, O, U, I, E"

 The vowel command will often be combined


with unique or sort
 The vowel command understands English and
Greek vowels
 y is not treated as a vowel OR consonant with
this command.

Algebraic Analysis Functions


Compare and CompareEq QuadL
Compare and compareEq compare two values and QuadL(a, b, c)
returns a comparison operator like >, < or =.
Finds the left (low) x intercept of the quadratic
compare(34,45) returns < ax2+bx+c.
compare(45.44443,3/4) returns >
compare(54,54) returns = quadl(1,2,-5) = -3.44949
quadl(1,0,5) = error
These allow you to create expressions which read
correctly. To find the right (high) x intercept, use the quadr
function
The compareEq command operates in exactly the
same way as compare, but will return ≥ and ≤ QuadR
instead of > and <. QuadR(a, b, c)

compareeq(34,45) returns ≤ Finds the right (high) x intercept of the quadratic


compareeq(45.44443,3/4) returns ≥ ax2+bx+c.
compareeq(54,54) returns =
quadr(1,2,-5) = -3.44949
quadr(1,0,5) = error

To find the left (low) x intercept, use the quadl


function

MultiDocs Primer - Copyright © 2023 – Efofex – Page 76


Discriminate

discriminate(a, b, c)

Finds the discriminate of the quadratic ax2+bx+c.

discriminate(1,2,-5) = 24
discriminate(1,0,5) = -20

FX Library
FX Library is a constantly growing collection of parametized questions published by Efofex. As a subscriber,
you can download any of the material and freely include it in your tests and exams. Most of the documents
we publish will contain questions with hundreds or thousands of variations available.

To access FX Library, visit our website

FX Library is constantly evolving so it's look may change. At the moment it looks like this.

FX Library is organised into modules of questions on a topic. The FX Library materials are constantly growing
and provide two benefits:

1. They are a direct source of parametized materials that you can include into your tests, exams and
worksheets.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 77


2. They provide exemplar material that you can use as a basis for your own production of parametized
materials.

Once you have found a parametized question that suits your needs, just copy the question from the source
document and paste it into your document. It is a good idea to copy any provided solutions over to your
document at the same time. Providing you only want to use the question ONCE in your new document, that
is all you need to do. If you are happy with the question as you have found it, you can just move on. If you
want to edit the question or regenerate it, you will need to use the Efofex toolbar in Word. If you want to
use the same question multiple times, you will need to reparametize the question each time you copy it.

Converting Classic Mode Graphics


Converting old Classic Mode documents can be easy or hard - depending on the age of the graphics. You
must be on a Windows machine to convert Classic Mode graphics.

New Graphics/Equations
 Make sure that you are on a Windows machine. Only Windows machines can access the data behind
Classic Mode graphics.
 Make sure that any Efofex programs are CLOSED on your computer.
 Load your document into Word
 Save your document in the latest Word format available. You cannot convert documents which are in
"compatibility mode".
 Push the Convert Classic Mode button
 Check the quality of the conversion

Old Graphics/Equations
Some schools have used Efofex products for over thirty years and have built up a corpus of documents,
some of which contain graphics which were created thirty years ago and have never been edited since.
These graphics can cause issues with the conversion process.

While the process is EXACTLY the same as for newer graphics, there are a number of caveats.

 Older graphics are likely to look slightly different when loaded into the latest versions. The fonts may have
changed size or something has been moved slightly. The older the graphic, the more likely that you will
see some changes. You need to check your graphics carefully to ensure that they are still valid.
 Some very old graphics/equations cannot be opened at all in the latest versions. This will affect graphics
that were created prior to about 1992. The only way to access these graphics is to load an old version of
FX Draw (usually FX Draw 4 is the best) onto your computer and edit the graphics in that version of FX
Draw BEFORE conversion. FX Draw 4 could load these very old graphics and will save them in a format that
the current version can use.
 As you are converting graphics, sometimes you will find it easier to just recreate the graphic in the latest
version of FX Draw.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 78


Check The Graphics
I know that we have already said this but it is worth repeating!

Upgrading Modern Mode Graphics


The new system integrates Modern Mode graphics into Word in a much more intimate way but many
teachers, particularly those on Mac machines, will have created documents containing older Modern Mode
graphics. These graphics need to be upgraded to fully support the new features.

 You can upgrade Modern Mode graphics on either Windows or Mac machines. The process will run fastest
if you perform the upgrade on the same account as the graphics were created on.
 Open any Efofex programs which may have graphics in the document. On most documents, opening just
FX Draw will be sufficient.
 Load your document into Word
 Save your document in the latest Word format available. You cannot convert documents which are in
"compatibility mode".
 Push the Upgrade Modern Graphics button
 Check the quality of the conversion

As the Modern Mode system is much newer than Classic Mode, most graphics will be upgraded successfully.
Even so, it is vital that you check the quality and placement of the upgraded graphics.

Changing Fonts
When you are using parametized materials from an external source (like our FX Library), you may not agree
with our choice of fonts. The MultiDocs toolbar gives you the option of changing the font for ALL Efofex
MultiDocs objects in a document.

1. Go to the Expert version of the toolbar.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 79


2. Push the Change Fonts option. This will load the font style selection window.

A. Select one of your standard font styles


B. Or edit one of your font styles.
C. Or create a specific font style manually.
D. You can also select if the new font style is applied to FX Equation equations and/or FX Draw
drawings.

Once you have selected your font style, this will be applied to ALL the equations/drawings in your
document. This can take some time for large documents (equivalent to regenerating all).

Working With Mixed Mode Documents


Documents in schools can often be developed over many years, by many different teachers. Some may
contain both old Classic Mode graphics and newer MultiDocs graphics. For these documents, you can use
both the Convert and Upgrade systems to move all graphics to the newest system.

MultiDocs Primer - Copyright © 2023 – Efofex – Page 80

You might also like