From 5957a2f813eedf2a5126a303e400eaf8502516cb Mon Sep 17 00:00:00 2001 From: arnaud-4d Date: Mon, 13 Apr 2026 15:17:01 +0200 Subject: [PATCH] reported changes from reverted PR --- .../4d-write-pro-attributes.md | 8 +++++--- docs/WritePro/commands/command-index.md | 20 +++++++++---------- .../commands/wp-delete-style-sheet.md | 13 ++++++++++-- docs/WritePro/commands/wp-get-style-sheet.md | 6 +++--- docs/WritePro/commands/wp-new-style-sheet.md | 7 ++++--- docs/WritePro/user-legacy/standard-actions.md | 4 ++-- docs/WritePro/user/user-new.md | 10 +++++----- 7 files changed, 40 insertions(+), 28 deletions(-) diff --git a/docs/WritePro/commands-legacy/4d-write-pro-attributes.md b/docs/WritePro/commands-legacy/4d-write-pro-attributes.md index 947649b7c9f0e6..837d2af27d3e24 100644 --- a/docs/WritePro/commands-legacy/4d-write-pro-attributes.md +++ b/docs/WritePro/commands-legacy/4d-write-pro-attributes.md @@ -274,7 +274,7 @@ List attributes are used to configure your lists and set different list item fon | wk list style image | Specifies an image reference as the list item marker in an unordered list. Possible values:
Use wk list style image url if you want to handle pictures through URLs or local URIs. | | wk list style image height | Sets height of image used as list item marker. Possible values:
| | wk list style image url | Image as the list item marker in an unordered list, defined through a URL (string). Possible values:
Use wk list style image if you want to handle list item marker images as picture expressions. | -| wk list style type | Specifies type of ordered or unordered list item marker. Possible values are:
| +| wk list style type | Specifies type of ordered or unordered list item marker. Possible values are:
| ### Margins @@ -456,6 +456,10 @@ Style sheet attributes are used to apply existing style sheet objects to the fol | Constant | Comment | | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| wk list concat string format | Specifies whether the numbering marker of the current level is concatenated with the marker of the previous level.

When set to:
| +| wk list level count | **For hierarchical style sheets:** (Read-only for sub-level style sheet) Total number of levels in the hierarchy. Possible values:

**For non-hierarchical style sheets:** (Read-only) Possible value: 0| +| wk list level index | **For hierarchical style sheets:** (Read-only) Level of the style sheet in the hierarchy. Possible values:

**For non-hierarchical style sheets:** (Read-only) Possible value: 0
**For paragraphs or paragraph ranges:** Level of the hierarchical style sheet applied. Possible values:
| +| wk list root style | (Read-only) Name of the root-level style sheet to which the current style sheet is related. Possible values:
| | wk new line style sheet | Specifies style sheet to use when adding a new line in the paragraph. Possible values:
| | wk style sheet | Specifies current style sheet for the selected element(s). Possible values:
| @@ -515,5 +519,3 @@ Text box attributes are used to handle text boxes inserted or added in the area. | wk style sheet | Specifies current style sheet for the selected element(s). Possible values:
| | wk type | Type of 4D Write Pro object. Possible values: For ranges of cells, columns and rows only: For subsections only: For tabs only, value used in the object for wk tab default or the objects of the collection for wk tabs: | | wk vertical align | Sets vertical alignment of an element. Can be used with characters, paragraphs, pictures, text boxes, tables, table rows, and table columns/cells. Cannot be used with sections or subsections. Possible values: For characters, wk top and wk bottom have the same effect as wk baseline.

For paragraphs, wk baseline, wk superscript and wk subscript have the same effect as wk top.

