insert_zotero_citation
Insert a Zotero citation field into Word documents after anchor text, using Zotero library item keys, so Zotero recognizes and refreshes it. Reads only, avoids mixing citation systems.
Instructions
Insert a REAL Zotero citation field (ADDIN ZOTERO_ITEM CSL_CITATION) after anchor_text, built exactly as the Zotero Word plugin builds it, so Zotero recognizes, refreshes, and bibliographs it. item_keys come from search_zotero_library; page becomes the locator; prefix/suffix attach to the cited item (single-item citations only; several keys refuse rather than guess). The visible text is a plain (Author, Year) PLACEHOLDER until the user clicks Refresh in Zotero's Word plugin. The Zotero database is only ever read. Run detect_citation_system first on unfamiliar documents: mixing Word-native and Zotero/Mendeley/EndNote citations creates a bibliography no single manager maintains. Auto-backup: prev/anchor slots in .ks4w-backups (backup=False skips rotation only); atomic validated save. Refuses documents open in Word.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | ||
| backup | No | ||
| prefix | No | ||
| suffix | No | ||
| db_path | No | ||
| file_path | Yes | ||
| item_keys | Yes | ||
| occurrence | No | ||
| anchor_text | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||