2

I am writing my thesis and the font size of the chapter title is defined in the class of the document. Somehow I cannot make bigger than \fontsize{60}{70}. Even if I write \fontsize{3000}{70} I cannot observe any difference. Is there a way to change it?

Thanks

My code (in the class file):

% Numbered chapter heading style:
\renewcommand{\@makechapterhead}[1]{%
  {\singlespacing
    \parindent \z@ \raggedleft \normalfont

    \vspace*{5mm}%  
    \ifnum \c@secnumdepth >\m@ne
    \usepackage{lmodern}
\usepackage{graphicx}
    \fontsize{120}{60} \selectfont \scshape \bf \textsc \space \thechapter         % Chapter followed by number
    \par\nobreak
    \fi
    \interlinepenalty\@M
    \vspace{20mm}%  
    \huge \scshape \bf #1\par                                                            % chapter title
    \rule{\textwidth}{1pt}                                                                                  %horizontontal line                     
    \nobreak
   \vskip 40\p@
  }}
Pepi
  • 31
  • 2
  • Welcome to TeX.SX! Please help us to help you and 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}. –  Mar 06 '15 at 16:22
  • Do you mean 60/70 seriously? That's really large! You should see a lot of warnings in your .log file –  Mar 06 '15 at 16:23
  • 2
    Do you really have \usepackage{lmodern} \usepackage{graphicx} in the middle of your chapter heading definition? How can that not give multiple errors? – David Carlisle Mar 06 '15 at 16:26
  • It depends on whether your font admits the specified size. Have a look at lmodern with some large sizes: `\documentclass{article} \usepackage{lmodern}

    \newcommand\Enlarge[2]{{\fontsize{#1}{#2}\selectfont test}} \begin{document}

    \Enlarge{60}{72} \Enlarge{120}{144}\par \Enlarge{500}{600}

    \end{document}`

    – Gonzalo Medina Mar 06 '15 at 16:26
  • 2
    The \usepackage lines have to be at the top level so they execute before the document starts. They can not be in the definition of \chapter. – David Carlisle Mar 06 '15 at 16:44
  • 2
    \scshape \bf is the same as \bf did you intend \scshape \bfseries which specifies bold caps and small caps (which is not available in all font families)? – David Carlisle Mar 06 '15 at 17:14
  • My document class is {thesis} but I am modifying the class document so the file starts with:% First identify the class:

    \NeedsTeXFormat{LaTeX2e} \ProvidesClass{thesis}

    \DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}

    \ProcessOptions

    \LoadClass{report} and finish with % end of file: \endinput

    – Pepi Mar 06 '15 at 18:40
  • 1
    the comment above doesn't really seem to add any extra information. The answer given shows how to have fonts bigger than 60pt, It is hard to guess the intention of the \@makechapterhead definition in the question but the errors it generates are basically unrelated to the question in the title. – David Carlisle Mar 06 '15 at 18:48
  • 1
    If you are using KOMA script, this will break all kinds of functionality.... (The KOMA classes define \@makechapterhead so this is a guess about what thesis might be doing.) – cfr Mar 07 '15 at 01:51
  • @cfr most classes with a chapter command define this,eg report and book – David Carlisle Mar 07 '15 at 09:28

2 Answers2

8

enter image description here

\documentclass{article}
\usepackage{lmodern}

\begin{document}

one {\fontsize{5cm}{6cm}\selectfont two}

\end{document}
David Carlisle
  • 757,742
2

Note that if you select a font size using \fontsize and then use a regular font size command such as \huge, you will get back to the ordinarily huge size. This probably isn't an issue since I can't imagine you are trying to make the chapter title this big as well, but since your question is difficult to figure out, maybe this might be useful.

For example:

\documentclass{article}

\usepackage{lmodern}

\begin{document}

  \fontsize{60}{70}\selectfont enormous

  \huge merely huge

\end{document}

enormous vs. merely huge

Note that \bf is deprecated and undoes \scshape, as pointed out in comments. \scshape\bfseries will switch to bold small-caps if they are available (unusual).

Note that \textsc{} is not a font switch but expects an argument.

So, if you just say \textsc without curly brackets, the next token will be small-caps - typically a single letter. Compare:

  \textsc abc

  \textsc{abc}

  {\scshape abc}

font shape commands

cfr
  • 198,882