Skip to main content

Patch IEEE citation format in Microsoft Word docx documents

Project description

Microsoft Word IEEE Citation Patcher

Post-processing script that patches IEEE citation format in Microsoft Word documents in the docx format.

Word does only allow to list citations one by one and has no integrated logic to group or sort them. Especially in scientific documents it is often the case that multiple citations are added to the same paragraphs and it is likely that they are not in order. Sorting and grouping citation references is a tedious task, so this script is here to help.

An original text like this

as shown by Brown [5], [4]; as mentioned earlier [9], [4], [5], [2], [7], [6]; Smith [4] and Brown and Jones [5]; Wood et al. [7]

is transformed to this

as shown by Brown [4], [5]; as mentioned earlier [2], [4]-[7], [9]; Smith [4] and Brown and Jones [5]; Wood et al. [7]

or with an optional compression option to this

as shown by Brown [4,5]; as mentioned earlier [2,4-7,9]; Smith [4] and Brown and Jones [5]; Wood et al. [7]

Installation

Python >= 3.8 is required for this tool to work. The package is hosted on PyPI.

To install with pip, use the following command:

$ pip install dcs-ms-word-ieee-patch

This installs two CLI scripts, ieee-patch and xml-pretty-print.

Usage

Run the script with the path to the

$ ieee-patch /path/to/file.docx                 # on unix
$ ieee-patch C:\Users\foobar\Desktop\file.docx  # on windows

The script by default creates a file with the filename suffix .patched in the same folder as the original file and patches the content within this file which means the original file is left untouched.

In case the replacement should be done in-place, e.g., when space limitations apply, use the --overwrite CLI flag. Please use this flag only if really necessary, since the original content cannot be restored after is has been overwritten!

Legal notice

This project is not affiliated, associated, authorized, endorsed by, or in any way officially connected with the Microsoft Corporation, or any of its subsidiaries or its affiliates.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dcs-ms-word-ieee-patch-0.2.1.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

dcs_ms_word_ieee_patch-0.2.1-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file dcs-ms-word-ieee-patch-0.2.1.tar.gz.

File metadata

  • Download URL: dcs-ms-word-ieee-patch-0.2.1.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.8.12 Linux/5.13.0-1025-azure

File hashes

Hashes for dcs-ms-word-ieee-patch-0.2.1.tar.gz
Algorithm Hash digest
SHA256 3c2da895efb190420a0f86439b492a0181d4e3e42d9fcd23a32218c6a76ff181
MD5 8f1476edcf0d06ea23dd1db6686694db
BLAKE2b-256 032a2c26cc6807a0d8af6d07a07aada5bb164b6f696ff7040136b76d3ecf8d3f

See more details on using hashes here.

File details

Details for the file dcs_ms_word_ieee_patch-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for dcs_ms_word_ieee_patch-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b3d7823aacfa295d17295e2e8f9d2850963638193d8f76466f677ac76e82702c
MD5 cdcc6223403fe981a94003108ff7dcc0
BLAKE2b-256 ac681484b16d7c7407a7117879f9bb81d5e6f461d3ca43665c28ecfbde96b371

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page