-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathqanda.sty
More file actions
59 lines (59 loc) · 1.06 KB
/
Copy pathqanda.sty
File metadata and controls
59 lines (59 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
\makeatletter
\newenvironment{qanda}[1]{
\phantomsection
\addtocounter{section}{1}
\addcontentsline{toc}{section}{#1}
\newcommand{\question}[1]{%
\newpage%
\phantomsection%
\addtocounter{subsection}{1}%
\addcontentsline{toc}{subsection}{##1}%
\@startsection%
{subsection}%
{2}%
{\z@}%
{1em}%
{1em}%
{\normalfont\Large\bfseries\color{questionColor}}%
*%
{##1}%
}
\renewcommand{\section}[1]{%
\newpage%
\phantomsection%
\addtocounter{subsection}{1}%
\addcontentsline{toc}{subsection}{##1}%
\@startsection%
{subsection}%
{2}%
{\z@}%
{1em}%
{1em}%
{\normalfont\Large\bfseries\centering}%
*%
{##1}%
}
\newcommand{\answersection}[1]{%
\@startsection%
{subsubsection}%
{3}%
{\z@}%
{0.5em plus 0.3em minus 0.2em}%
{0.2em plus 0.1em minus 0.1em}%
{\normalfont\large\bfseries}%
*%
{##1}%
}
\renewcommand{\paragraph}[1]{%
\@startsection%
{paragraph}%
{4}%
{\z@}%
{0em}%
{-0.5em}%
{\normalfont\normalsize\bfseries}%
*%
{##1}%
}
}{}
\makeatother