Help! txt to epub conversion markup: linked notes
Hi, I have a huge txt file that contains hundreds of short stories each with a notes section, it's in a format of something like the following example, can some kindly explain to me how can I easily add a markup mapping for the notes in an text editor (hopefully something that can be done by global replacing/adding) so that when converted to epub in Calibre, the number and the corresponding notes can interlinked with each other. The file has notes number [1] under each story, how can I make sure the notes no. 1 for word "queen" don't mess up with other words "shoe", "alone" that are also labeled as notes no. 1 (but for another story). Thank you so much!. Following is a watered down version of the text format (the real stories are much much longer and usually have about 100 notes under each story):
## Story One:
"My God," said the Queen[1], "I'm pregnant[2]. I wonder who the father is."
Notes:
[1]queen: a female monarch.
[2]pregnant: with child or young as a woman or female mammal.
## Story Two:
For sale: baby shoes[1], never worn[2].
Notes:
[1]shoe: an external covering for the human foot.
[2]worn: past participle of wear - to carry or have (a garment, etc).
## Story Three:
The last man on Earth sat alone[1] in a room. There was a knock[2] on the door.
Notes:
[1]alone: apart, or isolated from others.
[2]knock: the sound of knocking, especially a rap, as at a door.
|