Skip to main content

Critical edition enhancements for CollateX with footnote apparatus and transliterations

Project description

collatex-critical

PyPI Python

collatex-critical helps scholars prepare critical editions from multiple textual witnesses, producing outputs suitable for publication.

Unlike python-collatex, which focuses on column-based difference visualization in XML, SVG, or HTML, collatex-critical produces Markdown, PDF, HTML, and LaTeX outputs where the majority reading appears in the main text, and variant readings are recorded in footnotes or endnotes.


Features

  • Multi-witness collation with clear footnote apparatus
  • Output in Markdown, PDF, HTML, and LaTeX
  • Supports multiple transliteration schemes: Devanagari, IAST, SLP1
  • Integrates seamlessly with CollateX
  • Designed specifically for critical editions and scholarly texts

Installation

From PyPI

pip install collatex-critical

From GitHub (development version)

pip install git+https://github.com/drdhaval2785/collatex-critical.git

Dependencies

  1. Java - Java Runtime Environment (JRE) version 8 or higher is needed to run Collatex jar file.

  2. CollateX (1.7.1 or later) Download here. Example: collatex-tools-1.7.1.jar

  3. Pandoc Install from https://pandoc.org/installing.html

  4. Indic Transliteration

    pip install indic-transliteration
    

    Provides indic_transliteration Python library and sanscript CLI tool.


Project Structure

input/projectName/devanagari
input/projectName/iast
input/projectName/slp1

output/projectName/devanagari
output/projectName/iast
output/projectName/slp1

collatex-tools/1.7.1/collatex-tools-1.7.1.jar
generate.sh
merger.py

Setting Up a Project

  1. Place witness texts in input/projectName/devanagari.

  2. Name witness files according to precedence:

    • Less than 10 witnesses: 1.txt, 2.txt, 3.txt
    • 10 or more witnesses: 01.txt, 02.txt, 03.txt
  3. File order indicates descending precedence (first file = highest authority).

  4. Make sure that collatex-tools/1.7.1/collatex-tools-1.7.1.jar is in the same folder as generate.sh file.


Running the Project

sh generate.sh projectName
  • Creates missing directories under input/ and output/.
  • Generates outputs in all available transliteration schemes.
  • Input witness files must exist prior to running.

Output

For each project:

  • projectName.md, projectName.pdf, projectName.tex, projectName.htmloutput/projectName/devanagari/

  • Corresponding outputs in other transliterations: → output/projectName/iast/ and output/projectName/slp1/


Collation Logic

  1. Majority Rule: Reading preferred by the majority appears in the main text; others appear in footnotes.
  2. Tie-Breaker: If no clear majority, the order of precedence determines the main reading (01.txt > 02.txt > …).

The choice of the most faithful witness is left to the editor’s discretion (e.g., oldest, most accurate, or scholarly judgment).


Checking your installation

The github repository has a test data in input/test/devanagari/ directory.

It carries three witnesses of a manuscript.

Run the following from your commandline sh generate.sh test.

If everything goes as expected, you should see the output in output/test directory.

If there is any error logged, make sure you have installed the necessary dependencies and have the collatex-tools/1.7.1/collatex-tools-1.7.1.jar file at the correct location.

Example output

PDF

image

HTML

Screenshot_2025-09-27_12-12-57

Contributing

Contributions are welcome:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/my-feature
  3. Commit your changes: git commit -m "Add feature"
  4. Push your branch: git push origin feature/my-feature
  5. Open a pull request

License

GNU GPL v3.0. See LICENSE for details.


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

collatex_critical-0.1.3.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

collatex_critical-0.1.3-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file collatex_critical-0.1.3.tar.gz.

File metadata

  • Download URL: collatex_critical-0.1.3.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for collatex_critical-0.1.3.tar.gz
Algorithm Hash digest
SHA256 d000d40d8c319a8d9a8ac50997d1babf924c20c59444d0cc8a449681d4499343
MD5 94342e87faca7e747e3095c001dc0284
BLAKE2b-256 9ae0889c52170826b38ddfaf7ac5e90faa2d8594574c569c805af23949f28ca9

See more details on using hashes here.

File details

Details for the file collatex_critical-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for collatex_critical-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 043123c6be11cb5173d394f45196e321bcf4026baca25a2ebcf95e39a8457a25
MD5 ebcb143a638022b6d18199d598cbcb7a
BLAKE2b-256 f68ecc03a673824bbb2a5df7e32b665af0144ef24fbda615576cf7a214cb6493

See more details on using hashes here.

Supported by

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