Appendix name in Uppercase but in Appendix TOC lowercased












1















I'm writing a thesis in which there is an appendix. It's referenced in the TOC of appendixes. However, there is a requirement as to :




  • have the appendix name in Uppercase where the appendix actually is

  • and in the Appendix TOC, it should appear in lowercase


I declare the appendix with :



Annexe{Échantillons Utilisés}


Which makes it ok for the lowercase req. in TOC, but doesn't make it appear in Uppercase at the appendix title.



Here is the template to use.
Additionally, here is the main page on which you can retrieve the template in case of a broken link.



I was thinking of looking into the .sty file to MakeUpperCase the "appendix head" but I have no clue where to write that down. Is it a viable solution? Where should I input that (or a more interesting solution if anyone knows one)?



Thanks!



Edit : here is my attempt at a minimal (working) example in an Overleaf playground, so we can see and play around with the .sty file provided. There is also a folder with the whole templates files if needed.



My MWE is full of bugs (sigh), but we can see that the TOC of appendix and the appendix head share the same formatting (uppercase/lowercase).










share|improve this question




















  • 1





    Welcome to TeX SX! Could post a minimal, yet complete, code demonstrating the problem?

    – Bernard
    Mar 6 at 16:38






  • 2





    Note that users here do not like going off site for examples, mainly because those questions will not be relevant to others afterwards as the linked to material might disappear.

    – daleif
    Mar 6 at 16:41











  • Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with documentclass{...} and ending with end{document}.

    – Kurt
    Mar 6 at 16:46











  • Hi thanks for your comments. I modified the original post in an attempt to correct it. To demonstrate the problem I had to rely on the .sty file of 300 lines, so to keep this TeX SX clean I put the example in an Overleaf empty project with open access. @daleif I'll make sure to summarize the answer in an edit in case the material might disappear.

    – Seb
    Mar 6 at 19:53
















1















I'm writing a thesis in which there is an appendix. It's referenced in the TOC of appendixes. However, there is a requirement as to :




  • have the appendix name in Uppercase where the appendix actually is

  • and in the Appendix TOC, it should appear in lowercase


I declare the appendix with :



Annexe{Échantillons Utilisés}


Which makes it ok for the lowercase req. in TOC, but doesn't make it appear in Uppercase at the appendix title.



Here is the template to use.
Additionally, here is the main page on which you can retrieve the template in case of a broken link.



I was thinking of looking into the .sty file to MakeUpperCase the "appendix head" but I have no clue where to write that down. Is it a viable solution? Where should I input that (or a more interesting solution if anyone knows one)?



Thanks!



Edit : here is my attempt at a minimal (working) example in an Overleaf playground, so we can see and play around with the .sty file provided. There is also a folder with the whole templates files if needed.



My MWE is full of bugs (sigh), but we can see that the TOC of appendix and the appendix head share the same formatting (uppercase/lowercase).










share|improve this question




















  • 1





    Welcome to TeX SX! Could post a minimal, yet complete, code demonstrating the problem?

    – Bernard
    Mar 6 at 16:38






  • 2





    Note that users here do not like going off site for examples, mainly because those questions will not be relevant to others afterwards as the linked to material might disappear.

    – daleif
    Mar 6 at 16:41











  • Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with documentclass{...} and ending with end{document}.

    – Kurt
    Mar 6 at 16:46











  • Hi thanks for your comments. I modified the original post in an attempt to correct it. To demonstrate the problem I had to rely on the .sty file of 300 lines, so to keep this TeX SX clean I put the example in an Overleaf empty project with open access. @daleif I'll make sure to summarize the answer in an edit in case the material might disappear.

    – Seb
    Mar 6 at 19:53














1












1








1








I'm writing a thesis in which there is an appendix. It's referenced in the TOC of appendixes. However, there is a requirement as to :




  • have the appendix name in Uppercase where the appendix actually is

  • and in the Appendix TOC, it should appear in lowercase


I declare the appendix with :



Annexe{Échantillons Utilisés}


Which makes it ok for the lowercase req. in TOC, but doesn't make it appear in Uppercase at the appendix title.



Here is the template to use.
Additionally, here is the main page on which you can retrieve the template in case of a broken link.



I was thinking of looking into the .sty file to MakeUpperCase the "appendix head" but I have no clue where to write that down. Is it a viable solution? Where should I input that (or a more interesting solution if anyone knows one)?



