Short title in header but not ToC for document class bookShort title that is not displayed in the ToC hyperrefHow can I display a short chapter name in the header and a long chapter name in the ToC?Remove entries from short ToC but not from long ToCRoman numerals appear in toc but not in documentHow to use short subsection title in header but not in table of contents?Sections : Suppress numbers but retain title in headerHow do I prevent “Contents” from appearing twice in the header when I use fancyhdr in the book class?section*[toc]normal section title not working for meHow to get dotted leads in ToC using book classsection's extra optional argument for a header title possibly different from the text and TOC ones: displayed too earlyHeader with Section short title and Chapter short title using KOMA-script
What is the offset in a seaplane's hull?
Ideas for colorfully and clearly highlighting graph edges according to weights
Symmetry in quantum mechanics
Is it legal to have the "// (c) 2019 John Smith" header in all files when there are hundreds of contributors?
Is Social Media Science Fiction?
Extreme, but not acceptable situation and I can't start the work tomorrow morning
Doomsday-clock for my fantasy planet
Why did the Germans forbid the possession of pet pigeons in Rostov-on-Don in 1941?
How can I add custom success page
What is GPS' 19 year rollover and does it present a cybersecurity issue?
Can a planet have a different gravitational pull depending on its location in orbit around its sun?
Prime joint compound before latex paint?
What is the command to reset a PC without deleting any files
What is the meaning of "of trouble" in the following sentence?
Is there a familial term for apples and pears?
How to move the player while also allowing forces to affect it
Patience, young "Padovan"
Why airport relocation isn't done gradually?
Are cabin dividers used to "hide" the flex of the airplane?
aging parents with no investments
Is domain driven design an anti-SQL pattern?
Is "plugging out" electronic devices an American expression?
When blogging recipes, how can I support both readers who want the narrative/journey and ones who want the printer-friendly recipe?
How would photo IDs work for shapeshifters?
Short title in header but not ToC for document class book
Short title that is not displayed in the ToC hyperrefHow can I display a short chapter name in the header and a long chapter name in the ToC?Remove entries from short ToC but not from long ToCRoman numerals appear in toc but not in documentHow to use short subsection title in header but not in table of contents?Sections : Suppress numbers but retain title in headerHow do I prevent “Contents” from appearing twice in the header when I use fancyhdr in the book class?section*[toc]normal section title not working for meHow to get dotted leads in ToC using book classsection's extra optional argument for a header title possibly different from the text and TOC ones: displayed too earlyHeader with Section short title and Chapter short title using KOMA-script
I would like to have a short title of chapters and sections in my headers, but in the ToC there should appear the long title.
I am using the book
document class, and package fancyhdr
. section[short title]long title
gives me the headers I want, but then the short title is also placed in the ToC.
This didn't work out in my case: Short title that is not displayed in the ToC hyperref
table-of-contents sectioning header-footer fancyhdr
bumped to the homepage by Community♦ 6 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I would like to have a short title of chapters and sections in my headers, but in the ToC there should appear the long title.
I am using the book
document class, and package fancyhdr
. section[short title]long title
gives me the headers I want, but then the short title is also placed in the ToC.
This didn't work out in my case: Short title that is not displayed in the ToC hyperref
table-of-contents sectioning header-footer fancyhdr
bumped to the homepage by Community♦ 6 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Welcome to TeX SX! If you use packagetitlesec
, this is done through the[toctitles]
option.
– Bernard
Nov 9 '18 at 19:12
Thank you, I didn't see your answer at first, but this is actually the fastest solution!
– Anja
Nov 13 '18 at 16:45
add a comment |
I would like to have a short title of chapters and sections in my headers, but in the ToC there should appear the long title.
I am using the book
document class, and package fancyhdr
. section[short title]long title
gives me the headers I want, but then the short title is also placed in the ToC.
This didn't work out in my case: Short title that is not displayed in the ToC hyperref
table-of-contents sectioning header-footer fancyhdr
I would like to have a short title of chapters and sections in my headers, but in the ToC there should appear the long title.
I am using the book
document class, and package fancyhdr
. section[short title]long title
gives me the headers I want, but then the short title is also placed in the ToC.
This didn't work out in my case: Short title that is not displayed in the ToC hyperref
table-of-contents sectioning header-footer fancyhdr
table-of-contents sectioning header-footer fancyhdr
edited Nov 9 '18 at 20:28
Werner
450k729981705
450k729981705
asked Nov 9 '18 at 18:22
AnjaAnja
111
111
bumped to the homepage by Community♦ 6 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 6 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Welcome to TeX SX! If you use packagetitlesec
, this is done through the[toctitles]
option.
– Bernard
Nov 9 '18 at 19:12
Thank you, I didn't see your answer at first, but this is actually the fastest solution!
– Anja
Nov 13 '18 at 16:45
add a comment |
Welcome to TeX SX! If you use packagetitlesec
, this is done through the[toctitles]
option.
– Bernard
Nov 9 '18 at 19:12
Thank you, I didn't see your answer at first, but this is actually the fastest solution!
– Anja
Nov 13 '18 at 16:45
Welcome to TeX SX! If you use package
titlesec
, this is done through the [toctitles]
option.– Bernard
Nov 9 '18 at 19:12
Welcome to TeX SX! If you use package
titlesec
, this is done through the [toctitles]
option.– Bernard
Nov 9 '18 at 19:12
Thank you, I didn't see your answer at first, but this is actually the fastest solution!
– Anja
Nov 13 '18 at 16:45
Thank you, I didn't see your answer at first, but this is actually the fastest solution!
– Anja
Nov 13 '18 at 16:45
add a comment |
2 Answers
2
active
oldest
votes
If you would care to change to the memoir
class (which encompasses the book
class and an equivalent of the fancyhdr
package) then:
chapter[<toc-title>][<head-title>]<title>
section[<toc-title>][<head-title>]<title>
puts <toc-title>
in the ToC, <head-title>
in the header and <title>
in the body of the document. SimIlarly the same constructs are available for subsection
, subsubsection
, etc.
Thanks for your answer! However, with memoir class I get some new problems: onehalfspacing doesn't work any longer and I can not make titlepages with begintitlepage. Do you know how to do this?
– Anja
Nov 9 '18 at 20:15
@Anja TryOnehalfSpacing
and thetitllingpage
environment. (No need for any packages for these).
– Peter Wilson
Nov 10 '18 at 20:23
add a comment |
The following updates the way the marks are used when setting the chapter and sectional titles within the book
class:
documentclassbook
usepackagefancyhdr,lipsum
makeatletter
% Update how chapter is added to the ToC/header
letoldchaptermarkchaptermark
renewcommandchaptermark[1]oldchaptermark@chaptermark% Used stored chapter mark
letold@chapter@chapter
def@chapter[#1]#2%
def@chaptermark#1% Store chapter mark
old@chapter[#2]#2%
% Update how section and subsection is added to the ToC/header
letoldsectionmarksectionmark
renewcommandsectionmark[1]oldsectionmark@sectionmark% Used stored section mark
letoldsubsectionmarksubsectionmark
renewcommandsubsectionmark[1]oldsubsectionmark@subsectionmark% Used stored subsection mark
letold@sect@sect
def@sect#1#2#3#4#5#6[#7]#8%
@namedef@#1mark#7% Store sectional mark
old@sect#1#2#3#4#5#6[#8]#8%
makeatother
begindocument
tableofcontents
sloppy % Just for this example
chapter[Chapter short title]Chapter long title
lipsum[1-50]
section[Section short title]Section long title
lipsum[1-50]
enddocument
Thanks but... then it doesn't know the command section any more. What could have gone wrong?
– Anja
Nov 10 '18 at 14:27
@Anja: In my example there is no problem. Can you elaborate on what packages you use? Perhaps start by taking my example and adding packages you use until something goes wrong. This way you can identify the conflicting package(s). Give some feedback on your findings.
– Werner
Nov 10 '18 at 15:56
Actually several of the packages were causing problems, so in my case the solution suggested by Peter Wilson was just faster to get it to run. Thank you still.
– Anja
Nov 13 '18 at 16:01
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%2f459184%2fshort-title-in-header-but-not-toc-for-document-class-book%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
If you would care to change to the memoir
class (which encompasses the book
class and an equivalent of the fancyhdr
package) then:
chapter[<toc-title>][<head-title>]<title>
section[<toc-title>][<head-title>]<title>
puts <toc-title>
in the ToC, <head-title>
in the header and <title>
in the body of the document. SimIlarly the same constructs are available for subsection
, subsubsection
, etc.
Thanks for your answer! However, with memoir class I get some new problems: onehalfspacing doesn't work any longer and I can not make titlepages with begintitlepage. Do you know how to do this?
– Anja
Nov 9 '18 at 20:15
@Anja TryOnehalfSpacing
and thetitllingpage
environment. (No need for any packages for these).
– Peter Wilson
Nov 10 '18 at 20:23
add a comment |
If you would care to change to the memoir
class (which encompasses the book
class and an equivalent of the fancyhdr
package) then:
chapter[<toc-title>][<head-title>]<title>
section[<toc-title>][<head-title>]<title>
puts <toc-title>
in the ToC, <head-title>
in the header and <title>
in the body of the document. SimIlarly the same constructs are available for subsection
, subsubsection
, etc.
Thanks for your answer! However, with memoir class I get some new problems: onehalfspacing doesn't work any longer and I can not make titlepages with begintitlepage. Do you know how to do this?
– Anja
Nov 9 '18 at 20:15
@Anja TryOnehalfSpacing
and thetitllingpage
environment. (No need for any packages for these).
– Peter Wilson
Nov 10 '18 at 20:23
add a comment |
If you would care to change to the memoir
class (which encompasses the book
class and an equivalent of the fancyhdr
package) then:
chapter[<toc-title>][<head-title>]<title>
section[<toc-title>][<head-title>]<title>
puts <toc-title>
in the ToC, <head-title>
in the header and <title>
in the body of the document. SimIlarly the same constructs are available for subsection
, subsubsection
, etc.
If you would care to change to the memoir
class (which encompasses the book
class and an equivalent of the fancyhdr
package) then:
chapter[<toc-title>][<head-title>]<title>
section[<toc-title>][<head-title>]<title>
puts <toc-title>
in the ToC, <head-title>
in the header and <title>
in the body of the document. SimIlarly the same constructs are available for subsection
, subsubsection
, etc.
answered Nov 9 '18 at 19:16
Peter WilsonPeter Wilson
8,78011533
8,78011533
Thanks for your answer! However, with memoir class I get some new problems: onehalfspacing doesn't work any longer and I can not make titlepages with begintitlepage. Do you know how to do this?
– Anja
Nov 9 '18 at 20:15
@Anja TryOnehalfSpacing
and thetitllingpage
environment. (No need for any packages for these).
– Peter Wilson
Nov 10 '18 at 20:23
add a comment |
Thanks for your answer! However, with memoir class I get some new problems: onehalfspacing doesn't work any longer and I can not make titlepages with begintitlepage. Do you know how to do this?
– Anja
Nov 9 '18 at 20:15
@Anja TryOnehalfSpacing
and thetitllingpage
environment. (No need for any packages for these).
– Peter Wilson
Nov 10 '18 at 20:23
Thanks for your answer! However, with memoir class I get some new problems: onehalfspacing doesn't work any longer and I can not make titlepages with begintitlepage. Do you know how to do this?
– Anja
Nov 9 '18 at 20:15
Thanks for your answer! However, with memoir class I get some new problems: onehalfspacing doesn't work any longer and I can not make titlepages with begintitlepage. Do you know how to do this?
– Anja
Nov 9 '18 at 20:15
@Anja Try
OnehalfSpacing
and the titllingpage
environment. (No need for any packages for these).– Peter Wilson
Nov 10 '18 at 20:23
@Anja Try
OnehalfSpacing
and the titllingpage
environment. (No need for any packages for these).– Peter Wilson
Nov 10 '18 at 20:23
add a comment |
The following updates the way the marks are used when setting the chapter and sectional titles within the book
class:
documentclassbook
usepackagefancyhdr,lipsum
makeatletter
% Update how chapter is added to the ToC/header
letoldchaptermarkchaptermark
renewcommandchaptermark[1]oldchaptermark@chaptermark% Used stored chapter mark
letold@chapter@chapter
def@chapter[#1]#2%
def@chaptermark#1% Store chapter mark
old@chapter[#2]#2%
% Update how section and subsection is added to the ToC/header
letoldsectionmarksectionmark
renewcommandsectionmark[1]oldsectionmark@sectionmark% Used stored section mark
letoldsubsectionmarksubsectionmark
renewcommandsubsectionmark[1]oldsubsectionmark@subsectionmark% Used stored subsection mark
letold@sect@sect
def@sect#1#2#3#4#5#6[#7]#8%
@namedef@#1mark#7% Store sectional mark
old@sect#1#2#3#4#5#6[#8]#8%
makeatother
begindocument
tableofcontents
sloppy % Just for this example
chapter[Chapter short title]Chapter long title
lipsum[1-50]
section[Section short title]Section long title
lipsum[1-50]
enddocument
Thanks but... then it doesn't know the command section any more. What could have gone wrong?
– Anja
Nov 10 '18 at 14:27
@Anja: In my example there is no problem. Can you elaborate on what packages you use? Perhaps start by taking my example and adding packages you use until something goes wrong. This way you can identify the conflicting package(s). Give some feedback on your findings.
– Werner
Nov 10 '18 at 15:56
Actually several of the packages were causing problems, so in my case the solution suggested by Peter Wilson was just faster to get it to run. Thank you still.
– Anja
Nov 13 '18 at 16:01
add a comment |
The following updates the way the marks are used when setting the chapter and sectional titles within the book
class:
documentclassbook
usepackagefancyhdr,lipsum
makeatletter
% Update how chapter is added to the ToC/header
letoldchaptermarkchaptermark
renewcommandchaptermark[1]oldchaptermark@chaptermark% Used stored chapter mark
letold@chapter@chapter
def@chapter[#1]#2%
def@chaptermark#1% Store chapter mark
old@chapter[#2]#2%
% Update how section and subsection is added to the ToC/header
letoldsectionmarksectionmark
renewcommandsectionmark[1]oldsectionmark@sectionmark% Used stored section mark
letoldsubsectionmarksubsectionmark
renewcommandsubsectionmark[1]oldsubsectionmark@subsectionmark% Used stored subsection mark
letold@sect@sect
def@sect#1#2#3#4#5#6[#7]#8%
@namedef@#1mark#7% Store sectional mark
old@sect#1#2#3#4#5#6[#8]#8%
makeatother
begindocument
tableofcontents
sloppy % Just for this example
chapter[Chapter short title]Chapter long title
lipsum[1-50]
section[Section short title]Section long title
lipsum[1-50]
enddocument
Thanks but... then it doesn't know the command section any more. What could have gone wrong?
– Anja
Nov 10 '18 at 14:27
@Anja: In my example there is no problem. Can you elaborate on what packages you use? Perhaps start by taking my example and adding packages you use until something goes wrong. This way you can identify the conflicting package(s). Give some feedback on your findings.
– Werner
Nov 10 '18 at 15:56
Actually several of the packages were causing problems, so in my case the solution suggested by Peter Wilson was just faster to get it to run. Thank you still.
– Anja
Nov 13 '18 at 16:01
add a comment |
The following updates the way the marks are used when setting the chapter and sectional titles within the book
class:
documentclassbook
usepackagefancyhdr,lipsum
makeatletter
% Update how chapter is added to the ToC/header
letoldchaptermarkchaptermark
renewcommandchaptermark[1]oldchaptermark@chaptermark% Used stored chapter mark
letold@chapter@chapter
def@chapter[#1]#2%
def@chaptermark#1% Store chapter mark
old@chapter[#2]#2%
% Update how section and subsection is added to the ToC/header
letoldsectionmarksectionmark
renewcommandsectionmark[1]oldsectionmark@sectionmark% Used stored section mark
letoldsubsectionmarksubsectionmark
renewcommandsubsectionmark[1]oldsubsectionmark@subsectionmark% Used stored subsection mark
letold@sect@sect
def@sect#1#2#3#4#5#6[#7]#8%
@namedef@#1mark#7% Store sectional mark
old@sect#1#2#3#4#5#6[#8]#8%
makeatother
begindocument
tableofcontents
sloppy % Just for this example
chapter[Chapter short title]Chapter long title
lipsum[1-50]
section[Section short title]Section long title
lipsum[1-50]
enddocument
The following updates the way the marks are used when setting the chapter and sectional titles within the book
class:
documentclassbook
usepackagefancyhdr,lipsum
makeatletter
% Update how chapter is added to the ToC/header
letoldchaptermarkchaptermark
renewcommandchaptermark[1]oldchaptermark@chaptermark% Used stored chapter mark
letold@chapter@chapter
def@chapter[#1]#2%
def@chaptermark#1% Store chapter mark
old@chapter[#2]#2%
% Update how section and subsection is added to the ToC/header
letoldsectionmarksectionmark
renewcommandsectionmark[1]oldsectionmark@sectionmark% Used stored section mark
letoldsubsectionmarksubsectionmark
renewcommandsubsectionmark[1]oldsubsectionmark@subsectionmark% Used stored subsection mark
letold@sect@sect
def@sect#1#2#3#4#5#6[#7]#8%
@namedef@#1mark#7% Store sectional mark
old@sect#1#2#3#4#5#6[#8]#8%
makeatother
begindocument
tableofcontents
sloppy % Just for this example
chapter[Chapter short title]Chapter long title
lipsum[1-50]
section[Section short title]Section long title
lipsum[1-50]
enddocument
answered Nov 9 '18 at 20:27
WernerWerner
450k729981705
450k729981705
Thanks but... then it doesn't know the command section any more. What could have gone wrong?
– Anja
Nov 10 '18 at 14:27
@Anja: In my example there is no problem. Can you elaborate on what packages you use? Perhaps start by taking my example and adding packages you use until something goes wrong. This way you can identify the conflicting package(s). Give some feedback on your findings.
– Werner
Nov 10 '18 at 15:56
Actually several of the packages were causing problems, so in my case the solution suggested by Peter Wilson was just faster to get it to run. Thank you still.
– Anja
Nov 13 '18 at 16:01
add a comment |
Thanks but... then it doesn't know the command section any more. What could have gone wrong?
– Anja
Nov 10 '18 at 14:27
@Anja: In my example there is no problem. Can you elaborate on what packages you use? Perhaps start by taking my example and adding packages you use until something goes wrong. This way you can identify the conflicting package(s). Give some feedback on your findings.
– Werner
Nov 10 '18 at 15:56
Actually several of the packages were causing problems, so in my case the solution suggested by Peter Wilson was just faster to get it to run. Thank you still.
– Anja
Nov 13 '18 at 16:01
Thanks but... then it doesn't know the command section any more. What could have gone wrong?
– Anja
Nov 10 '18 at 14:27
Thanks but... then it doesn't know the command section any more. What could have gone wrong?
– Anja
Nov 10 '18 at 14:27
@Anja: In my example there is no problem. Can you elaborate on what packages you use? Perhaps start by taking my example and adding packages you use until something goes wrong. This way you can identify the conflicting package(s). Give some feedback on your findings.
– Werner
Nov 10 '18 at 15:56
@Anja: In my example there is no problem. Can you elaborate on what packages you use? Perhaps start by taking my example and adding packages you use until something goes wrong. This way you can identify the conflicting package(s). Give some feedback on your findings.
– Werner
Nov 10 '18 at 15:56
Actually several of the packages were causing problems, so in my case the solution suggested by Peter Wilson was just faster to get it to run. Thank you still.
– Anja
Nov 13 '18 at 16:01
Actually several of the packages were causing problems, so in my case the solution suggested by Peter Wilson was just faster to get it to run. Thank you still.
– Anja
Nov 13 '18 at 16:01
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%2f459184%2fshort-title-in-header-but-not-toc-for-document-class-book%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
Welcome to TeX SX! If you use package
titlesec
, this is done through the[toctitles]
option.– Bernard
Nov 9 '18 at 19:12
Thank you, I didn't see your answer at first, but this is actually the fastest solution!
– Anja
Nov 13 '18 at 16:45