1 Vomuro

Custom Bibliography Style Word 2013

Change the type of brackets in citations

Usually Word surrounds citations by the round brackets (see How to create a citation for more details). But you can insert a citation in the square brackets or use other symbols.

By default Word inserts citations in round brackets:

First, you must specify the style that you will use for citations:

    1.    On the References tab, in the Citations & Bibliography group, select Style:

    2.    Word proposes several styles. In this tip is used the APA Sixth Edition style.

To change the brackets type, do the following:

    1.    Open for edit the file APA*.xsl (for example in Notepad). The location of the file may vary, but it can be located here:

C:\Program Files (x86)\Microsoft Office\root\Office16\Bibliography\Style\ or

C:\Users\***\AppData\Roaming\Microsoft\Bibliography\Style\, where *** is your user name

    2.    Find the following lines in that file (you can search for the phrase "openbracket" and "closebracket"):

<xsl:template name="templ_prop_OpenBracket" >
  <xsl:param name="LCID" />
  <xsl:variable name="_LCID">
   <xsl:call-template name="localLCID">
    <xsl:with-param name="LCID" select="$LCID"/>
   </xsl:call-template>
  </xsl:variable>
  <xsl:value-of select="/*/b:Locals/b:Local[@LCID=$_LCID]/b:General/b:OpenBracket"/>
 </xsl:template>

 <xsl:template name="templ_prop_CloseBracket" >
  <xsl:param name="LCID" />
  <xsl:variable name="_LCID">
   <xsl:call-template name="localLCID">
    <xsl:with-param name="LCID" select="$LCID"/>
   </xsl:call-template>
  </xsl:variable>
  <xsl:value-of select="/*/b:Locals/b:Local[@LCID=$_LCID]/b:General/b:CloseBracket"/>
 </xsl:template>

    3.    Change the type of brackets:

 <xsl:template name="templ_prop_OpenBracket" >
  <xsl:param name="LCID" />
  <xsl:variable name="_LCID">
   <xsl:call-template name="localLCID">
    <xsl:with-param name="LCID" select="$LCID"/>
   </xsl:call-template>
  </xsl:variable>
  <xsl:value-of select="/*/b:Locals/b:Local[@LCID=INITIAL_CONTENTLCID]/b:General/b:OpenBracket"/>
    <xsl:text>[</xsl:text>
 </xsl:template>

 <xsl:template name="templ_prop_CloseBracket" >
  <xsl:param name="LCID" />
  <xsl:variable name="_LCID">
   <xsl:call-template name="localLCID">
    <xsl:with-param name="LCID" select="$LCID"/>
   </xsl:call-template>
  </xsl:variable>
  <xsl:value-of select="/*/b:Locals/b:Local[@LCID=INITIAL_CONTENTLCID]/b:General/b:CloseBracket"/>
    <xsl:text>]</xsl:text>
 </xsl:template>

After you save this file, you can see square brackets (only in the APA style):

NOTE:

  • We recommend you to create a copy of this file before you will begin to change it.
  • You can create your own style file:
    • copy APA.XSL file (on the same path)
    • change the type of brackets in it
    • choose you own style in the Style list (on the References tab, in the Citations & Bibliography group)

You can change other elements as you wish:

<?xml version=”1.0″ ?>

<!– List of the external resources that we are referencing –>

<xsl:stylesheet version=”1.0″ xmlns:xsl=”http://www.w3.org/1999/XSL/Transform” xmlns:msxsl=”urn:schemas-microsoft-com:xslt” xmlns:b=”http://schemas.openxmlformats.org/officeDocument/2006/bibliography”>

<!– When the bibliography or citation is in your document, it’s just HTML –>

<xsl:output method=”html” encoding=”us-ascii”/>

<!– match the root element, and dispatch to its children –>

<xsl:template match=”/”>

<xsl:apply-templates select=”*” />

</xsl:template>

<!–set an optional version number for this style–>

<xsl:template match=”b:version”>

<xsl:text>2006.5.07</xsl:text>

</xsl:template>

<!– Defines the name of the style in the References dropdown –>

