A parameter allows using a value at different places in a document.
The value of the parameter is used when publishing: configuring content allows to maximize their reuse.
To insert a parameter:
Specify an identifier on the element containing the text to reuse. This is often an element of the document header such as a product name, version number, etc.
Place the cursor where you want to insert the parameter.
Click on
→ .Set the identifier (To identify) of the variable, in the black background of the element.
A calculation can be inserted with the feature
→ .To edit the formula, click on the “Σ” sign.
Content of the dialog box
You may assign an identifier to this calculation. This will potentially allow you to reuse its result in another calculation.
A clickable list of variables that can be referenced in the formula.
For an element to appear in this list, the following conditions must be met:
The element must contain a number. Note that for greater flexibility, non-numeric characters are ignored. As an example, text “12 €” is identified as the number 12.
The decimal separator (if present) must correspond to the language declared on the root element of the document (for example the comma for French).
The element must have an identifier (just declare it as a reusable element for that).
A text field to enter the calculation formula.
Below this text field there is a button for testing the formula.
A field for specifying the number of decimal units for the result.
A mathematical formula can be invalid if your document is in this specific case:
If Formula C contains an error, when changing Formula A, Formula C will not be valid (everything is recalculated when changing Formula A). |
Update calculations | |
---|---|
Formulas are evaluated in real time as the base numbers are being changed in the document. Use the icon to refresh the document |
When writing the formula, the numeric constants must be written in the imperial format (the decimal point must be ".").
+
: Addition
-
: Subtraction
*
: Multiplication
/
: Division
%
: Modulo
Table 2. Constants
Constant |
Description |
---|---|
E |
Euler's number, the base of natural logarithms, about 2.718. |
LN2 | Natural logarithm of 2, approximately 0.693. |
LN10 | Natural logarithm of 10, approximately 2.302. |
LOG2E | Base logarithm 2 of E, approximately 1.442. |
LOG10E |
Base 10 e logarithm, about 0.434. |
PI |
Quotient of the circumference of a circle by its diameter, about 3.14159. |
SQRT1_2 |
Square root of 1/2; equivalent of 1 on the square root of 2, about 0.707. |
SQRT2 |
Square root of 2, about 1.414. |
Precision | |
---|---|
The precision of mathematical functions depends on implementation. This means that different browsers may provide different results. One can even have a single JavaScript engine that, on different architectures and/or operating systems, provides different results. |
Functions
Returns the absolute value of a number.
Returns the cosine arc of a number.
Returns the hyperbolic cosine arc of a number.
Returns the sine arc of a number.
Returns the hyperbolic sine arc of a number.
Returns the tangent arc of a number.
Returns the hyperbolic tangent arc of a number.
Returns the tangent arc of the quotient of its arguments.
Returns the cubic root of a number.
Returns the smallest integer greater than or equal to the value passed as a parameter.
Returns the number of zeros that prefix a 32-bit integer.
Returns the cosine of a number.
Returns the hyperbolic cosine of a number.
Returns the exponential of a number (i.e. Enumbr) with E the Euler constant (2.718...).
Returns the result of 1 minus the exponential of a number.
Returns the largest integer less than or equal to the value passed as a parameter.
Returns the 32-bit floating point number closest to the argument.
Returns the square root of the sum of the squares of the arguments.
Returns the result of 32-bit integer multiplication.
Returns the natural logarithm (lodge) of a number.
Returns the natural logarithm of 1 + a number.
Returns the logarithm at base 10 of a number.
Returns the logarithm at base 2 of a number.
Returns the largest value of a list of numbers.
Returns the smallest value of a list of numbers.
Returns the calculation of x to the power y (x is the base and y is the exponent).
Returns a pseudo-random number between 0 (inclusive) and 1 (excluded).
Returns the rounding of a number.
Returns the sign of a number, indicating whether it is positive, negative, or zero.
Returns the sine of a number.
Returns the hyperbolic sine of a number.
Returns the square root of a number.
Returns the tangent of a number.
Returns the hyperbolic tangent of a number.
Returns the integer part of a number (the decimal part is removed).
If a calculation is inserted into an array, its formula can reference the numerical values present in the array. The cells in the table are identified by their coordinates. Columns are identified by capital letters. Lines are identified by numbers.
Click on the top left icon to display coordinates of cells.
For example, to add 1 to the number in the cell in the third column, second row:
C2 + 1
To obtain the square root of the number contained in the cell of the fourth column, second row:
sqrt(D2)
Sum function. The function sum (sum
) has as input coordinates of the first cell and the ones of the last cell, separated by ":". Examples:
sum(B2:B13)
sum(B3:C4)
cos(PI)
Result: -1
.
cos(PI) + myIdentifier
Result: 0
if the variable identified by myIdentifier
contains text "1".
This setting works for style sheets produced with the PDF Layout Studio PDF Layout Studio.
Types of items that can change orientation:
section
Any block element (table, media, figure, lists) within the structural elements (chapter, appendix, etc.) or within sections
Supported page formats:
A4
A3
Two types of content orientation:
portrait
landscape
To set the orientation of an element:
Select the item in the editor.
Place the desired value in the Remap
In the list of attributes:
The value syntax for the remap
landscape or a4; landscape;
a4; portrait;
a3; portrait;
a3;landscape.
For the very first setup, open the stylesheet in the studio and resave it so that the orientation choice is taken into account for publishing. |
You can combine this setting with the configuration of the style sheet in portrait/landscape mode in the menu . |