Name of section in titleformat











up vote
1
down vote

favorite












When I try the titleformat commands with my sections, the name of the section doesn't appear.



titleformat{section}[wrap]
{normalfontbfseries}
{thesection.}{0.5em}{}


As result with this code, I get thisNumbering without name of section



Could someone explain me why?



MWE:



documentclass[10pt,french]{report}
usepackage[utf8]{inputenc}
usepackage[explicit]{titlesec}
titleformat{section}[wrap]
{normalfontbfseries}
{thesection.}{0.5em}{}
%titlespacing{section}{-1.5cm}{0cm}{0cm}%1=command,2=leftmargin,3

usepackage[utf8]{inputenc}
begin{document}
chapter{Chapitre} % (fold)
label{cha:chapite}
section{Section} % (fold)
label{sec:section}
section{Secondth section} % (fold)
label{sec:secondth_section}

end{document}









share|improve this question




















  • 1




    Please, present a minimal document showing the issue.
    – egreg
    Sep 26 at 17:45















up vote
1
down vote

favorite












When I try the titleformat commands with my sections, the name of the section doesn't appear.



titleformat{section}[wrap]
{normalfontbfseries}
{thesection.}{0.5em}{}


As result with this code, I get thisNumbering without name of section



Could someone explain me why?



MWE:



documentclass[10pt,french]{report}
usepackage[utf8]{inputenc}
usepackage[explicit]{titlesec}
titleformat{section}[wrap]
{normalfontbfseries}
{thesection.}{0.5em}{}
%titlespacing{section}{-1.5cm}{0cm}{0cm}%1=command,2=leftmargin,3

usepackage[utf8]{inputenc}
begin{document}
chapter{Chapitre} % (fold)
label{cha:chapite}
section{Section} % (fold)
label{sec:section}
section{Secondth section} % (fold)
label{sec:secondth_section}

end{document}









share|improve this question




















  • 1




    Please, present a minimal document showing the issue.
    – egreg
    Sep 26 at 17:45













up vote
1
down vote

favorite









up vote
1
down vote

favorite











When I try the titleformat commands with my sections, the name of the section doesn't appear.



titleformat{section}[wrap]
{normalfontbfseries}
{thesection.}{0.5em}{}


As result with this code, I get thisNumbering without name of section



Could someone explain me why?



MWE:



documentclass[10pt,french]{report}
usepackage[utf8]{inputenc}
usepackage[explicit]{titlesec}
titleformat{section}[wrap]
{normalfontbfseries}
{thesection.}{0.5em}{}
%titlespacing{section}{-1.5cm}{0cm}{0cm}%1=command,2=leftmargin,3

usepackage[utf8]{inputenc}
begin{document}
chapter{Chapitre} % (fold)
label{cha:chapite}
section{Section} % (fold)
label{sec:section}
section{Secondth section} % (fold)
label{sec:secondth_section}

end{document}









share|improve this question















When I try the titleformat commands with my sections, the name of the section doesn't appear.



titleformat{section}[wrap]
{normalfontbfseries}
{thesection.}{0.5em}{}


As result with this code, I get thisNumbering without name of section



Could someone explain me why?



MWE:



documentclass[10pt,french]{report}
usepackage[utf8]{inputenc}
usepackage[explicit]{titlesec}
titleformat{section}[wrap]
{normalfontbfseries}
{thesection.}{0.5em}{}
%titlespacing{section}{-1.5cm}{0cm}{0cm}%1=command,2=leftmargin,3

usepackage[utf8]{inputenc}
begin{document}
chapter{Chapitre} % (fold)
label{cha:chapite}
section{Section} % (fold)
label{sec:section}
section{Secondth section} % (fold)
label{sec:secondth_section}

end{document}






sectioning






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Oct 13 at 20:24









Kurt

33.8k846156




33.8k846156










asked Sep 26 at 13:57









Warok

656




656








  • 1




    Please, present a minimal document showing the issue.
    – egreg
    Sep 26 at 17:45














  • 1




    Please, present a minimal document showing the issue.
    – egreg
    Sep 26 at 17:45








