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 have the following command

\newcommand{\startsection}[4]{
\gdef\classname{#2}
\subsection*{\label{#3}{\bf {\sc #1} #2}}{
\rule[1em]{\hsize}{4pt}\vskip -1em
\vskip .1in 
#4
}%
}

I use it in the following way

\startsection{Anotaci\'on}{Lazy}{l0}

But my results is the following

Anotaci n Lazy

and my desired outpur would be something like this

Anotación Lazy

How I could solve it?

Thanks

share|improve this question
    
Works for me. I suspect this is a problem with your small caps font. Please post a more complete Example (with preamble). –  Stephan Lehmke Mar 30 '12 at 11:51
    
I'm guessing the font you are using doesn't have bold smallcaps ó. Most fonts don't include bold smallcaps at all, let alone accented characters. –  Roelof Spijker Mar 30 '12 at 11:52
    
@RoelofSpijker These are oldstyle LaTeX font switching commands. They don't combine like \bfseries, for instance. –  Stephan Lehmke Mar 30 '12 at 11:54
    
@StephanLehmke: Of course, you are right. So the problem most likely is that the smallcaps font is missing that accented character. –  Roelof Spijker Mar 30 '12 at 12:01

2 Answers 2

up vote 1 down vote accepted

Check this:

\documentclass{book}
\usepackage{mathpazo}
\makeatletter
\newcommand{\startsection}[4]{
\gdef\classname{#2}
\subsection*{\label{#3} \textbf{\textsc{#1} #2}}{
\rule[1em]{\hsize}{4pt}\vskip -1em \vskip .1in #4
}%
}
\makeatother

\begin{document}

\startsection{Anotaci\'on}{Lazy}{l0}

\end{document}
share|improve this answer

Also pay attention for trailing spaces:

\documentclass{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{libertine}
\newcommand\startsection[4]{%
  \gdef\classname{#2}%
  \subsection*{\label{#3}\textbf{\textsc{#1} #2}}{%
  \rule[1em]{\hsize}{4pt}\vskip -1em \vskip .1in #4}}

\begin{document}
\startsection{Anotación}{Lazy}{l0}

\end{document}

enter image description here

share|improve this answer

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.