Irish Hyphenation:
Installation and Usage
LaTeX Installation
The installation may vary according to the distribution
of TeX/LaTeX that you use (I use teTeX
as packaged by Gentoo Linux).
Path names in the instructions are given relative to your system
texmf directory; for me this is /usr/share/texmf.
- Download the file gahyph.tex from CTAN.
- Copy it into the directory
tex/generic/hyphen. - Run
texhashto tell LaTeX about the new file:# texhash
- Insert a line of the form
irish gahyph.tex
in the filetex/generic/config/language.dat. - Go into the subdirectory
web2cand runinitexto compile the patterns and rebuild thelatex.fmtfile:# initex latex.ltx
or else rebuild everything (pdflatex, etc.) withfmtutil:# fmtutil --all
LaTeX Usage
To typeset an Irish document, simply add the lines
\usepackage[irish]{babel}
\usepackage[T1]{fontenc}
to the preamble and compile using LaTeX as usual.
This sets the default language of the document to Irish.
If you need to include some English passages, change the "babel"
line above to:
\usepackage[english,irish]{babel}
and use \selectlanguage in the body of the document as follows:
\begin{document}
Is \'easca na fleisc\'{\i}n\'{\i}
a chur san \'aireamh anois.
\selectlanguage{english}
We don't talk no foreign talk
round these here parts.
\selectlanguage{irish}
Bainfidh m\'e \'us\'aid as an acmhainn seo.
\end{document}
Important Remarks
- TeX inserts a discretionary break after explicit hyphens within words; this has the (mostly desirable) effect that explicitly hyphenated words will only be broken at the hyphen.
- This is fine for Breac-Ghaeltacht or Ard-Aighne, but not for t-idirnáisiúnachas. You will have to add your own discretionary hyphens if such a word needs to be broken, e.g. t-idir\-n\'aisi\'un\-achas.
- Conversely, you may want to prevent breaks at
"t-" or "n-"; for this you can enclose the word in an
\mbox. - Similar remarks hold for words containing apostrophes.
One could try using
\catcodeto declare apostrophes to be "letters", but this forces you to include spaces when entering acute accents: n\' aisi\' un. Instead, since apostrophes occur relatively infrequently, it is easier to insert discretionary hyphens when needed. - For example, since amh-ras is a legal hyphenation, it follows that drochamh-ras should be also, though naturally one would much prefer droch-amhras. Unfortunately TeX has no mechanism for assigning "weights" to different hyphen points in the same word, so you will have to beware of such examples on your own.
- The 6000+ patterns put Irish near the top of the list of languages distributed with the Babel package. If you have problems with memory or load times I can easily produce a 33% smaller custom version by restricting to words appearing in a text corpus.
- See the list of bugs at the end of the Details page.
Other packages
I can't offer much assistance here. Here are some links which should be helpful:
© Cóipcheart/Copyright 2004 Kevin P. Scannell