scitex_msword

MS Word (DOCX) import/export utilities for SciTeX.

This module provides high-level functions to convert between MS Word .docx files and SciTeX’s internal writer document model.

Strategy:

  • Word users write text only (paragraphs, minimal formatting)

  • SciTeX handles: figures, tables, references, LaTeX generation

  • SciTeX JSON is the “source of truth”, Word is just a view/edit layer

Typical usage:

from scitex_msword import load_docx, save_docx, list_profiles

# Import from Word doc = load_docx(“input.docx”, profile=”generic”)

# Manipulate via scitex.writer… # doc.normalize()

# Export to Word (different journal template) save_docx(doc, “output.docx”, profile=”mdpi-ijerph”)

Available profiles:

  • generic: Standard Word with Heading 1/2/3

  • mdpi-ijerph: MDPI IJERPH journal template

  • resna-2025: RESNA 2025 scientific paper template

  • iop-double-anonymous: IOP double-anonymous template

Functions

convert_docx_to_tex(input_path, output_path)

Convert a DOCX file directly to LaTeX.

load_docx(path[, profile, extract_images])

Load a DOCX file and convert it into a SciTeX writer document.

save_docx(writer_doc, path[, profile, ...])

Save a SciTeX writer document as a DOCX file.

Modules

bold

Preserve specified tokens by re-splitting runs and applying bold + font.

cli

Click-based command-line interface for scitex-msword.

comments

Comment extraction and (limited) application for python-docx Documents.

diff

Paragraph-level diff between two DOCX documents.

highlights

Visual-mark / highlight utilities for python-docx Documents.

hooks

sxm.hooks — pluggable lifecycle-hook framework for DOCX I/O.

mcp_server

MCP server scaffold exposing scitex-msword as a tool surface.

profiles

Profiles for mapping MS Word styles to SciTeX writer structures.

reader

DOCX -> SciTeX writer document converter.

tables

Table insertion utilities for python-docx Documents.

track_changes

Track-Changes (revision) utilities for python-docx Documents.

utils

Utility functions for processing MS Word documents.

writer

SciTeX writer document -> DOCX converter.