Adjust academic paper formatting and convert between DOCX/LaTeX/Markdown when you need to meet a journal or school template requirement.
55
63%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
Fix and improve this skill with Tessl
tessl review fix ./scientific-skills/Other/article-format-adjustment/SKILL.mdRun this minimal command first to verify the supported execution path:
python scripts/format_adjuster.py --helpFormat conversion
.docx) ↔ Markdown (.md).docx) ↔ LaTeX (.tex) (via Pandoc).md) ↔ LaTeX (.tex)Full formatting adjustment
Journal template management
Validation
>= 3.8python-docx (Word read/write)markdown (Markdown processing)PyYAML (YAML parsing)requests (template download)beautifulsoup4 (HTML parsing)pandoc (required for DOCX ↔ LaTeX conversions)
choco install pandocbrew install pandocapt install pandocNote: Exact package versions depend on
requirements.txtin your repository.
python scripts/init_run.py \
--input paper.docx \
--journal "Nature" \
--output paper_formatted.docxpython scripts/init_run.py \
--input paper.md \
--config formats/my_journal.json \
--output paper_adjusted.mdpython scripts/init_run.py \
--download-template "Science" \
--output templates/science_format.jsonfrom 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").docx / .md / .tex)format_converter.py
format_adjuster.py
template_downloader.py
requests + beautifulsoup4)format_validator.py
A configuration file (JSON/YAML) typically includes:
font
body, body_size, title, title_size, caption, caption_sizespacing
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_sizeborders (tables)--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 formatarticle_format_adjustment_result.md unless the skill documentation defines a better convention.Run this minimal verification path before full execution when possible:
python scripts/format_adjuster.py --helpExpected output format:
Result file: article_format_adjustment_result.md
Validation summary: PASS/FAIL with brief notes
Assumptions: explicit list if any63c61d3
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.