Convert Author-Date format to Footnotes

A place for users to ask each other questions, make suggestions, and discuss Bookends.
mchapman
Posts: 69
Joined: Wed Mar 09, 2005 9:27 am

Convert Author-Date format to Footnotes

Post by mchapman »

Hello,

Is there an easier way to convert Author-Date citations into footnotes than copy and paste?

Thanks,

Mark
Jon
Site Admin
Posts: 10060
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Convert Author-Date format to Footnotes

Post by Jon »

Scanning.

Jon
Sonny Software
mchapman
Posts: 69
Joined: Wed Mar 09, 2005 9:27 am

Re: Convert Author-Date format to Footnotes

Post by mchapman »

I think I was not as clear as I should have been.

I wrote the paper using in-text citations. However, the journal I want to submit it to uses footnotes. Scanning will generate the correct format but it will not replace the in-text citation with a number and move the citation to a footnote (at least as far as I can tell).

I was wondering if I was missing something or if someone knew of an appleScript that might do the job.

Thanks,

Mark
Philologist
Posts: 166
Joined: Fri Mar 20, 2015 9:17 am

Re: Convert Author-Date format to Footnotes

Post by Philologist »

mchapman wrote:Is there an easier way to convert Author-Date citations into footnotes than copy and paste?
Sure, Nisus Writer Pro is predestined to do this kind of stuff. :lol:

1. Unscan Document (Tools > Bibliography > Unscan Document)
2. Run this macro in Nisus "Convert inline citations from Bookends to footnotes in NWP"

# This macro converts inline citations from Bookends to footnotes
# [15.9.2015]

Find All @Text<{(?:.|\n|\f)+?}>, 'Ea'
$howManyTimes = selection count
$counter = $howManyTimes
Select All
Select Start
While $counter >0
Find @Text<{(?:.|\n|\f)+?}>, 'E'
Edit:Cut:Cut
Insert:Footnote
Edit:Paste:Paste
Select End
$counter = $counter-1
End
Prompt $howManyTimes, "inline citations were converted to footnotes…"
# END OF MACRO

The search criteria may look a bit intimidating here, but in NWP you can use the bubbles, which make everything a lot easier:
1.png
1.png (14.3 KiB) Viewed 13643 times
2.png
2.png (13.37 KiB) Viewed 13643 times
mchapman
Posts: 69
Joined: Wed Mar 09, 2005 9:27 am

Re: Convert Author-Date format to Footnotes

Post by mchapman »

Sounds great.

I owned a copy of Nisus Writer back in the days of OS 9 but don't currently have one and don't have a current need (other than this application).

I guess I am stuck with manually creating them.

Thanks anyway,

Mark
Philologist
Posts: 166
Joined: Fri Mar 20, 2015 9:17 am

Re: Convert Author-Date format to Footnotes

Post by Philologist »

mchapman wrote:I guess I am stuck with manually creating them.
You can do it the hard way, or you can do it the easy way.

I would do it with the trial version which is fully functional for 14 days. Instead of doing it manually, you would have all your document converted in two or three seconds. Then I would save it as RTF, and from there you can take it to whatever word processor you like.
mchapman
Posts: 69
Joined: Wed Mar 09, 2005 9:27 am

Re: Convert Author-Date format to Footnotes

Post by mchapman »

Good idea.

It will work for this time.

Thanks,

Mark
jpkell
Posts: 16
Joined: Thu Aug 03, 2017 12:31 pm

Re: Convert Author-Date format to Footnotes

Post by jpkell »

Philologist wrote:
mchapman wrote:Is there an easier way to convert Author-Date citations into footnotes than copy and paste?
Sure, Nisus Writer Pro is predestined to do this kind of stuff. :lol:

1. Unscan Document (Tools > Bibliography > Unscan Document)
2. Run this macro in Nisus "Convert inline citations from Bookends to footnotes in NWP"

# This macro converts inline citations from Bookends to footnotes
# [15.9.2015]

Find All @Text<{(?:.|\n|\f)+?}>, 'Ea'
$howManyTimes = selection count
$counter = $howManyTimes
Select All
Select Start
While $counter >0
Find @Text<{(?:.|\n|\f)+?}>, 'E'
Edit:Cut:Cut
Insert:Footnote
Edit:Paste:Paste
Select End
$counter = $counter-1
End
Prompt $howManyTimes, "inline citations were converted to footnotes…"
# END OF MACRO

The search criteria may look a bit intimidating here, but in NWP you can use the bubbles, which make everything a lot easier:
1.png
2.png
Hello,

I'm a new buyer/user of Bookends. I too would like to be able to have the ability to convert in-text citations to footnotes. Is there any chance you know of (or know how to create) an equivalent macro for MS Word that does the following: Takes an in-text Bookends citation like "This view is defended by Brennan {Brennan, 2007, #74498}." and...

1. Removes the "{Brennan, 2007, #74498}" as well as the space preceding it;
2. Creates a new footnote after the period; and
3. Inserts "{Brennan, 2007, #74498}." as the new footnote's text.

