Chapter with background images in KOMA-Script The Next CEO of Stack OverflowFancy chapter headingsKOMA-Script: How to style the title of a chapterHow to place the chapter number behind the chapter title in KOMA scriptCustomizing Chapter style in scrbookKoma-script, change chapter appearance (how to add a circle and horizontal ruler?)Formatting and Styling of Headers using titlesec in scrbook-classChapter heading stylesChapter heading styleChapter Heading Designmakechapterstyle for scrreprt (change chapter title format)Multiple Dictums for a chapterChapter Design in LatexSame chapterformat for chapter and chapter* without titlesecChapterformat with chapter*Chapter heading styleChapter heading stylesSection Design for Poetry BookDesign Chapter Heading-Custom

What are the unusually-enlarged wing sections on this P-38 Lightning?

Cannot restore registry to default in Windows 10?

Does Germany produce more waste than the US?

Do I need to write [sic] when including a quotation with a number less than 10 that isn't written out?

Why did the Drakh emissary look so blurred in S04:E11 "Lines of Communication"?

Strange use of "whether ... than ..." in official text

Calculating discount not working

Variance of Monte Carlo integration with importance sampling

How to show a landlord what we have in savings?

Ising model simulation

Words hidden in my phone number

Traveling with my 5 year old daughter (as the father) without the mother from Germany to Mexico

What difference does it make matching a word with/without a trailing whitespace?

Horror film about a man brought out of cryogenic suspension without a soul, around 1990

Is it okay to majorly distort historical facts while writing a fiction story?

Does the Idaho Potato Commission associate potato skins with healthy eating?

Why cannot we not say "I have been having a dog"?

Would a grinding machine be a simple and workable propulsion system for an interplanetary spacecraft?

The sum of any ten consecutive numbers from a fibonacci sequence is divisible by 11

How can a day be of 24 hours?

Why did early computer designers eschew integers?

Masking layers by a vector polygon layer in QGIS

How can I prove that a state of equilibrium is unstable?

What did the word "leisure" mean in late 18th Century usage?



Chapter with background images in KOMA-Script



The Next CEO of Stack OverflowFancy chapter headingsKOMA-Script: How to style the title of a chapterHow to place the chapter number behind the chapter title in KOMA scriptCustomizing Chapter style in scrbookKoma-script, change chapter appearance (how to add a circle and horizontal ruler?)Formatting and Styling of Headers using titlesec in scrbook-classChapter heading stylesChapter heading styleChapter Heading Designmakechapterstyle for scrreprt (change chapter title format)Multiple Dictums for a chapterChapter Design in LatexSame chapterformat for chapter and chapter* without titlesecChapterformat with chapter*Chapter heading styleChapter heading stylesSection Design for Poetry BookDesign Chapter Heading-Custom










4















I would like to have a chapter design like



enter image description here



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
setcountersecnumdepth5
setcountertocdepth5
usepackagefancybox
usepackagetikz
usepackagecleveref
usetikzlibraryarrows,automata
usepackage[latin1]inputenc
usepackageamssymb,amsmath,amsthm
usepackageneedspace
usepackagemathabx
usepackageenumerate
usepackagemakeidx
usepackage[ruled]algorithm2e
usepackagemathrsfs
usepackage[many]tcolorbox


Update:
by substituting the ducks through:



chapternumberbackgroundbegintikzpictureincludegraphics[width=.2linewidth]logo.pdfendtikzpicture


I get an division by 0 error ... why? and how can I fix it?










share|improve this question



















  • 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
















4















I would like to have a chapter design like



enter image description here



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
setcountersecnumdepth5
setcountertocdepth5
usepackagefancybox
usepackagetikz
usepackagecleveref
usetikzlibraryarrows,automata
usepackage[latin1]inputenc
usepackageamssymb,amsmath,amsthm
usepackageneedspace
usepackagemathabx
usepackageenumerate
usepackagemakeidx
usepackage[ruled]algorithm2e
usepackagemathrsfs
usepackage[many]tcolorbox


Update:
by substituting the ducks through:



chapternumberbackgroundbegintikzpictureincludegraphics[width=.2linewidth]logo.pdfendtikzpicture


I get an division by 0 error ... why? and how can I fix it?










share|improve this question



















  • 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














4












4








4


2






I would like to have a chapter design like



