aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2014-04-22 14:12:37 +0100
committerMichael Williamson <mike@zwobble.org>2014-04-22 14:12:37 +0100
commit0f1c6c17628c4fec2d665071baf14e31323d22d9 (patch)
treec9e9c55af1f35d4f23ff7da7618e7e69ef220bd9
parent5c96af60296441d781a78c1a0b2ee264f7b126f5 (diff)
Document matching by style name
-rw-r--r--README.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/README.md b/README.md
index 2ff6898..e6c6983 100644
--- a/README.md
+++ b/README.md
@@ -273,6 +273,17 @@ Match any run:
r
```
+To match a paragraph or run with a specific style,
+you can reference the style by name.
+This is the style name that is displayed in Microsoft Word or LibreOffice.
+For instance, to match a paragraph with the style name `Heading 1`:
+
+```
+p[name='Heading1']
+```
+
+Styles can also be referenced by style ID.
+This is the ID used internally in the .docx file.
To match a paragraph or run with a specific style ID,
append a dot followed by the style ID.
For instance, to match a paragraph with the style `Heading1`: