convert_citation_style
Convert plain-text citations and reference lists to APA, Chicago, MLA, Harvard, IEEE, Vancouver, or ASA style, flagging unresolved entries for human review.
Instructions
BETA (heuristic): review the flagged-items list in the result rather than trusting silently. Convert a manuscript's PLAIN-TEXT citations and reference list to a target publication style: apa7, chicago17-author-date, chicago17-notes (= Turabian), mla9, harvard, ieee, vancouver, asa.
Heuristic text conversion, not a citation processor: only fully-parsed reference entries and unambiguously-resolved citations are converted; everything else is left verbatim and flagged for human review. Supports author-date <-> numbered ([n] or Vancouver superscripts, numbered by first appearance), author-date -> Chicago notes (each citation becomes a REAL footnote), and notes -> author-date (only recognizably pure citation footnotes are harvested; mixed ones are flagged and left alone). Narrative citations keep the author's name; reference-list italics, ordering, heading, and hanging indents are handled. Documents using Word-native or Zotero/Mendeley/EndNote citation FIELDS are routed away (set_bibliography_style, or restyle in the manager); fields are never rewritten as text. Run detect_citation_system first on unfamiliar documents: mixing Word-native and Zotero/Mendeley/EndNote citations creates a bibliography no single manager maintains.
dry_run=True returns the complete change plan and leaves the file byte-identical; parse_references is the read-only stage 1. Any error during a real run leaves the original untouched. 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 |
|---|---|---|---|
| backup | No | ||
| dry_run | No | ||
| file_path | Yes | ||
| source_style | No | auto | |
| target_style | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||