Dealing with footnotes in Word documents

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
Andrew Prior
Forum Members
Forum Members
Posts: 241
Joined: Sun Oct 28, 2007 4:14 am
Location: Australia

Dealing with footnotes in Word documents

Post by Andrew Prior »

Any one who does long form documents in Word knows the powerful endnote and footnote facility which allows users of the document to click and jump from text to footnote and back. Converting that to an html document is not simple or tidy. I've often simply removed the links and let people scroll manually, but that's hardly ideal in a very long document.

And when you do put the endnotes in, you may find that a "sticky" menu at the top of a page also hides the links. You click and find the footnote you want is under the menu bar.

This is a niche work around that allows for the menu bar and also provides a quick and dirty method to convert from Word endnotes to endnotes that work in a CMSMS website.

1. Write your document in Word, adding endnotes as per normal. I find it's best to use only Bold, Italic, indents, URL links to the web, and endnotes. This will then paste into a CMSMS content page. You will need to manually recreate the indents with blockquotes, and insert images into the text. (Untick the Paste as Text option)

If you have a sticky menu (I'm using a modified Portage theme) then add the following class to your Stylesheet.

Code: Select all

.anchor {
    padding-top: 100px;
    margin-top: -100px;
}
The trick now is to use the CMSMS content block tools menu and to copy out the full html text from the page which CMSMS has created there into another, temporary, word document.

You will find in that new document, two pieces of code which are repeated for each endnote. My example is using endnote 6.

The link to footnotes has this form:

Code: Select all

<a href="#_edn6" name="_ednref6">[vi]</a>
(That's for note 6.)

And endnote 6 will be:

Code: Select all

<a href="#_ednref6" name="_edn6">[vi]</a>
I use Ctrl-F in Word to search for:
<a href="#_
and work my way down through the document.

For the links to endnotes I paste in:

Code: Select all

<sup>{anchor anchor="six" text='6'}</sup> <a id="sixtext" class="anchor"></a>
This adds in a superscript command, the internal URL, and a return id tag.
What you need to do each time is replace the six, 6, and sixtext with the appropriate number; ie seven, 7, and seven text, for the next endnote. Then delete the code which Word inserted, and move to the next endnote...repeat.

When you get to the actual endnotes themselves, paste in:

Code: Select all

<a id="six" class="anchor"></a> 6. PasteFootnoteTextHere {anchor anchor='sixtext' text=' (Back)'} 
Change six, 6 and sixtext for the appropriate number, of course, and then copy and past the acutal text of the end note in place of PlaceFootnoteTextHere. Then remove the Word inserted code. You have created the id tag, and a link back to the text

It's monotonous, but I find I get a rhythm going, and 20 or 30 footnotes is a lot quicker and less onerus than using the CMSMS interface.

The last step is simply to post the code directly back into the html code box, and it's done.

Andrea

Andrea
Andrew Prior
Forum Members
Forum Members
Posts: 241
Joined: Sun Oct 28, 2007 4:14 am
Location: Australia

Re: Improved Method Dealing with footnotes in Word documents

Post by Andrew Prior »

Update, if you have got this far
The method above works. It just takes a lot of fiddly cut and paste. It also results in the following shape of footnotes:

Code: Select all

[b]1.[/b] Cf. Mark 6:43, Mark 8:8 ([b]Back[/b])
where Back is the hyperlink back to the place in the main text.

1. I have updated this so that the 1. is now the hyperlink back to the text, which is much tidier and allows a bulk find/replace macro to run, so no more cut and paste, because...

2. I discovered FrEdit (see here for an overview: https://www.techtoolsforwriters.com/how ... ace-macro/) which automates the whole process once you figure out your footnote coding. You can download the macro FRedit via the links on that site.

3. FrEdit requires the use of a file FSO-FRedit_list.docx which must be open at the same time as the document you are editing. I have edited mine to turn track changes off. What this file does is provide the Fredit macro for Word with a list of Find/Replace instructions to work through. They are of the form

Code: Select all

<a href="#_edn1" name="_ednref1">[1]</a>|<sup>{anchor anchor="one" text='1'}</sup> <a id="onetext" class="anchor"></a>
for sending you to a footnote and

Code: Select all

<a href="#_ednref1" name="_edn1">[1]</a>|<a id="one" class="anchor"></a> {anchor anchor='onetext' text=' 1.  '} 
for being sent back from the footnote to the main text.

The file I have attached below works for 100 footnotes. I have just tested it on a post with 43 footnotes, and it works perfectly, as far as I can see.

4. The key points for using this:
a) Write your document in Word, adding endnotes as per normal. I find it's best to use only Bold, Italic, indents, URL links to the web, and endnotes. This will then paste into a CMSMS content page. You will need to manually recreate the indents with blockquotes, and insert images into the text. (Untick the Paste as Text option)
b) The trick now is to use the CMSMS content block tools menu and to copy out the full html text from the page which CMSMS has created there into another, temporary, word document. That document will have the form of

Code: Select all

<a href="#_edn6" name="_ednref6">[vi]</a>
etc for footnotes (endnotes).
c) Make sure FSO-FRedit_list.docx is open and run the macro FRedit. Takes about 5 seconds.
d) You can now paste the code back into CMS Made Simple and then do a final edit to insert block text indents, etc.

e) Note the following, although I suspect any programmer is already well ahead of me:
Take the code

Code: Select all

<a href="#_edn1" name="_ednref1">[vi]</a>
How do you create this for say 100 footnotes?
1. I replaced the single and double apostrophes with & and && because Excel does some unhelpful replacement of the apostrophes.

Code: Select all

<a href=&#_edn1& name=&_ednref1&>[vi]</a>
2.I split the text into separate columns in Excel so that the digits were in separate columns. Then you can use the Excel drag and populate function to extend each column so that the text columns is just duplicated, and the digits auto increase.
3. Then export as a tab delineated file, remove the tabs (^t), and replace the apostrophes, using the find replace function in Word.
4. If you have a two column table in Word you can past the text you want replaced in the first column and the replacement text into the second. Then convert to text using a | (pipe) and you have the code for the FSO-FRedit_list.docx
5. Not so simple to update the series one, two three in text. But somebody may know how :)



Andrea
Attachments
FSO-FRedit_list.zip
(21.36 KiB) Downloaded 15 times
Andrew Prior
Forum Members
Forum Members
Posts: 241
Joined: Sun Oct 28, 2007 4:14 am
Location: Australia

Re: Dealing with footnotes in Word documents

Post by Andrew Prior »

NOTE: If you have your footnote in bold or italic, then that will change the html that CMSMS produces for Word. The macro and the FSO-FRedit_list.docx assume there are no

Code: Select all

[em]..[/em]
type codes in your html text.
Post Reply

Return to “Layout and Design (CSS & HTML)”