When using \textbf{text}, the length of text will be increased. Is there a way to make the text bold face without increasing its length?


Thanks to @Herbert and @Martin, here is a perfect solution for me:


5 Answers 5

foobarbaz y\\
\textbf{foobarbaz} y\\
\textBF{foobarbaz} y


enter image description here

The example for beamer

\only<1>{foobarbaz y1} 
\textbf<2->{foobarbaz y2}
\textBF<3>{foobarbaz y3}


Another (better) possibility is to use the letter spacing option from the package microtype

  • is it possible to make it work with beamer overlays? --e.g.\textBF<1>{text}
    – Li Wang
    Commented Jul 21, 2011 at 10:06
  • use it this way: \only<1>{\textBF{text}} or put this definition into \def\textBFitself.
    – user2478
    Commented Jul 21, 2011 at 10:28
  • It should be \newcommand<>\textBF[1]{\only#2{\sbox\CBox...}}, where the dots mean all the rest in Herbert's definition.
    – egreg
    Commented Jul 21, 2011 at 10:33
  • @Herbert: Humm, using \only here will lead to a different effect in my situation --- i.e. the text will disappear in other slides.
    – Li Wang
    Commented Jul 21, 2011 at 10:36
  • @Lee: then you do not have a \only<1-> so that it appears from slide 1 up to the end. Right?
    – user2478
    Commented Jul 21, 2011 at 10:40

You can use \fontseries{b}\selectfont to select a non-extended bold font, provided of course that the font family you're using contains such a font (as computer modern does). For comparison, note that \textbf uses \fontseries{bx}, where the xstands for “extended”.

  • In my opinion, the visual difference between Computer Modern's medium and non-extended-bold fonts isn't all that big. As a result, viewers of a beamer presentation might not even notice the intended effect of alternating between those two fonts.
    – Mico
    Commented Jul 21, 2011 at 10:41
  • @Mico: You have a point there. I was in a hurry and hadn't noticed that this was for a beamer presentation (which wasn't clear from the question itself). But I'll let the answer stand for future reference, since this is an option that should at least be considered. Commented Jul 21, 2011 at 11:15
  • I agree, it's good to mention the option of using a non-extended bold form of the Computer Modern roman (serif) fonts.
    – Mico
    Commented Jul 21, 2011 at 11:51

This answer is just for adding overlay support to Herber's command, who should credited for it.




"xyz" will be bold from the second screen onwards.

I don't think it's a good way to emphasize things on screen; colors are better.

  • I am actually using both bold and color.
    – Li Wang
    Commented Jul 21, 2011 at 11:36

You could use the following macro instead. It uses the size of the horizontal and vertical size of the normal text, but sets it as bold text which makes the bold text lap over the text which follows. The text is also not breakable any longer. For overlays of table cells this should be fine but I wouldn't use it in running text of course.


If you want to support beamer overlays use:



  • Thank you very much! How did you know I am using it for overlays of table cells?...It seems that I couldn't use it in this way: \textBF<1>{text}?
    – Li Wang
    Commented Jul 21, 2011 at 9:18
  • I tried to \newcommand*{\textBF}[2]{\rlap{\raisebox{0pt}[0pt][0pt]{\textbf<#1>{#2}}}\phantom{#2}} But it seems that it does not work.
    – Li Wang
    Commented Jul 21, 2011 at 9:26
  • @Lee: see my update. Commented Jul 21, 2011 at 9:29
  • hummm, I am not sure whether it is working in my table. It seems that if the text of the \textBF{text} is at the end, the length of the cell is still affected. BTW, it seems that I couldn't mention your name...
    – Li Wang
    Commented Jul 21, 2011 at 9:38
  • @Lee: Try the second version now. Commented Jul 21, 2011 at 9:42

If you're willing to (or allowed to) switch to typewriter (monospaced) font, you won't encounter the problem: the regular and bold fonts have glyphs of the exact same widths.

The following MWE uses Courier (scaled 5% in order to equate the cap-heights of the mono and text fonts in use), because in that font the difference between medium weight and bold is particularly strong. The lmodern package has a bold mono font as well, but the difference to the medium weight isn't as pronounced.

\usepackage[scaled=1.05]{couriers} %%
\texttt{The quick brown fox 012456789}\\
\texttt{\bfseries The quick brown fox 012456789}

Another font package possibility you may want to consider is arev. (Given that you seem to be preparing for a beamer presentation, using the arev package would be a good choice anyway.) In the arev package, the mono font harmonizes well with the text font (which is a sans-serif font), and the medium and bold mono fonts are quite different.

  • Yes, I can change the font. Could you please provide me with an example?
    – Li Wang
    Commented Jul 21, 2011 at 9:50
  • @Lee: I've added an example to my answer above.
    – Mico
    Commented Jul 21, 2011 at 10:19
  • is it possible to use this technique on my current font?
    – Li Wang
    Commented Jul 21, 2011 at 10:38
  • Lee: What font family are you currently using?
    – Mico
    Commented Jul 21, 2011 at 11:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .