### WML Bookmark Start Element Example
Source: https://github.com/kaisery/ooxmlsdk/blob/main/docs/specs/wml_bookmarks_hyperlinks.md
Illustrates the basic structure of a `w:bookmarkStart` element, including its required `w:id` and `w:name` attributes. This element marks the beginning of a named range in a Word document.
```xml
```
--------------------------------
### WML Field Instruction Text Example
Source: https://github.com/kaisery/ooxmlsdk/blob/main/docs/specs/wml_fields.md
Shows an example of the `` element within a run, used to carry the field instruction string. Ensure `xml:space="preserve"` is used for instructions with leading/trailing spaces.
```xml
PAGE \* MERGEFORMAT
```
--------------------------------
### FILENAME Field Instruction Example
Source: https://github.com/kaisery/ooxmlsdk/blob/main/docs/specs/wml_fields.md
Illustrates the FILENAME field instruction with the \p switch to include the full path.
```plaintext
FILENAME \p
```
--------------------------------
### REF Field Instruction Example
Source: https://github.com/kaisery/ooxmlsdk/blob/main/docs/specs/wml_fields.md
Shows the REF field instruction for cross-referencing a bookmark.
```plaintext
REF bookmark1
```
--------------------------------
### Table Width Examples
Source: https://github.com/kaisery/ooxmlsdk/blob/main/docs/specs/wml_tables.md
Illustrates different ways to specify table widths using CT_TblWidth with various units like dxa, pct, and auto.
```xml
```
```xml
```
```xml
```
```xml
```
--------------------------------
### Minimal SpreadsheetML StyleSheet Example
Source: https://github.com/kaisery/ooxmlsdk/blob/main/docs/specs/sml_formatting.md
A complete, minimal example of a SpreadsheetML stylesheet, including fonts, fills, borders, cellStyleXfs, and cellXfs. This structure is essential for a valid workbook.
```xml
```
--------------------------------
### HYPERLINK Field Instruction Example
Source: https://github.com/kaisery/ooxmlsdk/blob/main/docs/specs/wml_fields.md
Demonstrates the HYPERLINK field instruction for creating an external hyperlink.
```plaintext
HYPERLINK "https://example.com"
```
--------------------------------
### DATE Field Instruction Example
Source: https://github.com/kaisery/ooxmlsdk/blob/main/docs/specs/wml_fields.md
Shows how to use the DATE field instruction with a custom format switch. The \@ switch specifies the date picture.
```plaintext
DATE \@ "MMMM d, yyyy"
```
--------------------------------
### SEQ Field Instruction Example
Source: https://github.com/kaisery/ooxmlsdk/blob/main/docs/specs/wml_fields.md
Illustrates the SEQ field instruction for creating sequential counters, with \* ARABIC specifying the numbering format.
```plaintext
SEQ Figure \* ARABIC
```
--------------------------------
### PAGEREF Field Instruction Example
Source: https://github.com/kaisery/ooxmlsdk/blob/main/docs/specs/wml_fields.md
Illustrates the PAGEREF field instruction to get the page number of a bookmark, using the \h switch to create a hyperlink.
```plaintext
PAGEREF bookmark1 \h
```
--------------------------------
### Run Performance Benches
Source: https://github.com/kaisery/ooxmlsdk/blob/main/AGENTS.md
Execute package and XML performance benchmarks for the 'ooxmlsdk-test' package.
```bash
cargo bench -p ooxmlsdk-test --bench perf
```
--------------------------------
### Run Full Test Suite
Source: https://github.com/kaisery/ooxmlsdk/blob/main/AGENTS.md
Execute the default full test lane for the entire workspace.
```bash
cargo test --workspace
```
--------------------------------
### Concrete Numbering Instance
Source: https://github.com/kaisery/ooxmlsdk/blob/main/docs/specs/wml_numbering.md
An example of a `` element binding an abstract number definition to a specific list instance with a unique ID. It can override level settings like the starting value.
```xml
```
--------------------------------
### Start Conditions for PML Animations
Source: https://github.com/kaisery/ooxmlsdk/blob/main/docs/specs/pml_animations.md
Defines when an animation or effect should start. Use 'indefin' to wait for a mouse click, '0' to start immediately after the previous element, or a specific millisecond value to delay the start.
```xml
```
--------------------------------
### Single-Cell Array Formula Example
Source: https://github.com/kaisery/ooxmlsdk/blob/main/docs/specs/sml_formulas.md
An example of a single-cell array formula, where the `ref` attribute specifies the cell itself and the formula operates over ranges.
```xml
SUM(B1:B3*C1:C3)
32
```
--------------------------------
### Page Numbering Format and Start
Source: https://github.com/kaisery/ooxmlsdk/blob/main/docs/specs/wml_headers_footers.md
Use this element to define the numbering format (e.g., decimal, Roman numerals) and the starting page number for a section.
```xml
```
--------------------------------
### Point Bookmark Placement
Source: https://github.com/kaisery/ooxmlsdk/blob/main/docs/specs/wml_bookmarks_hyperlinks.md
Creates a zero-width bookmark at a specific insertion point by placing 'bookmarkStart' and 'bookmarkEnd' adjacently.
```xml
Bookmark is at the start of this paragraph.
```
--------------------------------
### Format All Code
Source: https://github.com/kaisery/ooxmlsdk/blob/main/docs/specs/particle.md
Apply code formatting to all files within the project using cargo fmt.
```bash
cargo fmt --all
```
--------------------------------
### Custom XML Data Store Item Payload Example
Source: https://github.com/kaisery/ooxmlsdk/blob/main/docs/specs/wml_custom_xml.md
An example of the XML payload for a custom XML data store item, conforming to a specified schema.
```xml
Alicealice@example.com
```
--------------------------------
### Starting a New Numbered List from 1
Source: https://github.com/kaisery/ooxmlsdk/blob/main/docs/specs/wml_numbering.md
Use with to begin a new numbered list from 1, independent of the main list definition.
```xml
```
--------------------------------
### Level Text Format Examples
Source: https://github.com/kaisery/ooxmlsdk/blob/main/docs/specs/wml_numbering.md
Examples of format strings used in `` to define numbering appearance. `%N` is replaced by the counter value at level N-1.
```plaintext
%1. → "1.", "2.", "3.", … (decimal, level 0)
%1.%2 → "1.1", "1.2", "2.1", … (two-level decimal)
(%1) → "(1)", "(2)", … (decimal with parens)
%1.%2.%3. → "1.1.1.", "1.1.2.", … (three-level)
• → "•", "•", "•" (bullet; numFmt=bullet)
```
--------------------------------
### Excel Data Table Formula Example
Source: https://github.com/kaisery/ooxmlsdk/blob/main/docs/specs/sml_formulas.md
This is an example of an Excel data table formula, which is generated by Excel and not directly editable. It includes key attributes like dt2D, dtr, r1, r2, del1, and del2.
```xml
SUM(A1:A10)
```
--------------------------------
### Example of mc:AlternateContent with mc:Choice and mc:Fallback
Source: https://github.com/kaisery/ooxmlsdk/blob/main/docs/specs/mce.md
Demonstrates how mc:AlternateContent uses mc:Choice elements with 'Requires' attributes to select content based on namespace support. Includes a fallback for unsupported namespaces.
```xml
```
--------------------------------
### SpreadsheetML Data Validation Examples
Source: https://github.com/kaisery/ooxmlsdk/blob/main/docs/specs/sml_validation.md
Provides examples of `` rules for different types: whole number range, list selection, and custom formula. Ensure the `count` attribute matches the number of validation rules.
```xml
1
100
"red,green,blue"
LEN(C1)<=10
```
--------------------------------
### Configure Text Body Properties
Source: https://github.com/kaisery/ooxmlsdk/blob/main/docs/specs/pml_text.md
Example demonstrating vertical text, bottom anchoring, and reduce-to-fit autofit for a text body. This configuration is useful for specific text orientations and fitting.
```xml
```
--------------------------------
### Theme XML Structure Example
Source: https://github.com/kaisery/ooxmlsdk/blob/main/docs/specs/pml_themes.md
Defines the basic structure of a PresentationML theme XML file, including theme elements like color, font, and format schemes.
```xml
…
…
…
```
--------------------------------
### Conditional Formatting Block Example
Source: https://github.com/kaisery/ooxmlsdk/blob/main/docs/specs/sml_conditional.md
An example of a `` block applied to specific cell ranges. It includes two conditional formatting rules: one based on a cell's value and another based on a formula.
```xml
10
MOD(ROW(),2)=0
```
--------------------------------
### mc:ProcessContent Example
Source: https://github.com/kaisery/ooxmlsdk/blob/main/docs/specs/mce.md
Demonstrates the 'see-through wrapper' pattern using mc:ProcessContent. When an ignorable element (ext:group) matches mc:ProcessContent, its children are promoted instead of being discarded.
```xml
first
second
```
```xml
first
second
```
--------------------------------
### Reference Generation Command
Source: https://github.com/kaisery/ooxmlsdk/blob/main/docs/specs/xlsx_pdf.md
Use LibreOffice headless mode to convert XLSX fixtures to PDF for reference generation. Ensure the output directory is specified.
```bash
soffice --headless --convert-to pdf --outdir
```
--------------------------------
### Run Basic PDF Tests
Source: https://github.com/kaisery/ooxmlsdk/blob/main/docs/specs/docx_pdf_rendering.md
Execute the basic PDF tests for the ooxmlsdk-pdf crate. This is part of the validation loop.
```bash
cargo test -p ooxmlsdk-pdf
```
--------------------------------
### Build All Crates
Source: https://github.com/kaisery/ooxmlsdk/blob/main/ARCHITECTURE.md
Use this command to build all crates within the workspace. Ensure you are in the repository root.
```bash
cargo build --workspace
```
--------------------------------
### OLE Object with Package ProgID
Source: https://github.com/kaisery/ooxmlsdk/blob/main/docs/specs/wml_embedded.md
Example of an OLEObject tag using 'Package' ProgID for whole-package embedding.
```xml
```
--------------------------------
### Example Numeric Cell
Source: https://github.com/kaisery/ooxmlsdk/blob/main/docs/specs/sml_cells.md
Represents a cell with a numeric value. This is the default type if the 't' attribute is absent.
```xml
42
```
--------------------------------
### Paragraph with Style and Run Formatting
Source: https://github.com/kaisery/ooxmlsdk/blob/main/docs/specs/wml_runs.md
Demonstrates a paragraph with a heading style and run-level formatting including bold text and a specific color. Revision save IDs are also included.
```xml
Chapter Introduction
```
--------------------------------
### Notes Slide Relationships Example
Source: https://github.com/kaisery/ooxmlsdk/blob/main/docs/specs/pml_notes.md
Defines the back-references for a notes slide, linking to the main slide and its master.
```XML
```
--------------------------------
### Run Performance Benches
Source: https://github.com/kaisery/ooxmlsdk/blob/main/ARCHITECTURE.md
Executes package and XML performance benchmarks within the test suite.
```bash
cd ../ooxmlsdk-test-suite && cargo bench -p ooxmlsdk-test --bench perf
```
--------------------------------
### Standard Formula Example
Source: https://github.com/kaisery/ooxmlsdk/blob/main/docs/specs/sml_formulas.md
Illustrates a standard, single-cell formula where the `t` attribute can be omitted as 'normal' is the default type.
```xml
A1*B1
42
```
--------------------------------
### Minimal Paragraph Example
Source: https://github.com/kaisery/ooxmlsdk/blob/main/docs/specs/wml_runs.md
A basic paragraph containing only a single run with text. This is the simplest valid paragraph structure.
```xml
Hello world
```
--------------------------------
### Run PDF Export Fixture Tests
Source: https://github.com/kaisery/ooxmlsdk/blob/main/docs/specs/docx_pdf_rendering.md
Execute the PDF export fixture tests for the ooxmlsdk-pdf-test crate. Use --nocapture to see test output.
```bash
cargo test -p ooxmlsdk-pdf-test -- --nocapture
```
--------------------------------
### Line Spacing Configuration
Source: https://github.com/kaisery/ooxmlsdk/blob/main/docs/specs/drawingml.md
Demonstrates how to set line spacing using percentage or points. Use `` for percentage-based spacing (100,000 = 100%) and `` for point-based spacing (100 units = 1 point).
```xml
```
```xml
```
--------------------------------
### STYLEREF Field Instruction Example
Source: https://github.com/kaisery/ooxmlsdk/blob/main/docs/specs/wml_fields.md
Shows the STYLEREF field instruction to retrieve text from a paragraph with a specific style.
```plaintext
STYLEREF "Heading 1"
```
--------------------------------
### Fast Integration Test Lane
Source: https://github.com/kaisery/ooxmlsdk/blob/main/AGENTS.md
Run a fast integration lane for common runtime and package behavior in the 'ooxmlsdk-test' package.
```bash
cargo test -p ooxmlsdk-test
```
--------------------------------
### Notes Slide with Two Paragraphs
Source: https://github.com/kaisery/ooxmlsdk/blob/main/docs/specs/pml_notes.md
An example of a notes slide containing two distinct paragraphs of speaker notes.
```XML
First paragraph of speaker notes.
Second paragraph with additional context.
```