Frequently Asked Questions for BibWord Styles

This pages contains answers regarding questions about the styles published through this project. For questions regarding the citations and bibliography tool in general, check the developer FAQ.


Q: Why is a new style not showing up in Word when I add it to the Style directory?
A: The list of available reference styles gets loaded only once. So when you add a new style to the style directory, you need to restart Word.


Q: In Word 2008, new styles are only added for citations. How can I use the new styles for bibliographies?
A: Add the bibliography using one of the four predefined styles. Then go to the citation toolbox and select the style you want. This will update all the citations and bibliographies in your text to the new style.


Q: Why does it take Word so long to show the dropdown list with style names the first time?
A: Word has to retrieve the style names of every XSL in the style directory the first time. Hence, the more styles you put in the directory, the more time Word needs to fill the drop down list.


Q: Why do I get 'BO' instead of a number when using certain styles?
A: 'BO' is often printed when the BibOrder number is not available. Use the BibWord Extender tool on the document to add the missing numbers.


Q: Why do certain styles have a * at the end of their name?
A: Although the usage of a * is not mandatory, it often indicates that part of the functionality of the style can only be used in combination with the BibWord Extender tool.


Q: Can I request to get a certain style?
A: No. Using BibWord, you really should try to create the style yourself. Keep in mind that even if you find someone prepared to create the style for you that you will have to provide him/her with detailed information about the formatting guidelines for your style. Messages containing "I need style x." will most likely be ignored.


Q: Can I (not) link my in-text citations to their bibliography entries?
A: Yes. Set the value of citation_as_link to 'yes' if you want in-text citations to link to their specific bibliography entry, or to any other value if you do not.


Q: Can I change the surrounding brackets for in-text citations?
A: Yes. You can change the surrounding brackets by changing the values of openbracket and closebracket
<openbracket>(</openbracket>
<closebracket>)</closebracket>

Q: How do I get my in-text citations in superscript?
A: In-text citations inherit the style of their surroundings. Only limited formatting (bold, underline, italic) can be applied to them through the reference style. For any further formatting, such as superscript, a character style has to be applied to all CITATION fields.

The following macro creates a character style called In-Text Citation if it does not yet exist. When the style is newly created, it sets the font to superscript. Then the style is applied to all CITATION fields in the document. By changing/updating the style In-Text Citation you can then update the formatting of all citations

Sub ApplyCitationStyle()
    Dim stylename As String
    Dim exists As Boolean
    Dim s As Style
    Dim fld As Field
                
    stylename = "In-Text Citation"
        
    ' Check if the style already exists.
    exists = False
        
    For Each s In ActiveDocument.Styles
        If s.NameLocal = stylename Then
           exists = True
           Exit For
        End If
    Next
    
    ' If the style did not exist yet, create it.
    If exists = False Then
        Set s = ActiveDocument.Styles.Add(stylename, wdStyleTypeCharacter)
        s.BaseStyle = ActiveDocument.Styles(wdStyleDefaultParagraphFont).BaseStyle
        s.Font.Superscript = True
    End If
    
    ' Now that the style really exists, select it.
    Set s = ActiveDocument.Styles(stylename)
     
    ' Apply the style to all in-text citations.
    For Each fld In ActiveDocument.Fields
        If fld.Type = wdFieldCitation Then
            fld.Select
            Selection.Style = s
        End If
    Next

End Sub

Q: How do I convert all my in-text citations to static text in one go?
A: You can use the following macro to convert all in-text citations:

Sub CitationsToStaticText()
    Dim fld As Field
            
    ' Go over all stories, including main, footnotes, ...
    For Each sr In ActiveDocument.StoryRanges
        ' Find all citation fields and convert them to static text.
        For Each fld In sr.Fields
            If fld.Type = wdFieldCitation Then
                fld.Select
                WordBasic.BibliographyCitationToText
            End If
        Next
    Next

End Sub

Q: Is there an easy way to get rid of sources which are not cited in the text?
A: You can use the following macro to remove all uncited sources from a document:

Sub RemoveUnusedCitations()
    ' Get the number of sources.
    idx = ActiveDocument.Bibliography.Sources.Count
    
    ' Remmove unused sources starting from the last one.
    Do While (idx > 0)
        If ActiveDocument.Bibliography.Sources(idx).Cited = False Then
            ActiveDocument.Bibliography.Sources(idx).Delete
        End If
        idx = idx - 1
    Loop
End Sub

Q: How do I set the indentation of my bibliography?
A: Add a bibliography to your document. Open the 'Styles' pane (CTRL+ALT+SHIFT+S) and look for a style called 'Bibliography' (or a localized translation of the word 'Bibliography'). Change the indentation settings there. That way, whenever your bibliography gets updated, the indentation will remain correct.


Q: Is it possible to group several citations? Currently I have something like (1)(2) and I want (1,2).
A: Yes. You can add a second source to a citation by using the '\m' switch and the tag of the source you want to add. In Word 2007, if you want to add a source with tag 'Bee99' to an existing citation, right click the citation and select 'Edit Field...'. It will show you something like 'CITATION Gup97 \l 2060'. To add the extra source, change it to 'CITATION Gup97 \l 2060 \m Bee99'. For more information, also see the Microsoft Office online help topic on the CITATION field code.

Alternatively, you can put your cursor inside any in-text citation, then go to 'References' tab in the ribbon and click 'Insert Citation'.

To change the separator between two grouped in-text citations, BibWord uses the separator element.


Q: Only the name of the first author is displayed correctly, all other author names are abbreviated. Is this a bug?
A: No. You probably made a mistake when entering the different author names. You should enter them one by one in the dialog that comes up when clicking the "Edit..." button next to the author field. That way you will not make a mistake.

If you really want to enter them as a string, then be aware that the correct format is "Last1, First1 Middle1; Last2, First2 Middle2; ...". So the names are separated by a ";" while name parts are separated by a ",".

Note that there is a bug in Word where sometimes the name conversion goes wrong. For more info, see here.


Q: When using a numbered style (e.g. IEEE), the number is wrapped over multiple lines. Is this a bug?
A: No. Numbered styles are mostly represented using a 2 column table where the first column contains the number and the second column contains the text. The text wrap you see is caused by the first column not being wide enough. You can simple solve this by positioning your cursor on the the table border between the first and second column and drag it to the right.

This can also be used to add extra white space after the number if you set the halign element to left of the first column.


Q: My in-text citations are displayed in bold. How do I change this?
A: If you link your in-text citation to your bibliography, Word formats the link using the 'Heading 2 Character style'. So if that style is configured to use bold, so will the in-text citation. Assuming you cannot or do not want to change that style, there are two possible solutions:
  1. Disable linking between in-text citations and bibliographies. This can be done easily be setting the value of citation_as_link to 'no' in the xsl file.
  2. Format each in-text citation with another character style. This way you will be able to keep using the links between in-text citations and bibliographies. To ease this job, you could use the following macro which you can run every time you insert an in-text citation or once at the end.
Sub ApplyCitationStyle()
    Dim stylename As String
    Dim exists As Boolean
    Dim s As Style
    Dim fld As Field
                
    stylename = "In-Text Citation"
        
    ' Check if the style already exists.
    exists = False
        
    For Each s In ActiveDocument.Styles
        If s.NameLocal = stylename Then
           exists = True
           Exit For
        End If
    Next
    
    ' If the style did not exist yet, create it.
    If exists = False Then
        Set s = ActiveDocument.Styles.Add(stylename, wdStyleTypeCharacter)
        s.BaseStyle = ActiveDocument.Styles(wdStyleDefaultParagraphFont).BaseStyle
        s.Font.Bold = False
    End If
    
    ' Now that the style really exists, select it.
    Set s = ActiveDocument.Styles(stylename)
     
    ' Apply the style to all in-text citations.
    For Each fld In ActiveDocument.Fields
        If fld.Type = wdFieldCitation Then
            fld.Select
            Selection.Style = s
        End If
    Next

End Sub

Last edited Mar 18, 2015 at 3:44 PM by Yves, version 15

Comments

miraz912 Aug 28, 2014 at 10:47 AM 
Dear everyone
The current styles do not let us include all the information required such as DOI, Standard Numbers etc. I have observed the same problem in most of the styles including IEEE Reference order. Can anyone please help me in this regard so that I can add all the information ( in the reference list entered) while inputting the data?
I look forward to hearing from you.

jharmon2 Feb 4, 2014 at 12:59 AM 
This information looks incredibly useful, but I have the same question as HymVong. I can find no way - other than using the Record option - to create macros. How would I go about creating the macro In-Text Citation?

mrw402 Dec 10, 2013 at 5:25 PM 
Hi,

I've been using this macro for some time but it seemed to not work anymore when I upgraded to the Ms Office 2013.

I use two of these macros hand in hand, the one which applies the styles for a superscript tag and the other to convert it to static text. The first macro still works but whenever I try to convert it to static text, it doesn't work. Could anyone advice me on this?

Thanks and regards.

HymVong Jan 20, 2013 at 5:25 AM 
I am the end-user. I'm very appreciated in vancouver style. The only thing which not meet my desire is superscript. I've already read FAQ throughly but I don't get an idea to do. Where can I put the superscript macro in? How to do it?