4

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.

  • you'll have to provide more details—it works for me! can you provide a minimal working example: meta.tex.stackexchange.com/questions/228/… – Sam Mason Nov 18 '13 at 9:24
  • Sorry for that. As I explained above, the problem only occurs when you use a colon as the last character of the bold part. – Karşıbalı Nov 18 '13 at 9:31
  • 3
    Please post a complete small document that shows the problem. (I would guess that you are using some babel language style that makes : active and adjusts the space. What you describe is not standard behaviour and you have not given enough of a clue how to reproduce it. – David Carlisle Nov 18 '13 at 9:34
  • Welcome to TeX.SX. Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document} – Claudio Fiandrino Nov 18 '13 at 9:39
  • I hope this explanation suffice. Thank you... – Karşıbalı Nov 18 '13 at 9:48
3

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

  • Thank you very much. I realized that I don't need the babel package if I just need to use the Turkish characters. Using utf8 with inputenc does the job. So removing the babel package solves my problem here. – Karşıbalı Nov 18 '13 at 10:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.