-
Notifications
You must be signed in to change notification settings - Fork 2
/
EquityPremiumPuzzle.cfg
122 lines (101 loc) · 4.79 KB
/
EquityPremiumPuzzle.cfg
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
% -*-latex-*-
\Preamble{charset="latin1",p-width,pic-align}
\DeclareGraphicsExtensions{.svg,.png,.jpg} % change to %\DeclareGraphicsExtensions{.png,.svg,.jpg} to prefer png pix
% \Configure{Picture}{.svg}
\Configure{VERSION}{}
\DeclareGraphicsRule{.png}{bmp}{.xbb}{}
% \DeclareGraphicsRule{.svg}{svg}{.xbb}{} % Uncomment if you want to use the commented-out method of configuring svg files to get the size from a boundingbox created by ebb -x *.png
\ConfigureEnv{figure}
{\ifvmode\IgnorePar\fi\EndP\HCode{<div class="figure"\Hnewline>}%
\bgroup \Configure{float}{\ShowPar}{}{}%
}
{\egroup
\ifvmode\IgnorePar\fi\EndP\HCode{</div>}\ShowPar
\par}
{}{}
\Css{div.caption {text-align:left;font-size:83\%;text-indent:0em; margin-left:2em; margin-right:2em; }}
\Css{div.caption span.id{font-variant: small-caps; white-space: nowrap; }}
\Css{.figure div.caption{text-align: center;}}
\Css{.table div.caption{text-align: center;}}
\Css{.table div.pic-tabular{text-align:center;clear:both;overflow:auto;width:100\%;margin-bottom:1em;margin-left:auto;margin-right:auto}}
\Css{div.figure{text-align:center;clear:both;overflow:auto;width:100\%;margin-bottom:1em;margin-left:auto;margin-right:auto}}
\Css{div.table{text-align:center;clear:both;overflow:auto;width:100\%;margin-bottom:1em;margin-left:auto;margin-right:auto}}
\Css{div.float{text-align:center;clear:both;overflow:auto;width:100\%;margin-bottom:1em;margin-left:auto;margin-right:auto}}
% 20200910: Tried a bunch of ways to center the tabbing envt; all failed:
% \Css{div.tbody{text-align:center;}}
% \Css{.table div.tabbing{text-align:center;clear:both;overflow:auto;width:100\%;margin-bottom:1em;margin-left:auto;margin-right:auto}}
% \Css{div.tabbing{text-align:center;}}
% \Css{.tabbing div.tbody{text-align:center;clear:both;overflow:auto;width:100\%;margin-bottom:1em;margin-left:auto;margin-right:auto}}
% \Css{.table tabbing div.tbody{text-align:center;clear:both;overflow:auto;margin-bottom:1em;margin-left:auto;margin-right:auto}}
\ConfigureEnv{subfigure}
{\ifvmode\IgnorePar\fi\EndP\HCode{<center><div class="subfigure">}
}
{\ifvmode\IgnorePar\fi\EndP\HCode{</div></center>}}{}{}
% \Css{.subfigure{display: inline-block;}} would make the figures float next to each other
\Css{.subfigure img{display:block; margin-left:auto; margin-right:auto}} % Should, but does not seem to, center captions
% The following is for figures in png format
\Configure{graphics*}
{png}
{%the special command below so it will copy the png over
\special{t4ht+@File: \csname Gin@base\endcsname.png}
\Picture[pict]{\csname Gin@base\endcsname .png
\space width="\expandafter\the\csname Gin@req@width\endcsname"
}
}
\Configure{Picture}{.svg}
\makeatletter
\Configure{graphics*}
{svg}
{
{\Configure{Needs}{File: \Gin@base.svg}\Needs{}}
\Picture[\csname a:GraphicsAlt\endcsname]{\csname Gin@base\endcsname.svg
\csname a:Gin-dim\endcsname}
}
\makeatother
% add any custom \Css or HTML commands here as needed.
% Fix tex4ht includegraphics to allow scaling relative to textwidth
% https://tex.stackexchange.com/questions/563276/graphics-scaling-in-tex4ht
\makeatletter
\ExplSyntaxOn
\Configure{Gin-dim}{style="width:\fp_eval:n{round(\Gin@req@width/\textwidth*100,2)}\%"}
\ExplSyntaxOff
\makeatother
\Css{.equation td{text-align:center; }}
\Css{td.equation { margin-top:5em; margin-bottom:5em; }}
% These tell tex4ht to make inline math images also
\begin{document}
\Configure{$}{\PicMath}{\EndPicMath}{}
\Configure{PicMath}{}{}{}{class="math";align="absmiddle"}
% https://12000.org/my_notes/faq/LATEX/htch4.htm
% https://tex.stackexchange.com/questions/44541/tex4ht-limit-toc
\ConfigureToc{section}
{\tocNesting{1}\HCode{<li style="list-style-type:none;color:red;font-size:x-small"><a style="font-size:x-small">}}{ }{}{ }
\ConfigureToc{subsection}
{\tocNesting{2}\HCode{<li style="list-style-type:none;color:red;font-size:x-small"><a style="font-size:x-small">}}{ }{}{ }
\ConfigureToc{subsubsection}
{\tocNesting{3}\HCode{<li style="list-style-type:none;color:red;font-size:x-small"><a style="font-size:x-small">}}{ }{}{ }
\Configure{tableofcontents}
{} {\tocNesting{0}} {} {} {}
\newcount\c
\def\tocNesting#1{%
\expandafter\ifx \csname level#1\endcsname\relax
\ifnum #1>0 \HCode{<ul>}\fi
\expandafter\def \csname level#1\endcsname{\HCode{</ul>}}
\fi
\c=#1 \advance\c by 1
\loop
\csname level\the\c\endcsname
\expandafter\let \csname level\the\c\endcsname\relax
\advance\c by 1
\ifnum \c<10 \repeat
}
% allow textwidth in includegraphics
\makeatletter
\ExplSyntaxOn
\Configure{Gin-dim}{style="width:\fp_eval:n{round(\Gin@req@width/\textwidth*100,2)}\char_generate:nn { `\% } { 12 }"}
\ExplSyntaxOff
\makeatother
\EndPreamble
% Local Variables:
% TeX-PDF-mode: t
% End: