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:
Thanks in advance,
Cheers.
titlesec exam
add a comment |
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:
Thanks in advance,
Cheers.
titlesec exam
Exam class usesLoadClass{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
add a comment |
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:
Thanks in advance,
Cheers.
titlesec exam
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:
Thanks in advance,
Cheers.
titlesec exam
titlesec exam
edited Jun 18 at 10:58
asked Jun 18 at 8:55
user175924
465
465
Exam class usesLoadClass{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
add a comment |
Exam class usesLoadClass{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
add a comment |
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}
Including the files oftitlesec
(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
add a comment |
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}
Including the files oftitlesec
(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
add a comment |
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}
Including the files oftitlesec
(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
add a comment |
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}
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}
edited Jun 18 at 16:25
answered Jun 18 at 12:21
John Kormylo
43.1k12465
43.1k12465
Including the files oftitlesec
(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
add a comment |
Including the files oftitlesec
(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
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%2f436859%2fcustomizing-chapter-names-in-exam-class%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
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