How to adjust the size and placement of chapter heading in report class











up vote
8
down vote

favorite
2












How could I adjust the size and placement of chapter heading in my custom class? I am using report class as my base. When I used titlesec package inside my custom class, it threw error




! Package titlesec Error: Not allowed in `easy'
settings.











share|improve this question






















  • So you don't want to use titlesec?
    – Werner
    Sep 19 '13 at 4:37










  • @Werner I want my things done. Thats all :D
    – tex
    Sep 19 '13 at 4:38















up vote
8
down vote

favorite
2












How could I adjust the size and placement of chapter heading in my custom class? I am using report class as my base. When I used titlesec package inside my custom class, it threw error




! Package titlesec Error: Not allowed in `easy'
settings.











share|improve this question






















  • So you don't want to use titlesec?
    – Werner
    Sep 19 '13 at 4:37










  • @Werner I want my things done. Thats all :D
    – tex
    Sep 19 '13 at 4:38













up vote
8
down vote

favorite
2









up vote
8
down vote

favorite
2






2





How could I adjust the size and placement of chapter heading in my custom class? I am using report class as my base. When I used titlesec package inside my custom class, it threw error




! Package titlesec Error: Not allowed in `easy'
settings.











share|improve this question













How could I adjust the size and placement of chapter heading in my custom class? I am using report class as my base. When I used titlesec package inside my custom class, it threw error




! Package titlesec Error: Not allowed in `easy'
settings.








titlesec documentclass-writing






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Sep 19 '13 at 4:34









tex

1,42952132




1,42952132












  • So you don't want to use titlesec?
    – Werner
    Sep 19 '13 at 4:37










  • @Werner I want my things done. Thats all :D
    – tex
    Sep 19 '13 at 4:38


















  • So you don't want to use titlesec?
    – Werner
    Sep 19 '13 at 4:37










  • @Werner I want my things done. Thats all :D
    – tex
    Sep 19 '13 at 4:38
















So you don't want to use titlesec?
– Werner
Sep 19 '13 at 4:37




So you don't want to use titlesec?
– Werner
Sep 19 '13 at 4:37












@Werner I want my things done. Thats all :D
– tex
Sep 19 '13 at 4:38




@Werner I want my things done. Thats all :D
– tex
Sep 19 '13 at 4:38










2 Answers
2






active

oldest

votes

















up vote
9
down vote



accepted










The error message indicates that you were trying to use the "easy setup" with titleformat* in a wrong way. For substantial formatting modifications, use the non-starred variant titleformat and for changing the spacing, use titlespacing*. Below are the default settings, which you can change according to your needs:



usepackage{titlesec}

titleformat{chapter}[display]
{normalfonthugebfseries}{chaptertitlename thechapter}{20pt}{Huge}
titlespacing*{chapter}
{0pt}{50pt}{40pt}


For example, to center the title, reduce the space before from 50pt to 30pt and the space after from 40pt to 20pt, you can do:



documentclass{report}
usepackage{titlesec}
usepackage{lipsum}

titleformat{chapter}[display]
{normalfonthugebfseriesfilcenter}{chaptertitlename thechapter}{20pt}{Huge}
titlespacing*{chapter}
{0pt}{30pt}{20pt}

begin{document}
chapter{Test Chapter}
lipsum[4]
end{document}


enter image description here






share|improve this answer























  • How could I place it at Center?
    – tex
    Sep 19 '13 at 4:51










  • @user3984 please see my updated answer.
    – Gonzalo Medina
    Sep 19 '13 at 4:53










  • Why does the default use pt instead of em. shouldn't ems be used to scale in case of a huge paper sheet?
    – Mario S. E.
    Nov 1 '13 at 0:33










  • @GonzaloMedina Is the first snippet really the default? If I have a chapter followed by a section, I get different vertical spacing with and without that snippet.
    – LaRiFaRi
    Jul 15 '15 at 7:42












  • @LaRiFaRi That's what the titlesec documentation says (page 23). However, you are right. Even with regular text after the title, there's a slight difference in vertical spacing between the default settings and what titlesec states is the configuration thet replicates the standard settings.
    – Gonzalo Medina
    Jul 15 '15 at 13:13


















up vote
3
down vote













The regular (numbered) chapter header in report is set by @makechapterhead:



def@makechapterhead#1{%
vspace*{50p@}%
{parindent z@ raggedright normalfont
ifnum c@secnumdepth >m@ne
hugebfseries @chapappspace thechapter
parnobreak
vskip 20p@
fi
interlinepenalty@M
Huge bfseries #1parnobreak
vskip 40p@
}}