1




1




Please, present a minimal document showing the issue.
– egreg
Sep 26 at 17:45




Please, present a minimal document showing the issue.
– egreg
Sep 26 at 17:45










1 Answer
1






active

oldest

votes

















up vote
0
down vote













The fact that your section titles are not being displayed is because you're passed the explicit option to the package titlesec:



usepackage[explicit]{titlesec}


In such cases, you have to explicitly use #1 within the definition of titleformat to place the title that is being used. Without that, the title is gobbled.



enter image description here



documentclass{report}

usepackage[explicit]{titlesec}
titleformat{section}[display]
{normalfontbfseries}
{thesection. #1}{0.5em}{}% <--- #1 denotes section title

begin{document}

chapter{A chapter}

section{First section}

section{Second section}

end{document}


Even though I've changed the section title format from wrap to display, that doesn't make a difference in terms of the use of #1 under explicit.






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%2f452615%2fname-of-section-in-titleformat%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    The fact that your section titles are not being displayed is because you're passed the explicit option to the package titlesec:



    usepackage[explicit]{titlesec}


    In such cases, you have to explicitly use #1 within the definition of titleformat to place the title that is being used. Without that, the title is gobbled.



    enter image description here



    documentclass{report}

    usepackage[explicit]{titlesec}
    titleformat{section}[display]
    {normalfontbfseries}
    {thesection. #1}{0.5em}{}% <--- #1 denotes section title

    begin{document}

    chapter{A chapter}

    section{First section}

    section{Second section}

    end{document}


    Even though I've changed the section title format from wrap to display, that doesn't make a difference in terms of the use of #1 under explicit.






    share|improve this answer

























      up vote
      0
      down vote













      The fact that your section titles are not being displayed is because you're passed the explicit option to the package titlesec:



      usepackage[explicit]{titlesec}


      In such cases, you have to explicitly use #1 within the definition of titleformat to place the title that is being used. Without that, the title is gobbled.



      enter image description here



      documentclass{report}

      usepackage[explicit]{titlesec}
      titleformat{section}[display]
      {normalfontbfseries}
      {thesection. #1}{0.5em}{}% <--- #1 denotes section title

      begin{document}

      chapter{A chapter}

      section{First section}

      section{Second section}

      end{document}


      Even though I've changed the section title format from wrap to display, that doesn't make a difference in terms of the use of #1 under explicit.






      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        The fact that your section titles are not being displayed is because you're passed the explicit option to the package titlesec:



        usepackage[explicit]{titlesec}


        In such cases, you have to explicitly use #1 within the definition of titleformat to place the title that is being used. Without that, the title is gobbled.



        enter image description here



        documentclass{report}

        usepackage[explicit]{titlesec}
        titleformat{section}[display]
        {normalfontbfseries}
        {thesection. #1}{0.5em}{}% <--- #1 denotes section title

        begin{document}

        chapter{A chapter}

        section{First section}

        section{Second section}

        end{document}


        Even though I've changed the section title format from wrap to display, that doesn't make a difference in terms of the use of #1 under explicit.






        share|improve this answer












        The fact that your section titles are not being displayed is because you're passed the explicit option to the package titlesec:



        usepackage[explicit]{titlesec}


        In such cases, you have to explicitly use #1 within the definition of titleformat to place the title that is being used. Without that, the title is gobbled.



        enter image description here



        documentclass{report}

        usepackage[explicit]{titlesec}
        titleformat{section}[display]
        {normalfontbfseries}
        {thesection. #1}{0.5em}{}% <--- #1 denotes section title

        begin{document}

        chapter{A chapter}

        section{First section}

        section{Second section}

        end{document}


        Even though I've changed the section title format from wrap to display, that doesn't make a difference in terms of the use of #1 under explicit.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Oct 13 at 20:38









        Werner

        430k599461623




        430k599461623






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f452615%2fname-of-section-in-titleformat%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