I want to disable the protrusion for endashes and emdashes. The line filling does not look good there ...
But how to do so? According to the answers here, I tried to manipulate the font packages but it does not have any effect.
Which is the correct font package I have to load while using lmodern – is it lmr? What are the settings to take single characters out from protrusion?
Here is a MWE to see whats going wrong, seen at the beginning of line 2 and the end of line 5, and below the same text with protrusion disabled at all.
Protrusion should remain enabled for other characters, it is only about -- and ---.
Do you have some suggestions? :)
\documentclass[a4paper, 12pt, headsepline]{scrreprt}
\setlength{\parindent}{0pt}
\usepackage{geometry}
\geometry{left=3.5cm, right=2cm, top=2.5cm, bottom=2cm}
\usepackage{setspace}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{microtype}
\LoadMicrotypeFile{lmr} % Which file do I need?
\SetProtrusion
[ name = lmr-adapted,
load = lmr-T1 ]
{ encoding = T1,
family = {lmr,lmrx,lmrj} }
{
\textendash = {0,0},
\textemdash = {0,0}, % does not have any effect
-- = {0,0},
--- = {0,0} % does not have any effect
}
\begin{document}
Hello world, bli bla blubb, how are you, I'm fine -- well, I need some stupid text. Damn... -- Maybe I should write a really loooooooooooooooooooooooooooooooooooooooooooooo\-ooooooooong line to fill the space. A chemist walks into a pharmacy and asks the pharmacist, “Do you have any acetylsalicylic acid?” “You mean aspirin?” asked the pharmacist. “That’s it! I can never remember that word.” \dots Well, that's some text ---
But how can I suppress that annoying protrusion for emdashes? 1 2 3 4 5 6 7 8 9 10 11\\
\microtypesetup{protrusion=false}
Hello world, bli bla blubb, how are you, I'm fine -- well, I need some stupid text. Damn... -- Maybe I should write a really looooooooooooooooooooooooooooooooooooooooooooo\-ooooooooong line to fill the space. A chemist walks into a pharmacy and asks the pharmacist, “Do you have any acetylsalicylic acid?” “You mean aspirin?” asked the pharmacist. “That’s it! I can never remember that word.” \dots Well, that's some text ---
But how can I suppress that annoying protrusion for emdashes? 1 2 3 4 5 6 7 8 9 10 11
\end{document}
\LoadMicrotypeFile{cmr}
(and remove the--
and---
lines) – Robert Feb 14 '20 at 16:13lmr
s. The family is calledlmr
but its settings are inmt-cmr.cfg
. – Robert Feb 14 '20 at 16:40