<xsl:template match=”b:StyleName”>

<xsl:text>Simple Book Style</xsl:text>

</xsl:template>

<!– Specifies which fields should appear in the Create Source dialog when in a collapsed state (The Show All Bibliography Fieldscheckbox is cleared) –>

<xsl:template match=”b:GetImportantFields[b:SourceType = ‘Book’]”>

<b:ImportantFields>

<b:ImportantField>

<xsl:text>b:Author/b:Author/b:NameList</xsl:text>

</b:ImportantField>

<b:ImportantField>

<xsl:text>b:Title</xsl:text>

</b:ImportantField>

<b:ImportantField>

<xsl:text>b:Year</xsl:text>

</b:ImportantField>

<b:ImportantField>

<xsl:text>b:City</xsl:text>

</b:ImportantField>

<b:ImportantField>

<xsl:text>b:Publisher</xsl:text>

</b:ImportantField>

</b:ImportantFields>

</xsl:template>

<!–Defines the output format for a simple Book (in the Bibliography) with important fields defined–>

<xsl:template match=”b:Source[b:SourceType = ‘Book’]”>

<!–Count the number of Corporate Authors (can only be 0 or 1)–>

<xsl:variable name=”cCorporateAuthors”>

<xsl:value-of select=”count(b:Author/b:Author/b:Corporate)” />

</xsl:variable>

<!-–Label the paragraph as an Office Bibliography paragraph–>

<p>

<xsl:choose>

<xsl:when test =”$cCorporateAuthors!=0″>

<!– when the corporate author exists display the corporate author–>

<xsl:value-of select=”b:Author/b:Author/b:Corporate”/>

<xsl:text>. (</xsl:text>

</xsl:when>

<xsl:otherwise>

<!– when the corporate author does not exist, display the normal author–>

<xsl:value-of select=”b:Author/b:Author/b:NameList/b:Person/b:Last”/>

<xsl:text>, </xsl:text>

<xsl:value-of select=”b:Author/b:Author/b:NameList/b:Person/b:First”/>

<xsl:text>. (</xsl:text>

</xsl:otherwise>

</xsl:choose>

<xsl:value-of select=”b:Year”/>

<xsl:text>). </xsl:text>

<i>

<xsl:value-of select=”b:Title”/>

<xsl:text>. </xsl:text>

</i>

<xsl:value-of select=”b:City”/>

<xsl:text>: </xsl:text>

<xsl:value-of select=”b:Publisher”/>

<xsl:text>.</xsl:text>

</p>

</xsl:template>

<!– Defines the output of the entire Bibliography –>

<xsl:template match=”b:Bibliography”>

<html xmlns=”http://www.w3.org/TR/REC-html40″>

<body>

<xsl:apply-templates select =”*”>

</xsl:apply-templates>

</body>

</html>

</xsl:template>

<!– Defines the output of the Citation –>

<xsl:template match=”b:Citation/b:Source[b:SourceType = ‘Book’]”>

<html xmlns=”http://www.w3.org/TR/REC-html40″>

<xsl:variable name=”cCorporateAuthors”>

<xsl:value-of select=”count(b:Author/b:Author/b:Corporate)” />

</xsl:variable>

<body>    

<!– Defines the output format as (Author, Year)–>

<xsl:text>(</xsl:text>

<xsl:choose>

<!– when the corporate author exists display the corporate author–>

<xsl:when test =”$cCorporateAuthors!=0″>

<xsl:value-of select=”b:Author/b:Author/b:Corporate”/>

</xsl:when>

<!– when the corporate author does not exist, display the normal author–>

<xsl:otherwise>

<xsl:value-of select=”b:Author/b:Author/b:NameList/b:Person/b:Last”/>

</xsl:otherwise>

</xsl:choose>

<xsl:text>, </xsl:text>

<xsl:value-of select=”b:Year”/>

<xsl:text>)</xsl:text>

</body>

</html>

</xsl:template>

<xsl:template match=”text()” />

</xsl:stylesheet>

Leave a Comment

(0 Comments)

Your email address will not be published. Required fields are marked *