Thanks!



Edit : here is my attempt at a minimal (working) example in an Overleaf playground, so we can see and play around with the .sty file provided. There is also a folder with the whole templates files if needed.



My MWE is full of bugs (sigh), but we can see that the TOC of appendix and the appendix head share the same formatting (uppercase/lowercase).










share|improve this question
















I'm writing a thesis in which there is an appendix. It's referenced in the TOC of appendixes. However, there is a requirement as to :




  • have the appendix name in Uppercase where the appendix actually is

  • and in the Appendix TOC, it should appear in lowercase


I declare the appendix with :



Annexe{Échantillons Utilisés}


Which makes it ok for the lowercase req. in TOC, but doesn't make it appear in Uppercase at the appendix title.



Here is the template to use.
Additionally, here is the main page on which you can retrieve the template in case of a broken link.



I was thinking of looking into the .sty file to MakeUpperCase the "appendix head" but I have no clue where to write that down. Is it a viable solution? Where should I input that (or a more interesting solution if anyone knows one)?



Thanks!



Edit : here is my attempt at a minimal (working) example in an Overleaf playground, so we can see and play around with the .sty file provided. There is also a folder with the whole templates files if needed.



My MWE is full of bugs (sigh), but we can see that the TOC of appendix and the appendix head share the same formatting (uppercase/lowercase).







table-of-contents appendix






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 6 at 19:37







Seb

















asked Mar 6 at 16:32









SebSeb

63




63








  • 1





    Welcome to TeX SX! Could post a minimal, yet complete, code demonstrating the problem?

    – Bernard
    Mar 6 at 16:38






  • 2





    Note that users here do not like going off site for examples, mainly because those questions will not be relevant to others afterwards as the linked to material might disappear.

    – daleif
    Mar 6 at 16:41











  • Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with documentclass{...} and ending with end{document}.

    – Kurt
    Mar 6 at 16:46











  • Hi thanks for your comments. I modified the original post in an attempt to correct it. To demonstrate the problem I had to rely on the .sty file of 300 lines, so to keep this TeX SX clean I put the example in an Overleaf empty project with open access. @daleif I'll make sure to summarize the answer in an edit in case the material might disappear.

    – Seb
    Mar 6 at 19:53














  • 1





    Welcome to TeX SX! Could post a minimal, yet complete, code demonstrating the problem?

    – Bernard
    Mar 6 at 16:38






  • 2





    Note that users here do not like going off site for examples, mainly because those questions will not be relevant to others afterwards as the linked to material might disappear.

    – daleif
    Mar 6 at 16:41











  • Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with documentclass{...} and ending with end{document}.

    – Kurt
    Mar 6 at 16:46











  • Hi thanks for your comments. I modified the original post in an attempt to correct it. To demonstrate the problem I had to rely on the .sty file of 300 lines, so to keep this TeX SX clean I put the example in an Overleaf empty project with open access. @daleif I'll make sure to summarize the answer in an edit in case the material might disappear.

    – Seb
    Mar 6 at 19:53








1




1





Welcome to TeX SX! Could post a minimal, yet complete, code demonstrating the problem?

– Bernard
Mar 6 at 16:38





Welcome to TeX SX! Could post a minimal, yet complete, code demonstrating the problem?

– Bernard
Mar 6 at 16:38




2




2





Note that users here do not like going off site for examples, mainly because those questions will not be relevant to others afterwards as the linked to material might disappear.

– daleif
Mar 6 at 16:41





Note that users here do not like going off site for examples, mainly because those questions will not be relevant to others afterwards as the linked to material might disappear.

– daleif
Mar 6 at 16:41













Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with documentclass{...} and ending with end{document}.

– Kurt
Mar 6 at 16:46





Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with documentclass{...} and ending with end{document}.

– Kurt
Mar 6 at 16:46













Hi thanks for your comments. I modified the original post in an attempt to correct it. To demonstrate the problem I had to rely on the .sty file of 300 lines, so to keep this TeX SX clean I put the example in an Overleaf empty project with open access. @daleif I'll make sure to summarize the answer in an edit in case the material might disappear.

– Seb
Mar 6 at 19:53





Hi thanks for your comments. I modified the original post in an attempt to correct it. To demonstrate the problem I had to rely on the .sty file of 300 lines, so to keep this TeX SX clean I put the example in an Overleaf empty project with open access. @daleif I'll make sure to summarize the answer in an edit in case the material might disappear.

