Better solutions for a 2em-dash

For anonymization, I want to remove people's names. I have read that the 2em-dash is fine for this. Since there's no ---- for that, I googled a bit about the options.

There's a source (TUGboat, Volume 24 (2003), No. 2 ) that suggests the definition of \iiemdash:

\newcommand*{\iiemdash}{%   2em dash
\rule[0.5ex]{2em}{0.4pt}}


However, I compared that to the em-dash (---) and find that they are not on the same height:

@Dr. Manuel Kühner asked why the position is important for me. From a graphic design perspective, I think it looks better, just in case different dashes occur on the same line. If -- and --- are on the same height, what would the reason be to have the 2em-dash on a different height?

@alephzero suggested that I could adapt the position to my font. However, if there's a font-independent solution, I'd prefer that.

Then I thought about simply using 2 em-dashes:

\newcommand*{\iiemdash}{------}


which looks fine. I noticed I had trouble with the following spaces, so I added a \.

\newcommand*{\iiemdash}{------\ }


I used it for a while - until one of the redacted names caused a line break.

I fixed this using an additional \mbox:

\newcommand*{\simple}{\mbox{------}\ }


At the moment, this works for me. However, having had all the problems already, I wonder whether there's something else to consider - and of course I'd like to know how a pro would define a 2em-dash.

• 1) What is the problem with the first solution? --> Why is the different height compared to --- a problem? 2) * I noticed I had trouble with the following spaces* --> maybe have a look at the xspace package. Aug 24 '18 at 16:08
• Why not just change the 0.5ex in the \iiemdash to match the em-dash in your font? Aug 24 '18 at 16:26
• If you can use xetex or luatex, fileformat.info/info/unicode/char/2e3a/fontsupport.htm will show you the fonts on your system that support the omission dash. Aug 24 '18 at 16:38
• @Dr.ManuelKuehner: 1) if -- and --- and on the same height, why should the 2em-dash differ from that? 2) thanks. Aug 24 '18 at 16:42
• @alephzero: I'd prefer a solution that is independent of the font. Aug 24 '18 at 16:43

1 Answer

In order to be safe with every font, I suggest to use three em-dashes, so they superimpose each other. With Computer Modern, two em-dashes overlap finely.

\documentclass{article}

\DeclareRobustCommand{\iiemdash}{%
\makebox[2em][s]{---\hss---\hss---}%
}

\begin{document}

\hspace*{2em} (empty space 2em wide)

------ (two em-dashes)

\iiemdash\ (2em dash)

\end{document}


You might use \xspace, but it's simpler adding \ (control space) when a space is needed.

• +1. Now I "have" to google \hss :) Aug 25 '18 at 7:38
• @Dr.ManuelKuehner \hss is the same as \hskip 0pt plus 1fil minus 1fil, so it's glue that (stretches and) shrinks as much as needed. Aug 25 '18 at 9:14