article-format-adjustment

Adjust academic paper formatting and convert between DOCX/LaTeX/Markdown when you need to meet a journal or school template requirement.

53 stars

Best use case

article-format-adjustment is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Adjust academic paper formatting and convert between DOCX/LaTeX/Markdown when you need to meet a journal or school template requirement.

Teams using article-format-adjustment should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/article-format-adjustment/SKILL.md --create-dirs "https://raw.githubusercontent.com/aipoch/medical-research-skills/main/scientific-skills/Other/article-format-adjustment/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/article-format-adjustment/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How article-format-adjustment Compares

Feature / Agentarticle-format-adjustmentStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Adjust academic paper formatting and convert between DOCX/LaTeX/Markdown when you need to meet a journal or school template requirement.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

> **Source**: [https://github.com/aipoch/medical-research-skills](https://github.com/aipoch/medical-research-skills)

## Validation Shortcut

Run this minimal command first to verify the supported execution path:

```bash
python scripts/format_adjuster.py --help
```

## When to Use

- You have a draft in **Word/LaTeX/Markdown** and must submit it in a **different format** (e.g., DOCX → LaTeX).
- A journal or school requires strict **typography rules** (fonts, sizes, margins, spacing) and you want them applied automatically.
- You need to enforce consistent **figure/table captions** and table border styles across the whole manuscript.
- You must switch or standardize **citation/reference styles** (e.g., IEEE, APA, GB/T 7714) before submission.
- You want to apply a **known journal template** (e.g., Nature/Science/Elsevier) or a **custom JSON/YAML template** to multiple papers.

## Key Features

- **Format conversion**
  - Word (`.docx`) ↔ Markdown (`.md`)
  - Word (`.docx`) ↔ LaTeX (`.tex`) (via Pandoc)
  - Markdown (`.md`) ↔ LaTeX (`.tex`)
  - Preserves document structure and basic formatting as much as possible

- **Full formatting adjustment**
  - Typography: fonts, font sizes (body/headings/footnotes), line spacing, margins, paragraph indentation and spacing
  - Figures/Tables: caption font size, caption position, table font, table border/line styles
  - References: citation styles (APA/MLA/Chicago/IEEE/GB/T 7714), reference list formatting, in-text citation formatting
  - Terminology: first-occurrence abbreviation annotation, terminology consistency checks, unit formatting standardization

- **Journal template management**
  - Built-in templates (e.g., Nature, Science, IEEE, Elsevier)
  - Template download by journal name (best-effort from official sources/Overleaf)
  - Custom templates via **JSON/YAML** configuration

- **Validation**
  - Checks whether the output meets the configured formatting requirements.

## Dependencies

### Runtime
- Python `>= 3.8`

### Python packages (typical)
- `python-docx` (Word read/write)
- `markdown` (Markdown processing)
- `PyYAML` (YAML parsing)
- `requests` (template download)
- `beautifulsoup4` (HTML parsing)

### System tools
- `pandoc` (required for DOCX ↔ LaTeX conversions)
  - Windows: `choco install pandoc`
  - macOS: `brew install pandoc`
  - Linux (Debian/Ubuntu): `apt install pandoc`

> Note: Exact package versions depend on `requirements.txt` in your repository.

## Example Usage

### 1) Apply a built-in journal template (DOCX → formatted DOCX)
```bash
python scripts/init_run.py \
  --input paper.docx \
  --journal "Nature" \
  --output paper_formatted.docx
```

### 2) Apply a custom configuration (MD → formatted MD)
```bash
python scripts/init_run.py \
  --input paper.md \
  --config formats/my_journal.json \
  --output paper_adjusted.md
```

### 3) Download a journal template configuration
```bash
python scripts/init_run.py \
  --download-template "Science" \
  --output templates/science_format.json
```

### 4) Minimal end-to-end runnable Python example (module usage)
```python
from scripts.format_converter import FormatConverter
from scripts.format_adjuster import FormatAdjuster

def run(input_file: str, config: dict, output_file: str):
    converter = FormatConverter()
    adjuster = FormatAdjuster(config)

    # 1) Normalize to Markdown as an intermediate representation
    md = converter.to_markdown(input_file)

    # 2) Apply formatting rules
    formatted_md = adjuster.apply_format(md, config)

    # 3) Validate against the same rules
    ok = adjuster.validate_format(formatted_md, config)
    if not ok:
        raise RuntimeError("Validation failed: output does not meet the configured requirements.")

    # 4) Convert back to the desired output format inferred from output_file
    converter.from_markdown(formatted_md, output_file)

if __name__ == "__main__":
    config = {
        "font": {"body": "Times New Roman", "body_size": 10},
        "spacing": {"line_space": "single", "paragraph_space": 6, "indent": 0.5},
        "margins": {"top": 2.54, "bottom": 2.54, "left": 2.54, "right": 2.54},
        "references": {"style": "Nature", "format": "numbered"},
        "figures": {"caption_position": "below", "font_size": 9},
        "tables": {"caption_position": "above", "font_size": 9, "borders": True},
    }
    run("paper.docx", config, "paper_formatted.docx")
```

## Implementation Details

### Processing pipeline
1. **Detect input format** (`.docx` / `.md` / `.tex`)
2. **Convert to Markdown** as a unified intermediate representation
3. **Apply formatting rules** from a selected journal template or custom config
4. **Validate** the formatted result against the config
5. **Convert to target format** (DOCX/MD/TEX)

### Core modules (typical responsibilities)
- `format_converter.py`
  - Conversion engine between Word/Markdown/LaTeX
  - Uses Pandoc for conversions involving LaTeX and/or DOCX where needed
- `format_adjuster.py`
  - Applies typography, figure/table, and reference formatting rules
  - Provides validation routines to check compliance
- `template_downloader.py`
  - Downloads template/config by journal name (best-effort)
  - Parses web sources (often via `requests` + `beautifulsoup4`)
- `format_validator.py`
  - Performs rule-based checks (margins, font sizes, caption placement, citation style selection, etc.)

### Configuration schema (key parameters)
A configuration file (JSON/YAML) typically includes:

- `font`
  - `body`, `body_size`, `title`, `title_size`, `caption`, `caption_size`
- `spacing`
  - `line_space` (`single` / `1.5` / `double`)
  - `paragraph_space` (e.g., points)
  - `indent` (e.g., first-line indent)
- `margins`
  - `top`, `bottom`, `left`, `right` (commonly in cm)
- `references`
  - `style` (e.g., `IEEE`, `APA`, `GB/T 7714-2015`)
  - `format` (e.g., `numbered`, `author-year`)
- `figures` / `tables`
  - `caption_position` (`above` / `below`)
  - `font_size`
  - `borders` (tables)

### CLI parameters (behavior)
- `--input`: input file path (**required**)
- `--output`: output file path (auto-generated if omitted)
- `--config`: path to JSON/YAML config (uses built-in default if omitted)
- `--journal`: journal name (selects a built-in or downloaded template)
- `--download-template`: journal name to download a template config
- `--format`: output format (`docx` / `md` / `tex`), defaults to the input format

## When Not to Use

- Do not use this skill when the required source data, identifiers, files, or credentials are missing.
- Do not use this skill when the user asks for fabricated results, unsupported claims, or out-of-scope conclusions.
- Do not use this skill when a simpler direct answer is more appropriate than the documented workflow.

## Required Inputs

- A clearly specified task goal aligned with the documented scope.
- All required files, identifiers, parameters, or environment variables before execution.
- Any domain constraints, formatting requirements, and expected output destination if applicable.

## Recommended Workflow

1. Validate the request against the skill boundary and confirm all required inputs are present.
2. Select the documented execution path and prefer the simplest supported command or procedure.
3. Produce the expected output using the documented file format, schema, or narrative structure.
4. Run a final validation pass for completeness, consistency, and safety before returning the result.

## Output Contract

- Return a structured deliverable that is directly usable without reformatting.
- If a file is produced, prefer a deterministic output name such as `article_format_adjustment_result.md` unless the skill documentation defines a better convention.
- Include a short validation summary describing what was checked, what assumptions were made, and any remaining limitations.

## Validation and Safety Rules

- Validate required inputs before execution and stop early when mandatory fields or files are missing.
- Do not fabricate measurements, references, findings, or conclusions that are not supported by the provided source material.
- Emit a clear warning when credentials, privacy constraints, safety boundaries, or unsupported requests affect the result.
- Keep the output safe, reproducible, and within the documented scope at all times.

## Failure Handling

- If validation fails, explain the exact missing field, file, or parameter and show the minimum fix required.
- If an external dependency or script fails, surface the command path, likely cause, and the next recovery step.
- If partial output is returned, label it clearly and identify which checks could not be completed.

## Quick Validation

Run this minimal verification path before full execution when possible:

```bash
python scripts/format_adjuster.py --help
```

Expected output format:

```text
Result file: article_format_adjustment_result.md
Validation summary: PASS/FAIL with brief notes
Assumptions: explicit list if any
```

## Deterministic Output Rules

- Use the same section order for every supported request of this skill.
- Keep output field names stable and do not rename documented keys across examples.
- If a value is unavailable, emit an explicit placeholder instead of omitting the field.

## Completion Checklist

- Confirm all required inputs were present and valid.
- Confirm the supported execution path completed without unresolved errors.
- Confirm the final deliverable matches the documented format exactly.
- Confirm assumptions, limitations, and warnings are surfaced explicitly.

Related Skills

text-format-organizer

53
from aipoch/medical-research-skills

A local text formatting organizer for biomedical/academic writing; use it when you need to clean whitespace/line endings while preserving Markdown structures or when normalizing .docx/.md/.txt before submission or proofreading.

soft-article-writer

53
from aipoch/medical-research-skills

Generates high-quality promotional soft articles with structured outlines, tailored introductions, and optimized titles based on product info and hot topics. Use when you need to write promotional content, "soft articles" (), or marketing copy that integrates product highlights with current trends, news, or industry insights.

science-popularization-article

53
from aipoch/medical-research-skills

Generates science popularization articles with titles and outlines based on medical topics and style preferences. Invoke when user needs to create medical/science popular content for public education.

bib-formatter

53
from aipoch/medical-research-skills

Convert reference lists and in-text citations between RIS, BibTeX, plain text, and CSL-JSON, triggered when you need to unify bibliography/citation styles before journal submission or compare before/after formatting differences.

research-article-weekly

53
from aipoch/medical-research-skills

Generates a weekly academic literature report based on keywords using PubMed. Use when the user wants to track recent research progress on a specific topic, automatically retrieving, classifying, and summarizing relevant papers from the last 7 days.

citation-formatter

53
from aipoch/medical-research-skills

Use when formatting references for journal submission, converting between citation styles (APA, MLA, Vancouver, Chicago), generating bibliographies for manuscripts, or ensuring consistent reference formatting. Automatically formats citations and bibliographies in 1000+ academic styles. Ensures reference accuracy, completeness, and compliance with journal requirements. Supports batch conversion and integration with reference managers.

bioinformatics-translational-opportunity-finder

53
from aipoch/medical-research-skills

Identifies translationally meaningful paths for bioinformatics findings by mapping omics or computational discoveries to diagnosis, stratification, prognosis, treatment-response, monitoring, or target-nomination use cases, while auditing bridge evidence, assayability, and validation burden. Use this skill when a user wants to know whether a bioinformatics finding can be framed as a stronger translational topic without overclaiming clinical relevance. Always separate statistical signal from translational value, and never imply clinical utility, targetability, or validation depth without explicit evidence support.

latex-manuscript-format-converter

53
from aipoch/medical-research-skills

Converts existing manuscript content into LaTeX format aligned with a target journal, conference, or template while preserving manuscript meaning and structural integrity.

skill-auditor

53
from aipoch/medical-research-skills

A comprehensive auditor for any agent skill — including Manus, OpenClaw/ClawHub, Claude, LobeHub, or custom SKILL.md-based skills. Use this skill whenever a user wants to evaluate, audit, review, score, or quality-check an agent skill before publishing, updating, or deploying. Covers two hard veto gates (structural redlines + research integrity redlines), static quality scoring across 25 criteria (ISO 25010 + OpenSSF + Agent), dynamic test input generation, multi-mode execution testing, multi-layer output evaluation with five specialized category rubrics (Evidence Insight / Protocol Design / Data Analysis / Academic Writing / Other), a Research Veto that applies to all four research categories, human eval viewer generation, actionable P0/P1/P2 optimization recommendations, and automatic skill improvement that outputs a polished, production-ready SKILL.md. Also use whenever a user says "audit my skill", "evaluate my skill", "improve my skill", or wants a corrected version after evaluation.

two-sample-mr-research-planner

53
from aipoch/medical-research-skills

Generates complete two-sample Mendelian randomization (MR) research designs from a user-provided research direction. Use when users want to design, plan, or build a study using two-sample MR to test causal relationships. Triggers:"design a two-sample MR study", "build a publishable MR paper", "test whether this biomarker causally affects this disease", "generate Lite/Standard/Advanced MR plans", "screen multiple exposures with MR", "bidirectional MR design", "causal inference using GWAS summary statistics", or "I want to study X and Y using MR". Always outputs four workload configurations (Lite / Standard / Advanced / Publication+) with a recommended primary plan, step-by-step workflow, figure plan, validation strategy, minimal executable version, and publication upgrade path.

research-proposal-generator

53
from aipoch/medical-research-skills

Generates a comprehensive research proposal design based on input literature, including hypothesis, mechanism verification, and budget. Use when the user wants to design a research project from a paper.

research-grants

53
from aipoch/medical-research-skills

Write competitive research proposals for NSF, NIH, DOE, DARPA, and Taiwan's NSTC when you need agency-compliant narratives, budgets, and review-criteria alignment for a specific solicitation/FOA/BAA.