Recover style of section modified by titlesec

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












1















After the section style is modified by the titlesec package, I want to return to the original style by let and renewcommand, but fails. Why and how to achieve this?



MWE:



documentclassarticle
usepackagetitlesec,xcolor

begindocument
sectionOriginal Section Style
letoldsectionsection %store the original macro section
oldsectionOriginal Section Style stored
titleformatsectionhugecolorredRomansection1em
sectionNew Section Style
letsectionoldsection % recovery of section
renewcommandthesectionarabicsection% I tried by another way
sectionI want to restore the original section style, but fails
enddocument


enter image description here










share|improve this question
























  • Different section styles may confuse readers however, as it breaks the coporate design somehow

    – user31729
    Feb 16 at 11:06















1















After the section style is modified by the titlesec package, I want to return to the original style by let and renewcommand, but fails. Why and how to achieve this?



MWE:



documentclassarticle
usepackagetitlesec,xcolor

begindocument
sectionOriginal Section Style
letoldsectionsection %store the original macro section
oldsectionOriginal Section Style stored
titleformatsectionhugecolorredRomansection1em
sectionNew Section Style
letsectionoldsection % recovery of section
renewcommandthesectionarabicsection% I tried by another way
sectionI want to restore the original section style, but fails
enddocument


enter image description here










share|improve this question
























  • Different section styles may confuse readers however, as it breaks the coporate design somehow

    – user31729
    Feb 16 at 11:06













1












1








1








After the section style is modified by the titlesec package, I want to return to the original style by let and renewcommand, but fails. Why and how to achieve this?



MWE:



documentclassarticle
usepackagetitlesec,xcolor

begindocument
sectionOriginal Section Style
letoldsectionsection %store the original macro section
oldsectionOriginal Section Style stored
titleformatsectionhugecolorredRomansection1em
sectionNew Section Style
letsectionoldsection % recovery of section
renewcommandthesectionarabicsection% I tried by another way
sectionI want to restore the original section style, but fails
enddocument


enter image description here










share|improve this question
















After the section style is modified by the titlesec package, I want to return to the original style by let and renewcommand, but fails. Why and how to achieve this?



MWE:



documentclassarticle
usepackagetitlesec,xcolor

begindocument
sectionOriginal Section Style
letoldsectionsection %store the original macro section
oldsectionOriginal Section Style stored
titleformatsectionhugecolorredRomansection1em
sectionNew Section Style
letsectionoldsection % recovery of section
renewcommandthesectionarabicsection% I tried by another way
sectionI want to restore the original section style, but fails
enddocument


enter image description here







sectioning titlesec






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 16 at 10:32







lyl

















asked Feb 16 at 10:11









lyllyl

70438




70438












  • Different section styles may confuse readers however, as it breaks the coporate design somehow

    – user31729
    Feb 16 at 11:06

















  • Different section styles may confuse readers however, as it breaks the coporate design somehow

    – user31729
    Feb 16 at 11:06
















Different section styles may confuse readers however, as it breaks the coporate design somehow

– user31729
Feb 16 at 11:06





Different section styles may confuse readers however, as it breaks the coporate design somehow

– user31729
Feb 16 at 11:06










2 Answers
2






active

oldest

votes


















2














In section 9.2 of the titlesec manual, you find that the default style for section is



titleformatsectionnormalfontLargebfseriesthesection1em


Thus you can go back and forward:



documentclassarticle
usepackagetitlesec,xcolor

newcommandoriginalsections%
titleformatsectionnormalfontLargebfseriesthesection1em%

newcommandmodifiedsections%
titleformatsectionhugecolorredRomansection1em%


originalsections

begindocument

sectionOriginal Section Style A
sectionOriginal Section Style B

modifiedsections

sectionNew Section Style A
sectionNew Section Style B

originalsections

sectionOriginal Section Style C

enddocument


enter image description here






