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 a problem with my fontsizes. I want to change the fontsize of my titles globally in my Latex document. I therefore created a newcommand. Here is a MWE

\documentclass[BCOR=8mm,DIV=12,11pt,twoside,titlepage,headsepline]{scrbook}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc} 
\usepackage[english,ngerman]{babel}
\usepackage{scrpage2} 
\usepackage{float}

\usepackage{ifthen} 

\begin{document}

\newcommand{\titel}[2]{
\ifthenelse{\equal{#1}{\empty}}{}{
\ifthenelse{\equal{#2}{\empty}}{
\begin{center}  \textbf{\fontsize{60pt}{25pt}\selectfont #1} \normalfont\vspace*{-2ex} \end{center}}
{
\begin{center}  \textbf{\fontsize{60pt}{25pt}\selectfont #1} \normalfont\vspace*{-2ex} \end{center} 
\begin{center} \textbf{\huge --- \\ \Huge #2}\end{center}}}}

\titel{I want the 2 linesof this title to be more seperated}{such that the letters aren't that close.}
\end{document}

Now the titles are huge, but if the title is separated into 2 lines, then the distance between the title lines is too small such that the letters touch each other.

I just want to have a bigger distance between the two lines. And I don't want to do it via

part 1 of the title \\ part 2 of the title

in the title command as it then influences the headlines (see command \kopftitle)

I am grateful for help!

share|improve this question
    
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}. –  karlkoeller Sep 14 '13 at 13:37

1 Answer 1

up vote 2 down vote accepted

There are (at least) three issues with your code. First, LaTeX's default font family (Computer Modern) doesn't provide a font size of 60pt; fix this by loading a font family (such as Latin Modern) that does provide this font size. Second, the instruction \fontsize{x}{y}\selectfont should come before the \textbf instruction. Finally, the second argument of \fontsize should be larger than the first; for many font families, it's customary to let the so-called baseline skip be about 10 to 20 percent larger than the nominal size of the font.

With these comments factored in, here's the output of your MWE. (Note that I've set the baselineskip to be 10 percent larger than the font size in the title lines. You will probably want to fiddle with this parameter.)

enter image description here

\documentclass[BCOR=8mm,DIV=12,11pt,twoside,titlepage,headsepline]{scrbook}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc} 
\usepackage[english,ngerman]{babel}
\usepackage{scrpage2,float,ifthen}
\usepackage{lmodern}% choose a font family that suits your needs

\newcommand{\titel}[2]{
\ifthenelse{\equal{#1}{\empty}}{}{%
   \ifthenelse{\equal{#2}{\empty}}{%
      \begin{center}  
         \fontsize{60pt}{66pt}\selectfont \textbf{#1}   
      \end{center}}
      {\begin{center}  
         \fontsize{60pt}{66pt}\selectfont \textbf{#1} 
       \end{center} 
       \begin{center} \textbf{\huge --- \\  \Huge #2 \\ \null}
       \end{center}%
      }
   }
}

\begin{document}
\titel{I want the lines of this title to be more separated}{so that the letters aren't too close.}

\noindent
And here's some text set in ``normal'' font size (11 pionts)\dots
\end{document}
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.