Customizing Chapter Names in Exam Class











up vote
0
down vote

favorite












I am preparing a multiple choice test book for my students in exam class. This book covers a few different topic, so I want to add chapter names at the beginning of each topic. As you can see in my MWE, it complies without any error, but titlesec do not modify the chapter name, it just writes the chapter name. Could you kindly address the problem here ?



The MWE:



documentclass[11pt]{exam}
usepackage{lipsum}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{pgf}
usepackage{multicol}
usepackage{amsmath}
usepackage{color}
usepackage{mdframed}
footer{}{thepage}{}
usepackage[top=1in, bottom=1.25in, left=0.8in, right=0.8in]{geometry}

usepackage{xcolor}
usepackage{titlesec}
usepackage{hyperref}
usepackage{graphicx}
usepackage[percent]{overpic}
usepackage{fix-cm}
newcommandctformatchapter[1]{%
parbox[b][6cm][b]{dimexpr.5textwidthrelax}{%
raggedright%
textcolor{cyan!50!blue}{textsf{#1}}%
}%
}
titleformat{chapter}[display]%
{fontsize{20pt}{20pt}bfseriesselectfont}%
{%
raggedleft{%
begin{overpic}[width=0.5textwidth]{Untitled.png}
put (38,22) {{fontsize{50pt}{50pt}selectfonttextsf{Roman{chapter}}}}
put (20,50) {textcolor{cyan!50!blue}{textsf{Chapter}}}
end{overpic}
}%
}%
{-6.5cm}%
{ctformatchapter}%
[phantomsection]

begin{document}
chapter{Introduction}
begin{multicols}{2}
lipsum[1-5]
end{multicols}
end{document}


It produces:enter image description here



Thanks in advance,



Cheers.










share|improve this question
























  • Exam class uses LoadClass{article}, but your MWE deosn't work with article class either. Come to think of it, article doesn't support chapter.
    – John Kormylo
    Jun 18 at 12:08

















up vote
0
down vote

favorite












I am preparing a multiple choice test book for my students in exam class. This book covers a few different topic, so I want to add chapter names at the beginning of each topic. As you can see in my MWE, it complies without any error, but titlesec do not modify the chapter name, it just writes the chapter name. Could you kindly address the problem here ?



The MWE:



documentclass[11pt]{exam}
usepackage{lipsum}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{pgf}
usepackage{multicol}
usepackage{amsmath}
usepackage{color}
usepackage{mdframed}
footer{}{thepage}{}
usepackage[top=1in, bottom=1.25in, left=0.8in, right=0.8in]{geometry}

usepackage{xcolor}
usepackage{titlesec}
usepackage{hyperref}
usepackage{graphicx}
usepackage[percent]{overpic}
usepackage{fix-cm}
newcommandctformatchapter[1]{%
parbox[b][6cm][b]{dimexpr.5textwidthrelax}{%
raggedright%
textcolor{cyan!50!blue}{textsf{#1}}%
}%
}
titleformat{chapter}[display]%
{fontsize{20pt}{20pt}bfseriesselectfont}%
{%
raggedleft{%
begin{overpic}[width=0.5textwidth]{Untitled.png}
put (38,22) {{fontsize{50pt}{50pt}selectfonttextsf{Roman{chapter}}}}
put (20,50) {textcolor{cyan!50!blue}{textsf{Chapter}}}
end{overpic}
}%
}%
{-6.5cm}%
{ctformatchapter}%
[phantomsection]

begin{document}
chapter{Introduction}
begin{multicols}{2}
lipsum[1-5]
end{multicols}
end{document}


It produces:enter image description here



Thanks in advance,



Cheers.










share|improve this question
























  • Exam class uses LoadClass{article}, but your MWE deosn't work with article class either. Come to think of it, article doesn't support chapter.
    – John Kormylo
    Jun 18 at 12:08















up vote
0
down vote

favorite









up vote
0
down vote

favorite











I am preparing a multiple choice test book for my students in exam class. This book covers a few different topic, so I want to add chapter names at the beginning of each topic. As you can see in my MWE, it complies without any error, but titlesec do not modify the chapter name, it just writes the chapter name. Could you kindly address the problem here ?



The MWE:



documentclass[11pt]{exam}
usepackage{lipsum}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{pgf}
usepackage{multicol}
usepackage{amsmath}
usepackage{color}
usepackage{mdframed}
footer{}{thepage}{}
usepackage[top=1in, bottom=1.25in, left=0.8in, right=0.8in]{geometry}

usepackage{xcolor}
usepackage{titlesec}
usepackage{hyperref}
usepackage{graphicx}
usepackage[percent]{overpic}
usepackage{fix-cm}
newcommandctformatchapter[1]{%
parbox[b][6cm][b]{dimexpr.5textwidthrelax}{%
raggedright%
textcolor{cyan!50!blue}{textsf{#1}}%
}%
}
titleformat{chapter}[display]%
{fontsize{20pt}{20pt}bfseriesselectfont}%
{%
raggedleft{%
begin{overpic}[width=0.5textwidth]{Untitled.png}
put (38,22) {{fontsize{50pt}{50pt}selectfonttextsf{Roman{chapter}}}}
put (20,50) {textcolor{cyan!50!blue}{textsf{Chapter}}}
end{overpic}
}%
}%
{-6.5cm}%
{ctformatchapter}%
[phantomsection]

begin{document}
chapter{Introduction}
begin{multicols}{2}
lipsum[1-5]
end{multicols}
end{document}


It produces:enter image description here



Thanks in advance,



Cheers.










share|improve this question















I am preparing a multiple choice test book for my students in exam class. This book covers a few different topic, so I want to add chapter names at the beginning of each topic. As you can see in my MWE, it complies without any error, but titlesec do not modify the chapter name, it just writes the chapter name. Could you kindly address the problem here ?



The MWE:



documentclass[11pt]{exam}
usepackage{lipsum}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{pgf}
usepackage{multicol}
usepackage{amsmath}
usepackage{color}
usepackage{mdframed}
footer{}{thepage}{}
usepackage[top=1in, bottom=1.25in, left=0.8in, right=0.8in]{geometry}

usepackage{xcolor}
usepackage{titlesec}
usepackage{hyperref}
usepackage{graphicx}
usepackage[percent]{overpic}
usepackage{fix-cm}
newcommandctformatchapter[1]{%
parbox[b][6cm][b]{dimexpr.5textwidthrelax}{%
raggedright%
textcolor{cyan!50!blue}{textsf{#1}}%
}%
}
titleformat{chapter}[display]%
{fontsize{20pt}{20pt}bfseriesselectfont}%
{%
raggedleft{%
begin{overpic}[width=0.5textwidth]{Untitled.png}
put (38,22) {{fontsize{50pt}{50pt}selectfonttextsf{Roman{chapter}}}}
put (20,50) {textcolor{cyan!50!blue}{textsf{Chapter}}}
end{overpic}
}%
}%
{-6.5cm}%
{ctformatchapter}%
[phantomsection]

begin{document}
chapter{Introduction}
begin{multicols}{2}
lipsum[1-5]
end{multicols}
end{document}


It produces:enter image description here



Thanks in advance,



Cheers.







titlesec exam






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jun 18 at 10:58

























asked Jun 18 at 8:55









user175924

465




465












  • Exam class uses LoadClass{article}, but your MWE deosn't work with article class either. Come to think of it, article doesn't support chapter.
    – John Kormylo
    Jun 18 at 12:08




















  • Exam class uses LoadClass{article}, but your MWE deosn't work with article class either. Come to think of it, article doesn't support chapter.
    – John Kormylo
    Jun 18 at 12:08


















Exam class uses LoadClass{article}, but your MWE deosn't work with article class either. Come to think of it, article doesn't support chapter.
– John Kormylo
Jun 18 at 12:08






Exam class uses LoadClass{article}, but your MWE deosn't work with article class either. Come to think of it, article doesn't support chapter.
– John Kormylo
Jun 18 at 12:08












1 Answer
1






active

oldest

votes

















up vote
0
down vote













Article class, and therefore exam, doesn't support chapter.



documentclass[11pt]{exam}
usepackage{lipsum}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{pgf}
usepackage{multicol}
usepackage{amsmath}
usepackage{color}
usepackage{mdframed}
footer{}{thepage}{}
usepackage[top=1in, bottom=1.25in, left=0.8in, right=0.8in]{geometry}

usepackage{xcolor}
usepackage{titlesec}
usepackage{hyperref}
usepackage{graphicx}
usepackage[percent]{overpic}
usepackage{fix-cm}
newcommandctformatsection[1]{%
parbox[b][6cm][b]{dimexpr.5textwidthrelax}{%
raggedright%
textcolor{cyan!50!blue}{textsf{#1}}%
}%
}
titleformat{section}[display]%
{fontsize{20pt}{20pt}bfseriesselectfont}%
{%
raggedleft{%
begin{overpic}[width=0.5textwidth]{example-image}
put (38,22) {{fontsize{50pt}{50pt}selectfonttextsf{Roman{section}}}}
put (20,50) {textcolor{cyan!50!blue}{textsf{Chapter}}}
end{overpic}
}%
}%
{-6.5cm}%
{ctformatsection}%
[phantomsection]

begin{document}
section{Introduction}
begin{multicols}{2}
lipsum[1-5]
end{multicols}
end{document}





share|improve this answer























  • Including the files of titlesec (downloaded from CTAN website) in the working directory, this block of code actually works, and produces the MWE. Thanks anyway.
    – user175924
    Jun 18 at 12:35











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',
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%2f436859%2fcustomizing-chapter-names-in-exam-class%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








up vote
0
down vote













Article class, and therefore exam, doesn't support chapter.



documentclass[11pt]{exam}
usepackage{lipsum}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{pgf}
usepackage{multicol}
usepackage{amsmath}
usepackage{color}
usepackage{mdframed}
footer{}{thepage}{}
usepackage[top=1in, bottom=1.25in, left=0.8in, right=0.8in]{geometry}

usepackage{xcolor}
usepackage{titlesec}
usepackage{hyperref}
usepackage{graphicx}
usepackage[percent]{overpic}
usepackage{fix-cm}
newcommandctformatsection[1]{%
parbox[b][6cm][b]{dimexpr.5textwidthrelax}{%
raggedright%
textcolor{cyan!50!blue}{textsf{#1}}%
}%
}
titleformat{section}[display]%
{fontsize{20pt}{20pt}bfseriesselectfont}%
{%
raggedleft{%
begin{overpic}[width=0.5textwidth]{example-image}
put (38,22) {{fontsize{50pt}{50pt}selectfonttextsf{Roman{section}}}}
put (20,50) {textcolor{cyan!50!blue}{textsf{Chapter}}}
end{overpic}
}%
}%
{-6.5cm}%
{ctformatsection}%
[phantomsection]

begin{document}
section{Introduction}
begin{multicols}{2}
lipsum[1-5]
end{multicols}
end{document}





share|improve this answer























  • Including the files of titlesec (downloaded from CTAN website) in the working directory, this block of code actually works, and produces the MWE. Thanks anyway.
    – user175924
    Jun 18 at 12:35















up vote
0
down vote













Article class, and therefore exam, doesn't support chapter.



documentclass[11pt]{exam}
usepackage{lipsum}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{pgf}
usepackage{multicol}
usepackage{amsmath}
usepackage{color}
usepackage{mdframed}
footer{}{thepage}{}
usepackage[top=1in, bottom=1.25in, left=0.8in, right=0.8in]{geometry}

usepackage{xcolor}
usepackage{titlesec}
usepackage{hyperref}
usepackage{graphicx}
usepackage[percent]{overpic}
usepackage{fix-cm}
newcommandctformatsection[1]{%
parbox[b][6cm][b]{dimexpr.5textwidthrelax}{%
raggedright%
textcolor{cyan!50!blue}{textsf{#1}}%
}%
}
titleformat{section}[display]%
{fontsize{20pt}{20pt}bfseriesselectfont}%
{%
raggedleft{%
begin{overpic}[width=0.5textwidth]{example-image}
put (38,22) {{fontsize{50pt}{50pt}selectfonttextsf{Roman{section}}}}
put (20,50) {textcolor{cyan!50!blue}{textsf{Chapter}}}
end{overpic}
}%
}%
{-6.5cm}%
{ctformatsection}%
[phantomsection]

begin{document}
section{Introduction}
begin{multicols}{2}
lipsum[1-5]
end{multicols}
end{document}





share|improve this answer























  • Including the files of titlesec (downloaded from CTAN website) in the working directory, this block of code actually works, and produces the MWE. Thanks anyway.
    – user175924
    Jun 18 at 12:35













up vote
0
down vote










up vote
0
down vote









Article class, and therefore exam, doesn't support chapter.



documentclass[11pt]{exam}
usepackage{lipsum}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{pgf}
usepackage{multicol}
usepackage{amsmath}
usepackage{color}
usepackage{mdframed}
footer{}{thepage}{}
usepackage[top=1in, bottom=1.25in, left=0.8in, right=0.8in]{geometry}

usepackage{xcolor}
usepackage{titlesec}
usepackage{hyperref}
usepackage{graphicx}
usepackage[percent]{overpic}
usepackage{fix-cm}
newcommandctformatsection[1]{%
parbox[b][6cm][b]{dimexpr.5textwidthrelax}{%
raggedright%
textcolor{cyan!50!blue}{textsf{#1}}%
}%
}
titleformat{section}[display]%
{fontsize{20pt}{20pt}bfseriesselectfont}%
{%
raggedleft{%
begin{overpic}[width=0.5textwidth]{example-image}
put (38,22) {{fontsize{50pt}{50pt}selectfonttextsf{Roman{section}}}}
put (20,50) {textcolor{cyan!50!blue}{textsf{Chapter}}}
end{overpic}
}%
}%
{-6.5cm}%
{ctformatsection}%
[phantomsection]

begin{document}
section{Introduction}
begin{multicols}{2}
lipsum[1-5]
end{multicols}
end{document}





share|improve this answer














Article class, and therefore exam, doesn't support chapter.



documentclass[11pt]{exam}
usepackage{lipsum}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{pgf}
usepackage{multicol}
usepackage{amsmath}
usepackage{color}
usepackage{mdframed}
footer{}{thepage}{}
usepackage[top=1in, bottom=1.25in, left=0.8in, right=0.8in]{geometry}

usepackage{xcolor}
usepackage{titlesec}
usepackage{hyperref}
usepackage{graphicx}
usepackage[percent]{overpic}
usepackage{fix-cm}
newcommandctformatsection[1]{%
parbox[b][6cm][b]{dimexpr.5textwidthrelax}{%
raggedright%
textcolor{cyan!50!blue}{textsf{#1}}%
}%
}
titleformat{section}[display]%
{fontsize{20pt}{20pt}bfseriesselectfont}%
{%
raggedleft{%
begin{overpic}[width=0.5textwidth]{example-image}
put (38,22) {{fontsize{50pt}{50pt}selectfonttextsf{Roman{section}}}}
put (20,50) {textcolor{cyan!50!blue}{textsf{Chapter}}}
end{overpic}
}%
}%
{-6.5cm}%
{ctformatsection}%
[phantomsection]

begin{document}
section{Introduction}
begin{multicols}{2}
lipsum[1-5]
end{multicols}
end{document}






share|improve this answer














share|improve this answer



share|improve this answer








edited Jun 18 at 16:25

























answered Jun 18 at 12:21









John Kormylo

43.1k12465




43.1k12465












  • Including the files of titlesec (downloaded from CTAN website) in the working directory, this block of code actually works, and produces the MWE. Thanks anyway.
    – user175924
    Jun 18 at 12:35


















  • Including the files of titlesec (downloaded from CTAN website) in the working directory, this block of code actually works, and produces the MWE. Thanks anyway.
    – user175924
    Jun 18 at 12:35
















Including the files of titlesec (downloaded from CTAN website) in the working directory, this block of code actually works, and produces the MWE. Thanks anyway.
– user175924
Jun 18 at 12:35




Including the files of titlesec (downloaded from CTAN website) in the working directory, this block of code actually works, and produces the MWE. Thanks anyway.
– user175924
Jun 18 at 12:35


















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f436859%2fcustomizing-chapter-names-in-exam-class%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

mysqli_query(): Empty query in /home/lucindabrummitt/public_html/blog/wp-includes/wp-db.php on line 1924

How to change which sound is reproduced for terminal bell?

Can I use Tabulator js library in my java Spring + Thymeleaf project?