科研 Skill
论文格式调整助手
article-format-adjustment
转换论文格式并套用期刊模板
Skill 说明
三向格式互转 + 期刊模板套用(via Pandoc)。**互转**:Word ↔ Markdown ↔ LaTeX(包含 md→latex);**内置期刊模板**:Nature / Science / IEEE / Elsevier;**自动下载期刊模板**:按期刊名从官方源 / Overleaf 拉(best-effort);**自定义模板**:JSON/YAML 配置;**引用样式**:APA / MLA / Chicago / IEEE / GB/T 7714(中文国标);**排版调整**:字体 / 字号 / 行距 / 边距 / 图表 caption / 表格边框;依赖 pandoc + python-docx | 输入:论文(DOCX / Markdown / LaTeX)+ 期刊名或模板配置 | 输出:Word ↔ Markdown ↔ LaTeX 互转(含 md → latex)+ 套好排版(字体/字号/边距/图表 caption/表格边框)+ 引用样式(APA / MLA / Chicago / IEEE / GB/T 7714 中文国标)
SKILL.md
Validation Shortcut
Run this minimal command first to verify the supported execution path:
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
- Word (
-
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
- Windows:
Note: Exact package versions depend on
requirements.txtin your repository.
Example Usage
1) Apply a built-in journal template (DOCX → formatted DOCX)
python scripts/init_run.py \
--input paper.docx \
--journal "Nature" \
--output paper_formatted.docx
2) Apply a custom configuration (MD → formatted MD)
python scripts/init_run.py \
--input paper.md \
--config formats/my_journal.json \
--output paper_adjusted.md
3) Download a journal template configuration
python scripts/init_run.py \
--download-template "Science" \
--output templates/science_format.json
4) Minimal end-to-end runnable Python example (module usage)
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
- Detect input format (
.docx/.md/.tex) - Convert to Markdown as a unified intermediate representation
- Apply formatting rules from a selected journal template or custom config
- Validate the formatted result against the config
- Convert to target format (DOCX/MD/TEX)
Core modules (typical responsibilities)
scripts/format_converter.py- Conversion engine between Word/Markdown/LaTeX
- Uses Pandoc for conversions involving LaTeX and/or DOCX where needed
scripts/format_adjuster.py- Applies typography, figure/table, and reference formatting rules
- Provides validation routines to check compliance
scripts/template_downloader.py- Downloads template/config by journal name (best-effort)
- Parses web sources (often via
requests+beautifulsoup4)
scripts/validate_skill.py- Performs package-level validation checks for the bundled skill files
Configuration schema (key parameters)
A configuration file (JSON/YAML) typically includes:
fontbody,body_size,title,title_size,caption,caption_size
spacingline_space(single/1.5/double)paragraph_space(e.g., points)indent(e.g., first-line indent)
marginstop,bottom,left,right(commonly in cm)
referencesstyle(e.g.,IEEE,APA,GB/T 7714-2015)format(e.g.,numbered,author-year)
figures/tablescaption_position(above/below)font_sizeborders(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
- Validate the request against the skill boundary and confirm all required inputs are present.
- Select the documented execution path and prefer the simplest supported command or procedure.
- Produce the expected output using the documented file format, schema, or narrative structure.
- 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.mdunless 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:
python scripts/format_adjuster.py --help
Expected output format:
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.
相关科研 Skill
中药材分子鉴定用ITS2等DNA条形码鉴定药材基原物种,处理多基原与降解样品局限。适用于药材真伪鉴别研究,不替代法定检验。
中药网络药理学用TCMSP等数据库构建成分-靶点-通路网络并做富集分析,批判性讨论方法学局限。适用于中药机制假设生成与论文方法复核。
中医术语标准与知识图谱建立中医药术语与WHO/ICD-11标准的映射,设计本体并用Neo4j构建知识图谱。适用于数据整合与科研检索,不作临床决策系统。
方剂配伍规律挖掘对方剂做药名规范化、关联规则与网络聚类分析,发现候选核心药组。适用于用药规律挖掘,结果仅为待验证假设,不作处方依据。
证候与症状数据分析对症状量表数据做术语规范、潜在类别与因子分析,探索统计学证候模式。适用于证候分型研究,结果不用于个体辨证诊断。
泵用混合物热力学计算Calculates thermodynamic properties and mixture phase behavior for pump applications using the thermo Python library’s DIPPR/NIST correlations. Use for VLE or mixture property calculations.
常见问题
论文格式调整助手能做什么?
三向格式互转 + 期刊模板套用(via Pandoc)。**互转**:Word ↔ Markdown ↔ LaTeX(包含 md→latex);**内置期刊模板**:Nature / Science / IEEE / Elsevier;**自动下载期刊模板**:按期刊名从官方源 / Overleaf 拉(best-effort);**自定义模板**:JSON/YAML 配置;**引用样式**:APA / MLA / Chicago / IEEE / GB/T 7714(中文国标);**排版调整**:字体 / 字号 / 行距 / 边距 / 图表 caption / 表格边框;依赖 pandoc + python-docx | 输入:论文(DOCX / Markdown / LaTeX)+ 期刊名或模板配置 | 输出:Word ↔ Markdown ↔ LaTeX 互转(含 md → latex)+ 套好排版(字体/字号/边距/图表 caption/表格边框)+ 引用样式(APA / MLA / Chicago / IEEE / GB/T 7714 中文国标)。
如何安装论文格式调整助手?
在科搭 Codar 左侧点击「插件」,在「组件」页签搜索「论文格式调整助手」并安装;在 Claude Code 或 Codex 中可以发送本页的安装提示词,或下载 Skill 包后解压到 ~/.claude/skills 或 ~/.codex/skills。
论文格式调整助手需要哪些权限?
该科研 Skill声明需要:本地文件。安装前会再次列出,由你确认后才会生效。
论文格式调整助手经过官方审核吗?
是。SpeedSkills 收录的每个版本都会记录内容摘要与权限声明,当前版本已通过安全审核。