Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I can't seem to have both the small caps and boldface styles on a line:

\huge\sc\bf Hello

This will generate bold text, and if the \sc is placed after, it will generate small caps text but not bolded. They seem to override each other, so is there any way to apply them both?

share|improve this question

migrated from stackoverflow.com Sep 4 '11 at 2:57

This question came from our site for professional and enthusiast programmers.

4 Answers 4

up vote 71 down vote accepted

Your question requires a two-part answer.

\sc and \bf (and \it) are deprecated because, as you have noticed, they override each other. Use either

\textit{...}
\textbf{...}
\textsc{...}

or

{\itshape ...}
{\bfseries ...}
{\scshape ...}

instead.

However, not all fonts contain italic and/or bold small caps (when they even contain small caps).

(Also, italic and small caps usually don't combine at all by default, requiring \usepackage{slantsc} to do so.)

When you load the T1 font encoding, you're replacing the default Computer Modern fonts by CM-Super, a larger but lower-quality set of fonts that look mostly identical but contain many more glyphs. In older TeX distributions, you might even end up with bitmap fonts in your output.

The Latin Modern fonts are a better alternative (\usepackage{lmodern}), but they unfortunately don't contain bold small caps.

share|improve this answer
2  
"In older TeX distributions, you might even end up with bitmap fonts in your output." - or the \textsc is just ignored and the \textbf{\textsc{...-text it printed in bold, because there is no appropriate font available and neither can it be created on the fly. –  Stephen Dec 9 '11 at 18:36
    
Can you explain why you call the CM-Super font "lower quality"? I always use the T1 encoding in order to be able to correctly copy-paste umlauts (for example) from my documents. Is there an explanation somewhere of the difference between the two? –  Fritz Sep 14 at 12:06
    
I can't find the TUG article that discusses it explicitly (I thought there was one in the last few years), but Cm-Super, I believe, is generated more automatically; in particular, I seem to recall that its auto tracing method produced outlines that are more complex than they need to be (i.e., fonts are larger) but also not as representative of the original CM bitmaps. –  Will Robertson Sep 15 at 4:29

For posterity, there is an easier and better alternative. Simply add

\usepackage{bold-extra}

along with your other includes. This lets you keep using the default high-quality Computer Modern fonts for normal text. It works by building a bold Computer Modern small-caps font on the fly and including it for you. Now \bfseries{\scshape{Foo}} works as expected!

Reference: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=bold-extras

share|improve this answer
3  
from my own experiments, I would contest the claim that this method keeps "using the default high-quality Computer Modern fonts." My bold small caps appear pixelated if I use the bold-extra package. –  arturomp Jan 22 '12 at 20:19
    
@amp sure -- the cm bold sc, etc, fonts are contributed extra metafont snippets. no-one seems to have traced them. –  wasteofspace Mar 7 '12 at 13:22
1  
Just a note for readers, \bfseries and \scshape do not take arguments; more appropriate syntax for the example would be {\bfseries{\scshape Foo}} or simply {\bfseries\scshape Foo}, but the argument variants are often preferred: \textbf{\textsc{Foo}}. –  Sean Allred Jan 8 at 1:34

Ok, you need to add

\usepackage[T1]{fontenc}

and this updated command should do the trick

\huge \textbf{\textsc{Hello}}

To explain, LaTeX uses the curly braces {} to indicate scope for the formatting command. So if you type

\textbf{ ... }

then all the text between the curly braces is formatted in bold, including the

\textsc{Hello}

Result

Small Caps Bold

Small Caps Bold

compared to regular small caps

small caps regular

share|improve this answer
2  
It doesn't seem to work. The text is only in bold. Also, I think that's the same as my statement since the braces are implied. –  verhogen Mar 30 '09 at 23:10
2  
pay close attention to the order of the braces and the commands. Works for me. –  Azim Mar 30 '09 at 23:15
1  
ok, my eyes tricked me sorry. you are correct. it doesn't work :( –  Azim Mar 30 '09 at 23:23
    
ok, actually I had the [T1], I think the problem was actually my PDF viewer... –  verhogen Mar 31 '09 at 4:00
    
The lmodern package prevents the good functioning of "bold" + "small caps". Is that possible ? –  SDrolet Mar 31 at 0:20

A rather crude way of obtaining bold-like characters from a font that doesn't have it, is to repeatedly overprint a character with slight variations. This is offered by the contour package:

enter image description here

\documentclass{article}
\usepackage{contour}% http://ctan.org/pkg/contour
\setlength{\parindent}{0pt}% Just for this example
\begin{document}

% Default
Hello

% Bold
\textbf{Hello}

% Small-caps
\textsc{Hello}

% Combined
\textbf{\textsc{Hello}}

% Default \contourlength (0.03em)
\contour{black}{\textsc{Hello}}

\contourlength{0.01em}% Smaller radius
\contour{black}{\textsc{Hello}}

\contour*{black}{\textsc{Hello}}% 32 copies (default is 16)

\contour[100]{black}{\textsc{Hello}}% 100 copies

% Just for reference
\contourlength{0.05em}
\contour[5]{red}{\textsc{Hello}}

\end{document}
share|improve this answer
    
Works very well ! –  SDrolet Jan 31 at 2:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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