Thanks for any help you can provide. I feel like having a how-to-install a macro like this would help a lot of people who wish to use Bookends but who may be required to convert some documents from in-text citations to footnote-based citations.
Jon
Site Admin
Posts: 10060
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Convert Author-Date format to Footnotes

Post by Jon »

I personally am not savvy enough with Word's VBA to know how one might do this, but I imagine it's possible. I'll think about it, but perhaps someone with more experience with Word macros can help.

Jon
Sonny Software
Jon
Site Admin
Posts: 10060
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Convert Author-Date format to Footnotes

Post by Jon »

I haven't tried it yet, but there's a post on the EndNote forum that may have a solution.

http://community.thomsonreuters.com/t5/ ... /td-p/4438

Jon
Sonny Software
jpkell
Posts: 16
Joined: Thu Aug 03, 2017 12:31 pm

Re: Convert Author-Date format to Footnotes

Post by jpkell »

Jon wrote:I haven't tried it yet, but there's a post on the EndNote forum that may have a solution.

http://community.thomsonreuters.com/t5/ ... /td-p/4438

Jon
Sonny Software
Thanks. My issue is that I don't know enough to know how to tweak it so that the conversion does exactly what I describe above.
jpkell
Posts: 16
Joined: Thu Aug 03, 2017 12:31 pm

Re: Convert Author-Date format to Footnotes

Post by jpkell »

Given my own coding limitations, this is the best procedure I can find so far to move from in-text Bookends citations to footnote citations using MS Word. If you think you may need to toggle from one to the other, I think it's easiest to compose using in-text citations and then, if needed, use the steps below to convert to footnote citations.

1. Create the following two macros in MS Word (I had to use Word 2011 as macros were crashing Word 2016):
First macro: http://www.msofficeforums.com/word-vba/ ... post100147
Second macro: http://www.msofficeforums.com/word-vba/ ... post100159

2. Use Word's Find/Replace to...
..find all instances of " {" (note the space before the curly bracket) and replace them with "[[{" (without a space).
...and find all instances of "}." and replace them with "}]]."

3. Run the first macro above. This will move your in-text Bookends citation tags to footnotes by moving all text between [[ and ]] into a new footnote.

4. Run the second macro, which converts your new footnotes into "dynamic" footnotes. This (1) enables the auto-renumber-footnotes feature if/when you add any future footnotes, and (2) enables previously inserted footnotes to be numbered properly along with the newly created ones.

5. Now you may need to move some periods around if you want your footnote numbers in the text to come after the period at the end of a sentence. Doing this is super clunky, but it is possible with the find/replace steps outlined here: https://word.tips.net/T012459_Moving_Fo ... place.html

6. You may have to do step 5 for the main text, and then do it again just for the footnotes section.

7. Finally, you can scan your document from within Word (only in Word 2011 though, not in Word 2016) to insert full citations into your footnotes.

ENJOY (as if this could be enjoyable!)
Jon
Site Admin
Posts: 10060
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Convert Author-Date format to Footnotes

Post by Jon »

I looked at the macros, modified them a bit, then joined them into one macro. This macro searches for text between { and } (the standard Bookends citation delimiters), makes static footnotes of them, and then makes the footnotes dynamic. It works with a small example I created in both Word 2011 and Word 2016.

Code: Select all

Sub CreateFootnote()

Dim oRng As Range
Dim strText As String
Dim i As Long
    Set oRng = ActiveDocument.Range
    i = 1
    With oRng.Find
        Do While .Execute(FindText:="\{(*)\}", MatchWildcards:=True)
            strText = Replace(oRng.Text, "[", "")
            strText = Replace(strText, "]", "")
            ActiveDocument.Footnotes.Add oRng, CStr(i), strText
            oRng.Text = ""
            i = i + 1
            oRng.Collapse 0
        Loop
    End With
    
    
Dim ftText As String
Dim r As Range
Dim ftCount As Long
   ftCount = ActiveDocument.Footnotes.Count
   For i = ftCount To 1 Step -1
      ftText = ActiveDocument.Footnotes(i).Range.Text
      Set r = ActiveDocument.Footnotes(i).Reference.Duplicate
      ActiveDocument.Footnotes(i).Delete
      ActiveDocument.Footnotes.Add Range:=r, Text:=ftText
   Next i
    
lbl_Exit:
    Set oRng = Nothing
    Exit Sub
End Sub
Jon
Sonny Software
jpkell
Posts: 16
Joined: Thu Aug 03, 2017 12:31 pm

Re: Convert Author-Date format to Footnotes

Post by jpkell »

Excellent! Thank you!
jpkell
Posts: 16
Joined: Thu Aug 03, 2017 12:31 pm

Re: Convert Author-Date format to Footnotes

Post by jpkell »

Unfortunately however, your macro produces three separate footnotes for "...{Brennan, 2007, #74498}{George, 2012, #5678}{Maddow, 1998, #1234}."
Post Reply