enter image description here



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
setcountersecnumdepth5
setcountertocdepth5
usepackagefancybox
usepackagetikz
usepackagecleveref
usetikzlibraryarrows,automata
usepackage[latin1]inputenc
usepackageamssymb,amsmath,amsthm
usepackageneedspace
usepackagemathabx
usepackageenumerate
usepackagemakeidx
usepackage[ruled]algorithm2e
usepackagemathrsfs
usepackage[many]tcolorbox


Update:
by substituting the ducks through:



chapternumberbackgroundbegintikzpictureincludegraphics[width=.2linewidth]logo.pdfendtikzpicture


I get an division by 0 error ... why? and how can I fix it?










share|improve this question
















I would like to have a chapter design like



enter image description here



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
setcountersecnumdepth5
setcountertocdepth5
usepackagefancybox
usepackagetikz
usepackagecleveref
usetikzlibraryarrows,automata
usepackage[latin1]inputenc
usepackageamssymb,amsmath,amsthm
usepackageneedspace
usepackagemathabx
usepackageenumerate
usepackagemakeidx
usepackage[ruled]algorithm2e
usepackagemathrsfs
usepackage[many]tcolorbox


Update:
by substituting the ducks through:



chapternumberbackgroundbegintikzpictureincludegraphics[width=.2linewidth]logo.pdfendtikzpicture


I get an division by 0 error ... why? and how can I fix it?







graphics chapters koma-script






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 2 mins ago









Jonas Stein

3,25542744




3,25542744










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













  • 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











1 Answer
1






active

oldest

votes


















11














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
usepackagelmodern% need scalable font
usepackagetikzducks% essential to use ducks
usepackageblindtext

RedeclareSectionCommand[%
font=normalfonthugescshape,
prefixfont=Large,
innerskip=0pt
]chapter

letraggedchapterraggedleft

renewcommand*chapterlineswithprefixformat[3]%
IfArgIsEmpty#2#3%
rule.333linewidth1pt #2%
parbox[b][dimexpr .2linewidth-dpstrutbox-baselineskip].78linewidth%
raggedchapterstrutignorespaces #3%
hfill
makebox[.2linewidth][r]rule[-dpstrutbox]linewidth1pt%
%

renewcommand*chapterformat%
IfUsePrefixLine%
chapappenskip
usekomafontchapter%
raiseboxdimexpr -.2linewidth+baselineskip[0pt][0pt]%
% frame%
resizebox*.2linewidth.2linewidth%
currentchapternumberbackground
%
% %
makebox[0pt][r]%
parbox.2linewidth%
centering
fontsize.75linewidthlinewidthselectfont
raisebox.75linewidthcolorgray!50!red!50thechapterpar
%
%
%
%
thechapterautodotenskip
%

newcommand*chapternumberbackground[1]%
renewcommand*currentchapternumberbackground#1%

newcommand*currentchapternumberbackground%
colorred!50rule1cm1cm%


begindocument
tableofcontents
chapternumberbackgroundbegintikzpictureduckendtikzpicture
chapterChapter Name
blindtext

chapternumberbackgroundbegintikzpictureduck[longhair=teal]endtikzpicture
chapterAnother Chapter Name
blindtext

chapternumberbackgroundbegintikzpictureduck[crazyhair=green,eyebrow=blue]endtikzpicture
chapterOnce more a Longer Chapter Name
blindtext

enddocument


First chapter



Second chapter



Third chapter



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.






share|improve this answer




















  • 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











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
);



);













draft saved

draft discarded


















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









11














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
usepackagelmodern% need scalable font
usepackagetikzducks% essential to use ducks
usepackageblindtext

RedeclareSectionCommand[%
font=normalfonthugescshape,
prefixfont=Large,
innerskip=0pt
]chapter

letraggedchapterraggedleft

renewcommand*chapterlineswithprefixformat[3]%
IfArgIsEmpty#2#3%
rule.333linewidth1pt #2%
parbox[b][dimexpr .2linewidth-dpstrutbox-baselineskip].78linewidth%
raggedchapterstrutignorespaces #3%
hfill
makebox[.2linewidth][r]rule[-dpstrutbox]linewidth1pt%
%

renewcommand*chapterformat%
IfUsePrefixLine%
chapappenskip
usekomafontchapter%
raiseboxdimexpr -.2linewidth+baselineskip[0pt][0pt]%
% frame%
resizebox*.2linewidth.2linewidth%
currentchapternumberbackground
%
% %
makebox[0pt][r]%
parbox.2linewidth%
centering
fontsize.75linewidthlinewidthselectfont
raisebox.75linewidthcolorgray!50!red!50thechapterpar
%
%
%
%
thechapterautodotenskip
%

