Separate toc for appendix
I am struggeling with creating a seperate toc for my appendix.
This is what I currently have:
Contents
1 first section......1
2 second section.....2
List of appendices...5
This is what I'd like to achieve:
Contents
1 first section......1
2 second section.....2
List of appendices...5
plus a seperate toc for my appendix including all sections:
List of appendices
I My first appendix......5
II My second appendix.....6
This is my code so far:
documentclass{article}
usepackage[utf8]{inputenc}
usepackage{hyperref}
usepackage{lipsum}
usepackage[toc,page]{appendix}
% as per https://tex.stackexchange.com/questions/100479/label-appendix-as-appendix-i-ii-iii-rather-than-appendix-a-b-and-c
letoldappendixappendices
renewcommand{appendices}{%
clearpage
oldappendix
renewcommand{thesection}{Roman{section}}
addtocontents{toc}{protectsetcounter{tocdepth}{0}}
}%
% use custom names for appendices
renewcommand{appendixtocname}{List of appendices}
renewcommand{appendixpagename}{List of appendices}
begin{document}
tableofcontents
section{first section}
lipsum
section{second section}
lipsum
begin{appendices}
section{My first appendix}
lipsum
section{My second appendix}
lipsum
end{appendices}
end{document}
Your help is highly appreciated. I've tried solving my issue with minitoc, however I couldn't achieve what I exactly wanted. I really apologize if this is a duplicate question, but I couldn't find answers for my specific problem.
table-of-contents appendices article
add a comment |
I am struggeling with creating a seperate toc for my appendix.
This is what I currently have:
Contents
1 first section......1
2 second section.....2
List of appendices...5
This is what I'd like to achieve:
Contents
1 first section......1
2 second section.....2
List of appendices...5
plus a seperate toc for my appendix including all sections:
List of appendices
I My first appendix......5
II My second appendix.....6
This is my code so far:
documentclass{article}
usepackage[utf8]{inputenc}
usepackage{hyperref}
usepackage{lipsum}
usepackage[toc,page]{appendix}
% as per https://tex.stackexchange.com/questions/100479/label-appendix-as-appendix-i-ii-iii-rather-than-appendix-a-b-and-c
letoldappendixappendices
renewcommand{appendices}{%
clearpage
oldappendix
renewcommand{thesection}{Roman{section}}
addtocontents{toc}{protectsetcounter{tocdepth}{0}}
}%
% use custom names for appendices
renewcommand{appendixtocname}{List of appendices}
renewcommand{appendixpagename}{List of appendices}
begin{document}
tableofcontents
section{first section}
lipsum
section{second section}
lipsum
begin{appendices}
section{My first appendix}
lipsum
section{My second appendix}
lipsum
end{appendices}
end{document}
Your help is highly appreciated. I've tried solving my issue with minitoc, however I couldn't achieve what I exactly wanted. I really apologize if this is a duplicate question, but I couldn't find answers for my specific problem.
table-of-contents appendices article
Maybe have a look at theetoc
package.
– albert
Aug 25 at 12:21
add a comment |
I am struggeling with creating a seperate toc for my appendix.
This is what I currently have:
Contents
1 first section......1
2 second section.....2
List of appendices...5
This is what I'd like to achieve:
Contents
1 first section......1
2 second section.....2
List of appendices...5
plus a seperate toc for my appendix including all sections:
List of appendices
I My first appendix......5
II My second appendix.....6
This is my code so far:
documentclass{article}
usepackage[utf8]{inputenc}
usepackage{hyperref}
usepackage{lipsum}
usepackage[toc,page]{appendix}
% as per https://tex.stackexchange.com/questions/100479/label-appendix-as-appendix-i-ii-iii-rather-than-appendix-a-b-and-c
letoldappendixappendices
renewcommand{appendices}{%
clearpage
oldappendix
renewcommand{thesection}{Roman{section}}
addtocontents{toc}{protectsetcounter{tocdepth}{0}}
}%
% use custom names for appendices
renewcommand{appendixtocname}{List of appendices}
renewcommand{appendixpagename}{List of appendices}
begin{document}
tableofcontents
section{first section}
lipsum
section{second section}
lipsum
begin{appendices}
section{My first appendix}
lipsum
section{My second appendix}
lipsum
end{appendices}
end{document}
Your help is highly appreciated. I've tried solving my issue with minitoc, however I couldn't achieve what I exactly wanted. I really apologize if this is a duplicate question, but I couldn't find answers for my specific problem.
table-of-contents appendices article
I am struggeling with creating a seperate toc for my appendix.
This is what I currently have:
Contents
1 first section......1
2 second section.....2
List of appendices...5
This is what I'd like to achieve:
Contents
1 first section......1
2 second section.....2
List of appendices...5
plus a seperate toc for my appendix including all sections:
List of appendices
I My first appendix......5
II My second appendix.....6
This is my code so far:
documentclass{article}
usepackage[utf8]{inputenc}
usepackage{hyperref}
usepackage{lipsum}
usepackage[toc,page]{appendix}
% as per https://tex.stackexchange.com/questions/100479/label-appendix-as-appendix-i-ii-iii-rather-than-appendix-a-b-and-c
letoldappendixappendices
renewcommand{appendices}{%
clearpage
oldappendix
renewcommand{thesection}{Roman{section}}
addtocontents{toc}{protectsetcounter{tocdepth}{0}}
}%
% use custom names for appendices
renewcommand{appendixtocname}{List of appendices}
renewcommand{appendixpagename}{List of appendices}
begin{document}
tableofcontents
section{first section}
lipsum
section{second section}
lipsum
begin{appendices}
section{My first appendix}
lipsum
section{My second appendix}
lipsum
end{appendices}
end{document}
Your help is highly appreciated. I've tried solving my issue with minitoc, however I couldn't achieve what I exactly wanted. I really apologize if this is a duplicate question, but I couldn't find answers for my specific problem.
table-of-contents appendices article
table-of-contents appendices article
edited Aug 25 at 12:12
Bernard
165k769193
165k769193
asked Aug 25 at 12:01
KarelZe
111
111
Maybe have a look at theetoc
package.
– albert
Aug 25 at 12:21
add a comment |
Maybe have a look at theetoc
package.
– albert
Aug 25 at 12:21
Maybe have a look at the
etoc
package.– albert
Aug 25 at 12:21
Maybe have a look at the
etoc
package.– albert
Aug 25 at 12:21
add a comment |
1 Answer
1
active
oldest
votes
The separate Toc
for the appendix entries can be achieved by letting an .app
file handle point to .toc
, i.e. at a certain point of document stopping to write to the .toc
file and everything meant for the .toc
enters the `.app file.
I have defined a listofappendices
macro, that reuses tableofcontents
by renaming contentsname
and applying @starttoc{app}
instead of @starttoc{toc}
.
documentclass{article}
usepackage{lipsum}
%usepackage[utf8]{inputenc} % Not needed since TL 2018
usepackage{hyperref}
usepackage[page]{appendix}
% as per https://tex.stackexchange.com/questions/100479/label-appendix-as-appendix-i-ii-iii-rather-than-appendix-a-b-and-c
% use custom names for appendices
renewcommand{appendixtocname}{List of appendices}
renewcommand{appendixpagename}{Appendices}
makeatletter
letoldappendixappendices
renewcommand{appendices}{%
clearpage
renewcommand{thesection}{Roman{section}}
% From now, everything goes to the app - file and not to the toc
lettf@toctf@app
addtocontents{app}{protectsetcounter{tocdepth}{1}}
immediatewrite@auxout{%
stringletstringtf@tocstringtf@app^^J
}
oldappendix
}%
newcommand{listofappendices}{%
begingroup
renewcommand{contentsname}{appendixtocname}
let@oldstarttoc@starttoc
def@starttoc##1{@oldstarttoc{app}}
tableofcontents% Reusing the code for tableofcontents with different contentsname and different file handle app
endgroup
}
makeatother
begin{document}
tableofcontents
listofappendices
section{first section}
lipsum
section{second section}
lipsum
section{Third section}
lipsum
begin{appendices}
section{My first appendix}
lipsum
section{My second appendix}
lipsum
section{My third appendix}
lipsum
end{appendices}
end{document}
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%2f447662%2fseparate-toc-for-appendix%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The separate Toc
for the appendix entries can be achieved by letting an .app
file handle point to .toc
, i.e. at a certain point of document stopping to write to the .toc
file and everything meant for the .toc
enters the `.app file.
I have defined a listofappendices
macro, that reuses tableofcontents
by renaming contentsname
and applying @starttoc{app}
instead of @starttoc{toc}
.
documentclass{article}
usepackage{lipsum}
%usepackage[utf8]{inputenc} % Not needed since TL 2018
usepackage{hyperref}
usepackage[page]{appendix}
% as per https://tex.stackexchange.com/questions/100479/label-appendix-as-appendix-i-ii-iii-rather-than-appendix-a-b-and-c
% use custom names for appendices
renewcommand{appendixtocname}{List of appendices}
renewcommand{appendixpagename}{Appendices}
makeatletter
letoldappendixappendices
renewcommand{appendices}{%
clearpage
renewcommand{thesection}{Roman{section}}
% From now, everything goes to the app - file and not to the toc
lettf@toctf@app
addtocontents{app}{protectsetcounter{tocdepth}{1}}
immediatewrite@auxout{%
stringletstringtf@tocstringtf@app^^J
}
oldappendix
}%
newcommand{listofappendices}{%
begingroup
renewcommand{contentsname}{appendixtocname}
let@oldstarttoc@starttoc
def@starttoc##1{@oldstarttoc{app}}
tableofcontents% Reusing the code for tableofcontents with different contentsname and different file handle app
endgroup
}
makeatother
begin{document}
tableofcontents
listofappendices
section{first section}
lipsum
section{second section}
lipsum
section{Third section}
lipsum
begin{appendices}
section{My first appendix}
lipsum
section{My second appendix}
lipsum
section{My third appendix}
lipsum
end{appendices}
end{document}
add a comment |
The separate Toc
for the appendix entries can be achieved by letting an .app
file handle point to .toc
, i.e. at a certain point of document stopping to write to the .toc
file and everything meant for the .toc
enters the `.app file.
I have defined a listofappendices
macro, that reuses tableofcontents
by renaming contentsname
and applying @starttoc{app}
instead of @starttoc{toc}
.
documentclass{article}
usepackage{lipsum}
%usepackage[utf8]{inputenc} % Not needed since TL 2018
usepackage{hyperref}
usepackage[page]{appendix}
% as per https://tex.stackexchange.com/questions/100479/label-appendix-as-appendix-i-ii-iii-rather-than-appendix-a-b-and-c
% use custom names for appendices
renewcommand{appendixtocname}{List of appendices}
renewcommand{appendixpagename}{Appendices}
makeatletter
letoldappendixappendices
renewcommand{appendices}{%
clearpage
renewcommand{thesection}{Roman{section}}
% From now, everything goes to the app - file and not to the toc
lettf@toctf@app
addtocontents{app}{protectsetcounter{tocdepth}{1}}
immediatewrite@auxout{%
stringletstringtf@tocstringtf@app^^J
}
oldappendix
}%
newcommand{listofappendices}{%
begingroup
renewcommand{contentsname}{appendixtocname}
let@oldstarttoc@starttoc
def@starttoc##1{@oldstarttoc{app}}
tableofcontents% Reusing the code for tableofcontents with different contentsname and different file handle app
endgroup
}
makeatother
begin{document}
tableofcontents
listofappendices
section{first section}
lipsum
section{second section}
lipsum
section{Third section}
lipsum
begin{appendices}
section{My first appendix}
lipsum
section{My second appendix}
lipsum
section{My third appendix}
lipsum
end{appendices}
end{document}
add a comment |
The separate Toc
for the appendix entries can be achieved by letting an .app
file handle point to .toc
, i.e. at a certain point of document stopping to write to the .toc
file and everything meant for the .toc
enters the `.app file.
I have defined a listofappendices
macro, that reuses tableofcontents
by renaming contentsname
and applying @starttoc{app}
instead of @starttoc{toc}
.
documentclass{article}
usepackage{lipsum}
%usepackage[utf8]{inputenc} % Not needed since TL 2018
usepackage{hyperref}
usepackage[page]{appendix}
% as per https://tex.stackexchange.com/questions/100479/label-appendix-as-appendix-i-ii-iii-rather-than-appendix-a-b-and-c
% use custom names for appendices
renewcommand{appendixtocname}{List of appendices}
renewcommand{appendixpagename}{Appendices}
makeatletter
letoldappendixappendices
renewcommand{appendices}{%
clearpage
renewcommand{thesection}{Roman{section}}
% From now, everything goes to the app - file and not to the toc
lettf@toctf@app
addtocontents{app}{protectsetcounter{tocdepth}{1}}
immediatewrite@auxout{%
stringletstringtf@tocstringtf@app^^J
}
oldappendix
}%
newcommand{listofappendices}{%
begingroup
renewcommand{contentsname}{appendixtocname}
let@oldstarttoc@starttoc
def@starttoc##1{@oldstarttoc{app}}
tableofcontents% Reusing the code for tableofcontents with different contentsname and different file handle app
endgroup
}
makeatother
begin{document}
tableofcontents
listofappendices
section{first section}
lipsum
section{second section}
lipsum
section{Third section}
lipsum
begin{appendices}
section{My first appendix}
lipsum
section{My second appendix}
lipsum
section{My third appendix}
lipsum
end{appendices}
end{document}
The separate Toc
for the appendix entries can be achieved by letting an .app
file handle point to .toc
, i.e. at a certain point of document stopping to write to the .toc
file and everything meant for the .toc
enters the `.app file.
I have defined a listofappendices
macro, that reuses tableofcontents
by renaming contentsname
and applying @starttoc{app}
instead of @starttoc{toc}
.
documentclass{article}
usepackage{lipsum}
%usepackage[utf8]{inputenc} % Not needed since TL 2018
usepackage{hyperref}
usepackage[page]{appendix}
% as per https://tex.stackexchange.com/questions/100479/label-appendix-as-appendix-i-ii-iii-rather-than-appendix-a-b-and-c
% use custom names for appendices
renewcommand{appendixtocname}{List of appendices}
renewcommand{appendixpagename}{Appendices}
makeatletter
letoldappendixappendices
renewcommand{appendices}{%
clearpage
renewcommand{thesection}{Roman{section}}
% From now, everything goes to the app - file and not to the toc
lettf@toctf@app
addtocontents{app}{protectsetcounter{tocdepth}{1}}
immediatewrite@auxout{%
stringletstringtf@tocstringtf@app^^J
}
oldappendix
}%
newcommand{listofappendices}{%
begingroup
renewcommand{contentsname}{appendixtocname}
let@oldstarttoc@starttoc
def@starttoc##1{@oldstarttoc{app}}
tableofcontents% Reusing the code for tableofcontents with different contentsname and different file handle app
endgroup
}
makeatother
begin{document}
tableofcontents
listofappendices
section{first section}
lipsum
section{second section}
lipsum
section{Third section}
lipsum
begin{appendices}
section{My first appendix}
lipsum
section{My second appendix}
lipsum
section{My third appendix}
lipsum
end{appendices}
end{document}
answered 19 mins ago
Christian Hupfer
147k14192384
147k14192384
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2f447662%2fseparate-toc-for-appendix%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
Maybe have a look at the
etoc
package.– albert
Aug 25 at 12:21