6. To configure

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:

  1. 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.

  2. Place the cursor where you want to insert the parameter.

  3. Click on Links & ReferencesVariable reference.

  4. Set the identifier (To identify) of the variable, in the black background of the element.

6.1. To calculate

A calculation can be inserted with the feature InlineCalculation.

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.

[Warning]

A mathematical formula can be invalid if your document is in this specific case:

  • 1 Formula A

  • 1 Formula B = it refers to the result of formula A

  • 1 Formula C = it refers to the result of formula B

If Formula C contains an error, when changing Formula A, Formula C will not be valid (everything is recalculated when changing Formula A).

[Important]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 if necessary.

6.1.1. Syntax

When writing the formula, the numeric constants must be written in the imperial format (the decimal point must be ".").

6.1.1.1. Operators
  • +: Addition

  • -: Subtraction

  • *: Multiplication

  • /: Division

  • %: Modulo

6.1.1.2. Functions and constants

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.


[Note]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

abs(x)

Returns the absolute value of a number.

acos(x)

Returns the cosine arc of a number.

acosh(x)

Returns the hyperbolic cosine arc of a number.

asin(x)

Returns the sine arc of a number.

asinh(x)

Returns the hyperbolic sine arc of a number.

atan(x)

Returns the tangent arc of a number.

atanh(x)

Returns the hyperbolic tangent arc of a number.

atan2(y, x)

Returns the tangent arc of the quotient of its arguments.

cbrt(x)

Returns the cubic root of a number.

ceil(x)

Returns the smallest integer greater than or equal to the value passed as a parameter.

clz32(x)

Returns the number of zeros that prefix a 32-bit integer.

cos(x)

Returns the cosine of a number.

cosh(x)

Returns the hyperbolic cosine of a number.

exp(x)

Returns the exponential of a number (i.e. Enumbr) with E the Euler constant (2.718...).

expm1(x)

Returns the result of 1 minus the exponential of a number.

floor(x)

Returns the largest integer less than or equal to the value passed as a parameter.

fround(x)

Returns the 32-bit floating point number closest to the argument.

hypot([x[,y[,...]]])

Returns the square root of the sum of the squares of the arguments.

imul(x, y)

Returns the result of 32-bit integer multiplication.

log(x)

Returns the natural logarithm (lodge) of a number.

log1p(x)

Returns the natural logarithm of 1 + a number.

log10(x)

Returns the logarithm at base 10 of a number.

log2(x)

Returns the logarithm at base 2 of a number.

max([x [, y [, ...]]])

Returns the largest value of a list of numbers.

min([x [, y [, ...]]])

Returns the smallest value of a list of numbers.

pow(x, y)

Returns the calculation of x to the power y (x is the base and y is the exponent).

random()

Returns a pseudo-random number between 0 (inclusive) and 1 (excluded).

round(x)

Returns the rounding of a number.

sign(x)

Returns the sign of a number, indicating whether it is positive, negative, or zero.

sin(x)

Returns the sine of a number.

sinh(x)

Returns the hyperbolic sine of a number.

sqrt(x)

Returns the square root of a number.

tan(x)

Returns the tangent of a number.

tanh(x)

Returns the hyperbolic tangent of a number.

trunc(x)

Returns the integer part of a number (the decimal part is removed).

6.1.1.3. Variables and functions in a table

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)
6.1.1.4. Examples
cos(PI)

Result: -1.

cos(PI) + myIdentifier

Result: 0 if the variable identified by myIdentifier contains text "1".

6.2. Choose the orientation of the content on the page

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:

  1. Select the item in the editor.

  2. Place the desired value in the Remap In the list of attributes:

    Figure 11. Orientation settings for a section

    Orientation settings for a section

    The value syntax for the remap

    • landscape or a4; landscape;

    • a4; portrait;

    • a3; portrait;

    • a3;landscape.

[Important]

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.

[Tip]

You can combine this setting with the configuration of the style sheet in portrait/landscape mode in the menu Page Dimensions.