# berenis and 'ę' 'ą' letters

The letters 'ę' e_ogonek and 'ą' a_ogonek are displayed incorrectly. Example:

\documentclass[A4paper,12pt]{article}
\usepackage{polski}
\usepackage[lf]{berenis}
\usepackage[LY1]{fontenc}
\usepackage[utf8]{inputenc}

\begin{document}
\section{Kopią i~trzęsą}
Myszy kopią i~trzęsą Warszaw\k{a}.
\end{document}


I'm using TexLive 2013 and berenis.sty 2010/08/26 v1.0. Is it the font or encoding problem?

-
I'm guessing it's a font problem. –  You Sep 4 '13 at 6:53
Interesting factoid: “Dear Polish friends: I’m doubly sorry”, Knuth wrote at the top of a macro! “I’m doubly sorry that I have only a crude approximation to an ogonek”; and he went and drafted a macro to make an ogonek". See tex.stackexchange.com/questions/37379/… –  Yiannis Lazarides Sep 4 '13 at 9:25

The LY1 encoding is not good for Polish, because it doesn't contains autonomous glyphs for the letters with the ogonek, so they must be constructed. As a result, no word will be hyphenated past a letter with the ogonek.

If you still insist in using that font, which is available only in the LY1 encoding, add some corrections, as the construction really works only for Ą.

\documentclass[a4paper,12pt]{article}
\usepackage[LY1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{polski}
\usepackage[lf]{berenis}

\DeclareTextCompositeCommand{\k}{LY1}{a}
{\oalign{a\crcr\noalign{\kern-.27ex}\hidewidth\char7}}
\DeclareTextCompositeCommand{\k}{LY1}{e}
{\oalign{e\crcr\noalign{\kern-.27ex}\hidewidth\char7\hidewidth}}
\DeclareTextCompositeCommand{\k}{LY1}{E}
{\oalign{E\crcr\hidewidth\char7\hidewidth}}

\begin{document}

\section{Kopią i~trzęsą}
Myszy kopią i~trzęsą Warszaw\k{a}.

\k{a}\k{e}\k{A}\k{E}

ąęĄĘ

\end{document}


As you see, it doesn't matter whether you input the letters in the Unicode form or with the \k syntax.

## Supplement for the acute accents

In LY1 there are only the ó and Ó, and the appearance of ćśźĆŚŹ is not good. Here's how to supplement. The horizontal alignment of the accent might be adjusted a bit. The height of the constructed characters is as close as possible to the height of the already existing ó and Ó glyphs.

\documentclass[a4paper,12pt]{article}
\usepackage[LY1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{polski}
\usepackage[lf]{berenis}

\DeclareTextCompositeCommand{\k}{LY1}{a}
{\oalign{a\crcr\noalign{\kern-.27ex}\hidewidth\char7}}
\DeclareTextCompositeCommand{\k}{LY1}{e}
{\oalign{e\crcr\noalign{\kern-.27ex}\hidewidth\char7\hidewidth}}
\DeclareTextCompositeCommand{\k}{LY1}{E}
{\oalign{E\crcr\hidewidth\char7\hidewidth}}

\DeclareTextCompositeCommand{\'}{LY1}{c}
{{\ooalign{\hidewidth\raise-.13875ex\hbox{\'{}}\hidewidth\crcr c}}}
\DeclareTextCompositeCommand{\'}{LY1}{s}
{{\ooalign{\hidewidth\raise-.13875ex\hbox{\'{}}\hidewidth\crcr s}}}
\DeclareTextCompositeCommand{\'}{LY1}{z}
{{\ooalign{\hidewidth\raise-.13875ex\hbox{\'{}}\hidewidth\crcr z}}}
\DeclareTextCompositeCommand{\'}{LY1}{C}
{{\ooalign{\hidewidth\raise.65367ex\hbox{\'{}}\hidewidth\crcr C}}}
\DeclareTextCompositeCommand{\'}{LY1}{S}
{{\ooalign{\hidewidth\raise.65367ex\hbox{\'{}}\hidewidth\crcr S}}}
\DeclareTextCompositeCommand{\'}{LY1}{Z}
{{\ooalign{\hidewidth\raise.65367ex\hbox{\'{}}\hidewidth\crcr Z}}}

\begin{document}

\section{Kopią i~trzęsą}
Myszy kopią i~trzęsą Warszaw\k{a}.

\k{a}\k{e}\k{A}\k{E}

ąęĄĘ

ćóśźĆÓŚŹ

\end{document}


-
I got the answer to the similar question that I had sent to the mantainer of the package: i.imgur.com/NuFXOaH.png ,,As you can see on the picture attached, aogonek and eogonek are available.So I suspect TeX using combined glyphes (a and (or) e + ogonok) to make the result you gave.May be possible to fix that with the proper encoding... Best to youHirwen HARENDAL'' –  user15941 Sep 12 '13 at 14:12