How center the chapter* titles
Clash Royale CLAN TAG#URR8PPP
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.
documentclassbook
usepackage[left=3cm, right=2cm, top=2cm, bottom=2cm]geometry
usepackagelipsum
usepackagelscape
usepackage[utf8]inputenc
usepackage[spanish,es-tabla]babel
usepackage[table]xcolor
usepackagesectsty
sectionfontfontsize12pt14.4ptselectfontsffamilybfseries
subsectionfontfontsize11.5pt13.8ptselectfontsffamilybfseries
subsubsectionfontnormalsizesffamilybfseries
begindocument
chapter*centering Preface
Some text
chapter*centering Abstract
chapterIntroduction
chapterBody
chapterConclusion
enddocument
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.
documentclassbook
usepackage[left=3cm, right=2cm, top=2cm, bottom=2cm]geometry
usepackagelipsum
usepackagelscape
usepackage[utf8]inputenc
usepackage[spanish,es-tabla]babel
usepackage[table]xcolor
usepackagesectsty
sectionfontfontsize12pt14.4ptselectfontsffamilybfseries
subsectionfontfontsize11.5pt13.8ptselectfontsffamilybfseries
subsubsectionfontnormalsizesffamilybfseries
begindocument
chapter*centering Preface
Some text
chapter*centering Abstract
chapterIntroduction
chapterBody
chapterConclusion
enddocument
horizontal-alignment chapters starred-version
Should all chapter titles be centred, or only unnumbered chapters?
– Bernard
Nov 21 at 23:56
@Bernard only two, Preface and Abstract
– x-rw
Nov 21 at 23:57
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.
documentclassbook
usepackage[left=3cm, right=2cm, top=2cm, bottom=2cm]geometry
usepackagelipsum
usepackagelscape
usepackage[utf8]inputenc
usepackage[spanish,es-tabla]babel
usepackage[table]xcolor
usepackagesectsty
sectionfontfontsize12pt14.4ptselectfontsffamilybfseries
subsectionfontfontsize11.5pt13.8ptselectfontsffamilybfseries
subsubsectionfontnormalsizesffamilybfseries
begindocument
chapter*centering Preface
Some text
chapter*centering Abstract
chapterIntroduction
chapterBody
chapterConclusion
enddocument
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.
documentclassbook
usepackage[left=3cm, right=2cm, top=2cm, bottom=2cm]geometry
usepackagelipsum
usepackagelscape
usepackage[utf8]inputenc
usepackage[spanish,es-tabla]babel
usepackage[table]xcolor
usepackagesectsty
sectionfontfontsize12pt14.4ptselectfontsffamilybfseries
subsectionfontfontsize11.5pt13.8ptselectfontsffamilybfseries
subsubsectionfontnormalsizesffamilybfseries
begindocument
chapter*centering Preface
Some text
chapter*centering Abstract
chapterIntroduction
chapterBody
chapterConclusion
enddocument
horizontal-alignment chapters starred-version
horizontal-alignment chapters starred-version
edited Nov 21 at 23:55
Werner
432k609511632
432k609511632
asked Nov 21 at 23:38
x-rw
32817
32817
Should all chapter titles be centred, or only unnumbered chapters?
– Bernard
Nov 21 at 23:56
@Bernard only two, Preface and Abstract
– x-rw
Nov 21 at 23:57
add a comment |
Should all chapter titles be centred, or only unnumbered chapters?
– Bernard
Nov 21 at 23:56
@Bernard only two, Preface and Abstract
– x-rw
Nov 21 at 23:57
Should all chapter titles be centred, or only unnumbered chapters?
– Bernard
Nov 21 at 23:56
Should all chapter titles be centred, or only unnumbered chapters?
– Bernard
Nov 21 at 23:56
@Bernard only two, Preface and Abstract
– x-rw
Nov 21 at 23:57
@Bernard only two, Preface and Abstract
– x-rw
Nov 21 at 23:57
add a comment |
3 Answers
3
active
oldest
votes
up vote
4
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.
documentclassbook
usepackagelipsum
begindocument
chapter*makebox[linewidth]Preface
lipsum[1]
chapter*makebox[linewidth]Abstract
lipsum[2]
chapterIntroduction
chapterBody
chapterConclusion
enddocument
add a comment |
up vote
0
down vote
Using the tools from sectsty
:
documentclassbook
usepackage[left=3cm, right=2cm, vmargin=2cm]geometry
usepackagelipsum
usepackagelscape
usepackage[utf8]inputenc
usepackage[spanish,es-tabla]babel
usepackage[table]xcolor
usepackagesectsty
sectionfontfontsize12pt14.4ptselectfontsffamilybfseries
subsectionfontfontsize11.5pt13.8ptselectfontsffamilybfseries
subsubsectionfontnormalsizesffamilybfseries
begindocument
chapterfonthugebfseriescentering
chapter*centering Preface
Some text
chapter*centering Abstract
chapterfonthugebfseriesraggedright
chapterIntroduction
chapterBody
chapterConclusion
enddocument
add a comment |
up vote
0
down vote
Fast solution
You could set a manual space
chapter*hspace.4textwidthPreface
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
usepackagecalc
newlengthmylen
newcommandchaplen[1]
setlengthmylen(textwidth-widthofHugebfseries #1)/2
%... BEGIN DOCUMENT
chaplenPreface
chapter*hspace*mylenPreface
chaplenOTHER
chapter*hspace*mylenOTHER
FUll code:
documentclassbook
usepackage[left=3cm, right=2cm, top=2cm, bottom=2cm]geometry
usepackagelipsum
usepackagelscape
usepackage[utf8]inputenc
usepackage[spanish,es-tabla]babel
usepackage[table]xcolor
usepackagesectsty
sectionfontfontsize12pt14.4ptselectfontsffamilybfseries
subsectionfontfontsize11.5pt13.8ptselectfontsffamilybfseries
subsubsectionfontnormalsizesffamilybfseries
usepackagecalc
newlengthmylen
newcommandchaplen[1]
setlengthmylen(textwidth-widthofHugebfseries #1)/2
begindocument
chaplenPreface
chapter*hspace*mylenPreface
Some text
chaplenAbstract
chapter*hspace*mylenAbstract
chapterIntroduction
chapterBody
chapterConclusion
enddocument
1
Does not centralize well, another option?
– x-rw
Nov 21 at 23:53
Why you multiplied by 2?
– Sigur
Nov 21 at 23:56
1
I think it is still wrong. If it would work, it should be(x-y)/2
.
– Sigur
Nov 21 at 23:59
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
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.
documentclassbook
usepackagelipsum
begindocument
chapter*makebox[linewidth]Preface
lipsum[1]
chapter*makebox[linewidth]Abstract
lipsum[2]
chapterIntroduction
chapterBody
chapterConclusion
enddocument
add a comment |
up vote
4
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.
documentclassbook
usepackagelipsum
begindocument
chapter*makebox[linewidth]Preface
lipsum[1]
chapter*makebox[linewidth]Abstract
lipsum[2]
chapterIntroduction
chapterBody
chapterConclusion
enddocument
add a comment |
up vote
4
down vote
accepted
up vote
4
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.
documentclassbook
usepackagelipsum
begindocument
chapter*makebox[linewidth]Preface
lipsum[1]
chapter*makebox[linewidth]Abstract
lipsum[2]
chapterIntroduction
chapterBody
chapterConclusion
enddocument
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.
documentclassbook
usepackagelipsum
begindocument
chapter*makebox[linewidth]Preface
lipsum[1]
chapter*makebox[linewidth]Abstract
lipsum[2]
chapterIntroduction
chapterBody
chapterConclusion
enddocument
answered Nov 21 at 23:54
Werner
432k609511632
432k609511632
add a comment |
add a comment |
up vote
0
down vote
Using the tools from sectsty
:
documentclassbook
usepackage[left=3cm, right=2cm, vmargin=2cm]geometry
usepackagelipsum
usepackagelscape
usepackage[utf8]inputenc
usepackage[spanish,es-tabla]babel
usepackage[table]xcolor
usepackagesectsty
sectionfontfontsize12pt14.4ptselectfontsffamilybfseries
subsectionfontfontsize11.5pt13.8ptselectfontsffamilybfseries
subsubsectionfontnormalsizesffamilybfseries
begindocument
chapterfonthugebfseriescentering
chapter*centering Preface
Some text
chapter*centering Abstract
chapterfonthugebfseriesraggedright
chapterIntroduction
chapterBody
chapterConclusion
enddocument
add a comment |
up vote
0
down vote
Using the tools from sectsty
:
documentclassbook
usepackage[left=3cm, right=2cm, vmargin=2cm]geometry
usepackagelipsum
usepackagelscape
usepackage[utf8]inputenc
usepackage[spanish,es-tabla]babel
usepackage[table]xcolor
usepackagesectsty
sectionfontfontsize12pt14.4ptselectfontsffamilybfseries
subsectionfontfontsize11.5pt13.8ptselectfontsffamilybfseries
subsubsectionfontnormalsizesffamilybfseries
begindocument
chapterfonthugebfseriescentering
chapter*centering Preface
Some text
chapter*centering Abstract
chapterfonthugebfseriesraggedright
chapterIntroduction
chapterBody
chapterConclusion
enddocument
add a comment |
up vote
0
down vote
up vote
0
down vote
Using the tools from sectsty
:
documentclassbook
usepackage[left=3cm, right=2cm, vmargin=2cm]geometry
usepackagelipsum
usepackagelscape
usepackage[utf8]inputenc
usepackage[spanish,es-tabla]babel
usepackage[table]xcolor
usepackagesectsty
sectionfontfontsize12pt14.4ptselectfontsffamilybfseries
subsectionfontfontsize11.5pt13.8ptselectfontsffamilybfseries
subsubsectionfontnormalsizesffamilybfseries
begindocument
chapterfonthugebfseriescentering
chapter*centering Preface
Some text
chapter*centering Abstract
chapterfonthugebfseriesraggedright
chapterIntroduction
chapterBody
chapterConclusion
enddocument
Using the tools from sectsty
:
documentclassbook
usepackage[left=3cm, right=2cm, vmargin=2cm]geometry
usepackagelipsum
usepackagelscape
usepackage[utf8]inputenc
usepackage[spanish,es-tabla]babel
usepackage[table]xcolor
usepackagesectsty
sectionfontfontsize12pt14.4ptselectfontsffamilybfseries
subsectionfontfontsize11.5pt13.8ptselectfontsffamilybfseries
subsubsectionfontnormalsizesffamilybfseries
begindocument
chapterfonthugebfseriescentering
chapter*centering Preface
Some text
chapter*centering Abstract
chapterfonthugebfseriesraggedright
chapterIntroduction
chapterBody
chapterConclusion
enddocument
answered Nov 22 at 0:13
Bernard
162k767192
162k767192
add a comment |
add a comment |
up vote
0
down vote
Fast solution
You could set a manual space
chapter*hspace.4textwidthPreface
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
usepackagecalc
newlengthmylen
newcommandchaplen[1]
setlengthmylen(textwidth-widthofHugebfseries #1)/2
%... BEGIN DOCUMENT
chaplenPreface
chapter*hspace*mylenPreface
chaplenOTHER
chapter*hspace*mylenOTHER
FUll code:
documentclassbook
usepackage[left=3cm, right=2cm, top=2cm, bottom=2cm]geometry
usepackagelipsum
usepackagelscape
usepackage[utf8]inputenc
usepackage[spanish,es-tabla]babel
usepackage[table]xcolor
usepackagesectsty
sectionfontfontsize12pt14.4ptselectfontsffamilybfseries
subsectionfontfontsize11.5pt13.8ptselectfontsffamilybfseries
subsubsectionfontnormalsizesffamilybfseries
usepackagecalc
newlengthmylen
newcommandchaplen[1]
setlengthmylen(textwidth-widthofHugebfseries #1)/2
begindocument
chaplenPreface
chapter*hspace*mylenPreface
Some text
chaplenAbstract
chapter*hspace*mylenAbstract
chapterIntroduction
chapterBody
chapterConclusion
enddocument
1
Does not centralize well, another option?
– x-rw
Nov 21 at 23:53
Why you multiplied by 2?
– Sigur
Nov 21 at 23:56
1
I think it is still wrong. If it would work, it should be(x-y)/2
.
– Sigur
Nov 21 at 23:59
add a comment |
up vote
0
down vote
Fast solution
You could set a manual space
chapter*hspace.4textwidthPreface
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
usepackagecalc
newlengthmylen
newcommandchaplen[1]
setlengthmylen(textwidth-widthofHugebfseries #1)/2
%... BEGIN DOCUMENT
chaplenPreface
chapter*hspace*mylenPreface
chaplenOTHER
chapter*hspace*mylenOTHER
FUll code:
documentclassbook
usepackage[left=3cm, right=2cm, top=2cm, bottom=2cm]geometry
usepackagelipsum
usepackagelscape
usepackage[utf8]inputenc
usepackage[spanish,es-tabla]babel
usepackage[table]xcolor
usepackagesectsty
sectionfontfontsize12pt14.4ptselectfontsffamilybfseries
subsectionfontfontsize11.5pt13.8ptselectfontsffamilybfseries
subsubsectionfontnormalsizesffamilybfseries
usepackagecalc
newlengthmylen
newcommandchaplen[1]
setlengthmylen(textwidth-widthofHugebfseries #1)/2
begindocument
chaplenPreface
chapter*hspace*mylenPreface
Some text
chaplenAbstract
chapter*hspace*mylenAbstract
chapterIntroduction
chapterBody
chapterConclusion
enddocument
1
Does not centralize well, another option?
– x-rw
Nov 21 at 23:53
Why you multiplied by 2?
– Sigur
Nov 21 at 23:56
1
I think it is still wrong. If it would work, it should be(x-y)/2
.
– Sigur
Nov 21 at 23:59
add a comment |
up vote
0
down vote
up vote
0
down vote
Fast solution
You could set a manual space
chapter*hspace.4textwidthPreface
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
usepackagecalc
newlengthmylen
newcommandchaplen[1]
setlengthmylen(textwidth-widthofHugebfseries #1)/2
%... BEGIN DOCUMENT
chaplenPreface
chapter*hspace*mylenPreface
chaplenOTHER
chapter*hspace*mylenOTHER
FUll code:
documentclassbook
usepackage[left=3cm, right=2cm, top=2cm, bottom=2cm]geometry
usepackagelipsum
usepackagelscape
usepackage[utf8]inputenc
usepackage[spanish,es-tabla]babel
usepackage[table]xcolor
usepackagesectsty
sectionfontfontsize12pt14.4ptselectfontsffamilybfseries
subsectionfontfontsize11.5pt13.8ptselectfontsffamilybfseries
subsubsectionfontnormalsizesffamilybfseries
usepackagecalc
newlengthmylen
newcommandchaplen[1]
setlengthmylen(textwidth-widthofHugebfseries #1)/2
begindocument
chaplenPreface
chapter*hspace*mylenPreface
Some text
chaplenAbstract
chapter*hspace*mylenAbstract
chapterIntroduction
chapterBody
chapterConclusion
enddocument
Fast solution
You could set a manual space
chapter*hspace.4textwidthPreface
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
usepackagecalc
newlengthmylen
newcommandchaplen[1]
setlengthmylen(textwidth-widthofHugebfseries #1)/2
%... BEGIN DOCUMENT
chaplenPreface
chapter*hspace*mylenPreface
chaplenOTHER
chapter*hspace*mylenOTHER
FUll code:
documentclassbook
usepackage[left=3cm, right=2cm, top=2cm, bottom=2cm]geometry
usepackagelipsum
usepackagelscape
usepackage[utf8]inputenc
usepackage[spanish,es-tabla]babel
usepackage[table]xcolor
usepackagesectsty
sectionfontfontsize12pt14.4ptselectfontsffamilybfseries
subsectionfontfontsize11.5pt13.8ptselectfontsffamilybfseries
subsubsectionfontnormalsizesffamilybfseries
usepackagecalc
newlengthmylen
newcommandchaplen[1]
setlengthmylen(textwidth-widthofHugebfseries #1)/2
begindocument
chaplenPreface
chapter*hspace*mylenPreface
Some text
chaplenAbstract
chapter*hspace*mylenAbstract
chapterIntroduction
chapterBody
chapterConclusion
enddocument
edited Nov 22 at 0:13
answered Nov 21 at 23:48
GiuTeX
661217
661217
1
Does not centralize well, another option?
– x-rw
Nov 21 at 23:53
Why you multiplied by 2?
– Sigur
Nov 21 at 23:56
1
I think it is still wrong. If it would work, it should be(x-y)/2
.
– Sigur
Nov 21 at 23:59
add a comment |
1
Does not centralize well, another option?
– x-rw
Nov 21 at 23:53
Why you multiplied by 2?
– Sigur
Nov 21 at 23:56
1
I think it is still wrong. If it would work, it should be(x-y)/2
.
– Sigur
Nov 21 at 23:59
1
1
Does not centralize well, another option?
– x-rw
Nov 21 at 23:53
Does not centralize well, another option?
– x-rw
Nov 21 at 23:53
Why you multiplied by 2?
– Sigur
Nov 21 at 23:56
Why you multiplied by 2?
– Sigur
Nov 21 at 23:56
1
1
I think it is still wrong. If it would work, it should be
(x-y)/2
.– Sigur
Nov 21 at 23:59
I think it is still wrong. If it would work, it should be
(x-y)/2
.– Sigur
Nov 21 at 23:59
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
Nov 21 at 23:56
@Bernard only two, Preface and Abstract
– x-rw
Nov 21 at 23:57