Chapter with background images in KOMA-Script
I would like to have a chapter design like
So in the Box of the title, should be an image in the background and above the number of the chapter.
The packages I'm using so far, are:
documentclass[a4paper,11pt,twoside]{scrbook} %{book}
setcounter{secnumdepth}{5}
setcounter{tocdepth}{5}
usepackage{fancybox}
usepackage{tikz}
usepackage{cleveref}
usetikzlibrary{arrows,automata}
usepackage[latin1]{inputenc}
usepackage{amssymb,amsmath,amsthm}
usepackage{needspace}
usepackage{mathabx}
usepackage{enumerate}
usepackage{makeidx}
usepackage[ruled]{algorithm2e}
usepackage{mathrsfs}
usepackage[many]{tcolorbox}
Update:
by substituting the ducks through:
chapternumberbackground{begin{tikzpicture}includegraphics[width=.2linewidth]{logo.pdf}end{tikzpicture}}
I get an division by 0 error ... why? and how can I fix it?
graphics chapters koma-script
|
show 4 more comments
I would like to have a chapter design like
So in the Box of the title, should be an image in the background and above the number of the chapter.
The packages I'm using so far, are:
documentclass[a4paper,11pt,twoside]{scrbook} %{book}
setcounter{secnumdepth}{5}
setcounter{tocdepth}{5}
usepackage{fancybox}
usepackage{tikz}
usepackage{cleveref}
usetikzlibrary{arrows,automata}
usepackage[latin1]{inputenc}
usepackage{amssymb,amsmath,amsthm}
usepackage{needspace}
usepackage{mathabx}
usepackage{enumerate}
usepackage{makeidx}
usepackage[ruled]{algorithm2e}
usepackage{mathrsfs}
usepackage[many]{tcolorbox}
Update:
by substituting the ducks through:
chapternumberbackground{begin{tikzpicture}includegraphics[width=.2linewidth]{logo.pdf}end{tikzpicture}}
I get an division by 0 error ... why? and how can I fix it?
graphics chapters koma-script
5
Welcome to TeX - LaTeX! Have you seen the show case ctan.org/pkg/memoirchapterstyles?lang=en ?
– Andrew Swann
Aug 31 '17 at 7:55
4
Which class do you intend to use? Please provide at least some code! This site is not a we-do-it-for-you-service! Show what you got so far (even if it's not much) and we'll most likely be glad to help. I won't touch the question as it is now!
– Skillmon
Aug 31 '17 at 8:20
2
@LatexNoob but you could create the desired layout with it (or without it; or with another package -- who knows, you don't tell us which class you use nor which other packages).
– Skillmon
Aug 31 '17 at 11:19
3
A few examples how to modify scrbook chapters: tex.stackexchange.com/questions/150923/… tex.stackexchange.com/questions/230635/…
– samcarter
Aug 31 '17 at 13:24
3
Or more recent: tex.stackexchange.com/q/388585, tex.stackexchange.com/q/387988, tex.stackexchange.com/q/246411, tex.stackexchange.com/a/376737, tex.stackexchange.com/a/375401
– Schweinebacke
Aug 31 '17 at 16:06
|
show 4 more comments
I would like to have a chapter design like
So in the Box of the title, should be an image in the background and above the number of the chapter.
The packages I'm using so far, are:
documentclass[a4paper,11pt,twoside]{scrbook} %{book}
setcounter{secnumdepth}{5}
setcounter{tocdepth}{5}
usepackage{fancybox}
usepackage{tikz}
usepackage{cleveref}
usetikzlibrary{arrows,automata}
usepackage[latin1]{inputenc}
usepackage{amssymb,amsmath,amsthm}
usepackage{needspace}
usepackage{mathabx}
usepackage{enumerate}
usepackage{makeidx}
usepackage[ruled]{algorithm2e}
usepackage{mathrsfs}
usepackage[many]{tcolorbox}
Update:
by substituting the ducks through:
chapternumberbackground{begin{tikzpicture}includegraphics[width=.2linewidth]{logo.pdf}end{tikzpicture}}
I get an division by 0 error ... why? and how can I fix it?
graphics chapters koma-script
I would like to have a chapter design like
So in the Box of the title, should be an image in the background and above the number of the chapter.
The packages I'm using so far, are:
documentclass[a4paper,11pt,twoside]{scrbook} %{book}
setcounter{secnumdepth}{5}
setcounter{tocdepth}{5}
usepackage{fancybox}
usepackage{tikz}
usepackage{cleveref}
usetikzlibrary{arrows,automata}
usepackage[latin1]{inputenc}
usepackage{amssymb,amsmath,amsthm}
usepackage{needspace}
usepackage{mathabx}
usepackage{enumerate}
usepackage{makeidx}
usepackage[ruled]{algorithm2e}
usepackage{mathrsfs}
usepackage[many]{tcolorbox}
Update:
by substituting the ducks through:
chapternumberbackground{begin{tikzpicture}includegraphics[width=.2linewidth]{logo.pdf}end{tikzpicture}}
I get an division by 0 error ... why? and how can I fix it?
graphics chapters koma-script
graphics chapters koma-script
edited 4 hours ago
Jonas Stein
3,26542744
3,26542744
asked Aug 31 '17 at 7:38
LatexNoobLatexNoob
262
262
5
Welcome to TeX - LaTeX! Have you seen the show case ctan.org/pkg/memoirchapterstyles?lang=en ?
– Andrew Swann
Aug 31 '17 at 7:55
4
Which class do you intend to use? Please provide at least some code! This site is not a we-do-it-for-you-service! Show what you got so far (even if it's not much) and we'll most likely be glad to help. I won't touch the question as it is now!
– Skillmon
Aug 31 '17 at 8:20
2
@LatexNoob but you could create the desired layout with it (or without it; or with another package -- who knows, you don't tell us which class you use nor which other packages).
– Skillmon
Aug 31 '17 at 11:19
3
A few examples how to modify scrbook chapters: tex.stackexchange.com/questions/150923/… tex.stackexchange.com/questions/230635/…
– samcarter
Aug 31 '17 at 13:24
3
Or more recent: tex.stackexchange.com/q/388585, tex.stackexchange.com/q/387988, tex.stackexchange.com/q/246411, tex.stackexchange.com/a/376737, tex.stackexchange.com/a/375401
– Schweinebacke
Aug 31 '17 at 16:06
|
show 4 more comments
5
Welcome to TeX - LaTeX! Have you seen the show case ctan.org/pkg/memoirchapterstyles?lang=en ?
– Andrew Swann
Aug 31 '17 at 7:55
4
Which class do you intend to use? Please provide at least some code! This site is not a we-do-it-for-you-service! Show what you got so far (even if it's not much) and we'll most likely be glad to help. I won't touch the question as it is now!
– Skillmon
Aug 31 '17 at 8:20
2
@LatexNoob but you could create the desired layout with it (or without it; or with another package -- who knows, you don't tell us which class you use nor which other packages).
– Skillmon
Aug 31 '17 at 11:19
3
A few examples how to modify scrbook chapters: tex.stackexchange.com/questions/150923/… tex.stackexchange.com/questions/230635/…
– samcarter
Aug 31 '17 at 13:24
3
Or more recent: tex.stackexchange.com/q/388585, tex.stackexchange.com/q/387988, tex.stackexchange.com/q/246411, tex.stackexchange.com/a/376737, tex.stackexchange.com/a/375401
– Schweinebacke
Aug 31 '17 at 16:06
5
5
Welcome to TeX - LaTeX! Have you seen the show case ctan.org/pkg/memoirchapterstyles?lang=en ?
– Andrew Swann
Aug 31 '17 at 7:55
Welcome to TeX - LaTeX! Have you seen the show case ctan.org/pkg/memoirchapterstyles?lang=en ?
– Andrew Swann
Aug 31 '17 at 7:55
4
4
Which class do you intend to use? Please provide at least some code! This site is not a we-do-it-for-you-service! Show what you got so far (even if it's not much) and we'll most likely be glad to help. I won't touch the question as it is now!
– Skillmon
Aug 31 '17 at 8:20
Which class do you intend to use? Please provide at least some code! This site is not a we-do-it-for-you-service! Show what you got so far (even if it's not much) and we'll most likely be glad to help. I won't touch the question as it is now!
– Skillmon
Aug 31 '17 at 8:20
2
2
@LatexNoob but you could create the desired layout with it (or without it; or with another package -- who knows, you don't tell us which class you use nor which other packages).
– Skillmon
Aug 31 '17 at 11:19
@LatexNoob but you could create the desired layout with it (or without it; or with another package -- who knows, you don't tell us which class you use nor which other packages).
– Skillmon
Aug 31 '17 at 11:19
3
3
A few examples how to modify scrbook chapters: tex.stackexchange.com/questions/150923/… tex.stackexchange.com/questions/230635/…
– samcarter
Aug 31 '17 at 13:24
A few examples how to modify scrbook chapters: tex.stackexchange.com/questions/150923/… tex.stackexchange.com/questions/230635/…
– samcarter
Aug 31 '17 at 13:24
3
3
Or more recent: tex.stackexchange.com/q/388585, tex.stackexchange.com/q/387988, tex.stackexchange.com/q/246411, tex.stackexchange.com/a/376737, tex.stackexchange.com/a/375401
– Schweinebacke
Aug 31 '17 at 16:06
Or more recent: tex.stackexchange.com/q/388585, tex.stackexchange.com/q/387988, tex.stackexchange.com/q/246411, tex.stackexchange.com/a/376737, tex.stackexchange.com/a/375401
– Schweinebacke
Aug 31 '17 at 16:06
|
show 4 more comments
1 Answer
1
active
oldest
votes
You can do a lot of things with KOMA-Script's chapter headings, if you redefine chapterformat
and chapterlinesformat
or chapterlineswithprefixformat
. If I interpret your question as
How to use ducks in chapter headings of KOMA-Script?
I could, e.g, do:
documentclass[chapterprefix]{scrbook}
usepackage{lmodern}% need scalable font
usepackage{tikzducks}% essential to use ducks
usepackage{blindtext}
RedeclareSectionCommand[%
font=normalfonthugescshape,
prefixfont=Large,
innerskip=0pt
]{chapter}
letraggedchapterraggedleft
renewcommand*{chapterlineswithprefixformat}[3]{%
IfArgIsEmpty{#2}{#3}{%
rule{.333linewidth}{1pt} #2%
parbox[b][dimexpr .2linewidth-dpstrutbox-baselineskip]{.78linewidth}{%
raggedchapterstrutignorespaces #3%
}hfill
makebox[.2linewidth][r]{rule[-dpstrutbox]{linewidth}{1pt}}%
}%
}
renewcommand*{chapterformat}{%
IfUsePrefixLine{%
chapappenskip
usekomafont{chapter}%
raisebox{dimexpr -.2linewidth+baselineskip}[0pt][0pt]{%
% frame{%
resizebox*{.2linewidth}{.2linewidth}{%
currentchapternumberbackground
}%
% }%
makebox[0pt][r]{%
parbox{.2linewidth}{%
centering
fontsize{.75linewidth}{linewidth}selectfont
raisebox{.75linewidth}{color{gray!50!red!50}thechapter}par
}%
}%
}%
}{%
thechapterautodotenskip
}%
}
newcommand*{chapternumberbackground}[1]{%
renewcommand*{currentchapternumberbackground}{#1}%
}
newcommand*{currentchapternumberbackground}{%
{color{red!50}rule{1cm}{1cm}}%
}
begin{document}
tableofcontents
chapternumberbackground{begin{tikzpicture}duckend{tikzpicture}}
chapter{Chapter Name}
blindtext
chapternumberbackground{begin{tikzpicture}duck[longhair=teal]end{tikzpicture}}
chapter{Another Chapter Name}
blindtext
chapternumberbackground{begin{tikzpicture}duck[crazyhair=green,eyebrow=blue]end{tikzpicture}}
chapter{Once more a Longer Chapter Name}
blindtext
end{document}
For more information about RedeclareSectionCommand
, chapterformat
and chapterlineswithprefixformat
see the KOMA-Script manual also available in German. And don't forget the famous information about using ducks in TikZ.
1
tikzducks
is not for demo only :)
– Skillmon
Sep 2 '17 at 11:13
1
@Skillmon Your absolutely right. Fixed. ;-)
– Schweinebacke
Sep 2 '17 at 11:24
3
I WILL USE THIS FOR MY THESIS
– Paulo Cereda
Sep 2 '17 at 11:45
1
+1 for the ducks! In the new package version, there will be a graduate duck -> perfect for a phd thesis! i.stack.imgur.com/x0ogv.png (and the bounding box size will also be fixed so the ducks don't get distorted)
– samcarter
Sep 2 '17 at 13:50
2
Another one has joined the Duck Side of the Force! <3 <3 <3
– CarLaTeX
Sep 2 '17 at 14:38
|
show 3 more comments
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%2f389141%2fchapter-with-background-images-in-koma-script%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
You can do a lot of things with KOMA-Script's chapter headings, if you redefine chapterformat
and chapterlinesformat
or chapterlineswithprefixformat
. If I interpret your question as
How to use ducks in chapter headings of KOMA-Script?
I could, e.g, do:
documentclass[chapterprefix]{scrbook}
usepackage{lmodern}% need scalable font
usepackage{tikzducks}% essential to use ducks
usepackage{blindtext}
RedeclareSectionCommand[%
font=normalfonthugescshape,
prefixfont=Large,
innerskip=0pt
]{chapter}
letraggedchapterraggedleft
renewcommand*{chapterlineswithprefixformat}[3]{%
IfArgIsEmpty{#2}{#3}{%
rule{.333linewidth}{1pt} #2%
parbox[b][dimexpr .2linewidth-dpstrutbox-baselineskip]{.78linewidth}{%
raggedchapterstrutignorespaces #3%
}hfill
makebox[.2linewidth][r]{rule[-dpstrutbox]{linewidth}{1pt}}%
}%
}
renewcommand*{chapterformat}{%
IfUsePrefixLine{%
chapappenskip
usekomafont{chapter}%
raisebox{dimexpr -.2linewidth+baselineskip}[0pt][0pt]{%
% frame{%
resizebox*{.2linewidth}{.2linewidth}{%
currentchapternumberbackground
}%
% }%
makebox[0pt][r]{%
parbox{.2linewidth}{%
centering
fontsize{.75linewidth}{linewidth}selectfont
raisebox{.75linewidth}{color{gray!50!red!50}thechapter}par
}%
}%
}%
}{%
thechapterautodotenskip
}%
}
newcommand*{chapternumberbackground}[1]{%
renewcommand*{currentchapternumberbackground}{#1}%
}
newcommand*{currentchapternumberbackground}{%
{color{red!50}rule{1cm}{1cm}}%
}
begin{document}
tableofcontents
chapternumberbackground{begin{tikzpicture}duckend{tikzpicture}}
chapter{Chapter Name}
blindtext
chapternumberbackground{begin{tikzpicture}duck[longhair=teal]end{tikzpicture}}
chapter{Another Chapter Name}
blindtext
chapternumberbackground{begin{tikzpicture}duck[crazyhair=green,eyebrow=blue]end{tikzpicture}}
chapter{Once more a Longer Chapter Name}
blindtext
end{document}
For more information about RedeclareSectionCommand
, chapterformat
and chapterlineswithprefixformat
see the KOMA-Script manual also available in German. And don't forget the famous information about using ducks in TikZ.
1
tikzducks
is not for demo only :)
– Skillmon
Sep 2 '17 at 11:13
1
@Skillmon Your absolutely right. Fixed. ;-)
– Schweinebacke
Sep 2 '17 at 11:24
3
I WILL USE THIS FOR MY THESIS
– Paulo Cereda
Sep 2 '17 at 11:45
1
+1 for the ducks! In the new package version, there will be a graduate duck -> perfect for a phd thesis! i.stack.imgur.com/x0ogv.png (and the bounding box size will also be fixed so the ducks don't get distorted)
– samcarter
Sep 2 '17 at 13:50
2
Another one has joined the Duck Side of the Force! <3 <3 <3
– CarLaTeX
Sep 2 '17 at 14:38
|
show 3 more comments
You can do a lot of things with KOMA-Script's chapter headings, if you redefine chapterformat
and chapterlinesformat
or chapterlineswithprefixformat
. If I interpret your question as
How to use ducks in chapter headings of KOMA-Script?
I could, e.g, do:
documentclass[chapterprefix]{scrbook}
usepackage{lmodern}% need scalable font
usepackage{tikzducks}% essential to use ducks
usepackage{blindtext}
RedeclareSectionCommand[%
font=normalfonthugescshape,
prefixfont=Large,
innerskip=0pt
]{chapter}
letraggedchapterraggedleft
renewcommand*{chapterlineswithprefixformat}[3]{%
IfArgIsEmpty{#2}{#3}{%
rule{.333linewidth}{1pt} #2%
parbox[b][dimexpr .2linewidth-dpstrutbox-baselineskip]{.78linewidth}{%
raggedchapterstrutignorespaces #3%
}hfill
makebox[.2linewidth][r]{rule[-dpstrutbox]{linewidth}{1pt}}%
}%
}
renewcommand*{chapterformat}{%
IfUsePrefixLine{%
chapappenskip
usekomafont{chapter}%
raisebox{dimexpr -.2linewidth+baselineskip}[0pt][0pt]{%
% frame{%
resizebox*{.2linewidth}{.2linewidth}{%
currentchapternumberbackground
}%
% }%
makebox[0pt][r]{%
parbox{.2linewidth}{%
centering
fontsize{.75linewidth}{linewidth}selectfont
raisebox{.75linewidth}{color{gray!50!red!50}thechapter}par
}%
}%
}%
}{%
thechapterautodotenskip
}%
}
newcommand*{chapternumberbackground}[1]{%
renewcommand*{currentchapternumberbackground}{#1}%
}
newcommand*{currentchapternumberbackground}{%
{color{red!50}rule{1cm}{1cm}}%
}
begin{document}
tableofcontents
chapternumberbackground{begin{tikzpicture}duckend{tikzpicture}}
chapter{Chapter Name}
blindtext
chapternumberbackground{begin{tikzpicture}duck[longhair=teal]end{tikzpicture}}
chapter{Another Chapter Name}
blindtext
chapternumberbackground{begin{tikzpicture}duck[crazyhair=green,eyebrow=blue]end{tikzpicture}}
chapter{Once more a Longer Chapter Name}
blindtext
end{document}
For more information about RedeclareSectionCommand
, chapterformat
and chapterlineswithprefixformat
see the KOMA-Script manual also available in German. And don't forget the famous information about using ducks in TikZ.
1
tikzducks
is not for demo only :)
– Skillmon
Sep 2 '17 at 11:13
1
@Skillmon Your absolutely right. Fixed. ;-)
– Schweinebacke
Sep 2 '17 at 11:24
3
I WILL USE THIS FOR MY THESIS
– Paulo Cereda
Sep 2 '17 at 11:45
1
+1 for the ducks! In the new package version, there will be a graduate duck -> perfect for a phd thesis! i.stack.imgur.com/x0ogv.png (and the bounding box size will also be fixed so the ducks don't get distorted)
– samcarter
Sep 2 '17 at 13:50
2
Another one has joined the Duck Side of the Force! <3 <3 <3
– CarLaTeX
Sep 2 '17 at 14:38
|
show 3 more comments
You can do a lot of things with KOMA-Script's chapter headings, if you redefine chapterformat
and chapterlinesformat
or chapterlineswithprefixformat
. If I interpret your question as
How to use ducks in chapter headings of KOMA-Script?
I could, e.g, do:
documentclass[chapterprefix]{scrbook}
usepackage{lmodern}% need scalable font
usepackage{tikzducks}% essential to use ducks
usepackage{blindtext}
RedeclareSectionCommand[%
font=normalfonthugescshape,
prefixfont=Large,
innerskip=0pt
]{chapter}
letraggedchapterraggedleft
renewcommand*{chapterlineswithprefixformat}[3]{%
IfArgIsEmpty{#2}{#3}{%
rule{.333linewidth}{1pt} #2%
parbox[b][dimexpr .2linewidth-dpstrutbox-baselineskip]{.78linewidth}{%
raggedchapterstrutignorespaces #3%
}hfill
makebox[.2linewidth][r]{rule[-dpstrutbox]{linewidth}{1pt}}%
}%
}
renewcommand*{chapterformat}{%
IfUsePrefixLine{%
chapappenskip
usekomafont{chapter}%
raisebox{dimexpr -.2linewidth+baselineskip}[0pt][0pt]{%
% frame{%
resizebox*{.2linewidth}{.2linewidth}{%
currentchapternumberbackground
}%
% }%
makebox[0pt][r]{%
parbox{.2linewidth}{%
centering
fontsize{.75linewidth}{linewidth}selectfont
raisebox{.75linewidth}{color{gray!50!red!50}thechapter}par
}%
}%
}%
}{%
thechapterautodotenskip
}%
}
newcommand*{chapternumberbackground}[1]{%
renewcommand*{currentchapternumberbackground}{#1}%
}
newcommand*{currentchapternumberbackground}{%
{color{red!50}rule{1cm}{1cm}}%
}
begin{document}
tableofcontents
chapternumberbackground{begin{tikzpicture}duckend{tikzpicture}}
chapter{Chapter Name}
blindtext
chapternumberbackground{begin{tikzpicture}duck[longhair=teal]end{tikzpicture}}
chapter{Another Chapter Name}
blindtext
chapternumberbackground{begin{tikzpicture}duck[crazyhair=green,eyebrow=blue]end{tikzpicture}}
chapter{Once more a Longer Chapter Name}
blindtext
end{document}
For more information about RedeclareSectionCommand
, chapterformat
and chapterlineswithprefixformat
see the KOMA-Script manual also available in German. And don't forget the famous information about using ducks in TikZ.
You can do a lot of things with KOMA-Script's chapter headings, if you redefine chapterformat
and chapterlinesformat
or chapterlineswithprefixformat
. If I interpret your question as
How to use ducks in chapter headings of KOMA-Script?
I could, e.g, do:
documentclass[chapterprefix]{scrbook}
usepackage{lmodern}% need scalable font
usepackage{tikzducks}% essential to use ducks
usepackage{blindtext}
RedeclareSectionCommand[%
font=normalfonthugescshape,
prefixfont=Large,
innerskip=0pt
]{chapter}
letraggedchapterraggedleft
renewcommand*{chapterlineswithprefixformat}[3]{%
IfArgIsEmpty{#2}{#3}{%
rule{.333linewidth}{1pt} #2%
parbox[b][dimexpr .2linewidth-dpstrutbox-baselineskip]{.78linewidth}{%
raggedchapterstrutignorespaces #3%
}hfill
makebox[.2linewidth][r]{rule[-dpstrutbox]{linewidth}{1pt}}%
}%
}
renewcommand*{chapterformat}{%
IfUsePrefixLine{%
chapappenskip
usekomafont{chapter}%
raisebox{dimexpr -.2linewidth+baselineskip}[0pt][0pt]{%
% frame{%
resizebox*{.2linewidth}{.2linewidth}{%
currentchapternumberbackground
}%
% }%
makebox[0pt][r]{%
parbox{.2linewidth}{%
centering
fontsize{.75linewidth}{linewidth}selectfont
raisebox{.75linewidth}{color{gray!50!red!50}thechapter}par
}%
}%
}%
}{%
thechapterautodotenskip
}%
}
newcommand*{chapternumberbackground}[1]{%
renewcommand*{currentchapternumberbackground}{#1}%
}
newcommand*{currentchapternumberbackground}{%
{color{red!50}rule{1cm}{1cm}}%
}
begin{document}
tableofcontents
chapternumberbackground{begin{tikzpicture}duckend{tikzpicture}}
chapter{Chapter Name}
blindtext
chapternumberbackground{begin{tikzpicture}duck[longhair=teal]end{tikzpicture}}
chapter{Another Chapter Name}
blindtext
chapternumberbackground{begin{tikzpicture}duck[crazyhair=green,eyebrow=blue]end{tikzpicture}}
chapter{Once more a Longer Chapter Name}
blindtext
end{document}
For more information about RedeclareSectionCommand
, chapterformat
and chapterlineswithprefixformat
see the KOMA-Script manual also available in German. And don't forget the famous information about using ducks in TikZ.
edited Sep 2 '17 at 11:24
answered Sep 2 '17 at 10:36
SchweinebackeSchweinebacke
22.1k4577
22.1k4577
1
tikzducks
is not for demo only :)
– Skillmon
Sep 2 '17 at 11:13
1
@Skillmon Your absolutely right. Fixed. ;-)
– Schweinebacke
Sep 2 '17 at 11:24
3
I WILL USE THIS FOR MY THESIS
– Paulo Cereda
Sep 2 '17 at 11:45
1
+1 for the ducks! In the new package version, there will be a graduate duck -> perfect for a phd thesis! i.stack.imgur.com/x0ogv.png (and the bounding box size will also be fixed so the ducks don't get distorted)
– samcarter
Sep 2 '17 at 13:50
2
Another one has joined the Duck Side of the Force! <3 <3 <3
– CarLaTeX
Sep 2 '17 at 14:38
|
show 3 more comments
1
tikzducks
is not for demo only :)
– Skillmon
Sep 2 '17 at 11:13
1
@Skillmon Your absolutely right. Fixed. ;-)
– Schweinebacke
Sep 2 '17 at 11:24
3
I WILL USE THIS FOR MY THESIS
– Paulo Cereda
Sep 2 '17 at 11:45
1
+1 for the ducks! In the new package version, there will be a graduate duck -> perfect for a phd thesis! i.stack.imgur.com/x0ogv.png (and the bounding box size will also be fixed so the ducks don't get distorted)
– samcarter
Sep 2 '17 at 13:50
2
Another one has joined the Duck Side of the Force! <3 <3 <3
– CarLaTeX
Sep 2 '17 at 14:38
1
1
tikzducks
is not for demo only :)– Skillmon
Sep 2 '17 at 11:13
tikzducks
is not for demo only :)– Skillmon
Sep 2 '17 at 11:13
1
1
@Skillmon Your absolutely right. Fixed. ;-)
– Schweinebacke
Sep 2 '17 at 11:24
@Skillmon Your absolutely right. Fixed. ;-)
– Schweinebacke
Sep 2 '17 at 11:24
3
3
I WILL USE THIS FOR MY THESIS
– Paulo Cereda
Sep 2 '17 at 11:45
I WILL USE THIS FOR MY THESIS
– Paulo Cereda
Sep 2 '17 at 11:45
1
1
+1 for the ducks! In the new package version, there will be a graduate duck -> perfect for a phd thesis! i.stack.imgur.com/x0ogv.png (and the bounding box size will also be fixed so the ducks don't get distorted)
– samcarter
Sep 2 '17 at 13:50
+1 for the ducks! In the new package version, there will be a graduate duck -> perfect for a phd thesis! i.stack.imgur.com/x0ogv.png (and the bounding box size will also be fixed so the ducks don't get distorted)
– samcarter
Sep 2 '17 at 13:50
2
2
Another one has joined the Duck Side of the Force! <3 <3 <3
– CarLaTeX
Sep 2 '17 at 14:38
Another one has joined the Duck Side of the Force! <3 <3 <3
– CarLaTeX
Sep 2 '17 at 14:38
|
show 3 more comments
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%2f389141%2fchapter-with-background-images-in-koma-script%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
5
Welcome to TeX - LaTeX! Have you seen the show case ctan.org/pkg/memoirchapterstyles?lang=en ?
– Andrew Swann
Aug 31 '17 at 7:55
4
Which class do you intend to use? Please provide at least some code! This site is not a we-do-it-for-you-service! Show what you got so far (even if it's not much) and we'll most likely be glad to help. I won't touch the question as it is now!
– Skillmon
Aug 31 '17 at 8:20
2
@LatexNoob but you could create the desired layout with it (or without it; or with another package -- who knows, you don't tell us which class you use nor which other packages).
– Skillmon
Aug 31 '17 at 11:19
3
A few examples how to modify scrbook chapters: tex.stackexchange.com/questions/150923/… tex.stackexchange.com/questions/230635/…
– samcarter
Aug 31 '17 at 13:24
3
Or more recent: tex.stackexchange.com/q/388585, tex.stackexchange.com/q/387988, tex.stackexchange.com/q/246411, tex.stackexchange.com/a/376737, tex.stackexchange.com/a/375401
– Schweinebacke
Aug 31 '17 at 16:06