newcommand*chapternumberbackground[1]%
renewcommand*currentchapternumberbackground#1%

newcommand*currentchapternumberbackground%
colorred!50rule1cm1cm%


begindocument
tableofcontents
chapternumberbackgroundbegintikzpictureduckendtikzpicture
chapterChapter Name
blindtext

chapternumberbackgroundbegintikzpictureduck[longhair=teal]endtikzpicture
chapterAnother Chapter Name
blindtext

chapternumberbackgroundbegintikzpictureduck[crazyhair=green,eyebrow=blue]endtikzpicture
chapterOnce more a Longer Chapter Name
blindtext

enddocument


First chapter



Second chapter



Third chapter



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.






share|improve this answer




















  • 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















11














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
usepackagelmodern% need scalable font
usepackagetikzducks% essential to use ducks
usepackageblindtext

RedeclareSectionCommand[%
font=normalfonthugescshape,
prefixfont=Large,
innerskip=0pt
]chapter

letraggedchapterraggedleft

renewcommand*chapterlineswithprefixformat[3]%
IfArgIsEmpty#2#3%
rule.333linewidth1pt #2%
parbox[b][dimexpr .2linewidth-dpstrutbox-baselineskip].78linewidth%
raggedchapterstrutignorespaces #3%
hfill
makebox[.2linewidth][r]rule[-dpstrutbox]linewidth1pt%
%

renewcommand*chapterformat%
IfUsePrefixLine%
chapappenskip
usekomafontchapter%
raiseboxdimexpr -.2linewidth+baselineskip[0pt][0pt]%
% frame%
resizebox*.2linewidth.2linewidth%
currentchapternumberbackground
%
% %
makebox[0pt][r]%
parbox.2linewidth%
centering
fontsize.75linewidthlinewidthselectfont
raisebox.75linewidthcolorgray!50!red!50thechapterpar
%
%
%
%
thechapterautodotenskip
%

newcommand*chapternumberbackground[1]%
renewcommand*currentchapternumberbackground#1%

newcommand*currentchapternumberbackground%
colorred!50rule1cm1cm%


begindocument
tableofcontents
chapternumberbackgroundbegintikzpictureduckendtikzpicture
chapterChapter Name
blindtext

chapternumberbackgroundbegintikzpictureduck[longhair=teal]endtikzpicture
chapterAnother Chapter Name
blindtext

chapternumberbackgroundbegintikzpictureduck[crazyhair=green,eyebrow=blue]endtikzpicture
chapterOnce more a Longer Chapter Name
blindtext

enddocument


First chapter



Second chapter



Third chapter



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.






share|improve this answer




















  • 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













11












11








11







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
usepackagelmodern% need scalable font
usepackagetikzducks% essential to use ducks
usepackageblindtext

RedeclareSectionCommand[%
font=normalfonthugescshape,
prefixfont=Large,
innerskip=0pt
]chapter

letraggedchapterraggedleft

renewcommand*chapterlineswithprefixformat[3]%
IfArgIsEmpty#2#3%
rule.333linewidth1pt #2%
parbox[b][dimexpr .2linewidth-dpstrutbox-baselineskip].78linewidth%
raggedchapterstrutignorespaces #3%
hfill
makebox[.2linewidth][r]rule[-dpstrutbox]linewidth1pt%
%

renewcommand*chapterformat%
IfUsePrefixLine%
chapappenskip
usekomafontchapter%
raiseboxdimexpr -.2linewidth+baselineskip[0pt][0pt]%
% frame%
resizebox*.2linewidth.2linewidth%
currentchapternumberbackground
%
% %
makebox[0pt][r]%
parbox.2linewidth%
centering
fontsize.75linewidthlinewidthselectfont
raisebox.75linewidthcolorgray!50!red!50thechapterpar
%
%
%
%
thechapterautodotenskip
%

newcommand*chapternumberbackground[1]%
renewcommand*currentchapternumberbackground#1%

newcommand*currentchapternumberbackground%
colorred!50rule1cm1cm%


begindocument
tableofcontents
chapternumberbackgroundbegintikzpictureduckendtikzpicture
chapterChapter Name
blindtext

chapternumberbackgroundbegintikzpictureduck[longhair=teal]endtikzpicture
chapterAnother Chapter Name
blindtext

