Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}

berenis example

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

share|improve this question
1  
I'm guessing it's a font problem. –  You Sep 4 '13 at 6:53
2  
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
add comment

2 Answers 2

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.

enter image description here

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}

enter image description here

share|improve this answer
    
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
add comment

Please see Recode LY1 encoding to T1 (berenis font and polish letters).

In short: the new package offers T1/TS1 support as a non-default option. You just need to pass the right option when you load the package. (This maintains backwards compatibility.) I would be grateful if somebody could check it supports Polish OK or let me know what the bugs are, as I don't really know what it should look like to check.

Welsh should be typeset with default settings for enc. lig is no longer required. I don't know if this affects any other languages but the LY1 encoding of this particular package better supports Welsh than T1. Users who want fj and ffj ligatures also need to use the default (LY1) encoding.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.