Appendix name in Uppercase but in Appendix TOC lowercased
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
add a comment |
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
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 withdocumentclass{...}and ending withend{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
add a comment |
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
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
table-of-contents appendix
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 withdocumentclass{...}and ending withend{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
add a comment |
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 withdocumentclass{...}and ending withend{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
add a comment |
3 Answers
3
active
oldest
votes
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:

add a comment |
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}
add a comment |
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 !
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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:

add a comment |
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:

add a comment |
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:

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:

answered Mar 6 at 20:12
Fabio EnricoFabio Enrico
185
185
add a comment |
add a comment |
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}
add a comment |
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}
add a comment |
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}
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}
edited Mar 6 at 20:16
answered Mar 6 at 20:07
Superuser27Superuser27
61715
61715
add a comment |
add a comment |
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 !
add a comment |
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 !
add a comment |
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 !
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 !
edited Mar 7 at 14:58
JouleV
5,50621445
5,50621445
answered Mar 7 at 14:54
SebSeb
63
63
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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 withend{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