For tables, table rows, and table columns/cells, only wk top, wk bottom and wk middle values are supported. | - - diff --git a/docs/WritePro/commands/command-index.md b/docs/WritePro/commands/command-index.md index 0a3e7ad603dbc6..df9909f616e29c 100644 --- a/docs/WritePro/commands/command-index.md +++ b/docs/WritePro/commands/command-index.md @@ -9,7 +9,7 @@ title: 4D Write Pro Commands A -[`WP Add picture`](wp-add-picture.md) ***Modified 4D 20 R8*** +[`WP Add picture`](../commands/wp-add-picture) ***Modified 4D 20 R8*** B @@ -27,13 +27,13 @@ title: 4D Write Pro Commands [`WP DELETE PICTURE`](../commands/wp-delete-picture)
[`WP DELETE SECTION`](../commands/wp-delete-section) ***New 4D 20 R7***
[`WP DELETE STYLE SHEET`](../commands/wp-delete-style-sheet) ***Modified 4D 21 R3***
-[`WP DELETE SUBSECTION`](wp-delete-subsection.md) ***Modified 4D 20 R7***
+[`WP DELETE SUBSECTION`](../commands/wp-delete-subsection) ***Modified 4D 20 R7***
[`WP DELETE TEXT BOX`](../commands/wp-delete-text-box) E -[`WP EXPORT DOCUMENT`](wp-export-document.md) **Modified 4D 20 R9**
-[`WP EXPORT VARIABLE`](wp-export-variable.md) **Modified 4D 20 R9** +[`WP EXPORT DOCUMENT`](../commands/wp-export-document) **Modified 4D 20 R9**
+[`WP EXPORT VARIABLE`](../commands/wp-export-variable) **Modified 4D 20 R9** F @@ -44,7 +44,7 @@ title: 4D Write Pro Commands G -[`WP GET ATTRIBUTES`](wp-get-attributes.md) ***Modified 4D 20 R8***
+[`WP GET ATTRIBUTES`](../commands/wp-get-attributes) ***Modified 4D 20 R8***
[`WP Get body`](../commands/wp-get-body)
[`WP GET BOOKMARKS`](../commands/wp-get-bookmarks)
[`WP Get breaks`](../commands/wp-get-breaks)
@@ -68,12 +68,12 @@ title: 4D Write Pro Commands I -[`WP Import document`](wp-import-document.md) ***Modified 4D 20 R8***
+[`WP Import document`](../commands/wp-import-document) ***Modified 4D 20 R8***
[`WP IMPORT STYLE SHEETS`](../commands/wp-import-style-sheets)
-[`WP INSERT BREAK`](wp-insert-break.md) ***Modified 4D 20 R8***
-[`WP Insert document body`](wp-insert-document-body.md) ***Modified 4D 20 R8***
-[`WP INSERT FORMULA`](wp-insert-formula.md) ***Modified 4D 20 R8***
-[`WP INSERT PICTURE`](wp-insert-picture.md) ***Modified 4D 20 R8***
+[`WP INSERT BREAK`](../commands/wp-insert-break) ***Modified 4D 20 R8***
+[`WP Insert document body`](../commands/wp-insert-document-body) ***Modified 4D 20 R8***
+[`WP INSERT FORMULA`](../commands/wp-insert-formula) ***Modified 4D 20 R8***
+[`WP INSERT PICTURE`](../commands/wp-insert-picture) ***Modified 4D 20 R8***
[`WP Insert table`](../commands/wp-insert-table)
[`WP Is font style supported`](../commands/wp-is-font-style-supported) diff --git a/docs/WritePro/commands/wp-delete-style-sheet.md b/docs/WritePro/commands/wp-delete-style-sheet.md index b2808ec67bef99..029919c1f7093d 100644 --- a/docs/WritePro/commands/wp-delete-style-sheet.md +++ b/docs/WritePro/commands/wp-delete-style-sheet.md @@ -24,8 +24,8 @@ displayed_sidebar: docs |Release|Changes| |---|---| -|4D 18|Created| |4D 21 R3|*listLevelIndex* parameter added| +|4D 18|Created| @@ -54,7 +54,16 @@ The command performs no action if the specified level does not exist, or if the **Note**: The default ("Normal") style sheet can not be deleted. -## Example +## Example 1 + +To delete a character style sheet "MyCharStyle": + +```4d +WP DELETE STYLE SHEET(wpArea; "MyCharStyle") +``` + + +## Example 2 The following example deletes the second level of a hierarchical list style sheet: diff --git a/docs/WritePro/commands/wp-get-style-sheet.md b/docs/WritePro/commands/wp-get-style-sheet.md index fe39f3efebff36..75a975d5558ba7 100644 --- a/docs/WritePro/commands/wp-get-style-sheet.md +++ b/docs/WritePro/commands/wp-get-style-sheet.md @@ -23,8 +23,8 @@ displayed_sidebar: docs |Release|Changes| |---|---| -|4D 18|Created| |4D 21 R3|*listLevelIndex* parameter added| +|4D 18|Created| @@ -37,9 +37,9 @@ In *wpDoc*, pass the 4D Write Pro document that contains the style sheet. The *styleSheetName* parameter allows you to specify the name of the style sheet to return. If the style sheet name does not exist in *wpDoc*, an null object is returned. -If the style sheet is part of a hierarchical list style sheet, you can optionally specify the *listLevelIndex* parameter to retrieve a specific level of the hierarchy. +If the *styleSheetName* is the root-level name of a hierarchical list style sheet, you can optionally specify the *listLevelIndex* parameter to retrieve a specific level of the hierarchy. -* *listLevelIndex* represents the level of the style sheet in the hierarchy (1 = root level, 2 = first sub-level, etc.). +* *listLevelIndex* represents the level of the style sheet in the hierarchy (1 = root-level, 2 = first sub-level, etc.). * If the parameter is omitted and the style sheet is hierarchical, the root-level style sheet is returned. * If the requested level does not exist, a null object is returned. * If the style sheet is not a hierarchical list style sheet and *listLevelIndex* is greater than 1, a null object is returned. diff --git a/docs/WritePro/commands/wp-new-style-sheet.md b/docs/WritePro/commands/wp-new-style-sheet.md index 4dfa6a35a36ed9..e59687881e1fe8 100644 --- a/docs/WritePro/commands/wp-new-style-sheet.md +++ b/docs/WritePro/commands/wp-new-style-sheet.md @@ -68,7 +68,8 @@ The following predefined values are applied: * `wk list style type` is set to `wk decimal` * `wk list level index` is automatically assigned (1 for the root level, incremented for sub-levels) * `wk list level count` is set to the specified value for all levels -* `wk margin left` is automatically calculated (0.75 cm × level index) +* `wk margin left` is automatically calculated (0.75 cm × level index or 0.25 inches * level index, depending on current layout unit): so offset may be different depending if layout unit is metric or inches (for better alignment on default with current Write ruler graduations) + If the parameter is omitted or set to 0, a standard (non-list) paragraph style sheet is created. @@ -126,5 +127,5 @@ Result: [Style sheets](../user-legacy/stylesheets.md) [WP DELETE STYLE SHEET](../WritePro/commands/wp-delete-style-sheet) [WP Get style sheet](../WritePro/commands/wp-get-style-sheet) -[WP Get style sheets](../commands/wp-get-style-sheets) -[WP IMPORT STYLE SHEETS](../commands/wp-import-style-sheets.md) +[WP Get style sheets](../WritePro/commands/wp-get-style-sheets) +[WP IMPORT STYLE SHEETS](../WritePro/commands/wp-import-style-sheets) diff --git a/docs/WritePro/user-legacy/standard-actions.md b/docs/WritePro/user-legacy/standard-actions.md index 25e0fe46c91816..2f26975c6c8d95 100644 --- a/docs/WritePro/user-legacy/standard-actions.md +++ b/docs/WritePro/user-legacy/standard-actions.md @@ -105,8 +105,8 @@ The following standard actions are available with 4D Write Pro areas. | keepWithNext | keepWithNext | Paragraph | Links a paragraph with the next so that they cannot be separated by automatic page or column breaks. If applied to the last paragraph of the last cell in a table, the last row of the table is linked to the following paragraph. | | lineHeight | lineHeight?value={ \| } | Paragraph, Submenu | Paragraph line height. Ex: lineHeight?value=120% | | layer | {image \| textBox}/layer | Submenu | Default submenu with layering actions for images or text boxes | -| listConcatString | listConcatStringFormat | Paragraph | Determines whether the numbering marker of the current level should be concatenated with the one of the previous level or not.| -| listLevelAppend | listLevelDec | Paragraph | Creates a new hierarchical list style sheet of a next level and applies it to the selected paragraph.| +| listConcatStringFormat | listConcatStringFormat | Paragraph | Determines whether the numbering marker of the current level should be concatenated with the one of the previous level or not.| +| listLevelAppend | listLevelAppend | Paragraph | Creates a new hierarchical list style sheet of a next level and applies it to the selected paragraph.| | listLevelDec | listLevelDec | Paragraph | Applies the hierarchical list style sheet of the previous level to the selected paragraph.| | listLevelInc | listLevelInc | Paragraph | Applies the hierarchical list style sheet of the next level to the selected paragraph.| | listNumberFormat | listNumberFormat?value=endDot\|endParenthesis\|doubleParenthesis | Paragraph, Submenu | Determines which delimiter to add to the numbering marker: an ending dot, an ending parenthesis, or double parenthesis (“1.”, “1)”, “(1)” | diff --git a/docs/WritePro/user/user-new.md b/docs/WritePro/user/user-new.md index 4718c49d78cae6..0db04f1ad883ee 100644 --- a/docs/WritePro/user/user-new.md +++ b/docs/WritePro/user/user-new.md @@ -44,13 +44,13 @@ When a new sub-level is created, the level numbering restarts at 1. When you add ![](../../assets/en/WritePro/multilevel-lists.png) -Multi-level lists are created by applying a hierarchical list style sheet to a paragraph using [WP SET ATTRIBUTE](../commands/wp-set-attributes.md). +Multi-level lists are created with command [WP New style sheet](../commands/wp-new-style-sheet.md) and can be applied to a paragraph using [WP SET ATTRIBUTE](../commands/wp-set-attributes.md). Multi-level lists can be managed using: -* paragraph [style sheet attributes](../commands-legacy/4d-write-pro-attributes.md#style-sheets) (such as `wk list level index`, `wk list level count`, and `wk list concat string format`) +* paragraph [style sheet attributes](../commands/4d-write-pro-attributes.md#style-sheets) (such as `wk list level index`, `wk list level count`, and `wk list concat string format`) * dedicated [standard actions](../user-legacy/standard-actions.md) for level management (`listLevelAppend`, `listLevelInc`, `listLevelDec`) -* dedicated standard actions for numbering marker management (`listConcatString`, `listNumberFormat`). +* dedicated standard actions for numbering marker management (`listConcatStringFormat`, `listNumberFormat`). :::tip Related blog post @@ -68,7 +68,7 @@ Hierarchical list style sheets are used to create [multi-level lists](using-a-4d To create a hierarchical list style sheet, use [WP New style sheet](../commands/wp-new-style-sheet.md) and pass in *listLevelCount* the desired number of levels. You then define a hierarchy of related paragraph style sheets: one **root-level** style sheet and one or more **sub-level** style sheets linked to it. Each level represents a depth in the list (level 1, level 2, level 3, etc.) and is automatically named "root-level name + lvl + index", for example "Mylist lvl 2". -To define and manage the hierarchy, the paragraph style sheet object can be customized using [style sheet attributes](../commands-legacy/4d-write-pro-attributes.md#style-sheets). +To customize hierarchical list styles, the paragraph style sheet object can be customized using [style sheet attributes](../commands/4d-write-pro-attributes.md#style-sheets). Hierarchical list style sheets are fully supported by the following commands: [`WP Get style sheet`](../commands/wp-get-style-sheet.md), [`WP SET ATTRIBUTES`](../commands/wp-set-attributes.md), [`WP DELETE STYLE SHEET`](../commands/wp-delete-style-sheet.md). @@ -116,7 +116,7 @@ result: When created, hierarchical list style sheets use predefined values: -* `wk margin left` = 0.75 cm × (number of previous levels) +* `wk margin left` = 0.75 cm \* (number of previous levels) or 0.25 inches \* (number of previous levels), depending on current layout unit * `wk list type` = `wk decimal` * `wk name` is derived from the root style sheet name (Read-only for sub-levels) * `wk list level count` is set to the specified value for all levels