share|improve this answer






























    1














    The old definition of section etc. must be captured by a let statement



    before



    titlesec changes section etc, i.e.



    letoldsectionsection
    usepackagetitlesec


    enter image description here



    Here is the modified code:



    documentclassarticle

    letoldsectionsection %store the original macro section

    usepackagetitlesec
    usepackagexcolor


    begindocument

    sectionOriginal Section Style
    oldsectionOriginal Section Style stored
    titleformatsectionhugecolorredRomansection1em
    sectionNew Section Style
    letsectionoldsection % recovery of section
    renewcommandthesectionarabicsection% I tried by another way
    sectionI want to restore the original section style, but fails
    enddocument





    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',
      autoActivateHeartbeat: false,
      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%2f475161%2frecover-style-of-section-modified-by-titlesec%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









      2














      In section 9.2 of the titlesec manual, you find that the default style for section is



      titleformatsectionnormalfontLargebfseriesthesection1em


      Thus you can go back and forward:



      documentclassarticle
      usepackagetitlesec,xcolor

      newcommandoriginalsections%
      titleformatsectionnormalfontLargebfseriesthesection1em%

      newcommandmodifiedsections%
      titleformatsectionhugecolorredRomansection1em%


      originalsections

      begindocument

      sectionOriginal Section Style A
      sectionOriginal Section Style B

      modifiedsections

      sectionNew Section Style A
      sectionNew Section Style B

      originalsections

      sectionOriginal Section Style C

      enddocument


      enter image description here






      share|improve this answer



























        2














        In section 9.2 of the titlesec manual, you find that the default style for section is



        titleformatsectionnormalfontLargebfseriesthesection1em


        Thus you can go back and forward:



        documentclassarticle
        usepackagetitlesec,xcolor

        newcommandoriginalsections%
        titleformatsectionnormalfontLargebfseriesthesection1em%

        newcommandmodifiedsections%
        titleformatsectionhugecolorredRomansection1em%


        originalsections

        begindocument

        sectionOriginal Section Style A
        sectionOriginal Section Style B

        modifiedsections

        sectionNew Section Style A
        sectionNew Section Style B

        originalsections

        sectionOriginal Section Style C

        enddocument


        enter image description here






        share|improve this answer

























          2












          2








          2







          In section 9.2 of the titlesec manual, you find that the default style for section is



          titleformatsectionnormalfontLargebfseriesthesection1em


          Thus you can go back and forward:



          documentclassarticle
          usepackagetitlesec,xcolor

          newcommandoriginalsections%
          titleformatsectionnormalfontLargebfseriesthesection1em%

          newcommandmodifiedsections%
          titleformatsectionhugecolorredRomansection1em%


          originalsections

          begindocument

          sectionOriginal Section Style A
          sectionOriginal Section Style B

          modifiedsections

          sectionNew Section Style A
          sectionNew Section Style B

          originalsections

          sectionOriginal Section Style C

          enddocument


          enter image description here






          share|improve this answer













          In section 9.2 of the titlesec manual, you find that the default style for section is



          titleformatsectionnormalfontLargebfseriesthesection1em


          Thus you can go back and forward:



          documentclassarticle
          usepackagetitlesec,xcolor

          newcommandoriginalsections%
          titleformatsectionnormalfontLargebfseriesthesection1em%

          newcommandmodifiedsections%
          titleformatsectionhugecolorredRomansection1em%


          originalsections

          begindocument

          sectionOriginal Section Style A
          sectionOriginal Section Style B

          modifiedsections

          sectionNew Section Style A
          sectionNew Section Style B

          originalsections

          sectionOriginal Section Style C

          enddocument


          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Feb 16 at 11:33









          egregegreg

          726k8819193226




          726k8819193226





















              1














              The old definition of section etc. must be captured by a let statement



              before



              titlesec changes section etc, i.e.



              letoldsectionsection
              usepackagetitlesec


              enter image description here



              Here is the modified code:



              documentclassarticle

              letoldsectionsection %store the original macro section

              usepackagetitlesec
              usepackagexcolor


              begindocument

              sectionOriginal Section Style
              oldsectionOriginal Section Style stored
              titleformatsectionhugecolorredRomansection1em
              sectionNew Section Style
              letsectionoldsection % recovery of section
              renewcommandthesectionarabicsection% I tried by another way
              sectionI want to restore the original section style, but fails
              enddocument





              share|improve this answer



























                1














                The old definition of section etc. must be captured by a let statement



                before



                titlesec changes section etc, i.e.



                letoldsectionsection
                usepackagetitlesec


                enter image description here



                Here is the modified code:



                documentclassarticle

                letoldsectionsection %store the original macro section

                usepackagetitlesec
                usepackagexcolor


                begindocument

                sectionOriginal Section Style
                oldsectionOriginal Section Style stored
                titleformatsectionhugecolorredRomansection1em
                sectionNew Section Style
                letsectionoldsection % recovery of section
                renewcommandthesectionarabicsection% I tried by another way
                sectionI want to restore the original section style, but fails
                enddocument





                share|improve this answer

























                  1












                  1








                  1







                  The old definition of section etc. must be captured by a let statement



                  before



                  titlesec changes section etc, i.e.



                  letoldsectionsection
                  usepackagetitlesec


                  enter image description here



                  Here is the modified code:



                  documentclassarticle

                  letoldsectionsection %store the original macro section

                  usepackagetitlesec
                  usepackagexcolor


                  begindocument

                  sectionOriginal Section Style
                  oldsectionOriginal Section Style stored
                  titleformatsectionhugecolorredRomansection1em
                  sectionNew Section Style
                  letsectionoldsection % recovery of section
                  renewcommandthesectionarabicsection% I tried by another way
                  sectionI want to restore the original section style, but fails
                  enddocument





                  share|improve this answer













                  The old definition of section etc. must be captured by a let statement



                  before



                  titlesec changes section etc, i.e.



                  letoldsectionsection
                  usepackagetitlesec


                  enter image description here



                  Here is the modified code:



                  documentclassarticle

                  letoldsectionsection %store the original macro section

                  usepackagetitlesec
                  usepackagexcolor


                  begindocument

                  sectionOriginal Section Style
                  oldsectionOriginal Section Style stored
                  titleformatsectionhugecolorredRomansection1em
                  sectionNew Section Style
                  letsectionoldsection % recovery of section
                  renewcommandthesectionarabicsection% I tried by another way
                  sectionI want to restore the original section style, but fails
                  enddocument






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Feb 16 at 11:03







                  user31729


































                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f475161%2frecover-style-of-section-modified-by-titlesec%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

                      Peggy Mitchell

                      Palaiologos

                      The Forum (Inglewood, California)