chapternumberbackgroundbegintikzpictureduck[crazyhair=green,eyebrow=blue]endtikzpicture
chapterOnce more a Longer Chapter Name
blindtext

enddocument


First chapter



Second chapter



Third chapter



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.






share|improve this answer















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
usepackagelmodern% need scalable font
usepackagetikzducks% essential to use ducks
usepackageblindtext

RedeclareSectionCommand[%
font=normalfonthugescshape,
prefixfont=Large,
innerskip=0pt
]chapter

letraggedchapterraggedleft

renewcommand*chapterlineswithprefixformat[3]%
IfArgIsEmpty#2#3%
rule.333linewidth1pt #2%
parbox[b][dimexpr .2linewidth-dpstrutbox-baselineskip].78linewidth%
raggedchapterstrutignorespaces #3%
hfill
makebox[.2linewidth][r]rule[-dpstrutbox]linewidth1pt%
%

renewcommand*chapterformat%
IfUsePrefixLine%
chapappenskip
usekomafontchapter%
raiseboxdimexpr -.2linewidth+baselineskip[0pt][0pt]%
% frame%
resizebox*.2linewidth.2linewidth%
currentchapternumberbackground
%
% %
makebox[0pt][r]%
parbox.2linewidth%
centering
fontsize.75linewidthlinewidthselectfont
raisebox.75linewidthcolorgray!50!red!50thechapterpar
%
%
%
%
thechapterautodotenskip
%

newcommand*chapternumberbackground[1]%
renewcommand*currentchapternumberbackground#1%

newcommand*currentchapternumberbackground%
colorred!50rule1cm1cm%


begindocument
tableofcontents
chapternumberbackgroundbegintikzpictureduckendtikzpicture
chapterChapter Name
blindtext

chapternumberbackgroundbegintikzpictureduck[longhair=teal]endtikzpicture
chapterAnother Chapter Name
blindtext

chapternumberbackgroundbegintikzpictureduck[crazyhair=green,eyebrow=blue]endtikzpicture
chapterOnce more a Longer Chapter Name
blindtext

enddocument


First chapter



Second chapter



Third chapter



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.







share|improve this answer














share|improve this answer



share|improve this answer








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












  • 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

















draft saved

draft discarded
















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

acmart: Multiple authors: all with same affiliation, one author an additional affiliationHow to Write Names of Multiple Authors with Shared Affiliation in ACM 2017 Template?Multiple authors with different primary affiliation, but same additional affiliationSame affiliation for all authors without extra packagesIOS-Book-Article.cls: one author with multiple affiliationacmart: Shared Author AffiliationMultiple authors with different primary affiliation, but same additional affiliationAuthor affiliation with only 1 authorAdding Multiple Authors with Different Affiliation in LaTeX ArticleLaTeX: Multiple authors stays on same lineHow to Label Multiple Authors with Same DescriptionHow to make two authors use the same affiliationTwo authors with same affiliation on finished front page

How to write “ä” and other umlauts and accented letters in bibliography?Accents in BibTeXSorting references with special characters alphabeticallyUse ae ligature in bibliographyEastern European nameInverted circumflex in BibTexBibTex, non-ascii initials and nameptr fproblems with accent in LatexHow to add a Ø to my bibliography from Jabref?References without accentsTroubles when trying to cite St“omer-Verlet in ”title" field of a bib entryComprehensive list of accented charactersHow to type the letter “i” with two dots (diaeresis) in math mode?Problem with glossary text and accented lettersSpecial character in bibliographyAccented letters, Unicode and LaTeX accentsHow to stop natbib from modifying bibliography styleCitation of a paper with non-standard characters by BibtexWrite accented characters to file using writeHow to group the bibliography alphabetically, if some surnames start with “accented” characters?How can I automatically capitalize significant words in my bibliography?

How to remove border form elements in the last row?Targeting flex items on the last rowHow to vertically wrap content with flexbox?Remove border from IFrameCSS3's border-radius property and border-collapse:collapse don't mix. How can I use border-radius to create a collapsed table with rounded corners?Div width 100% minus fixed amount of pixelsBorder around specific rows in a table?How to remove border (outline) around text/input boxes? (Chrome)How do I remove the space between inline-block elements?Flex-box: Align last row to gridRemove blue border from css custom-styled button in ChromeFill remaining vertical space with CSS using display:flexhow style elements in the last row of flexbox row layout with pure css without js