You see a 50p@ (or 50pt) vertical gap before setting @chapappspace thechapter in hugebfseries; then another 20p@ gap and the title in Hugebfseries, and yet another 40p@. Starred chapters are set using @makeschapterhead:



def@makeschapterhead#1{%
vspace*{50p@}%
{parindent z@ raggedright
normalfont
interlinepenalty@M
Huge bfseries #1parnobreak
vskip 40p@
}}


You can change these values to your liking.






share|improve this answer





















    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "85"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














     

    draft saved


    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f134031%2fhow-to-adjust-the-size-and-placement-of-chapter-heading-in-report-class%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    9
    down vote



    accepted










    The error message indicates that you were trying to use the "easy setup" with titleformat* in a wrong way. For substantial formatting modifications, use the non-starred variant titleformat and for changing the spacing, use titlespacing*. Below are the default settings, which you can change according to your needs:



    usepackage{titlesec}

    titleformat{chapter}[display]
    {normalfonthugebfseries}{chaptertitlename thechapter}{20pt}{Huge}
    titlespacing*{chapter}
    {0pt}{50pt}{40pt}


    For example, to center the title, reduce the space before from 50pt to 30pt and the space after from 40pt to 20pt, you can do:



    documentclass{report}
    usepackage{titlesec}
    usepackage{lipsum}

    titleformat{chapter}[display]
    {normalfonthugebfseriesfilcenter}{chaptertitlename thechapter}{20pt}{Huge}
    titlespacing*{chapter}
    {0pt}{30pt}{20pt}

    begin{document}
    chapter{Test Chapter}
    lipsum[4]
    end{document}


    enter image description here






    share|improve this answer























    • How could I place it at Center?
      – tex
      Sep 19 '13 at 4:51










    • @user3984 please see my updated answer.
      – Gonzalo Medina
      Sep 19 '13 at 4:53










    • Why does the default use pt instead of em. shouldn't ems be used to scale in case of a huge paper sheet?
      – Mario S. E.
      Nov 1 '13 at 0:33










    • @GonzaloMedina Is the first snippet really the default? If I have a chapter followed by a section, I get different vertical spacing with and without that snippet.
      – LaRiFaRi
      Jul 15 '15 at 7:42












    • @LaRiFaRi That's what the titlesec documentation says (page 23). However, you are right. Even with regular text after the title, there's a slight difference in vertical spacing between the default settings and what titlesec states is the configuration thet replicates the standard settings.
      – Gonzalo Medina
      Jul 15 '15 at 13:13















    up vote
    9
    down vote



    accepted










    The error message indicates that you were trying to use the "easy setup" with titleformat* in a wrong way. For substantial formatting modifications, use the non-starred variant titleformat and for changing the spacing, use titlespacing*. Below are the default settings, which you can change according to your needs:



    usepackage{titlesec}

    titleformat{chapter}[display]
    {normalfonthugebfseries}{chaptertitlename thechapter}{20pt}{Huge}
    titlespacing*{chapter}
    {0pt}{50pt}{40pt}


    For example, to center the title, reduce the space before from 50pt to 30pt and the space after from 40pt to 20pt, you can do:



    documentclass{report}
    usepackage{titlesec}
    usepackage{lipsum}

    titleformat{chapter}[display]
    {normalfonthugebfseriesfilcenter}{chaptertitlename thechapter}{20pt}{Huge}
    titlespacing*{chapter}
    {0pt}{30pt}{20pt}

    begin{document}
    chapter{Test Chapter}
    lipsum[4]
    end{document}


    enter image description here






    share|improve this answer























    • How could I place it at Center?
      – tex
      Sep 19 '13 at 4:51










    • @user3984 please see my updated answer.
      – Gonzalo Medina
      Sep 19 '13 at 4:53










    • Why does the default use pt instead of em. shouldn't ems be used to scale in case of a huge paper sheet?
      – Mario S. E.
      Nov 1 '13 at 0:33










    • @GonzaloMedina Is the first snippet really the default? If I have a chapter followed by a section, I get different vertical spacing with and without that snippet.
      – LaRiFaRi
      Jul 15 '15 at 7:42












    • @LaRiFaRi That's what the titlesec documentation says (page 23). However, you are right. Even with regular text after the title, there's a slight difference in vertical spacing between the default settings and what titlesec states is the configuration thet replicates the standard settings.
      – Gonzalo Medina
      Jul 15 '15 at 13:13













    up vote
    9
    down vote



    accepted







    up vote
    9
    down vote



    accepted






    The error message indicates that you were trying to use the "easy setup" with titleformat* in a wrong way. For substantial formatting modifications, use the non-starred variant titleformat and for changing the spacing, use titlespacing*. Below are the default settings, which you can change according to your needs:



    usepackage{titlesec}

    titleformat{chapter}[display]
    {normalfonthugebfseries}{chaptertitlename thechapter}{20pt}{Huge}
    titlespacing*{chapter}
    {0pt}{50pt}{40pt}


    For example, to center the title, reduce the space before from 50pt to 30pt and the space after from 40pt to 20pt, you can do:



    documentclass{report}
    usepackage{titlesec}
    usepackage{lipsum}

    titleformat{chapter}[display]
    {normalfonthugebfseriesfilcenter}{chaptertitlename thechapter}{20pt}{Huge}
    titlespacing*{chapter}
    {0pt}{30pt}{20pt}

    begin{document}
    chapter{Test Chapter}
    lipsum[4]
    end{document}


    enter image description here






    share|improve this answer














    The error message indicates that you were trying to use the "easy setup" with titleformat* in a wrong way. For substantial formatting modifications, use the non-starred variant titleformat and for changing the spacing, use titlespacing*. Below are the default settings, which you can change according to your needs:



    usepackage{titlesec}

    titleformat{chapter}[display]
    {normalfonthugebfseries}{chaptertitlename thechapter}{20pt}{Huge}
    titlespacing*{chapter}
    {0pt}{50pt}{40pt}


    For example, to center the title, reduce the space before from 50pt to 30pt and the space after from 40pt to 20pt, you can do:



    documentclass{report}
    usepackage{titlesec}
    usepackage{lipsum}

    titleformat{chapter}[display]
    {normalfonthugebfseriesfilcenter}{chaptertitlename thechapter}{20pt}{Huge}
    titlespacing*{chapter}
    {0pt}{30pt}{20pt}

    begin{document}
    chapter{Test Chapter}
    lipsum[4]
    end{document}


    enter image description here







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Sep 19 '13 at 4:56

























    answered Sep 19 '13 at 4:48









    Gonzalo Medina

    393k4012861555




    393k4012861555












    • How could I place it at Center?
      – tex
      Sep 19 '13 at 4:51










    • @user3984 please see my updated answer.
      – Gonzalo Medina
      Sep 19 '13 at 4:53










    • Why does the default use pt instead of em. shouldn't ems be used to scale in case of a huge paper sheet?
      – Mario S. E.
      Nov 1 '13 at 0:33










    • @GonzaloMedina Is the first snippet really the default? If I have a chapter followed by a section, I get different vertical spacing with and without that snippet.
      – LaRiFaRi
      Jul 15 '15 at 7:42












    • @LaRiFaRi That's what the titlesec documentation says (page 23). However, you are right. Even with regular text after the title, there's a slight difference in vertical spacing between the default settings and what titlesec states is the configuration thet replicates the standard settings.
      – Gonzalo Medina
      Jul 15 '15 at 13:13


















    • How could I place it at Center?
      – tex
      Sep 19 '13 at 4:51










    • @user3984 please see my updated answer.
      – Gonzalo Medina
      Sep 19 '13 at 4:53










    • Why does the default use pt instead of em. shouldn't ems be used to scale in case of a huge paper sheet?
      – Mario S. E.
      Nov 1 '13 at 0:33










    • @GonzaloMedina Is the first snippet really the default? If I have a chapter followed by a section, I get different vertical spacing with and without that snippet.
      – LaRiFaRi
      Jul 15 '15 at 7:42












    • @LaRiFaRi That's what the titlesec documentation says (page 23). However, you are right. Even with regular text after the title, there's a slight difference in vertical spacing between the default settings and what titlesec states is the configuration thet replicates the standard settings.
      – Gonzalo Medina
      Jul 15 '15 at 13:13
















    How could I place it at Center?
    – tex
    Sep 19 '13 at 4:51




    How could I place it at Center?
    – tex
    Sep 19 '13 at 4:51












    @user3984 please see my updated answer.
    – Gonzalo Medina
    Sep 19 '13 at 4:53




    @user3984 please see my updated answer.
    – Gonzalo Medina
    Sep 19 '13 at 4:53












    Why does the default use pt instead of em. shouldn't ems be used to scale in case of a huge paper sheet?
    – Mario S. E.
    Nov 1 '13 at 0:33




    Why does the default use pt instead of em. shouldn't ems be used to scale in case of a huge paper sheet?
    – Mario S. E.
    Nov 1 '13 at 0:33












    @GonzaloMedina Is the first snippet really the default? If I have a chapter followed by a section, I get different vertical spacing with and without that snippet.
    – LaRiFaRi
    Jul 15 '15 at 7:42






    @GonzaloMedina Is the first snippet really the default? If I have a chapter followed by a section, I get different vertical spacing with and without that snippet.
    – LaRiFaRi
    Jul 15 '15 at 7:42














    @LaRiFaRi That's what the titlesec documentation says (page 23). However, you are right. Even with regular text after the title, there's a slight difference in vertical spacing between the default settings and what titlesec states is the configuration thet replicates the standard settings.
    – Gonzalo Medina
    Jul 15 '15 at 13:13




    @LaRiFaRi That's what the titlesec documentation says (page 23). However, you are right. Even with regular text after the title, there's a slight difference in vertical spacing between the default settings and what titlesec states is the configuration thet replicates the standard settings.
    – Gonzalo Medina
    Jul 15 '15 at 13:13










    up vote
    3
    down vote













    The regular (numbered) chapter header in report is set by @makechapterhead:



    def@makechapterhead#1{%
    vspace*{50p@}%
    {parindent z@ raggedright normalfont
    ifnum c@secnumdepth >m@ne
    hugebfseries @chapappspace thechapter
    parnobreak
    vskip 20p@
    fi
    interlinepenalty@M
    Huge bfseries #1parnobreak
    vskip 40p@
    }}


    You see a 50p@ (or 50pt) vertical gap before setting @chapappspace thechapter in hugebfseries; then another 20p@ gap and the title in Hugebfseries, and yet another 40p@. Starred chapters are set using @makeschapterhead:



    def@makeschapterhead#1{%
    vspace*{50p@}%
    {parindent z@ raggedright
    normalfont
    interlinepenalty@M
    Huge bfseries #1parnobreak
    vskip 40p@
    }}


    You can change these values to your liking.






    share|improve this answer

























      up vote
      3
      down vote













      The regular (numbered) chapter header in report is set by @makechapterhead:



      def@makechapterhead#1{%
      vspace*{50p@}%
      {parindent z@ raggedright normalfont
      ifnum c@secnumdepth >m@ne
      hugebfseries @chapappspace thechapter
      parnobreak
      vskip 20p@
      fi
      interlinepenalty@M
      Huge bfseries #1parnobreak
      vskip 40p@
      }}


      You see a 50p@ (or 50pt) vertical gap before setting @chapappspace thechapter in hugebfseries; then another 20p@ gap and the title in Hugebfseries, and yet another 40p@. Starred chapters are set using @makeschapterhead:



      def@makeschapterhead#1{%
      vspace*{50p@}%
      {parindent z@ raggedright
      normalfont
      interlinepenalty@M
      Huge bfseries #1parnobreak
      vskip 40p@
      }}


      You can change these values to your liking.






      share|improve this answer























        up vote
        3
        down vote










        up vote
        3
        down vote









        The regular (numbered) chapter header in report is set by @makechapterhead:



        def@makechapterhead#1{%
        vspace*{50p@}%
        {parindent z@ raggedright normalfont
        ifnum c@secnumdepth >m@ne
        hugebfseries @chapappspace thechapter
        parnobreak
        vskip 20p@
        fi
        interlinepenalty@M
        Huge bfseries #1parnobreak
        vskip 40p@
        }}


        You see a 50p@ (or 50pt) vertical gap before setting @chapappspace thechapter in hugebfseries; then another 20p@ gap and the title in Hugebfseries, and yet another 40p@. Starred chapters are set using @makeschapterhead:



        def@makeschapterhead#1{%
        vspace*{50p@}%
        {parindent z@ raggedright
        normalfont
        interlinepenalty@M
        Huge bfseries #1parnobreak
        vskip 40p@
        }}


        You can change these values to your liking.






        share|improve this answer












        The regular (numbered) chapter header in report is set by @makechapterhead:



        def@makechapterhead#1{%
        vspace*{50p@}%
        {parindent z@ raggedright normalfont
        ifnum c@secnumdepth >m@ne
        hugebfseries @chapappspace thechapter
        parnobreak
        vskip 20p@
        fi
        interlinepenalty@M
        Huge bfseries #1parnobreak
        vskip 40p@
        }}


        You see a 50p@ (or 50pt) vertical gap before setting @chapappspace thechapter in hugebfseries; then another 20p@ gap and the title in Hugebfseries, and yet another 40p@. Starred chapters are set using @makeschapterhead:



        def@makeschapterhead#1{%
        vspace*{50p@}%
        {parindent z@ raggedright
        normalfont
        interlinepenalty@M
        Huge bfseries #1parnobreak
        vskip 40p@
        }}


        You can change these values to your liking.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Sep 19 '13 at 4:44









        Werner

        432k609511632




        432k609511632






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f134031%2fhow-to-adjust-the-size-and-placement-of-chapter-heading-in-report-class%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How to change which sound is reproduced for terminal bell?

            Can I use Tabulator js library in my java Spring + Thymeleaf project?

            Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents