Start a new topic

Creating Annotations

Thanks to @alwayslockyourbike who pointed out this macro to me, which can be used to convert double square brackets into footnotes in MS Word. I tested it and it is a great workaround and functional way to create annotations from CafeTran.


This is a necessity for doing academic translation work. CafeTran has been a particularly platform for my academic workflow because it has the File -> Export -> "Export Current Document with Notes", so I can make precisely placed footnotes  among the segments with double square brackets but also leave the CafeTran's "notes" feature separate for not-to-be-published editorial comments. So here is my basic workflow:


1) Create annotations using double square brackets "[[" and "]]", for example:

Source:

འདི་ཚིག་གྲུབ་རེད།

Target:

This is a sentence.[[This is a note.]]

2) When you complete your translation, export your translation as a .docx or copy and paste the text content into an MS Word document. Then run the macro at pasted at the end of this post.

3) You will probably want to remove the annotations from your final TMs. This is up to you, in some cases your annotations may be useful information to recall, but most often I find my annotations are specific to the context in which the segment appears and not useful for a future recall. To remove these annotations from the TMs you will need to do a search and replace with regular expressions; I suggest using a free text editor such as Sublime Text (Mac) or Notepad++ (Windows). Then using regular expressions checked in a search and replace dialogue, search for:

\[\[.+\]\]

and replace with nothing.

So this is the workflow I recommend for anyone doing academic translation work.

Now one question for the community. I would like to have some alternative macro code for other word processors: Pages, LibreOffice, OpenOffice, etc... all of which do  have macro features, but don't use MS Word's VBA code. I lead a community forum for academic translators and would like to provide them with macros for these various processors since they don't all use word. If anyone has any suggestions or can write such macros please add them to this thread. 

Finally, here is the macro posted below, thanks again to alwayslockyourbike for pointing this out to me, it came from this MS Word forum.:

Sub Macro1()
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
lbl_Exit:
    Set oRng = Nothing
    Exit Sub
End Sub

Login to post a comment