[Tex/LaTex] Extra space within bold text

boldspacing

I want to extra space within a bold text. When I use the \textbf{} command it removes the extra space I put in it. My code is as follows:

\textbf{My bold text\qquad:}

Here \textbf removes the extra space that I put inside the bold text. It removes the extra space even if I move it out out of the bold part.

\textbf{My bold text}\qquad\textbf{:}

This is the same when I use italic or underlined text. Extra space I use is removed. This problem only occurs when you use a colon as the last character in the bold part. If I use something else as the last character the space is reserved. But, it is removed if you use a colon as the last character within the bold part.
How can I solve this problem?

% !TeX encoding = UTF-8

\documentclass{article}

\usepackage[turkish]{babel}
\usepackage[utf8]{inputenc}

\begin{document}

\flushleft
\underline{\textbf{ACIKLAMALAR \quad}:} \\

\end{document}

If put something else instead of the colon at the end it works just right. If I put the colon outside the \underline it works. But that is not what I want.

Best Answer

It's a problem of : being an active character in the Turkish language for babel, and gobbling other bits of the document. There was a similar problem being discussed in a similar question here a few years ago. Credit to egreg for the answer, which is to add the line

\shorthandoff{:}

to disable the active character, and just use Unicode to enter Turkish characters. You can add

\shorthandon{:}
% some stuff here
\shorthandoff{:}

Here's a MWE:

\documentclass{article}

\usepackage[turkish]{babel}

\begin{document}

\shorthandoff{:}

\flushleft

\textbf{ALongWord:} \\
\textbf{ALongWord :} \\
\textbf{ALongWord \qquad:} \\
\textbf{ALongWord \qquad\qquad:} \\
\textbf{ALongWord \qquad\qquad\qquad\qquad:}

\end{document}

Here's the effect:

enter image description here

Related Question