63 Comments

  1. BG

    I really like the “Less is More” style – it’s just what I’ve been looking for. Thanks!

  2. Ole J. Forsberg, Ph.D.

    First of all: Tom, thank you for an excellent source of TeX and LaTeX information. I reference it frequently.

    Second: I just wrote an include for making my chapters look good (to me). Here is the code:

    \newcommand*\chapterlabel{}
    \titleformat{\chapter}[block]{
       \gdef\chapterlabel{}
       \normalfont\sffamily\Huge\bfseries\scshape%
       }
       {\gdef\chapterlabel{\thechapter}}{0pt}{%
    % The upper bar
        \begin{tikzpicture}[remember picture, overlay]
            \node[yshift=-2cm] at (current page.north west)
            { \begin{tikzpicture}[remember picture, overlay]
              \draw[fill=chapterbackground] (0,0) rectangle (\evensidemargin+0.2\paperwidth,2cm);
              \end{tikzpicture}
            };
        \end{tikzpicture}
    % The lower bar
        \begin{tikzpicture}[remember picture, overlay]
            \node[yshift=-6.2in] at (current page.north west)
            { \begin{tikzpicture}[remember picture, overlay]
              \draw[fill=chapterbackground] (0,0) rectangle (\paperwidth,2cm);
              \end{tikzpicture}
            };
        \end{tikzpicture}
    % The photograph
        {%
            \flushright
            \setlength\fboxsep{0pt}
            \setlength\fboxrule{0.5pt}
            \fbox{\includegraphics[width=0.8\textwidth]{chapterImages/chapter\thechapter.jpg}}
        }
    % The chapter number
        \begin{tikzpicture}[remember picture, overlay]
        \node[yshift=-6.15in] at (current page.north west)
          { \begin{tikzpicture}[remember picture, overlay]
            \node[above left,
                  anchor=west,
                  xshift=\evensidemargin,
                  yshift=0.8cm,
                  rectangle,
                  inner sep=10pt,
                  fill=chapterbackground ]
                  {\color{white} Stage \thechapter:};
            \end{tikzpicture}
          };
       \end{tikzpicture}
    % The chapter name
        \begin{tikzpicture}[remember picture, overlay]
        \node[yshift=-6.7in] at (current page.north west)
          { \begin{tikzpicture}[remember picture, overlay]
            \node[above left,
                  anchor=west,
                  xshift=0.92*(1in + \hoffset + \oddsidemargin),
                  yshift=0.3cm ]
                  {\color{chapterbackground}#1};
            \end{tikzpicture}
          };
       \end{tikzpicture}
    % End titleformat
    }
    \titlespacing*{\chapter}{0.3\textwidth}{-100pt}{50pt}

    I like the effect (others may not). I offer it PD.

    • Hi Ole,

      Thanks for sharing the code! For others to use it the way you designed it however, you would also have to provide the jpg and some things that got lost from the preamble like which packages you load and the color definition of chapterbackground. If you agree, I will send you an e-mail so you can attach the picture. Or if you have a place to upload it to, just send me the link.

      Looking forward to seeing your chapter style!

      Thanks, Tom.

      • tom

        Hi Adil,

        I provided complete minimal working example for all chapter styles. Please let me know which example is not running.

        Thanks, Tom

  3. JK

    Wonderful examples. I’m always looking for customisations of these types, of which your blog is full of, to finesse my thesis. Thank you.

    The new chapter definitions however, don’t seem to work on unnumbered chapters (ie. \chapter*{Name of Unnumbered Chapter})
    Any thoughts?
    Cheers,

      • JK

        Initially I have been playing around with your more is less style and the titlesec package.
        Cheers,
        JK

      • Hi JK,

        I works perfectly for me (see the code below). Please provide a minimal example illustrating the problem.

        \documentclass{report}
        \usepackage[T1]{fontenc}
        \usepackage{titlesec, blindtext, color}
        \definecolor{gray75}{gray}{0.75}
        \newcommand{\hsp}{\hspace{20pt}}
        \titleformat{\chapter}[hang]{\Huge\bfseries}{\thechapter\hsp\textcolor{gray75}{|}\hsp}{0pt}{\Huge\bfseries}
        \begin{document}
        \tableofcontents
        \chapter{Less is More}
        \blindtext
        \chapter*{Less is Less}
        \blindtext
        \end{document}

        Best, Tom.

      • JK

        Cheers Tom. The code is working fine for me now too. I must have had something commented out before, else some other random oddity was present.

  4. Nazma

    hi,
    I use latex in linux (ubutu). Please tell me how I use fancychapter. For using the same I am have to download any package. From where I download it and tell me the stps.

    • Hi Nazma,

      Thanks for your question. You are right, the fancychapter package is not included in the standard TeX distributions. However, you can get the style file here. The easiest way would be to just keep the file in your project folder where your tex-file is located. Apart from loading it, that’s all you need.

      Hope it works.
      Best, Tom.

  5. Prakash

    Thanks for the nice post. This is very helpful. Is there anyway I can give author names and affliations beneath the chapter title?

    • Hi Rafik,

      Thanks for your question. I’m not sure whether I understand your problem. Please provide a minimal working example which I can run on my computer.

      Here is some code that adds the word Chapter and later Appendix to the title. You might find this useful.

      \documentclass{report}
      \usepackage[T1]{fontenc}
      \usepackage{titlesec, blindtext, color}
      \definecolor{gray75}{gray}{0.75}
      \newcommand{\hsp}{\hspace{20pt}}
      \titleformat{\chapter}[hang]{\Huge\bfseries}{\chaptername~\thechapter\hsp\textcolor{gray75}{|}\hsp}{0pt}{\Huge\bfseries}
      \begin{document}
      \chapter{Less is More}
      \blindtext
      \appendix
      \renewcommand\chaptername{Appendix}
      \chapter{First}
      \blindtext
      \chapter{Second}
      \blindtext
      \end{document}
      • Thank you very much, indeed!
        But I truly satisfied with the chapter having only number without word “chapter”. I would like only to Have Appendix word before A, B etc appendices !
        Could you help with this?
        Tanks in advance.

      • Hi Rafik,

        A possible solution is to use the code I provided below with a minor modification, set \chaptername to “empty” for regular chapters. Here is the code:

        \documentclass{report}
        \usepackage[T1]{fontenc}
        \usepackage{titlesec, blindtext, color}
        \definecolor{gray75}{gray}{0.75}
        \newcommand{\hsp}{\hspace{20pt}}
        \renewcommand\chaptername{}
        \titleformat{\chapter}[hang]{\Huge\bfseries}{\chaptername\thechapter\hsp\textcolor{gray75}{|}\hsp}{0pt}{\Huge\bfseries}
        \begin{document}
        \chapter{Less is More}
        \blindtext
        \appendix
        \renewcommand\chaptername{Appendix~}
        \chapter{First}
        \blindtext
        \chapter{Second}
        \blindtext
        \end{document}
  6. Sarang

    Hi…..!
    for thesis chapter lay out, i want a particular design, but i couldn’t able to paste an image of that design, how can I post that image for further corresponding, in order to need code for that designing.
    Currently I am using following package:
    %Options: Sonny, Lenny, Glenn, Conny, Rejne, Bjarne, Bjornstrup
    \usepackage[Sonny]{fncychap}

    • Hi,

      You can upload it to Dropbox, Picasaweb, Facebook, Flickr, Instagram, anywhere you like and share the link.
      if you would rather not post the design publicly, you can get in touch here.

      Cheers, Tom

  7. Hi Tom,
    first of all, thanks dude. I’ve favourited your page, btw, many useful info here.
    I have a question, what about just “Chapter 1 – Name_of_the_chapter”? How could I do that?
    Thanks again, keep up the great work.
    See ya!

    • Using the titlesec example from above with a few minor modifications:

      \documentclass{report}
      \usepackage[T1]{fontenc}
      \usepackage{titlesec, blindtext}
      \titleformat{\chapter}[hang]{\Huge\bfseries}{Chapter \thechapter\ -- }{0pt}{\Huge\bfseries}
      \begin{document}
      \chapter{Numbered}
      \blindtext
      \chapter*{Non-numbered}
      \blindtext
      \end{document}
    • Thanks for the link.
      I’m generally happy to help with problems. However, if you are asking me for code, at least try yourself first, please. Most of the information can be found in the post above and package documentation.

      Anyway, here is what I came up with:

      \documentclass{report}
      \usepackage{anyfontsize}
      \usepackage{titlesec, blindtext}
      \titleformat{\chapter}[display]{\raggedleft}{\fontsize{70}{60}\selectfont\thechapter}{0pt}{\fontsize{20}{10}\selectfont}[\rule{0.75\linewidth}{1pt}]
      \begin{document}
      \chapter{Numbered custom design}
      \blindtext
      \chapter*{Non-numbered custom design}
      \end{document}
  8. Sarang

    thanks tom……
    Since I am beginner in Latex, that’s why asked for the code, I have tried, but due to some minor errors I didn’t do it. Well after referring your code, I got it, . . . . . I have rectified many things by visiting this blog, really great job,,,,,
    once again thanks for code…..
    cheers.

    • That’s ok. Please consider creating a minimal working example next time that would let me reproduce the minor errors. By doing so, there is a good change you find a solution and by posting it on my blog, you will help other people with similar issues.

  9. Matthias

    Hi Tom,

    Thanks for the extremely usefull information. Personally I very much like the ‘less is more’ style for my thesis. I was wondering though if it were possible to add two horizontal lines: one above and one underneath the title. Is there an easy way to do this?

    Either way, thanks a million ! Your resumation was clear and very helpfull.

    Greetings,
    Matthias

    • Matthias

      I think I figured it out, but my way might not be according to LaTeX etiquette. My code:

      \usepackage{titlesec}
      \usepackage[T1]{fontenc}
      \usepackage{blindtext}
      \newcommand{\hsp}{\hspace{20pt}}
      \titleformat{\chapter}[hang]
      	{\Huge\bfseries}
      	{\thechapter\hsp\textcolor{lightgray}{|}\hsp}
      	{0pt}
      	{\Huge\bfseries}
      	[\vspace{-4ex}\titlerule\vspace{5ex}\titlerule]
      • Hi Matthias,

        Sorry it took me so long to get back to you. I’m glad you found a solution that works. Thanks for posting it here. Alternatively, you one could also add the top rule with format (see the documentation).

        \titleformat{\chapter}[hang]{\titlerule\Huge\bfseries\vspace{1ex}}{\thechapter\hsp\textcolor{lightgray}{|}\hsp\titlerule}{0pt}{\Huge\bfseries}[\vspace{1ex}\titlerule]

        Cheers,
        Tom

    • Hey!

      Thanks for your question. Try this and let me know what you think:

      \documentclass{report}
      \usepackage{titlesec, blindtext}
      \titleformat{\chapter}[hang]{\vspace{-65pt}\vfill}{}{0pt}{\Huge\bfseries\centering}[\vfill\clearpage]
      \begin{document}
      \chapter{Centered chapter title}
      \blindtext
      \end{document}
  10. Govind

    Hi Tom,
    I am using the book class for writing my thesis. I am happy with its formatting but I have a issue with its chapter title. It consumes a lot of vertical space and comes in the middle of the page. Is there a way to keep the chapter heading at the top like this:

    Chapter 1

    Power System Analysis and Optimization

    Regards,
    Govind

    • tom

      I didn’t quite catch whether you wanted to center the heading horizontally. Below is an example that should give you enough flexibility to customize the chapter heading to your needs.

      Cheers, Tom.

      \documentclass[11pt]{book}
      
      % Visualize margins (remove this)
      \usepackage{showframe} 
      
      % Centered chapter heading
      \usepackage{sectsty} 
      \chapterfont{\centering}
      
      % Set white space above and below chapter to 10pt
      \usepackage{toolbox} 
      \makeatletter
      \patchcmd{\@makechapterhead}{\vspace*{50\p@}}{\vspace*{10pt}}{}{}
      \patchcmd{\@makeschapterhead}{\vspace*{50\p@}}{\vspace*{10pt}}{}{}
      \makeatother
      
      \begin{document}
      \chapter{Power System Analysis and Optimization}
      \end{document}
  11. shastry

    Hi Tom,
    I am writing my thesis in latex. I just want to change the
    font size of chapter title (by default it is very big). I used the titlesec package. But the problem is now “Chapter #” disappear and it just appears “# followed by Introduction”.

    I used

    \titleformat{\chapter}[display]
    {\normalfont\Large\bfseries}{\thechapter}{1em}{}

    and the result is

    #
    Introduction

    I
    want to display it as

    Chapter #
    Introduction

    or is there any other way to change the font size interactively?

    Thanks you very much
    shastry

    • tom

      Hi Shastry,

      Thanks for your comment. I tried your code and it seems to work fine. Here’s a minimal working example:

      \documentclass[12pt]{report}
      \usepackage{titlesec}
      \titleformat{\chapter}[display]
      {\normalfont\Large\bfseries}{\thechapter}{1em}{}
      \begin{document}
      
      \chapter{First}
      \chapter{Second}
      
      \end{document}

      If this doesn’t help, please provide a similar complete example and I’ll be happy to take a look.

      Cheers, Tom

    • tom

      The default font size for all standard document classes is 10pt. You can change it to 12pt using:

      \documentclass[12pt]{report}

      HTH, Tom

      • Adil

        Thanks …. i did it, do you have some beautiful thesis template with nice looking chapters?

      • tom

        Hi Adil,

        Thesis templates are frequently provided by the university and there is not a lot of flexibility. If your institution doesn’t provide an official template, you might use any of the chapter styles described in the post above and change them to your liking. Also, it may be worthwhile to take a look at templates from other universities and adapt them according to your needs/preferences.

        HTH, Tom

  12. Emiliano Amendola

    Tom, is there a way that i can change the language of the default “Chapter 1” ? I need it to say “Capitulo 1”, for example in the “daleif1” chapter style at the top right chapter numeration. I’m using the spanish language package but nothing changes, i think the problem is the default configuration of the chapter style.
    Thanks..

    • tom

      Dear Emiliano,

      Thanks for your question. I removed the code as I wasn’t able to run it. If you’d like me to look at your code, please provide a minimal working example that I can copy-paste (similar to the example below). In general, you can set the language through babel. This works for me in the example. Alternatively, you can manually redefine \chaptername (code commented out). These approaches are not the same however. Babel also changes the language of other keywords like “Contents”, “List of Figures”, etc.

      Best, Tom

      \documentclass[11pt]{report}
      \usepackage[spanish]{babel}
      %\renewcommand\chaptername{Cap\'itulo}
      \begin{document}
      \tableofcontents
      \chapter{Introducci\'on}
      \end{document}
  13. Emiliano Amendola

    Thanks for the reply Tom, but the “\renewcommand\chaptername” suggestion isn’t working, i post here a snippet to see what the problem is, at page 7 the first chapter “Introducción” is generated with “Chapter 1” caption at the top right corner numeration, and subsecuent pages are generated with “Chapter 1. Introducción ” at the header note

    \RequirePackage[l2tabu]{nag}	% Warns for incorrect (obsolete) LaTeX usage
    \documentclass[a4paper,11pt,leqno,openbib]{memoir}
    \usepackage[utf8]{inputenc}
    \usepackage[spanish,english]{babel}
    \usepackage[T1]{fontenc}
    \usepackage{xcolor,lipsum,rotating,graphicx,newlfont}
    \usepackage{calc,soul}
    \makeatletter
    \newlength\dlf@normtxtw
    \setlength\dlf@normtxtw{\textwidth}
    \newsavebox{\feline@chapter}
    \newcommand\feline@chapter@marker[1][4cm]{%
    \sbox\feline@chapter{%
    \resizebox{!}{#1}{\fboxsep=1pt%
    \colorbox{gray}{\color{white}\thechapter}}}%
    \rotatebox{90}{%
    \resizebox{%
    \heightof{\usebox{\feline@chapter}}+\depthof{\usebox{\feline@chapter}}}%
    {!}{\scshape\so\@chapapp}}\quad%
    \raisebox{\depthof{\usebox{\feline@chapter}}}{\usebox{\feline@chapter}}}
    \newcommand\feline@chm[1][4cm]{%
    \sbox\feline@chapter{\feline@chapter@marker[#1]}%
    \makebox[0pt][c]{% aka \rlap
    \makebox[1cm][r]{\usebox\feline@chapter}}}
    \makechapterstyle{daleifmodif}{
    \renewcommand\chapnamefont{\normalfont\Large\scshape\raggedleft\so}
    \renewcommand\chaptitlefont{\normalfont\Large\bfseries\scshape}
    \renewcommand\chapternamenum{}
    \renewcommand\printchaptername{}
    \renewcommand\printchapternum{\null\hfill\feline@chm[2.5cm]\par}
    \renewcommand\afterchapternum{\par\vskip\midchapskip}
    \renewcommand\printchaptertitle[1]{\color{gray}\chaptitlefont\raggedleft ##1\par}}
    \makeatother
    \chapterstyle{daleifmodif}
    \begin{document}
    \pagenumbering{roman}
    \renewcommand{\contentsname}{Tabla de Contenidos}
    \maxtocdepth{subsection}
    \tableofcontents*
    \addtocontents{toc}{\par\nobreak \mbox{}\hfill{\bf P\'agina}\par\nobreak}
    \chapter{Introducci\'on}
    \section{Introducci\'on a Lipsum}
    \lipsum
    \end{document}
    • tom

      Hi Emiliano,

      Thanks for the code. The problem is that you use babel with the option spanish,english which sets it to English. The latter overwrites the former. What you’ll have to do is load babel with spanish only. If you see an error, try commenting out the first line (nag package), it seems to only work with english.

      Nice chapter style by the way.

      Best, Tom.

      • Emiliano Amendola

        Thanks again Tom, but unfortunately i do have an error, even i’ve commented out the line “\RequirePackage[l2tabu]{nag}”. The error goes:

        Introduccion.tex:7:
        Argument of \@firstofone has an extra
        }.

        \par
        l.7 \chapter{Introducción}

  14. andreasm

    Hey Tom,
    First of all thanks for this awesome tutorial!
    I am currently trying to put your “Less is more” style to the template I am using but for some reason, the text of the chapter won’t show up !
    It would be awesome if you could help me !

    \documentclass[a4paper,12pt]{book}
    \usepackage[utf8]{inputenc}
    \usepackage[T1]{fontenc}
    \usepackage[frenchb]{babel}
    \usepackage{graphicx,xcolor}
    \usepackage[explicit]{titlesec}
    \usepackage{blindtext}
    \renewcommand\thechapter{\Roman{chapter}}
    \renewcommand\thesection{\Alph{section}}
    \renewcommand\thesubsection{\arabic{subsection}}
    \titlespacing{\chapter}{0pt}{*4}{*1.5}
    
    \definecolor{gray75}{gray}{0.75}
    \newcommand{\hsp}{\hspace{20pt}}
    \titleformat{\chapter}[hang]{\Huge\bfseries}{\thechapter\hsp\textcolor{gray75}{|}\hsp}{0pt}{\Huge\bfseries}
    
    \begin{document}
    \blinddocument
    \end{document}
    • tom

      Hi Andreas,

      I’m glad you like the chapter style. I hope you don’t mind that I shortened your code to the most relevant bits. The code works if you load titlesec without the explicit option. Please see the titlesec package documentation for more details.

      Cheers, Tom

      • andreasm

        Wow awesome,

        Thank you very much Tom and thanks for the explanation, didn’t figure out it could have its origin in the way the package was loaded.

        Cheers,

Leave a Reply