– Seb
Mar 6 at 19:53










3 Answers
3






active

oldest

votes


















0














Welcome to TeX.SX! A bit more code would be great, however, if your issue is solely regarding the appendix name being non-capitalised, just declare it as a supressed section in case your document is an article or a chapter in case you chose report format like: chapter*{Appendix}. Subsequently, re-define the name using addcontentsline{toc}{chapter}{appendix}
Here a schematic exert from my own thesis layout:



documentclass[12pt]{report}
begin{document}
chapter*{Abstract}
newpage
tableofcontents
newpage
chapter{Chapter 1}
newpage
chapter*{Appendix} %Suppress the capitalised name
addcontentsline{toc}{chapter}{appendix} %Manually add the non-capitalised one
section{Risk Assessment}
section{Proofs}
end{document}


Your appendix will come out like this in your TOC:
enter image description here






share|improve this answer































    0














    I had a similar problem, you could try with something like this: the first line adds the title (so in your case it should be uppercase) and the second adds it to the TOC (so you type it lowercase).



    chapter*{Your Uppercase Title}
    addcontentsline{toc}{chapter}{your lowercase title}


    Edit: remember to add appendix before you start appendixes to have them numbered "A.", "B." etc. instead of continuing the numbering from the previous chapters. So the complete code above would be:



    appendix
    chapter*{Your Uppercase Title}
    addcontentsline{toc}{chapter}{your lowercase title}





    share|improve this answer

































      0














      Thanks for the answers! They indeed managed to solve the problem, but partially. It eventually interacted with all the rules included in the .sty file of the template.



      So to summarize the goto answer is :



      % eventually appendix here 
      chapter*{THE CHAPTER}
      addcontentsline{toc}{chapter}{The chapter}


      But it may conflict with the commands defined in the .sty of a template someone makes use of: like in my case Annexe{The chapter} has a defined style/spacing/etc. (However the answers helped me trace the whole process in the .sty so many thanks!)



      So you need to either grab in the .sty the style to apply and do that to the suggested answer, or find where and how to resolve that issue by hacking on the Annexe .sty directly.



      Here is a recap of the process to hopefully help others people diagnose the school template ! :)



      First off, the newcommandannexe defined by the school: here look for your interpretation of Annexe (if it's Appendix search for newcommandappendix).



      In my case it calls @annexe at some point in that command. @annexe is a function that takes as input my "The chapter". Here it is in full :



      def@annexe[#1]#2{ifnum c@secnumdepth >m@ne
      if@mainmatter
      refstepcounter{chapter}%
      typeout{@chapappspacethechapter.}%
      if@english
      addcontentsline{app}{annexe}%
      {protectnumberline{Appendixnobreakspacethechapter}#1}%
      else
      addcontentsline{app}{annexe}%
      {protectnumberline{Annexenobreakspacethechapter}#1}%
      fi
      else
      addcontentsline{app}{annexe}{#1}%
      fi
      else
      addcontentsline{app}{annexe}{#1}%
      fi
      chaptermark{#1}%
      if@twocolumn
      @topnewpage[@makeappendixhead{#2}]%
      else
      @makeappendixhead{#2}%
      @afterheading
      fi}


      As we see, it's a mess and it explains why the chapter*{} solution may not have worked as intended. Here we can see the addcontentsline{} command as well. The key to the issue is the @makeappendixhead{#2}} command used, here with the desired MakeUppercase{} command :



      def@makeappendixhead#1{%
      {parindent z@ raggedright normalfont
      centering
      ifnum c@secnumdepth >m@ne
      if@mainmatter
      if@english
      normalsizebfseries APPENDIXspacethechapter
      else
      normalsizebfseries ANNEXEspacethechapter
      fi
      %parnobreak
      %vskip 20p@
      spacespacespacespace
      fi
      fi
      interlinepenalty@M
      normalsize bfseries {MakeUppercase{#1}}parnobreak
      vskip 40p@
      }}


      And voilà ! :)



      Notice that I don't understand fully how to use the makeuppercase in that context (the double {{}} seems fishy to me) but with a few trial and error it eventually worked !






      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%2f478056%2fappendix-name-in-uppercase-but-in-appendix-toc-lowercased%23new-answer', 'question_page');
        }
        );

        Post as a guest















        Required, but never shown

























        3 Answers
        3






        active

        oldest

        votes








        3 Answers
        3






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        0














        Welcome to TeX.SX! A bit more code would be great, however, if your issue is solely regarding the appendix name being non-capitalised, just declare it as a supressed section in case your document is an article or a chapter in case you chose report format like: chapter*{Appendix}. Subsequently, re-define the name using addcontentsline{toc}{chapter}{appendix}
        Here a schematic exert from my own thesis layout:



        documentclass[12pt]{report}
        begin{document}
        chapter*{Abstract}
        newpage
        tableofcontents
        newpage
        chapter{Chapter 1}
        newpage
        chapter*{Appendix} %Suppress the capitalised name
        addcontentsline{toc}{chapter}{appendix} %Manually add the non-capitalised one
        section{Risk Assessment}
        section{Proofs}
        end{document}


        Your appendix will come out like this in your TOC:
        enter image description here






        share|improve this answer




























          0














          Welcome to TeX.SX! A bit more code would be great, however, if your issue is solely regarding the appendix name being non-capitalised, just declare it as a supressed section in case your document is an article or a chapter in case you chose report format like: chapter*{Appendix}. Subsequently, re-define the name using addcontentsline{toc}{chapter}{appendix}
          Here a schematic exert from my own thesis layout:



          documentclass[12pt]{report}
          begin{document}
          chapter*{Abstract}
          newpage
          tableofcontents
          newpage
          chapter{Chapter 1}
          newpage
          chapter*{Appendix} %Suppress the capitalised name
          addcontentsline{toc}{chapter}{appendix} %Manually add the non-capitalised one
          section{Risk Assessment}
          section{Proofs}
          end{document}


          Your appendix will come out like this in your TOC:
          enter image description here






          share|improve this answer


























            0












            0








            0







            Welcome to TeX.SX! A bit more code would be great, however, if your issue is solely regarding the appendix name being non-capitalised, just declare it as a supressed section in case your document is an article or a chapter in case you chose report format like: chapter*{Appendix}. Subsequently, re-define the name using addcontentsline{toc}{chapter}{appendix}
            Here a schematic exert from my own thesis layout:



            documentclass[12pt]{report}
            begin{document}
            chapter*{Abstract}
            newpage
            tableofcontents
            newpage
            chapter{Chapter 1}
            newpage
            chapter*{Appendix} %Suppress the capitalised name
            addcontentsline{toc}{chapter}{appendix} %Manually add the non-capitalised one
            section{Risk Assessment}
            section{Proofs}
            end{document}


            Your appendix will come out like this in your TOC:
            enter image description here






            share|improve this answer













            Welcome to TeX.SX! A bit more code would be great, however, if your issue is solely regarding the appendix name being non-capitalised, just declare it as a supressed section in case your document is an article or a chapter in case you chose report format like: chapter*{Appendix}. Subsequently, re-define the name using addcontentsline{toc}{chapter}{appendix}
            Here a schematic exert from my own thesis layout:



            documentclass[12pt]{report}
            begin{document}
            chapter*{Abstract}
            newpage
            tableofcontents
            newpage
            chapter{Chapter 1}
            newpage
            chapter*{Appendix} %Suppress the capitalised name
            addcontentsline{toc}{chapter}{appendix} %Manually add the non-capitalised one
            section{Risk Assessment}
            section{Proofs}
            end{document}


            Your appendix will come out like this in your TOC:
            enter image description here







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Mar 6 at 20:12









            Fabio EnricoFabio Enrico

            185




            185























                0














                I had a similar problem, you could try with something like this: the first line adds the title (so in your case it should be uppercase) and the second adds it to the TOC (so you type it lowercase).



                chapter*{Your Uppercase Title}
                addcontentsline{toc}{chapter}{your lowercase title}


                Edit: remember to add appendix before you start appendixes to have them numbered "A.", "B." etc. instead of continuing the numbering from the previous chapters. So the complete code above would be:



                appendix
                chapter*{Your Uppercase Title}
                addcontentsline{toc}{chapter}{your lowercase title}





                share|improve this answer






























                  0














                  I had a similar problem, you could try with something like this: the first line adds the title (so in your case it should be uppercase) and the second adds it to the TOC (so you type it lowercase).



                  chapter*{Your Uppercase Title}
                  addcontentsline{toc}{chapter}{your lowercase title}


                  Edit: remember to add appendix before you start appendixes to have them numbered "A.", "B." etc. instead of continuing the numbering from the previous chapters. So the complete code above would be:



                  appendix
                  chapter*{Your Uppercase Title}
                  addcontentsline{toc}{chapter}{your lowercase title}





                  share|improve this answer




























                    0












                    0








                    0







                    I had a similar problem, you could try with something like this: the first line adds the title (so in your case it should be uppercase) and the second adds it to the TOC (so you type it lowercase).



                    chapter*{Your Uppercase Title}
                    addcontentsline{toc}{chapter}{your lowercase title}


                    Edit: remember to add appendix before you start appendixes to have them numbered "A.", "B." etc. instead of continuing the numbering from the previous chapters. So the complete code above would be:



                    appendix
                    chapter*{Your Uppercase Title}
                    addcontentsline{toc}{chapter}{your lowercase title}





                    share|improve this answer















                    I had a similar problem, you could try with something like this: the first line adds the title (so in your case it should be uppercase) and the second adds it to the TOC (so you type it lowercase).



                    chapter*{Your Uppercase Title}
                    addcontentsline{toc}{chapter}{your lowercase title}


                    Edit: remember to add appendix before you start appendixes to have them numbered "A.", "B." etc. instead of continuing the numbering from the previous chapters. So the complete code above would be:



                    appendix
                    chapter*{Your Uppercase Title}
                    addcontentsline{toc}{chapter}{your lowercase title}






                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Mar 6 at 20:16

























                    answered Mar 6 at 20:07









                    Superuser27Superuser27

                    61715




                    61715























                        0














                        Thanks for the answers! They indeed managed to solve the problem, but partially. It eventually interacted with all the rules included in the .sty file of the template.



                        So to summarize the goto answer is :



                        % eventually appendix here 
                        chapter*{THE CHAPTER}
                        addcontentsline{toc}{chapter}{The chapter}


                        But it may conflict with the commands defined in the .sty of a template someone makes use of: like in my case Annexe{The chapter} has a defined style/spacing/etc. (However the answers helped me trace the whole process in the .sty so many thanks!)



                        So you need to either grab in the .sty the style to apply and do that to the suggested answer, or find where and how to resolve that issue by hacking on the Annexe .sty directly.



                        Here is a recap of the process to hopefully help others people diagnose the school template ! :)



                        First off, the newcommandannexe defined by the school: here look for your interpretation of Annexe (if it's Appendix search for newcommandappendix).



                        In my case it calls @annexe at some point in that command. @annexe is a function that takes as input my "The chapter". Here it is in full :



                        def@annexe[#1]#2{ifnum c@secnumdepth >m@ne
                        if@mainmatter
                        refstepcounter{chapter}%
                        typeout{@chapappspacethechapter.}%
                        if@english
                        addcontentsline{app}{annexe}%
                        {protectnumberline{Appendixnobreakspacethechapter}#1}%
                        else
                        addcontentsline{app}{annexe}%
                        {protectnumberline{Annexenobreakspacethechapter}#1}%
                        fi
                        else
                        addcontentsline{app}{annexe}{#1}%
                        fi
                        else
                        addcontentsline{app}{annexe}{#1}%
                        fi
                        chaptermark{#1}%
                        if@twocolumn
                        @topnewpage[@makeappendixhead{#2}]%
                        else
                        @makeappendixhead{#2}%
                        @afterheading
                        fi}


                        As we see, it's a mess and it explains why the chapter*{} solution may not have worked as intended. Here we can see the addcontentsline{} command as well. The key to the issue is the @makeappendixhead{#2}} command used, here with the desired MakeUppercase{} command :



                        def@makeappendixhead#1{%
                        {parindent z@ raggedright normalfont
                        centering
                        ifnum c@secnumdepth >m@ne
                        if@mainmatter
                        if@english
                        normalsizebfseries APPENDIXspacethechapter
                        else
                        normalsizebfseries ANNEXEspacethechapter
                        fi
                        %parnobreak
                        %vskip 20p@
                        spacespacespacespace
                        fi
                        fi
                        interlinepenalty@M
                        normalsize bfseries {MakeUppercase{#1}}parnobreak
                        vskip 40p@
                        }}


                        And voilà ! :)



                        Notice that I don't understand fully how to use the makeuppercase in that context (the double {{}} seems fishy to me) but with a few trial and error it eventually worked !






                        share|improve this answer






























                          0














                          Thanks for the answers! They indeed managed to solve the problem, but partially. It eventually interacted with all the rules included in the .sty file of the template.



                          So to summarize the goto answer is :



                          % eventually appendix here 
                          chapter*{THE CHAPTER}
                          addcontentsline{toc}{chapter}{The chapter}


                          But it may conflict with the commands defined in the .sty of a template someone makes use of: like in my case Annexe{The chapter} has a defined style/spacing/etc. (However the answers helped me trace the whole process in the .sty so many thanks!)



                          So you need to either grab in the .sty the style to apply and do that to the suggested answer, or find where and how to resolve that issue by hacking on the Annexe .sty directly.



                          Here is a recap of the process to hopefully help others people diagnose the school template ! :)



                          First off, the newcommandannexe defined by the school: here look for your interpretation of Annexe (if it's Appendix search for newcommandappendix).



                          In my case it calls @annexe at some point in that command. @annexe is a function that takes as input my "The chapter". Here it is in full :



                          def@annexe[#1]#2{ifnum c@secnumdepth >m@ne
                          if@mainmatter
                          refstepcounter{chapter}%
                          typeout{@chapappspacethechapter.}%
                          if@english
                          addcontentsline{app}{annexe}%
                          {protectnumberline{Appendixnobreakspacethechapter}#1}%
                          else
                          addcontentsline{app}{annexe}%
                          {protectnumberline{Annexenobreakspacethechapter}#1}%
                          fi
                          else
                          addcontentsline{app}{annexe}{#1}%
                          fi
                          else
                          addcontentsline{app}{annexe}{#1}%
                          fi
                          chaptermark{#1}%
                          if@twocolumn
                          @topnewpage[@makeappendixhead{#2}]%
                          else
                          @makeappendixhead{#2}%
                          @afterheading
                          fi}


                          As we see, it's a mess and it explains why the chapter*{} solution may not have worked as intended. Here we can see the addcontentsline{} command as well. The key to the issue is the @makeappendixhead{#2}} command used, here with the desired MakeUppercase{} command :



                          def@makeappendixhead#1{%
                          {parindent z@ raggedright normalfont
                          centering
                          ifnum c@secnumdepth >m@ne
                          if@mainmatter
                          if@english
                          normalsizebfseries APPENDIXspacethechapter
                          else
                          normalsizebfseries ANNEXEspacethechapter
                          fi
                          %parnobreak
                          %vskip 20p@
                          spacespacespacespace
                          fi
                          fi
                          interlinepenalty@M
                          normalsize bfseries {MakeUppercase{#1}}parnobreak
                          vskip 40p@
                          }}


                          And voilà ! :)



                          Notice that I don't understand fully how to use the makeuppercase in that context (the double {{}} seems fishy to me) but with a few trial and error it eventually worked !






                          share|improve this answer




























                            0












                            0








                            0







                            Thanks for the answers! They indeed managed to solve the problem, but partially. It eventually interacted with all the rules included in the .sty file of the template.



                            So to summarize the goto answer is :



                            % eventually appendix here 
                            chapter*{THE CHAPTER}
                            addcontentsline{toc}{chapter}{The chapter}


                            But it may conflict with the commands defined in the .sty of a template someone makes use of: like in my case Annexe{The chapter} has a defined style/spacing/etc. (However the answers helped me trace the whole process in the .sty so many thanks!)



                            So you need to either grab in the .sty the style to apply and do that to the suggested answer, or find where and how to resolve that issue by hacking on the Annexe .sty directly.



                            Here is a recap of the process to hopefully help others people diagnose the school template ! :)



                            First off, the newcommandannexe defined by the school: here look for your interpretation of Annexe (if it's Appendix search for newcommandappendix).



                            In my case it calls @annexe at some point in that command. @annexe is a function that takes as input my "The chapter". Here it is in full :



                            def@annexe[#1]#2{ifnum c@secnumdepth >m@ne
                            if@mainmatter
                            refstepcounter{chapter}%
                            typeout{@chapappspacethechapter.}%
                            if@english
                            addcontentsline{app}{annexe}%
                            {protectnumberline{Appendixnobreakspacethechapter}#1}%
                            else
                            addcontentsline{app}{annexe}%
                            {protectnumberline{Annexenobreakspacethechapter}#1}%
                            fi
                            else
                            addcontentsline{app}{annexe}{#1}%
                            fi
                            else
                            addcontentsline{app}{annexe}{#1}%
                            fi
                            chaptermark{#1}%
                            if@twocolumn
                            @topnewpage[@makeappendixhead{#2}]%
                            else
                            @makeappendixhead{#2}%
                            @afterheading
                            fi}


                            As we see, it's a mess and it explains why the chapter*{} solution may not have worked as intended. Here we can see the addcontentsline{} command as well. The key to the issue is the @makeappendixhead{#2}} command used, here with the desired MakeUppercase{} command :



                            def@makeappendixhead#1{%
                            {parindent z@ raggedright normalfont
                            centering
                            ifnum c@secnumdepth >m@ne
                            if@mainmatter
                            if@english
                            normalsizebfseries APPENDIXspacethechapter
                            else
                            normalsizebfseries ANNEXEspacethechapter
                            fi
                            %parnobreak
                            %vskip 20p@
                            spacespacespacespace
                            fi
                            fi
                            interlinepenalty@M
                            normalsize bfseries {MakeUppercase{#1}}parnobreak
                            vskip 40p@
                            }}


                            And voilà ! :)



                            Notice that I don't understand fully how to use the makeuppercase in that context (the double {{}} seems fishy to me) but with a few trial and error it eventually worked !






                            share|improve this answer















                            Thanks for the answers! They indeed managed to solve the problem, but partially. It eventually interacted with all the rules included in the .sty file of the template.



                            So to summarize the goto answer is :



                            % eventually appendix here 
                            chapter*{THE CHAPTER}
                            addcontentsline{toc}{chapter}{The chapter}


                            But it may conflict with the commands defined in the .sty of a template someone makes use of: like in my case Annexe{The chapter} has a defined style/spacing/etc. (However the answers helped me trace the whole process in the .sty so many thanks!)



                            So you need to either grab in the .sty the style to apply and do that to the suggested answer, or find where and how to resolve that issue by hacking on the Annexe .sty directly.



                            Here is a recap of the process to hopefully help others people diagnose the school template ! :)



                            First off, the newcommandannexe defined by the school: here look for your interpretation of Annexe (if it's Appendix search for newcommandappendix).



                            In my case it calls @annexe at some point in that command. @annexe is a function that takes as input my "The chapter". Here it is in full :



                            def@annexe[#1]#2{ifnum c@secnumdepth >m@ne
                            if@mainmatter
                            refstepcounter{chapter}%
                            typeout{@chapappspacethechapter.}%
                            if@english
                            addcontentsline{app}{annexe}%
                            {protectnumberline{Appendixnobreakspacethechapter}#1}%
                            else
                            addcontentsline{app}{annexe}%
                            {protectnumberline{Annexenobreakspacethechapter}#1}%
                            fi
                            else
                            addcontentsline{app}{annexe}{#1}%
                            fi
                            else
                            addcontentsline{app}{annexe}{#1}%
                            fi
                            chaptermark{#1}%
                            if@twocolumn
                            @topnewpage[@makeappendixhead{#2}]%
                            else
                            @makeappendixhead{#2}%
                            @afterheading
                            fi}


                            As we see, it's a mess and it explains why the chapter*{} solution may not have worked as intended. Here we can see the addcontentsline{} command as well. The key to the issue is the @makeappendixhead{#2}} command used, here with the desired MakeUppercase{} command :



                            def@makeappendixhead#1{%
                            {parindent z@ raggedright normalfont
                            centering
                            ifnum c@secnumdepth >m@ne
                            if@mainmatter
                            if@english
                            normalsizebfseries APPENDIXspacethechapter
                            else
                            normalsizebfseries ANNEXEspacethechapter
                            fi
                            %parnobreak
                            %vskip 20p@
                            spacespacespacespace
                            fi
                            fi
                            interlinepenalty@M
                            normalsize bfseries {MakeUppercase{#1}}parnobreak
                            vskip 40p@
                            }}


                            And voilà ! :)



                            Notice that I don't understand fully how to use the makeuppercase in that context (the double {{}} seems fishy to me) but with a few trial and error it eventually worked !







                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited Mar 7 at 14:58









                            JouleV

                            5,50621445




                            5,50621445










                            answered Mar 7 at 14:54









                            SebSeb

                            63




                            63






























                                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%2f478056%2fappendix-name-in-uppercase-but-in-appendix-toc-lowercased%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 send String Array data to Server using php in android

                                Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

                                Is anime1.com a legal site for watching anime?