Coffeehouse Thread

14 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Word 2007 citations, should be simple, but... (solved)

Back to Forum: Coffeehouse
  • User profile image
    Sven Groot

    I am using the citations feature in Word 2007, and it's quite nice. It's not as powerful as BibTex or anything but it's still nice.

    One thing though: I'm using the ISO 690 Numerical Reference style, and whenever I insert a citation, it comes out looking like e.g. Devil. What I want it to look like however is [6].

    Square brackets instead of parenthesis. It should be simple, but I can't find any way to change this. There's some horrible 7000-lines XSLT files corresponding to the different styles, but they seem to deal only with the bibliography section, not the inline citations.

    Does anyone know how I can change this, or am I going to have to convert them to static text and fix them manually one by one?

  • User profile image
    Sven Groot

    I managed to do this, I will document it here for future reference.

    In the C:\Program Files (x86)\Microsoft Office\Office12\Bibliography\Style\ISO690Nmerical.XSL file, there's two templates, named templ_prop_OpenBracket and templ_prop_CloseBracket. These get the actual bracket from some other XML source but I can't find where that's stored. Not in the .docx file as far as I can tell. So I just changed the XSL file. I changed line 2013 and 2024 to <xsl:text>[</xsl:text> and <xsl:text>]</xsl:text> respectively, and that did the job.

    Come on MS, surely there's a better way to do this which I'm missing somehow...

  • User profile image
    zzzpt

    Hello
    I am having the same problem
    I tried to edit the: C:\Program Files\Microsoft Office\Office12\Bibliography\Style\ISO690Nmerical.XSL

    but the lines 2013 and 2024 does'nt apear to be inside the templ_prop_OpenBracket and templ_prop_CloseBracket.

    wrote:

      <xsl:template name="templ_prop_CloseQuote" >
        <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:CloseQuote"/>
      </xsl:template>

     
      <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>


    What should i change to make the brackets -> [ and ]
    Can you tell me what is this folder
     C:\Program Files\Microsoft Office\Office12\Bibliography\Sort

    it as 4 files: AUTOR.XSL, TAG.XSL, TITLE.XSL, YEAR.XSL
    In al the files there is this:
    wrote:

    <xsl:variable name="const_BracketOpen">
            <xsl:text>(</xsl:text>   
        </xsl:variable>

        <xsl:variable name="const_BracketClose">
            <xsl:text>)</xsl:text>   
        </xsl:variable>


    I trieded to change it all to [ and ]
    But no change in the Word Doc.

    Please Help Me[C]

  • User profile image
    zzzpt

    Some one ??
    Please help me [C]

  • User profile image
    Sven Groot

    Yeah I saw those AUTHOR.XSL... etc too, don't really know what they're used for but they certainly don't affect that.

    The line numbers I gave were valid for the Beta 2 Technical Refresh, looks like the file changed for the final version. It's line 2047 and 2058 now in the ISO690Nmerical.xslt file.

    For reference, this the original version:

    <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>


    And after modification:
    <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: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=$_LCID]/b:General/b:CloseBracket"/>-->
      <xsl:text>]</xsl:text>
    </xsl:template>


    That should take care of it for the ISO690 Numerical style. If you use a different style you will need to find the equivalent sections in the other xslt files and modify those too.

  • User profile image
    zzzpt

    Thanks Champ

    I tought i tryed that, but now is OK. Wink

    Now can you tel me how to put in the bibliography
    the brackets in the numbers

    Now is this:

    1. 3-D Constraint-based Modeling: Finding Common Themes. Wiebe, Eric N. 1999. EDGD Mid-year Meeting, Columbus, OH.


    I would like to be:

    [1]. 3-D Constraint-based Modeling: Finding Common Themes. Wiebe, Eric N. 1999. EDGD Mid-year Meeting, Columbus, OH.

    Thanks again to all Big Smile

  • User profile image
    Sven Groot

    I looked for this and fortunately it wasn't difficult to find.

    Around line 4442 (if you already changed the xslt file it might not be exactly that line) there's a line that reads:

    <xsl:value-of select="b:RefOrder"/>

    Change it to this:

    <xsl:text>[</xsl:text>
    <xsl:value-of select="b:RefOrder"/>
    <xsl:text>]</xsl:text>

    That should have the desired effect.

  • User profile image
    zzzpt

    Thanks again
    Now is perfect Big Smile

  • User profile image
    sheepy

    Now that that part is sorted, can someone help me please?

    Basically I want the referencing to be in the page. eg.


    --------------------------------

    Random text writing in the document blah blah [1]
    blah blah blah blah











    [1] Fred Bloggs, 2004, Book name, Author


    --------------------------------

    Basically I want it as a footnote (like the ctrl+alt+f)

  • User profile image
    sharoz

    I've been messing around with the sorting order for the bibliography section and thought I could offer some quick advice and an interesting question. At around line 4880, look for:

    <xsl:template name="sortedList">
    <xsl:param name="sourceRoot"/>
    <xsl:apply-templates select="msxsl:node-set($sourceRoot)/*">
    <xsl:sort select="b:RefOrder" data-type="number"/>
    <xsl:sort select="b:Author/b:Main/b:NameList/b:Person[1]/b:Last" />
    <xsl:sort select="b:Author/b:Main/b:NameList/b:Person[1]/b:First" />
    <xsl:sort select="b:Author/b:Main/b:NameList/b:Person[1]/b:Middle"/>
    <xsl:sort select="b:Title"/>
    </xsl:apply-templates>
    </xsl:template>

    Swap the order of the "xsl:sort" elements to control the listed order. This has to be done a second time 10 or 20 lines down.

    Question:

    In the citation, does anyone know of a way to use the order that the source is listed (in the bibliography) rather than the order that it is used?

    I tried to find the definition for RefOrder, but it was not in the document. I hope a variable such as "RefOrderListed" is available.

    Any help or advice would be appreciated.

    -Steve

  • User profile image
    MasterPi

    A bit off topic but..

    It would be nicer if footnotes were linked to entries in Manage Sources.  Apparently, you can only generate paranthetical citations, but not footnotes/documentation notes.

    Though, I'm still using B2TR.

  • User profile image
    klimeck

    For me this problem is not solved...

    I try to change the citation like the
    http://jpcrd.aip.org/jpcrd/submit.jsp

    Also, I need the year in bold letters...

    But I can't find the solutions... Sad

    Greetz,
    Thomas



  • User profile image
    Ian Knowles

    Sven Groot said:
    I looked for this and fortunately it wasn't difficult to find.

    Around line 4442 (if you already changed the xslt file it might not be exactly that line) there's a line that reads:

    <xsl:value-of select="b:RefOrder"/>

    Change it to this:

    <xsl:text>[</xsl:text>
    <xsl:value-of select="b:RefOrder"/>
    <xsl:text>]</xsl:text>

    That should have the desired effect.

    a slightly cleaner fix than Sven's i made a guess and found MS's propname for square brackets, the lines replaced represent the beginning of a cititation, the end, and the numbered start of a reference so you could change these lines to anything else if you can figure out MSes prop names. Or stick some xsl-text in if you want for a messy fix

    line 3715 :
    <xsl:call-template name="templ_prop_ISO690_GeneralOpen"/>
    line 3779:
    <xsl:call-template name="templ_prop_ISO690_GeneralClose"/>
    lines 4443-4445:
    <xsl:call-template name="templ_prop_ISO690_GeneralOpen"/>
    <xsl:value-of select="b:RefOrder"/>
    <xsl:call-template name="templ_prop_ISO690_GeneralClose"/><xsl:call-template name="templ_prop_Space"/>

  • User profile image
    cotarelo

    Ian Knowles said:
    Sven Groot said:
    *snip*
    a slightly cleaner fix than Sven's i made a guess and found MS's propname for square brackets, the lines replaced represent the beginning of a cititation, the end, and the numbered start of a reference so you could change these lines to anything else if you can figure out MSes prop names. Or stick some xsl-text in if you want for a messy fix

    line 3715 :
    <xsl:call-template name="templ_prop_ISO690_GeneralOpen"/>
    line 3779:
    <xsl:call-template name="templ_prop_ISO690_GeneralClose"/>
    lines 4443-4445:
    <xsl:call-template name="templ_prop_ISO690_GeneralOpen"/>
    <xsl:value-of select="b:RefOrder"/>
    <xsl:call-template name="templ_prop_ISO690_GeneralClose"/><xsl:call-template name="templ_prop_Space"/>

    Thanks for all your contributions!

     

    It is the only post in the whole internet that fixed my issue actually but...

     

    I have a small request. How do I do so when there are many authors on the reference it writes them all (not just et. al) and... how do I remove the dot after the closing bracket?

     

    Thank you very much in advance

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.