Como fazer \maiúsculas funcionar com o idioma polonês?

Como fazer \maiúsculas funcionar com o idioma polonês?

Estou tentando trabalhar \uppercasecom documentos escritos em polonês. No entanto, não funciona corretamente para todas as letras:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[polish]{babel}
\usepackage{polski}
\begin{document}

Test:
\\
dość gróźb fuzją, klnę, pych i małżeństw
\\
\uppercase{dość gróźb fuzją, klnę, pych i małżeństw}

\end{document}

Resultado:

Test:
dość gróźb fuzją, klnę, pych i małżeństw
DOść GRÓŚB FUZJą, KLNę, PYCH I MAłŜEńSTW

Como você pode ver, algumas letras são ignoradas (por exemplo, ś), algumas estão em maiúsculas corretamente (por exemplo, Ó) e algumas estão simplesmente erradas (por exemplo, ź -> Ś). Tenho tentado diferentes combinações de babel/ polski, atualizando todos os meus pacotes com tlmgr, até agora nada ajuda.

Estou usando o pdflatex do TeX Live:

$ pdflatex -v
pdfTeX 3.14159265-2.6-1.40.18 (TeX Live 2017)
kpathsea version 6.2.3
Copyright 2017 Han The Thanh (pdfTeX) et al.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
Compiled with libpng 1.6.29; using libpng 1.6.29
Compiled with zlib 1.2.11; using zlib 1.2.11
Compiled with xpdf version 3.04

Responder1

Você precisa fazer duas alterações:

  • Em documentos LaTeX, use \MakeUppercase, não \uppercase.

  • Para compor o acento ogonek, é necessário ativar T1a codificação da fonte. Portanto, corra \usepackage[T1]{fontenc}.

Se, por algum motivo, você não conseguir passar a usar \MakeUppercase, sugiro que carregue o textcasepacote com a opção overload. Fazer isso modifica o comportamento de \uppercase, para que ele se comporte como \MakeUppercase.

Separadamente, é necessário (ou mesmo aconselhável) carregar o polskipacote se o babelpacote estiver carregado com a opção polish? Acho que depende se você realmente precisa da OT4codificação da fonte.

E, para acessar detalhes realmente bem desenhados, considere carregar o lmodernpacote.

insira a descrição da imagem aqui

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}

\usepackage[polish]{babel}
%%\usepackage{polski}

\begin{document}
\obeylines % just for this example
Test:
dość gróźb fuzją, klnę, pych i małżeństw
\MakeUppercase{dość gróźb fuzją, klnę, pych i małżeństw}
\end{document}

informação relacionada