13

I use pdfLaTeX with Polish documents. In Polish quotation marks look like this: „Lorem”. With package polski, one can use them in LaTeX with ,,Lorem''. All was well, but I recently discovered the amazing microtype package.

Unfortunately, protrusion just doesn't want to work with Polish :

Actual result

As you can see, regular English quotes are treated differently from Polish ones.

What I would expect would be something like this:

Expected result

Here is minimal code example:

\documentclass{article}
\usepackage{polski}
\usepackage[utf8]{inputenc}
\usepackage{microtype}

\begin{document}

\noindent
``Lorem'' \newline
,,Lorem'' \newline
Lorem

\end{document}

My question is: how to make output look like the second image?

1
  • I did not use LaTeX for 20 years or so but I read this group exactly for that: to learn things I would have never known otherwise (Polish quoting in that case). Thanks for that.
    – WoJ
    Commented Feb 26, 2019 at 11:15

2 Answers 2

18

Use T1 fontencoding instead of OT4 (default).

\documentclass{article}
\usepackage[T1]{polski}
\usepackage[utf8]{inputenc}
\usepackage{microtype}

\begin{document}

\noindent
``Lorem'' \newline
,,Lorem'' \newline
Lorem \newline
ć, ń, ó, ś, ź, ż, ą, ę, ł \newline
Ć, Ń, Ó, Ś, Ź, Ż, Ą, Ę, Ł

\end{document}

enter image description here

16

EDIT: This has been fixed in version 2.7b (28 Feb 2019).


The default microtype configuration lacks protrusion settings for the ligature. You can add them like this (in the preamble):

\LoadMicrotypeFile{cmr}
\SetProtrusion
   [ name     = cmr-OT4,
     load     = cmr-OT1]
   { encoding = OT4,
     family   = cmr  }
   {
      "FF = {500,300}
   }

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .