{"data":{"slug":"github-aipoch-medical-research-skills-scientific-skills-academic-writing-style-journal-rewrite-6092416585cd","title":"Style and Journal Format Adaptation","summary":"Rewrite text to match a specific writing style or journal format. Ideal for adapting content for publication, including formatting .docx files to meet journal requirements.","url":"https:\/\/skillshunter.net\/skills\/github-aipoch-medical-research-skills-scientific-skills-academic-writing-style-journal-rewrite-6092416585cd","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/github-aipoch-medical-research-skills-scientific-skills-academic-writing-style-journal-rewrite-6092416585cd","markdown_url":"https:\/\/skillshunter.net\/skills\/github-aipoch-medical-research-skills-scientific-skills-academic-writing-style-journal-rewrite-6092416585cd.md","download_url":"https:\/\/skillshunter.net\/skills\/github-aipoch-medical-research-skills-scientific-skills-academic-writing-style-journal-rewrite-6092416585cd\/download","category":{"slug":"content-editorial","name":"Content & Editorial"},"editor_note":"Install `python-docx` via `pip install python-docx` before using B4\/C4 visual formatting or B1\/B2 scripts. Ensure `[PMID:xxxxxxxx]` markers are present in .md files for C1 processing. Extract `--range-joiner` and `--group-separator` parameters from the reference article's actual writing style, rather than assuming them.","instructions":"---\nname: style-journal-rewrite\ndescription: Rewrite drafts according to target writing style or target journal format. Triggers when user says \"rewrite in XX style\", \"match this tone\", \"format for XX journal\", \"rewrite following this format\". Input can be .docx \/ .md \/ .txt or conversation text.\nlicense: MIT\nauthor: AIPOCH\n---\n> **Source**: [https:\/\/github.com\/aipoch\/medical-research-skills](https:\/\/github.com\/aipoch\/medical-research-skills)\n\n\n# Style and Journal Format Adaptation Skill\n\n## Trigger Conditions\n\n### Triggers\n- Style change: \"rewrite in XX style\", \"write like XX\", \"match this tone\"\n- Journal format: \"format for XX journal\", \"rewrite following this format\", \"convert to NC format\"\n- Adjust reference style or abstract structure\n\n### Does Not Trigger\n- Factual additions, content expansion\n- Proofreading typos\n- Complete structural rewrite (unrelated to style\/format)\n- Adding references only (use `find-paper-references`)\n\n## Requirements\n\n- `python-docx`: `pip install python-docx` (required for B4\/C4 visual formatting, B1\/B2 scripts)\n\n## Process\n\n### 0. Define Boundaries\n\nDetermine three things:\n- **Input format**: DOCX \/ MD \/ TXT \/ conversation text?\n- **Task type**: Style only \/ format only \/ both?\n- **Output format**: Same as input or specific format requested?\n\nThen branch into the corresponding path below.\n\n### 1. Extract Target Profile\n\nRead extraction guides from `references\/`:\n- Style adaptation \u2192 `references\/style-profile-extraction.md`\n- Journal format adaptation \u2192 `references\/journal-format-extraction.md`\n\n**Do not fabricate** rules not found in the user's materials.\n\n---\n\n## Path A: Pure Style Adaptation (any input format)\n\nRead `references\/rewriting-criteria.md` directly, rewrite according to profile. Change only expression style, not formatting.\n\nOutput matches input format. DOCX: change text only, not styles; MD\/TXT: output same format; conversation text: output directly.\n\n**After completion, skip to Section 5 QC.**\n\n---\n\n## Path B: DOCX + Format Adaptation\n\nInput is `.docx`, requires journal format changes (may also include style changes).\n\n### B1. Structure Layer\n- Heading numbering:\n  - Reference article has no numbering \u2192 run `scripts\/remove_heading_numbers.py <input> <output>`\n  - Reference article has numbering but different format \u2192 manually edit heading text\n- Abstract structure, section order: AI modifies directly\n\n### B2. Citation Layer\n- End-of-text list numbering: use `convert_ref_format.py --ref-list-style` to switch between `[N]` \/ `N.`\n- In-text citations: use `convert_ref_format.py --style` to switch superscript (Unicode \/ font format)\n- `--range-joiner` and `--group-separator` **must be extracted from the reference article's actual writing style**, do not assume\n- How the reference article combines consecutive citations: observe multi-citation sequences in text, then set parameters\n\n### B3. Field Code Detection\nScan `w:instrText` in DOCX XML:\n- Contains `ADDIN ZOTERO_ITEM` \u2192 load `format-references-zotero` skill, search CSL style \u2192 install \u2192 Refresh\n- Contains `{Author, Year, Title}` \u2192 load `format-references-endnote` skill, check `.ris` in same directory \u2192 deliver\n- Plain text citations (no field codes) \u2192 skip this step, B2 already handled\n\n### B4. Visual Formatting\n`python-docx` adjusts font, size, line spacing, paragraph spacing, indentation, alignment per paragraph. Use `para.runs` to set `font.name` \/ `font.size`, use `para.paragraph_format` for spacing.\n\n**\/!\\** Do NOT use `para._element.clear()` to clear paragraphs containing field codes \u2014 this destroys Zotero\/EndNote field codes. B4 only modifies `w:rPr` and `w:pPr`.\n\n---\n\n## Path C: MD + Format Adaptation\n\nInput is `.md`, requires journal format changes (may also include style changes).\n\n### C1. Check PMID Markers\nMD must contain `[PMID:xxxxxxxx]` markers to use this path.\n\n- Has markers \u2192 continue\n- No markers \u2192 **prompt user**: run `find-paper-references` first to insert PMID markers, then return to this skill\n\n### C2. Style and Structure Adjustment\nAI directly modifies MD text:\n- Remove heading numbers, adjust abstract structure, adjust section order\n- Change writing style (if needed)\n\n**\/!\\ Critical constraint**: When moving or rewriting sentences with citations, `[PMID:xxxxxxxx]` markers must follow the text \u2014 do not lose, change numbers, or modify spaces.\n\n### C3. Hand Off to Citation Formatting Skill\nLoad the corresponding skill based on user's tool:\n- Zotero \u2192 `Skill(\"format-references-zotero\")`\n- EndNote \u2192 `Skill(\"format-references-endnote\")`\n\nBoth skills do: parse `[PMID:xxxxx]` \u2192 fetch PubMed metadata \u2192 download target journal CSL style \u2192 output DOCX (in-text citations and bibliography formatted per journal style).\n\n**This step replaces all work done by `convert_ref_format.py` in Path B**, with more professional results \u2014 citation formatting is driven by Zotero\/EndNote engines, avoiding inconsistencies from manual Unicode superscript assembly.\n\n### C4. Visual Formatting\n`python-docx` applies journal-required font, size, line spacing, margins, and figure\/table caption positioning on the DOCX produced by C3.\n\nSame as B4: only modify `w:rPr` and `w:pPr`, do not affect Zotero\/EndNote field codes.\n\n### C5. Output\nFinal DOCX = C2 (structure+style) \u2192 C3 (citation formatting) \u2192 C4 (visual formatting)\n\n---\n\n## 4. Output and Delivery\n\n- DOCX \u2192 `doc.save()` \u2192 `deliver_attachments`\n- MD \u2192 `Write()` \u2192 `deliver_attachments`\n- TXT \u2192 `Write()` \u2192 `deliver_attachments`\n- Conversation text \u2192 output directly to conversation\n- After delivery, summarize changes in one sentence\n\n---\n\n## 5. Quality Check\n\nVerify each item:\n\n- [ ] Original key information fully preserved, no example content mixed in\n- [ ] If style target: consistent tone throughout, not just first few paragraphs\n- [ ] If journal format target:\n  - [ ] Heading numbering matches reference article\n  - [ ] Abstract structure matches reference article\n  - [ ] (DOCX path) Field codes detected, corresponding citation skill executed\n  - [ ] (MD path) PMID markers intact, citation skill executed\n  - [ ] Visual formatting (font\/size\/line spacing) applied\n- [ ] No fabricated \"journal rules\" unsupported by user materials\n- [ ] File opens normally, no formatting issues (MD path: final DOCX opens with working Refresh\/Update Citations)\n\n## Error Handling\n\n- If required inputs are missing, state exactly which fields are missing and request only the minimum additional information.\n- If the task goes outside the documented scope, stop instead of guessing or silently widening the assignment.\n- If execution fails, report the failure point, summarize what can still be completed safely, and provide a manual fallback.\n- Do not fabricate files, citations, data, search results, or execution outcomes.\n\n## Input Validation\n\nThis skill accepts requests that match the documented purpose of `style-journal-rewrite` and include enough context to complete the workflow safely.\n\nDo not continue the workflow when the request is out of scope, missing a critical input, or would require unsupported assumptions. Instead respond:\n\n> `style-journal-rewrite` only handles its documented workflow. Please provide the missing required inputs or switch to a more suitable skill.\n","use_cases":["Rewrite a manuscript to match the style of a target journal","Convert a conversation text to a formal academic style","Format a .docx file to meet journal formatting requirements"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/aipoch\/medical-research-skills\/blob\/686e09dfdb45d9fa1a08664f06bb93769b3c9d91\/scientific-skills\/Academic%20Writing\/style-journal-rewrite\/SKILL.md","source_commit":"686e09dfdb45d9fa1a08664f06bb93769b3c9d91","license":"MIT","version":null,"listing_approved_at":"2026-11-24","created_at":"2026-11-23T10:47:03.000000Z","updated_at":"2026-11-24T07:14:40.000000Z","seo_title":"Style and Journal Format Adaptation Tool","seo_description":"Rewrite text to match a specific writing style or journal format. Perfect for adapting content for publication, including formatting .docx files to meet journal standards","seo_keywords":["journal format adaptation","writing style rewrite","academic style conversion","manuscript formatting","style adaptation tool"]}}