- Extract title
- Separate preamble and body
- Extract macros from the preamble
- Implement later
- Handle title
- window name should incorporate title
- make title heading h1
- Extracted, ready for formatting in site
- Handle macros
- place in invisible div for Mathjax
- see "Macros div" below
- Implement later
- Handle the body. Everything below is for the body.
- Remove extra space and lines
- Swap escape sequences
\$
,\%
,\&
, and<
,>
- Swap manual newlines
\\
, spaces\
, and accents- Partially done. Accents handled.
- Swap fontstyles
\em
,bf
, etc. - Convert text tables into html tables - Completely inessential, low priority of implementation
- Convert itemize, enumerate
- Put
<p> ... </p>
tags in - Excessively - remove excess later - Handle the \begin ... \end math.
- equation, equationstar, align, alignstar
- Enclose in
$
for mathjax - Convert theorem environments - Handle both named and unnamed thms - Have a reference list, like "Theorem Environment List" - Remove labels, for now
- Convert section, sectionstar, subsection, subsectionstar
To define macros, we'll place them in an invisible div, but still inside mathmode so that mathjax will interpret them. In particular,
<div style="display:none">
\[
\newcommand{\CC}{\mathbf{C}}
\]
</div>
Alternately, we could simply decide on preestablished macros that seem worthwhile, and use no others. This would also keep good portability with journals, etc.
A reasonable start is the following. Either stick to it, or
ThmEnvs = ["theorem","definition","lemma",
"proposition","corollary","claim",
"remark","example","exercise"]
In short, keep with it at first.
- Handle theorem numbering
- Handle theorem labeling and ref
- Handle
\cite
and bibliography
First thought:
- Go through document and make lists of theorem env labels
- Keep refs only for not theorem env labels
- Modify the others, as in mse2wp
vim: foldmethod=indent foldcolumn=2 ts=2 sw=2 sts=2