[Tex/LaTex] What’s the easiest way of putting a fixed-width space

spacing

I got some Polish text with dialogues throughout it. I just learned that in Polish typography every statement in a dialogue is started by a dash followed by a fixed-width space. Now I have plenty of cases like this:

\textit{--- Jaki jest język wietnamski?} \\
\textit{--- Język wietnamski nie jest trudny.} \\

which produces:

example of widened space

It is evident that this is not a fixed-width space. I found some descriptions of how to get fixed-width spaces in some text in "Fixed-width interword space" but that looks too complex to me to be used in this case. Is there any easy way of changing these very spaces (these following the "opening" dashes) to fixed-width ones? Defining some fixed-width space (\newcommand) might also work…

Best Answer

Put this in the preamble

\newcommand{\opendialog}{---\enspace}
\newcommand{\dialog}[1]{\opendialog\textit{#1}}

and, in the document,

\dialog{To be or not to be, that is the question}

Full example:

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

\newcommand{\opendialog}{---\enspace}
\newcommand{\dialog}[1]{\opendialog\textit{#1}}

\setlength{\textwidth}{5.1cm} % just to make the text wrap

\begin{document}

\dialog{Jaki jest język wietnamski?}

\dialog{Język wietnamski nie jest trudny.}     

\end{document}

enter image description here

Instead of \enspace that makes a space of 0.5em, you might want to use a smaller one. The big advantage of using macros is that you can change the overall appearance just by acting in a single place.