Remove indentation in table of contents
up vote
1
down vote
favorite
I want remove the space in my table of contents of section
, subsection
and subsubsection
.
This is my code:
documentclass{book}
usepackage[utf8]{inputenc}
usepackage{imakeidx}
makeindex[columns=3, title=Alphabetical Index, intoc]
begin{document}
tableofcontents
chapter{chapter}
section{Introduction}
In this example several keywordsindex{keywords} will be
used which are important and deserve to appear in the
Indexindex{Index}.
subsection{subsection}
Terms like generateindex{generate} and someindex{others}
will also show up. Terms in the index can also be
nested index{Index!nested}
clearpage
section{Second section}
This second sectionindex{section} may include some special
word, and expand the ones already usedindex{keywords!used}.
printindex
end{document}
table-of-contents indentation
add a comment |
up vote
1
down vote
favorite
I want remove the space in my table of contents of section
, subsection
and subsubsection
.
This is my code:
documentclass{book}
usepackage[utf8]{inputenc}
usepackage{imakeidx}
makeindex[columns=3, title=Alphabetical Index, intoc]
begin{document}
tableofcontents
chapter{chapter}
section{Introduction}
In this example several keywordsindex{keywords} will be
used which are important and deserve to appear in the
Indexindex{Index}.
subsection{subsection}
Terms like generateindex{generate} and someindex{others}
will also show up. Terms in the index can also be
nested index{Index!nested}
clearpage
section{Second section}
This second sectionindex{section} may include some special
word, and expand the ones already usedindex{keywords!used}.
printindex
end{document}
table-of-contents indentation
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I want remove the space in my table of contents of section
, subsection
and subsubsection
.
This is my code:
documentclass{book}
usepackage[utf8]{inputenc}
usepackage{imakeidx}
makeindex[columns=3, title=Alphabetical Index, intoc]
begin{document}
tableofcontents
chapter{chapter}
section{Introduction}
In this example several keywordsindex{keywords} will be
used which are important and deserve to appear in the
Indexindex{Index}.
subsection{subsection}
Terms like generateindex{generate} and someindex{others}
will also show up. Terms in the index can also be
nested index{Index!nested}
clearpage
section{Second section}
This second sectionindex{section} may include some special
word, and expand the ones already usedindex{keywords!used}.
printindex
end{document}
table-of-contents indentation
I want remove the space in my table of contents of section
, subsection
and subsubsection
.
This is my code:
documentclass{book}
usepackage[utf8]{inputenc}
usepackage{imakeidx}
makeindex[columns=3, title=Alphabetical Index, intoc]
begin{document}
tableofcontents
chapter{chapter}
section{Introduction}
In this example several keywordsindex{keywords} will be
used which are important and deserve to appear in the
Indexindex{Index}.
subsection{subsection}
Terms like generateindex{generate} and someindex{others}
will also show up. Terms in the index can also be
nested index{Index!nested}
clearpage
section{Second section}
This second sectionindex{section} may include some special
word, and expand the ones already usedindex{keywords!used}.
printindex
end{document}
table-of-contents indentation
table-of-contents indentation
edited Nov 22 at 0:54
Werner
433k609531635
433k609531635
asked Nov 22 at 0:11
x-rw
32817
32817
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
3
down vote
accepted
Using tocloft
, these lengths are managed by cftXindent
where X
includes chap
(for chapter
), sec
(for section
) and subsec
(for subsection
):
documentclass{book}
usepackage{lipsum}
usepackage{tocloft}
setlength{cftsecindent}{0pt}% Remove indent for section
setlength{cftsubsecindent}{0pt}% Remove indent for subsection
% setlength{cftsubsubsecindent}{0pt}% Remove indent for subsubsection
begin{document}
tableofcontents
chapter{A chapter}
section{First section}lipsum[1-5]
subsection{A subsection}lipsum[6-10]
section{Second section}lipsum[11-15]
end{document}
add a comment |
up vote
1
down vote
A solution with titletoc
:
documentclass{book}
usepackage[showframe]{geometry}
usepackage[utf8]{inputenc}
usepackage{imakeidx}
makeindex[columns=3, title=Alphabetical Index, intoc]
usepackage{titletoc}
contentsmargin{0.2pt}
titlecontents{section}
[2.5em]
{vspace*{baselineskip}mdseries}
{contentslabel[thecontentslabel]{2.5em}}
{}
{hfillthecontentspage}
titlecontents{subsection}
[2.5em]
{vspace*{baselineskip}mdseries}
{contentslabel[thecontentslabel]{2.5em}}
{}
{hfillthecontentspage}
begin{document}
tableofcontents
chapter{chapter}
section{Introduction}
In this example several keywordsindex{keywords} will be
used which are important and deserve to appear in the
Indexindex{Index}.
subsection{subsection}
Terms like generateindex{generate} and someindex{others}
will also show up. Terms in the index can also be
nested index{Index!nested}
clearpage
section{Second section}
This second sectionindex{section} may include some special
word, and expand the ones already usedindex{keywords!used}.
printindex
end{document}
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
Using tocloft
, these lengths are managed by cftXindent
where X
includes chap
(for chapter
), sec
(for section
) and subsec
(for subsection
):
documentclass{book}
usepackage{lipsum}
usepackage{tocloft}
setlength{cftsecindent}{0pt}% Remove indent for section
setlength{cftsubsecindent}{0pt}% Remove indent for subsection
% setlength{cftsubsubsecindent}{0pt}% Remove indent for subsubsection
begin{document}
tableofcontents
chapter{A chapter}
section{First section}lipsum[1-5]
subsection{A subsection}lipsum[6-10]
section{Second section}lipsum[11-15]
end{document}
add a comment |
up vote
3
down vote
accepted
Using tocloft
, these lengths are managed by cftXindent
where X
includes chap
(for chapter
), sec
(for section
) and subsec
(for subsection
):
documentclass{book}
usepackage{lipsum}
usepackage{tocloft}
setlength{cftsecindent}{0pt}% Remove indent for section
setlength{cftsubsecindent}{0pt}% Remove indent for subsection
% setlength{cftsubsubsecindent}{0pt}% Remove indent for subsubsection
begin{document}
tableofcontents
chapter{A chapter}
section{First section}lipsum[1-5]
subsection{A subsection}lipsum[6-10]
section{Second section}lipsum[11-15]
end{document}
add a comment |
up vote
3
down vote
accepted
up vote
3
down vote
accepted
Using tocloft
, these lengths are managed by cftXindent
where X
includes chap
(for chapter
), sec
(for section
) and subsec
(for subsection
):
documentclass{book}
usepackage{lipsum}
usepackage{tocloft}
setlength{cftsecindent}{0pt}% Remove indent for section
setlength{cftsubsecindent}{0pt}% Remove indent for subsection
% setlength{cftsubsubsecindent}{0pt}% Remove indent for subsubsection
begin{document}
tableofcontents
chapter{A chapter}
section{First section}lipsum[1-5]
subsection{A subsection}lipsum[6-10]
section{Second section}lipsum[11-15]
end{document}
Using tocloft
, these lengths are managed by cftXindent
where X
includes chap
(for chapter
), sec
(for section
) and subsec
(for subsection
):
documentclass{book}
usepackage{lipsum}
usepackage{tocloft}
setlength{cftsecindent}{0pt}% Remove indent for section
setlength{cftsubsecindent}{0pt}% Remove indent for subsection
% setlength{cftsubsubsecindent}{0pt}% Remove indent for subsubsection
begin{document}
tableofcontents
chapter{A chapter}
section{First section}lipsum[1-5]
subsection{A subsection}lipsum[6-10]
section{Second section}lipsum[11-15]
end{document}
answered Nov 22 at 0:53
Werner
433k609531635
433k609531635
add a comment |
add a comment |
up vote
1
down vote
A solution with titletoc
:
documentclass{book}
usepackage[showframe]{geometry}
usepackage[utf8]{inputenc}
usepackage{imakeidx}
makeindex[columns=3, title=Alphabetical Index, intoc]
usepackage{titletoc}
contentsmargin{0.2pt}
titlecontents{section}
[2.5em]
{vspace*{baselineskip}mdseries}
{contentslabel[thecontentslabel]{2.5em}}
{}
{hfillthecontentspage}
titlecontents{subsection}
[2.5em]
{vspace*{baselineskip}mdseries}
{contentslabel[thecontentslabel]{2.5em}}
{}
{hfillthecontentspage}
begin{document}
tableofcontents
chapter{chapter}
section{Introduction}
In this example several keywordsindex{keywords} will be
used which are important and deserve to appear in the
Indexindex{Index}.
subsection{subsection}
Terms like generateindex{generate} and someindex{others}
will also show up. Terms in the index can also be
nested index{Index!nested}
clearpage
section{Second section}
This second sectionindex{section} may include some special
word, and expand the ones already usedindex{keywords!used}.
printindex
end{document}
add a comment |
up vote
1
down vote
A solution with titletoc
:
documentclass{book}
usepackage[showframe]{geometry}
usepackage[utf8]{inputenc}
usepackage{imakeidx}
makeindex[columns=3, title=Alphabetical Index, intoc]
usepackage{titletoc}
contentsmargin{0.2pt}
titlecontents{section}
[2.5em]
{vspace*{baselineskip}mdseries}
{contentslabel[thecontentslabel]{2.5em}}
{}
{hfillthecontentspage}
titlecontents{subsection}
[2.5em]
{vspace*{baselineskip}mdseries}
{contentslabel[thecontentslabel]{2.5em}}
{}
{hfillthecontentspage}
begin{document}
tableofcontents
chapter{chapter}
section{Introduction}
In this example several keywordsindex{keywords} will be
used which are important and deserve to appear in the
Indexindex{Index}.
subsection{subsection}
Terms like generateindex{generate} and someindex{others}
will also show up. Terms in the index can also be
nested index{Index!nested}
clearpage
section{Second section}
This second sectionindex{section} may include some special
word, and expand the ones already usedindex{keywords!used}.
printindex
end{document}
add a comment |
up vote
1
down vote
up vote
1
down vote
A solution with titletoc
:
documentclass{book}
usepackage[showframe]{geometry}
usepackage[utf8]{inputenc}
usepackage{imakeidx}
makeindex[columns=3, title=Alphabetical Index, intoc]
usepackage{titletoc}
contentsmargin{0.2pt}
titlecontents{section}
[2.5em]
{vspace*{baselineskip}mdseries}
{contentslabel[thecontentslabel]{2.5em}}
{}
{hfillthecontentspage}
titlecontents{subsection}
[2.5em]
{vspace*{baselineskip}mdseries}
{contentslabel[thecontentslabel]{2.5em}}
{}
{hfillthecontentspage}
begin{document}
tableofcontents
chapter{chapter}
section{Introduction}
In this example several keywordsindex{keywords} will be
used which are important and deserve to appear in the
Indexindex{Index}.
subsection{subsection}
Terms like generateindex{generate} and someindex{others}
will also show up. Terms in the index can also be
nested index{Index!nested}
clearpage
section{Second section}
This second sectionindex{section} may include some special
word, and expand the ones already usedindex{keywords!used}.
printindex
end{document}
A solution with titletoc
:
documentclass{book}
usepackage[showframe]{geometry}
usepackage[utf8]{inputenc}
usepackage{imakeidx}
makeindex[columns=3, title=Alphabetical Index, intoc]
usepackage{titletoc}
contentsmargin{0.2pt}
titlecontents{section}
[2.5em]
{vspace*{baselineskip}mdseries}
{contentslabel[thecontentslabel]{2.5em}}
{}
{hfillthecontentspage}
titlecontents{subsection}
[2.5em]
{vspace*{baselineskip}mdseries}
{contentslabel[thecontentslabel]{2.5em}}
{}
{hfillthecontentspage}
begin{document}
tableofcontents
chapter{chapter}
section{Introduction}
In this example several keywordsindex{keywords} will be
used which are important and deserve to appear in the
Indexindex{Index}.
subsection{subsection}
Terms like generateindex{generate} and someindex{others}
will also show up. Terms in the index can also be
nested index{Index!nested}
clearpage
section{Second section}
This second sectionindex{section} may include some special
word, and expand the ones already usedindex{keywords!used}.
printindex
end{document}
answered Nov 22 at 0:51
Bernard
163k768192
163k768192
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%2f461216%2fremove-indentation-in-table-of-contents%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