Skip to main content

Package for disambiguation of identical terms in critical editions in LaTeX with reledmac.

Project description

Samewords
=========
.. image:: https://readthedocs.org/projects/samewords/badge/?version=latest
:target: http://samewords.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

*Word disambigutaion in critical text editions*

In critical textual editions notes in the critical apparatus are
normally made to the line where the words occur. This leads to ambiguous
references when a critical apparatus note refers to a word that occurs
more than once in a line. For example:

::

We have a passage of text here, such a nice place for a critical
note.

----
1 a] om. M

It is very unclear which of three instances of “a” the note refers to.

`Reledmac <https://www.ctan.org/pkg/reledmac>`__ is a great LaTeX package that
facilitates typesetting critical editions of prime quality. It already provides
facilities for disambiguating identical words, but it requires the creator of
the critical text to mark all potential instances of ambiguous references
manually (see the *reledmac* handbook for the details on that). *Samewords*
automates this step for the editor.

Install and usage
-----------------

.. code:: bash

pip3 install samewords

That’s it!

This requires Python 3.6 installed in your system. For more details on
installation, see the :ref:`installation` section.


Now call the script with the file you want annotated as the only argument to get
the annotated version back in the terminal.

.. code:: bash

samewords my-awesome-edition.tex

This will send the annotated version to ``stdout``. To see that it actually
contains some ``\sameword{}`` macros, you can try running it through
``grep``:

.. code:: bash

samewords my-awesome-edition.tex | grep sameword

You can define a output location with the ``--output`` option:

.. code:: bash

samewords --output ~/Desktop/test/output my-awesome-edition.tex

This will check whether ``~/Desktop/test/output`` is a directory or a file.
If it is a directory, it will put the file inside that directory (with
the original name). If it is a file, it will ask you whether you want to
overwrite it. If it is neither a directory nor a file, it will create
the file ``output`` and write the content to that.

Alternatively regular unix redirecting will work just as well in a Unix
context:

.. code:: bash

samewords my-beautiful-edition.tex > ~/Desktop/test/output.tex

See more in the `documentation <https://samewords.readthedocs.io/en/latest/>`__.


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

samewords-0.4.0.tar.gz (43.9 kB view details)

Uploaded Source

Built Distribution

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

samewords-0.4.0-py3-none-any.whl (56.9 kB view details)

Uploaded Python 3

File details

Details for the file samewords-0.4.0.tar.gz.

File metadata

  • Download URL: samewords-0.4.0.tar.gz
  • Upload date:
  • Size: 43.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for samewords-0.4.0.tar.gz
Algorithm Hash digest
SHA256 fe0e131093f7ac565af3a12784b7d8fad9ec985e1fc1bc026498c2912353e7db
MD5 b77b435df1ed18cdecfd615e7f9cb019
BLAKE2b-256 c5a8879aee7b4a9bd7bcb5b3091b84cb2694f3d398a6c869aebb3fbbd29523b6

See more details on using hashes here.

File details

Details for the file samewords-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for samewords-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9e268b9741ecdc2e2e55be2f278c5fdcd164166bc4cf70f11fb8fca0fec8e399
MD5 99b69a45093b68e56bd147e119f2d276
BLAKE2b-256 dfcb18dfc4a7d6b0a5861a8ed04cb14e76d219cbc7a66807c0ae57ca5d84f021

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