From 0f1c6c17628c4fec2d665071baf14e31323d22d9 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Tue, 22 Apr 2014 14:12:37 +0100 Subject: Document matching by style name --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) 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`: -- cgit v1.2.3