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 need to change the size of some text within a section title:

\documentclass{article}
\begin{document}
    \section{This text is normal {\Large This text is large}}
\end{document}

This works, however, in some situations, I am using an extra-small font. For example:

\def\Tiny{ \font\Tinyfont = cmr10 at 5pt \relax  \Tinyfont}

When \Tiny is used within the section title, it produces:

Undefined control sequence

  • How can I get the \Tiny letters to appear in the section titles
  • As the section title text is normally larger than regular text, but \Tiny letters also appear throughout the document, how can I ensure that the Tiny text within the section title is proportionally small (i.e. slightly larger than the \Tiny text within the rest of the document).
share|improve this question
    
What are you writing!? It's got to be a thesis. It seems like you're popping up every five minutes! :P –  qubyte Nov 14 '11 at 13:02
    
It is some reference books. Am I asking too many questions? –  Village Nov 15 '11 at 1:56
    
Not at all! It must be a monster of a project though. –  qubyte Nov 15 '11 at 2:15
1  
To reiterate, I'm not criticising. The whole point of Stack Exchange is the questions, so keep asking. –  qubyte Nov 15 '11 at 3:18
add comment

1 Answer

up vote 8 down vote accepted

You may define a very tiny font just like the standard font commands:

\makeatletter
\newcommand*{\Tiny}{\@setfontsize\Tiny{3pt}{4pt}}
\makeatother

This may be used like \Large or \large. I've used 3pt here, because \tiny is already 5pt at article without size option. So:

\documentclass{article}
\makeatletter
\newcommand*{\Tiny}{\@setfontsize\Tiny{5pt}{6pt}}
\makeatother

\begin{document}
\section{This text is normal {\Tiny This text is very tiny}}
\section{This text is normal {\tiny This text is tiny}}
\end{document}

Would show same font sizes.

BTW: Maybe package relsize would also be interesting for you:

\documentclass{article}
\usepackage{relsize}
\begin{document}
\section{This text is normal {\relsize{-4} This text is very tiny}}
\end{document}

This allows to set sizes not absolute but relative.

share|improve this answer
add comment

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.