Fixing unmarked footnotes

  1. In word365 find and replace '^p' with '^p###', in order to preserve the text when you copy into a spreadsheet later, so it doesn't delete apostrophes and quote marks at the beginning of paragraphs.

  2. Click Edit -> Select -> Select All

  3. Cut and paste into a notepad to preserve the paragraph spacing.

  4. Cut and paste into google sheets column B.

  5. In 'Cell A1', type '1'.

  6. In 'Cell A2', type '=A1+1'.

  7. Then 'shift+Ctrl+down' and 'Ctrl+D' to highlight the rest of the column and create a column of numbers.

  8. Then 'ctrl+c', right click and click paste as plain text.

  9. Then highlight both column 1 and 2, and sort by column 2.

  10. Then mark all the cells beginning with numbers, by putting an 'x' in column 3.

  11. Then sort by column 1 to check what numbers you marked.

  12. Scroll down column 3 with a mix of 'ctrl+down arrow key' and the mouse wheel, deleting numbers that aren't footnotes.

  13. Then sort by column 3 to reveal just the footnotes.

  14. Ctrl highlight the footnotes in column 2, and copy paste them into column 4.

  15. Then from the toolbar click 'Data' -> split text to columns -> and click 'period' in the seperator.

  16. Ctrl+highlight the remaining numbers and 3 hashes, then find and replace the hashes.

  17. Ctrl+highlight the 4 columns connected to the footnotes and sort by column 4.

  18. In 'cell A4' type '=replace(A2+1,3,"[")

  19. Hold 'Ctrl+down' then 'Ctrl+D' to continue the formula for the rest of the text.

  20. Ctrl+highlight that group of text, then right click 'cell A1' and click 'paste as plain text'.

  21. In 'cell A4' type '=replace(A2+2,1,"] ")'

  22. Hold 'Ctrl+down' then 'Ctrl+D' to continue the formula for the rest of the text.

  23. Go back to the top and check where the footnotes go from the number '9' to '10' and change the second part of the replace formula from a '2' to a '3', so '=replace(A2+3,1,"] ")'

  24. Repeat if the footnotes go up to 100, 1000, etc. by changing from a '3', to a '4', etc.

  25. Ctrl+highlight that group of text, then right click 'cell A1' and click 'paste as plain text'.

  26. highlight all text on the sheet by clicking the top left corner and sort by column 1.

  27. highlight the text and copy paste into a notepad.

  28. Find and replace delete the rest of the ### and you're done.


Quote Indents

This takes a long time, but if you have a lot of books you want to bulk upload perfectly with quote indents, you can do them this way and all at the same time so it's worth it:

So if I have the document open in LibreOffice, I hit File -> Export -> and chose MediaWiki format in the 'Save as' drop down menu.

Then I open up the new file and copy paste it back into an office word document. All the indents will look something like this: "<div style="margin-left:1.251cm;margin-right:0cm;">___</div>

Then I find and replace all the "<div style...." and</div> into amusewiki code <quote>and</quote> .

Then replace single line quotes into block quotes by doing find and replace "</quote>^p^p<quote>" with simply "^p^p".


Rearranging Footnotes

If you have a long book with chapter specific footnotes, like so:

** Chapter 1

[1] Blah.

[2] Blah.

** Chapter 2

[1] Blah.

[2] Blah.

Then you can fix them under "Filters", by checking the box that says "Rearrange footnotes".

If it throws up an error such as:

@@ -413,6 +413,7 @@
 {17}
 {18}
 {19}
+{8}
 {20}
 {21}
 {22}

@@ -447,13 +448,11 @@
 {51}
 {52}
 {1}
-{2}
 {3}
 {4}
 {5}
 {6}
 {7}
-{8}
 {9}
 {10}
 {11}

Then what it's saying is the first number after the '@@' is the current paragraph number in the 'text change difference script'. The second number after the '@@' and ',' is the number of current footnotes shown below it. The third and fourth numbers are what the paragraph number and footnote number should be after error correcting.


The line prefixed with '-' come from the footnotes, the '+' from the references in the body

So, what it's saying is if you search that page for {19} or {8} you'll see that the body has a spurious {8}.

And later on it's missing a {2} and a {8}. So you could check through your {1}'s and {7}'s and scroll down each time to find the missing {2} & {8}.


Typing Ctrl+F, then '[1]' can sometimes help you speed up looking for where in the text the footnote error is, because where it says e.g. "found 767 footnotes ([1] [2] [1] [8] [2]) ... found 766 footnote references in the body ([1] [2] [1] [8] [2])", you'll be able to see which set of chapter footnotes the error is in, so in that example, in the second set.

Finally, for a really hard to find number, you can copy all of them from the list of 'found footnotes and references' and paste them into a spreadsheet to see them along side each other.


Primary Footnotes in the Secondary Footnotes

If you have a long book with two sets of footnotes like so:

Blah blah blah.a

a. Blah.1

1. Blah.

Then after converting the document, the footnotes might end up looking like below, but it'll be broken:

Blah blah blah.{1}

[1] Blah.

{1} Blah.[1]

To fix this, you could copy paste the text into a word document and use 'find and replace' a tonne of times to swap them round, like so:

  • Find '{' replace with '@@@'

  • } -> &&&

  • [1 -> {1

  • [2 -> {2

  • 0] -> 0}

  • 1] -> 1}

  • ...

  • @@@ -> [

  • &&& -> ]


Copying over amusewiki texts from other libraries

This is what I do to quickly copy over texts from other amusewiki libraries:

  • Click 'add new text'

  • Copy paste the end of the URL after /library/ (e.g. "black-rose-anarchist-federation-turning-the-tide") from the doc into the title box, so that it automatically generates a URL based on the title, and hit 'Create'

  • Then once in the edit box, delete everything other than the #pubdate

  • Click 'plain text source' on the doc

  • Zoom out, highlight all the text, then cut and paste into the edit box.

  • Delete the old #pubdate

  • Save and publish.