France's Association for Social and Moral Assistance tried to sue Boris Vian for Vernon Sullivan's provocative novels. At first Vian claimed that he acted only as a translator, and even tried to create an English-language version of the novel “I Spit on Your Graves”, from which he allegedly translated all this obscenity. The trial ended in nothing, and Vian himself pretty quickly tired of looking at the sluggish interest in his brilliant modernist novels and the hype around parody novels of Vernon Sullivan (120 000 copies sold of the first novel Sullivan for 2 years — this joke is too far gone). He soon quit writing at all; he was just over 30.
Unfinished and even almost not started remained the fifth novel Sullivan, for which Vian in 1950 sketched sinopsis and the first 4 chapters. But — abandoned and this novel, and prose in general, switched to writing songs and poems. Vian died in 1959, too, we can say, at the hands of Vernon Sullivan, namely at the premiere of the French film adaptation of “I Spit on Your Graves”, which he was extremely dissatisfied and demanded to remove his name from the credits. And Sullivan's last novel waited for 60 years until Vian's heirs took the sketches to ULIPO — a very interesting creative association of writers and mathematicians (!), whose first members were all friends and literary associates of Vian, formed a year after his death.
Of course, such a novel, completed after the author by a whole creative association, could not remain without extensive commentary. And even two kinds of notes: page-by-page and text-by-text. One problem — the creators of the EPUB version of the Russian-language edition failed to cope with the back-text notes and did not link them with hyperlinks to the main text. It was not a difficult task to improve this EPUB (we've seen worse EPUBs), but maybe someone will find this example of using regular expressions in Sigil useful.
If you are lucky enough to have a textual comment that is solidly numbered, there is no problem to use this footnote sequence number to generate unique forward and backward links from the text to the XHTML file with the notes.
For convenience, we temporarily merge all the main text into one XHTML file. Then we look for all characters in the text with a certain style:
<span class="nadindex(.*?)">(.*?)</span>
and generate common links to the footnote XHTML file (not forgetting the <sup> tag for the top index instead of the unintelligible <span>):
<sup><a id="footnote-100\2-backlink" class="_idFootnoteLink _idGenColorInherit" href="comments.xhtml#footnote-100\2">\2</a></sup>
After that, we need to create backlinks from the footnotes to the main text using a slightly more complicated regular expression (because we need to wrap the footnotes in <div> and save not only the footnote number, but also the text of the footnote). So we change:
<p class="komment _idGenParaOverride-1" lang="ru-RU" xml:lang="ru-RU"><span class="nadindex(.*?)">(.*?)</span>(.*?)</p>
to:
<div id="footnote-100\2" class="_idFootnote"><p class="snoska" lang="ru-RU"><sup><a class="_idFootnoteAnchor _idGenColorInherit" href="text.xhtml#footnote-100\2-backlink">\2</a></sup>\3</p></div>
The only thing left to do is to check for multi-paragraph footnotes, correct this, and cut the chapters back into XHTML files by placing a Sigil split marker in front of the opening title tags. All in all, 10 minutes of extra work and the reader of the electronic version of the book will be able to fully immerse themselves in the context of the creation of this work with the help of working footnotes.
Comments