-
Notifications
You must be signed in to change notification settings - Fork 1
/
calvinisme.4ht
66 lines (54 loc) · 1.63 KB
/
calvinisme.4ht
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
\usepackage[utf8]{inputenc}
% All paragraphs are indented
\Css{h3 + p.noindent{
text-indent:1em;
}}
% Guillemets
\renewcommand{\Og}{\HCode{« }}
\renewcommand{\Fg}{\HCode{ »}}
% HRule
\renewcommand{\HRule}{%
\ifvmode\IgnorePar\fi\EndP\HCode{<hr />}\IgnoreIndent
}
% Fake pdfpages
%\newcommand\includepdf[1]{}
% Renew myverse
\renewenvironment*{myverse}%
{\begin{center}\HRule}%
{\HRule\end{center}}
% French colon
\renewcommand{\frcolon}{\HCode{ : }}
% page breaks
\renewcommand\pagebreak{%
\HCode{<br class="pagebreak" />}
}
\renewcommand\pocketpagebreak{}
% Make links in Bible index
\newcommand{\getversesec}[1]{%
\csname versesec#1\endcsname
}
\newcommand{\linkonepage}[1]{%
\ifthenelse{\secondparam=1}{, }{}%
\hyperlink{verse.#1}{\textrm{voir}}%
\def\secondparam{1}}
\newcommand{\linkpages}[1]{%
\def\secondparam{0}%
\forcsvlist\linkonepage{#1}}
\renewcommand*{\bvidxpgformat}{linkpages}
% Make anchors in text
\newcounter{bibleverse}
\NewConfigure{ibibleverse}{2}
\renewcommand*{\ibibleverse}[1][\bvidxpgformat]{%
\stepcounter{bibleverse}%
\a:ibibleverse\b:ibibleverse%
\expandafter\xdef\csname versesec\thebibleverse\endcsname{\thesection}%
\def\@bv@idxpgformat{#1}%
\@bv@idxtrue\def\@bv@idxentry{}\bibleverse}
\Configure{ibibleverse}{\Tg<a id="verse.\thebibleverse">}{\Tg</a>}
% Patch imakeidx to map verse num instead of page
\patchcmd{\@index}{\@wrindex}{\@Wrindex}{}{}
\let\@Wrindex\@wrindex
\patchcmd{\@Wrindex}{\thepage}{\thebibleverse}{}{}
\let\protected@iwrite\protected@write
\patchcmd{\protected@iwrite}{\write}{\immediate\write}{}{}
\patchcmd{\@Wrindex}{\protected@write}{\protected@iwrite}{}{}