Produce Word (.docx) documents from markdown manuscript sections. Use when asked to generate a Word document, create a docx, compile the manuscript, or export to Word. Assembles markdown sections, embeds figures/tables, and converts via pandoc with journal-ready formatting.
Instrucciones de origen · Vista previa de solo lectura
name
word-document
description
Produce Word (.docx) documents from markdown manuscript sections. Use when asked to generate a Word document, create a docx, compile the manuscript, or export to Word. Assembles markdown sections, embeds figures/tables, and converts via pandoc with journal-ready formatting.
user-invocable
true
Word Document Generation Skill
Produces publication-ready Word (.docx) documents from the markdown manuscript sections in this project using pandoc.
If the user wants figures embedded in the document (rather than at the end), insert markdown image references at the appropriate locations. Use standard markdown syntax:
Many journals (including JID) require line numbers and double spacing. These are best set via a reference.docx template with double-spaced paragraph formatting. Line numbers can be added in Word after export (Layout > Line Numbers).
Tables from CSV
To include supplementary tables from CSV data, convert with pandoc or create markdown tables first:
# Convert a CSV to a markdown table using column/csvlook or a simple script
Rscript -e '
library(knitr)
df <- read.csv("meta_analysis/bulk3/results/tables/04_rra_combined_stat_6datasets.csv")
cat(kable(head(df, 30), format = "pipe"), sep = "\n")
' > "${OUTPUT_DIR}/table_s2.md"
Common Invocations
User Request
Action
"Generate Word document"
Full manuscript assembly (Steps 1-4)
"Export manuscript to docx"
Same as above
"Create supplementary docx"
Supplementary materials only
"Compile manuscript with figures"
Embed figures inline
"Make submission-ready Word file"
Main + supplementary as separate files
Troubleshooting
Images not embedding: Ensure --resource-path points to the manuscript directory
Pandoc not found: Check ~/.local/bin/pandoc or install via the README
Table formatting issues: Use pipe tables (| col1 | col2 |) for best pandoc compatibility
Unicode issues: Add --metadata lang=en if special characters cause problems