Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

geez2ethiop

CI

Convert Geez (Ethiopic) scripts into PDFLaTeX commands for the ethiop package.

This module translates Geez characters to their Ethiopian Latin transcription (for use with the ethiop package) and to IPA transcription (for use with the TIPA package) in LaTeX.

Installation

pip install git+https://github.com/tachi-hi/geez2ethiop.git

For development:

git clone https://github.com/tachi-hi/geez2ethiop.git
cd geez2ethiop
pip install -e ".[dev]"

Usage

Command Line

$ echo አዲስ አበባ | geez2ethiop --latex
\geeztext{'adise 'ababA}
\textipa{'\"adis\textschwa{} '\"ab\"aba}

Without --latex:

$ echo አዲስ አበባ | geez2ethiop
አዲስ አበባ
'adise 'ababA
'\"adis\textschwa{} '\"ab\"aba

Python API

from geez2ethiop import geez2ethiop, ethiop2ipa

geez = "አዲስ አበባ"
ethiop = geez2ethiop(geez)   # "'adise 'ababA"
ipa = ethiop2ipa(ethiop)     # "'\"adis\\textschwa{} '\"ab\"aba"

See the demo notebook for more examples (view on nbviewer, open in Colab).

Usage with PDFLaTeX

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{tipa}
\usepackage[ethiop,main=english]{babel}
\newcommand{\geeztext}[1]{{\selectlanguage{ethiop}\mbox{#1}}}

\begin{document}
\geeztext{'adise 'ababA}
\textipa{'\"adis\textschwa{} '\"ab\"aba}
\end{document}

See latex-example/example.tex for a complete example.

Compiled output:

LaTeX output example

If you are interested in using XeLaTeX or LuaLaTeX, you can write Ethiopic text directly using the fontspec package with appropriate Ethiopic fonts.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages