latex3 / babel

The babel system for LaTeX, LuaLaTeX and XeLaTeX
LaTeX Project Public License v1.3c
124 stars 34 forks source link

Consider adding IPA as a babel language #235

Closed me-kell closed 1 year ago

me-kell commented 1 year ago

PROPOSAL

I'd like to suggest to add IPA (International Phonetic Alphabet) as a "language".

The IPA is not really a language but an alphabet without a language used to phonetically transcribe whatever human language.

IPA has its own Unicode Range [0250–02AF] See The Unicode Standard, Version 15.0

If IPA were a "language" in the babel sense. It would be easy to use commands like \babelfont or \foreignlanguage in a document.

jbezos commented 1 year ago

Like this? 🙂:

\documentclass{article}

\usepackage[english]{babel}

\babelprovide{ipa}
\babelfont[ipa]{rm}{DejaVu Sans}

\begin{document}

Blah \foreignlanguage{ipa}{ɔːlˈðəʊ} Blah.

\end{document}

image

As you can see, with babel you can create new languages easily. Then you can define shorthands, transforms (if luatex), and so on. I’m not sure it’s the best option for the IPA, but well, here is.

me-kell commented 1 year ago

@jbezos Thank you. That's a very gut point to start. I didn't know that this was possible and so easy.