textstyle

Purpose

Search for arguments based on paragraph style, taking into account alignment, indentation, and line spacing.

Syntax

textstyle(parameter[, argument])

Arguments

The function takes one mandatory argument, which can be a parameter. The presence of the parameter is mandatory, while the argument may be absent.

The mandatory condition of the function’s proper work is the specification of a named parameter or a combination of them:

Parameter

Comments

Supported values

alignment

Specifies text alignment in the document.

alignment:=right — right-aligned text; alignment:=left — left-aligned text; alignment:=center — centered text; alignment:=justified — justified text (aligned evenly from left to right margins).

indent_left

Left indent (fractions and negative numbers are allowed, the value is measured in the units specified in indent_unit).

indent_left:=1.5 indent_left:=2 indent_left:="-2", etc.

indent_right

Right indent (fractions and negative numbers are allowed, the value is measured in the units specified in indent_unit).

indent_right:=1.5 indent_right:=2, indent_right:="-1.5", etc.

indent_unit

Indentation unit

Accepts the following values: pt/inch/cm/mm (i.e. point/inch/centimeter/millimeter). By default, indent_unit:=cm

spacing_before

Spacing before the paragraph.

spacing_after

Spacing after the paragraph.

spacing_line

Line spacing (fractions are allowed)

spacing_line:=1.5 spacing_line:=2, etc.

spacing_line_unit

The unit of line spacing.

Accepts the following values: pt/lines (i.e. points/lines).

The function works in docx format documents.

Returned Value

Documents matching the query.

Examples

textstyle(alignment:=right, indLeft:=2) finds text with right alignment and left indentation of 2 cm.

textstyle(alignment:=right, indRight:=3, spacingLine:=1.5) finds text with right alignment, a right indent of 3 cm and a line spacing of 1.5 cm.

textstyle(alignment:=right, noun()) finds nouns in right-aligned text.

textstyle(indent_left:="-0.3") finds text with a left indent of -0.3 cm.