How center the chapter* titles
up vote
3
down vote
favorite
I want center the title "Preface" and "Abstract" only. I do not want to centralize all the chapters. I can not and I should not delete any bookstore, I need all the libraries.
documentclass{book}
usepackage[left=3cm, right=2cm, top=2cm, bottom=2cm]{geometry}
usepackage{lipsum}
usepackage{lscape}
usepackage[utf8]{inputenc}
usepackage[spanish,es-tabla]{babel}
usepackage[table]{xcolor}
usepackage{sectsty}
sectionfont{fontsize{12pt}{14.4pt}selectfontsffamilybfseries}
subsectionfont{fontsize{11.5pt}{13.8pt}selectfontsffamilybfseries}
subsubsectionfont{normalsizesffamilybfseries}
begin{document}
chapter*{centering Preface}
Some text
chapter*{centering Abstract}
chapter{Introduction}
chapter{Body}
chapter{Conclusion}
end{document}
horizontal-alignment chapters starred-version
add a comment |
up vote
3
down vote
favorite
I want center the title "Preface" and "Abstract" only. I do not want to centralize all the chapters. I can not and I should not delete any bookstore, I need all the libraries.
documentclass{book}
usepackage[left=3cm, right=2cm, top=2cm, bottom=2cm]{geometry}
usepackage{lipsum}
usepackage{lscape}
usepackage[utf8]{inputenc}
usepackage[spanish,es-tabla]{babel}
usepackage[table]{xcolor}
usepackage{sectsty}
sectionfont{fontsize{12pt}{14.4pt}selectfontsffamilybfseries}
subsectionfont{fontsize{11.5pt}{13.8pt}selectfontsffamilybfseries}
subsubsectionfont{normalsizesffamilybfseries}
begin{document}
chapter*{centering Preface}
Some text
chapter*{centering Abstract}
chapter{Introduction}
chapter{Body}
chapter{Conclusion}
end{document}
horizontal-alignment chapters starred-version
Should all chapter titles be centred, or only unnumbered chapters?
– Bernard
3 hours ago
@Bernard only two, Preface and Abstract
– x-rw
3 hours ago
add a comment |
up vote
3
down vote
favorite
up vote
3
down vote
favorite
I want center the title "Preface" and "Abstract" only. I do not want to centralize all the chapters. I can not and I should not delete any bookstore, I need all the libraries.
documentclass{book}
usepackage[left=3cm, right=2cm, top=2cm, bottom=2cm]{geometry}
usepackage{lipsum}
usepackage{lscape}
usepackage[utf8]{inputenc}
usepackage[spanish,es-tabla]{babel}
usepackage[table]{xcolor}
usepackage{sectsty}
sectionfont{fontsize{12pt}{14.4pt}selectfontsffamilybfseries}
subsectionfont{fontsize{11.5pt}{13.8pt}selectfontsffamilybfseries}
subsubsectionfont{normalsizesffamilybfseries}
begin{document}
chapter*{centering Preface}
Some text
chapter*{centering Abstract}
chapter{Introduction}
chapter{Body}
chapter{Conclusion}
end{document}
horizontal-alignment chapters starred-version
I want center the title "Preface" and "Abstract" only. I do not want to centralize all the chapters. I can not and I should not delete any bookstore, I need all the libraries.
documentclass{book}
usepackage[left=3cm, right=2cm, top=2cm, bottom=2cm]{geometry}
usepackage{lipsum}
usepackage{lscape}
usepackage[utf8]{inputenc}
usepackage[spanish,es-tabla]{babel}
usepackage[table]{xcolor}
usepackage{sectsty}
sectionfont{fontsize{12pt}{14.4pt}selectfontsffamilybfseries}
subsectionfont{fontsize{11.5pt}{13.8pt}selectfontsffamilybfseries}
subsubsectionfont{normalsizesffamilybfseries}
begin{document}
chapter*{centering Preface}
Some text
chapter*{centering Abstract}
chapter{Introduction}
chapter{Body}
chapter{Conclusion}
end{document}
horizontal-alignment chapters starred-version
horizontal-alignment chapters starred-version
edited 3 hours ago
Werner
431k599491626
431k599491626
asked 4 hours ago
x-rw
28716
28716
Should all chapter titles be centred, or only unnumbered chapters?
– Bernard
3 hours ago
@Bernard only two, Preface and Abstract
– x-rw
3 hours ago
add a comment |
Should all chapter titles be centred, or only unnumbered chapters?
– Bernard
3 hours ago
@Bernard only two, Preface and Abstract
– x-rw
3 hours ago
Should all chapter titles be centred, or only unnumbered chapters?
– Bernard
3 hours ago
Should all chapter titles be centred, or only unnumbered chapters?
– Bernard
3 hours ago
@Bernard only two, Preface and Abstract
– x-rw
3 hours ago
@Bernard only two, Preface and Abstract
– x-rw
3 hours ago
add a comment |
3 Answers
3
active
oldest
votes
up vote
3
down vote
accepted
Set the title inside a makebox[linewidth]
; this naturally centres it. It would not have any impact on headers or the ToC since these elements don't end up there.
documentclass{book}
usepackage{lipsum}
begin{document}
chapter*{makebox[linewidth]{Preface}}
lipsum[1]
chapter*{makebox[linewidth]{Abstract}}
lipsum[2]
chapter{Introduction}
chapter{Body}
chapter{Conclusion}
end{document}
add a comment |
up vote
0
down vote
Using the tools from sectsty
:
documentclass{book}
usepackage[left=3cm, right=2cm, vmargin=2cm]{geometry}
usepackage{lipsum}
usepackage{lscape}
usepackage[utf8]{inputenc}
usepackage[spanish,es-tabla]{babel}
usepackage[table]{xcolor}
usepackage{sectsty}
sectionfont{fontsize{12pt}{14.4pt}selectfontsffamilybfseries}
subsectionfont{fontsize{11.5pt}{13.8pt}selectfontsffamilybfseries}
subsubsectionfont{normalsizesffamilybfseries}
begin{document}
chapterfont{hugebfseriescentering}
chapter*{centering Preface}
Some text
chapter*{centering Abstract}
chapterfont{hugebfseriesraggedright}
chapter{Introduction}
chapter{Body}
chapter{Conclusion}
end{document}
add a comment |
up vote
0
down vote
Fast solution
You could set a manual space
chapter*{hspace{.4textwidth}Preface}
which puts the title almost in the middle of the page
Reasoned solution
Otherwise you could think of measuring the length of your title and make the thing more precise with the package calc
%PREAMBLE
usepackage{calc}
newlengthmylen
newcommandchaplen[1]{
setlengthmylen{(textwidth-widthof{Hugebfseries #1})/2}
}
%... BEGIN DOCUMENT
chaplen{Preface}
chapter*{hspace*{mylen}Preface}
chaplen{OTHER}
chapter*{hspace*{mylen}OTHER}
FUll code:
documentclass{book}
usepackage[left=3cm, right=2cm, top=2cm, bottom=2cm]{geometry}
usepackage{lipsum}
usepackage{lscape}
usepackage[utf8]{inputenc}
usepackage[spanish,es-tabla]{babel}
usepackage[table]{xcolor}
usepackage{sectsty}
sectionfont{fontsize{12pt}{14.4pt}selectfontsffamilybfseries}
subsectionfont{fontsize{11.5pt}{13.8pt}selectfontsffamilybfseries}
subsubsectionfont{normalsizesffamilybfseries}
usepackage{calc}
newlengthmylen
newcommandchaplen[1]{
setlengthmylen{(textwidth-widthof{Hugebfseries #1})/2}
}
begin{document}
chaplen{Preface}
chapter*{hspace*{mylen}Preface}
Some text
chaplen{Abstract}
chapter*{hspace*{mylen}Abstract}
chapter{Introduction}
chapter{Body}
chapter{Conclusion}
end{document}
1
Does not centralize well, another option?
– x-rw
3 hours ago
Why you multiplied by 2?
– Sigur
3 hours ago
1
I think it is still wrong. If it would work, it should be(x-y)/2
.
– Sigur
3 hours ago
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
Set the title inside a makebox[linewidth]
; this naturally centres it. It would not have any impact on headers or the ToC since these elements don't end up there.
documentclass{book}
usepackage{lipsum}
begin{document}
chapter*{makebox[linewidth]{Preface}}
lipsum[1]
chapter*{makebox[linewidth]{Abstract}}
lipsum[2]
chapter{Introduction}
chapter{Body}
chapter{Conclusion}
end{document}
add a comment |
up vote
3
down vote
accepted
Set the title inside a makebox[linewidth]
; this naturally centres it. It would not have any impact on headers or the ToC since these elements don't end up there.
documentclass{book}
usepackage{lipsum}
begin{document}
chapter*{makebox[linewidth]{Preface}}
lipsum[1]
chapter*{makebox[linewidth]{Abstract}}
lipsum[2]
chapter{Introduction}
chapter{Body}
chapter{Conclusion}
end{document}
add a comment |
up vote
3
down vote
accepted
up vote
3
down vote
accepted
Set the title inside a makebox[linewidth]
; this naturally centres it. It would not have any impact on headers or the ToC since these elements don't end up there.
documentclass{book}
usepackage{lipsum}
begin{document}
chapter*{makebox[linewidth]{Preface}}
lipsum[1]
chapter*{makebox[linewidth]{Abstract}}
lipsum[2]
chapter{Introduction}
chapter{Body}
chapter{Conclusion}
end{document}
Set the title inside a makebox[linewidth]
; this naturally centres it. It would not have any impact on headers or the ToC since these elements don't end up there.
documentclass{book}
usepackage{lipsum}
begin{document}
chapter*{makebox[linewidth]{Preface}}
lipsum[1]
chapter*{makebox[linewidth]{Abstract}}
lipsum[2]
chapter{Introduction}
chapter{Body}
chapter{Conclusion}
end{document}
answered 3 hours ago
Werner
431k599491626
431k599491626
add a comment |
add a comment |
up vote
0
down vote
Using the tools from sectsty
:
documentclass{book}
usepackage[left=3cm, right=2cm, vmargin=2cm]{geometry}
usepackage{lipsum}
usepackage{lscape}
usepackage[utf8]{inputenc}
usepackage[spanish,es-tabla]{babel}
usepackage[table]{xcolor}
usepackage{sectsty}
sectionfont{fontsize{12pt}{14.4pt}selectfontsffamilybfseries}
subsectionfont{fontsize{11.5pt}{13.8pt}selectfontsffamilybfseries}
subsubsectionfont{normalsizesffamilybfseries}
begin{document}
chapterfont{hugebfseriescentering}
chapter*{centering Preface}
Some text
chapter*{centering Abstract}
chapterfont{hugebfseriesraggedright}
chapter{Introduction}
chapter{Body}
chapter{Conclusion}
end{document}
add a comment |
up vote
0
down vote
Using the tools from sectsty
:
documentclass{book}
usepackage[left=3cm, right=2cm, vmargin=2cm]{geometry}
usepackage{lipsum}
usepackage{lscape}
usepackage[utf8]{inputenc}
usepackage[spanish,es-tabla]{babel}
usepackage[table]{xcolor}
usepackage{sectsty}
sectionfont{fontsize{12pt}{14.4pt}selectfontsffamilybfseries}
subsectionfont{fontsize{11.5pt}{13.8pt}selectfontsffamilybfseries}
subsubsectionfont{normalsizesffamilybfseries}
begin{document}
chapterfont{hugebfseriescentering}
chapter*{centering Preface}
Some text
chapter*{centering Abstract}
chapterfont{hugebfseriesraggedright}
chapter{Introduction}
chapter{Body}
chapter{Conclusion}
end{document}
add a comment |
up vote
0
down vote
up vote
0
down vote
Using the tools from sectsty
:
documentclass{book}
usepackage[left=3cm, right=2cm, vmargin=2cm]{geometry}
usepackage{lipsum}
usepackage{lscape}
usepackage[utf8]{inputenc}
usepackage[spanish,es-tabla]{babel}
usepackage[table]{xcolor}
usepackage{sectsty}
sectionfont{fontsize{12pt}{14.4pt}selectfontsffamilybfseries}
subsectionfont{fontsize{11.5pt}{13.8pt}selectfontsffamilybfseries}
subsubsectionfont{normalsizesffamilybfseries}
begin{document}
chapterfont{hugebfseriescentering}
chapter*{centering Preface}
Some text
chapter*{centering Abstract}
chapterfont{hugebfseriesraggedright}
chapter{Introduction}
chapter{Body}
chapter{Conclusion}
end{document}
Using the tools from sectsty
:
documentclass{book}
usepackage[left=3cm, right=2cm, vmargin=2cm]{geometry}
usepackage{lipsum}
usepackage{lscape}
usepackage[utf8]{inputenc}
usepackage[spanish,es-tabla]{babel}
usepackage[table]{xcolor}
usepackage{sectsty}
sectionfont{fontsize{12pt}{14.4pt}selectfontsffamilybfseries}
subsectionfont{fontsize{11.5pt}{13.8pt}selectfontsffamilybfseries}
subsubsectionfont{normalsizesffamilybfseries}
begin{document}
chapterfont{hugebfseriescentering}
chapter*{centering Preface}
Some text
chapter*{centering Abstract}
chapterfont{hugebfseriesraggedright}
chapter{Introduction}
chapter{Body}
chapter{Conclusion}
end{document}
answered 3 hours ago
Bernard
162k767192
162k767192
add a comment |
add a comment |
up vote
0
down vote
Fast solution
You could set a manual space
chapter*{hspace{.4textwidth}Preface}
which puts the title almost in the middle of the page
Reasoned solution
Otherwise you could think of measuring the length of your title and make the thing more precise with the package calc
%PREAMBLE
usepackage{calc}
newlengthmylen
newcommandchaplen[1]{
setlengthmylen{(textwidth-widthof{Hugebfseries #1})/2}
}
%... BEGIN DOCUMENT
chaplen{Preface}
chapter*{hspace*{mylen}Preface}
chaplen{OTHER}
chapter*{hspace*{mylen}OTHER}
FUll code:
documentclass{book}
usepackage[left=3cm, right=2cm, top=2cm, bottom=2cm]{geometry}
usepackage{lipsum}
usepackage{lscape}
usepackage[utf8]{inputenc}
usepackage[spanish,es-tabla]{babel}
usepackage[table]{xcolor}
usepackage{sectsty}
sectionfont{fontsize{12pt}{14.4pt}selectfontsffamilybfseries}
subsectionfont{fontsize{11.5pt}{13.8pt}selectfontsffamilybfseries}
subsubsectionfont{normalsizesffamilybfseries}
usepackage{calc}
newlengthmylen
newcommandchaplen[1]{
setlengthmylen{(textwidth-widthof{Hugebfseries #1})/2}
}
begin{document}
chaplen{Preface}
chapter*{hspace*{mylen}Preface}
Some text
chaplen{Abstract}
chapter*{hspace*{mylen}Abstract}
chapter{Introduction}
chapter{Body}
chapter{Conclusion}
end{document}
1
Does not centralize well, another option?
– x-rw
3 hours ago
Why you multiplied by 2?
– Sigur
3 hours ago
1
I think it is still wrong. If it would work, it should be(x-y)/2
.
– Sigur
3 hours ago
add a comment |
up vote
0
down vote
Fast solution
You could set a manual space
chapter*{hspace{.4textwidth}Preface}
which puts the title almost in the middle of the page
Reasoned solution
Otherwise you could think of measuring the length of your title and make the thing more precise with the package calc
%PREAMBLE
usepackage{calc}
newlengthmylen
newcommandchaplen[1]{
setlengthmylen{(textwidth-widthof{Hugebfseries #1})/2}
}
%... BEGIN DOCUMENT
chaplen{Preface}
chapter*{hspace*{mylen}Preface}
chaplen{OTHER}
chapter*{hspace*{mylen}OTHER}
FUll code:
documentclass{book}
usepackage[left=3cm, right=2cm, top=2cm, bottom=2cm]{geometry}
usepackage{lipsum}
usepackage{lscape}
usepackage[utf8]{inputenc}
usepackage[spanish,es-tabla]{babel}
usepackage[table]{xcolor}
usepackage{sectsty}
sectionfont{fontsize{12pt}{14.4pt}selectfontsffamilybfseries}
subsectionfont{fontsize{11.5pt}{13.8pt}selectfontsffamilybfseries}
subsubsectionfont{normalsizesffamilybfseries}
usepackage{calc}
newlengthmylen
newcommandchaplen[1]{
setlengthmylen{(textwidth-widthof{Hugebfseries #1})/2}
}
begin{document}
chaplen{Preface}
chapter*{hspace*{mylen}Preface}
Some text
chaplen{Abstract}
chapter*{hspace*{mylen}Abstract}
chapter{Introduction}
chapter{Body}
chapter{Conclusion}
end{document}
1
Does not centralize well, another option?
– x-rw
3 hours ago
Why you multiplied by 2?
– Sigur
3 hours ago
1
I think it is still wrong. If it would work, it should be(x-y)/2
.
– Sigur
3 hours ago
add a comment |
up vote
0
down vote
up vote
0
down vote
Fast solution
You could set a manual space
chapter*{hspace{.4textwidth}Preface}
which puts the title almost in the middle of the page
Reasoned solution
Otherwise you could think of measuring the length of your title and make the thing more precise with the package calc
%PREAMBLE
usepackage{calc}
newlengthmylen
newcommandchaplen[1]{
setlengthmylen{(textwidth-widthof{Hugebfseries #1})/2}
}
%... BEGIN DOCUMENT
chaplen{Preface}
chapter*{hspace*{mylen}Preface}
chaplen{OTHER}
chapter*{hspace*{mylen}OTHER}
FUll code:
documentclass{book}
usepackage[left=3cm, right=2cm, top=2cm, bottom=2cm]{geometry}
usepackage{lipsum}
usepackage{lscape}
usepackage[utf8]{inputenc}
usepackage[spanish,es-tabla]{babel}
usepackage[table]{xcolor}
usepackage{sectsty}
sectionfont{fontsize{12pt}{14.4pt}selectfontsffamilybfseries}
subsectionfont{fontsize{11.5pt}{13.8pt}selectfontsffamilybfseries}
subsubsectionfont{normalsizesffamilybfseries}
usepackage{calc}
newlengthmylen
newcommandchaplen[1]{
setlengthmylen{(textwidth-widthof{Hugebfseries #1})/2}
}
begin{document}
chaplen{Preface}
chapter*{hspace*{mylen}Preface}
Some text
chaplen{Abstract}
chapter*{hspace*{mylen}Abstract}
chapter{Introduction}
chapter{Body}
chapter{Conclusion}
end{document}
Fast solution
You could set a manual space
chapter*{hspace{.4textwidth}Preface}
which puts the title almost in the middle of the page
Reasoned solution
Otherwise you could think of measuring the length of your title and make the thing more precise with the package calc
%PREAMBLE
usepackage{calc}
newlengthmylen
newcommandchaplen[1]{
setlengthmylen{(textwidth-widthof{Hugebfseries #1})/2}
}
%... BEGIN DOCUMENT
chaplen{Preface}
chapter*{hspace*{mylen}Preface}
chaplen{OTHER}
chapter*{hspace*{mylen}OTHER}
FUll code:
documentclass{book}
usepackage[left=3cm, right=2cm, top=2cm, bottom=2cm]{geometry}
usepackage{lipsum}
usepackage{lscape}
usepackage[utf8]{inputenc}
usepackage[spanish,es-tabla]{babel}
usepackage[table]{xcolor}
usepackage{sectsty}
sectionfont{fontsize{12pt}{14.4pt}selectfontsffamilybfseries}
subsectionfont{fontsize{11.5pt}{13.8pt}selectfontsffamilybfseries}
subsubsectionfont{normalsizesffamilybfseries}
usepackage{calc}
newlengthmylen
newcommandchaplen[1]{
setlengthmylen{(textwidth-widthof{Hugebfseries #1})/2}
}
begin{document}
chaplen{Preface}
chapter*{hspace*{mylen}Preface}
Some text
chaplen{Abstract}
chapter*{hspace*{mylen}Abstract}
chapter{Introduction}
chapter{Body}
chapter{Conclusion}
end{document}
edited 3 hours ago
answered 3 hours ago
GiuTeX
661217
661217
1
Does not centralize well, another option?
– x-rw
3 hours ago
Why you multiplied by 2?
– Sigur
3 hours ago
1
I think it is still wrong. If it would work, it should be(x-y)/2
.
– Sigur
3 hours ago
add a comment |
1
Does not centralize well, another option?
– x-rw
3 hours ago
Why you multiplied by 2?
– Sigur
3 hours ago
1
I think it is still wrong. If it would work, it should be(x-y)/2
.
– Sigur
3 hours ago
1
1
Does not centralize well, another option?
– x-rw
3 hours ago
Does not centralize well, another option?
– x-rw
3 hours ago
Why you multiplied by 2?
– Sigur
3 hours ago
Why you multiplied by 2?
– Sigur
3 hours ago
1
1
I think it is still wrong. If it would work, it should be
(x-y)/2
.– Sigur
3 hours ago
I think it is still wrong. If it would work, it should be
(x-y)/2
.– Sigur
3 hours ago
add a comment |
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%2f461212%2fhow-center-the-chapter-titles%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
Should all chapter titles be centred, or only unnumbered chapters?
– Bernard
3 hours ago
@Bernard only two, Preface and Abstract
– x-rw
3 hours ago