IEEE with tag

Mar 4, 2009 at 6:55 PM
I wish to use the style IEEE with tags, but would like to be able to add a page numbers to the in-text citations, e.g.:

[TAG, p. 12]

For some reason I'm unable to "edit citation" upon clicking in Word. Also I would like to change the bold font. I have tried to edit the source myself, but havn't been able to get it to work.
Coordinator
Mar 4, 2009 at 7:35 PM

Word shows different contextmenus depending on the underlying field. IEEE with tags uses hyperlinks to make the tags clickable (if you CTRL+click a tag, you will end up in the bibliography). To get the correct contextmenu to show, put your cursor between the last character of your tag and the closing square bracket. If you right click there, the "Edit citation" option will be available in the menu. If you don't want the links to be clickable, you can always deactivate it by changing:

<xsl:variable name="InTextCitationAsLink" select="'true'" />

into

<xsl:variable name="InTextCitationAsLink" select="'false'" />

Note that this is an extension of IEEE, so the "pages" option for citations is not implemented. If you want to add that option, you will have to change:

<!-- Display in-text citation as link. -->
<
xsl:when test="$InTextCitationAsLink = 'true'">
  <
a href="#{/b:Citation/b:Source/b:Tag}">
    <
xsl:value-of select="/b:Citation/b:Source/b:Tag"/>
  </
a>
</
xsl:when>
<!--
Display in-text citation without link. -->
<
xsl:otherwise>
  <
xsl:value-of select="/b:Citation/b:Source/b:Tag"/>
</
xsl:otherwise>

into:

<!-- Display in-text citation as link. -->
<
xsl:when test="$InTextCitationAsLink = 'true'">
  <
a href="#{/b:Citation/b:Source/b:Tag}">
    <
xsl:value-of select="/b:Citation/b:Source/b:Tag"/>
    <xsl:if test="/b:Citation/b:Pages">
      <
xsl:text>, p. </xsl:text>
      <
xsl:value-of select="/b:Citation/b:Pages"/>
    </
xsl:if>
  </
a>
</
xsl:when>
<!--
Display in-text citation without link. -->
<
xsl:otherwise>
  <
xsl:value-of select="/b:Citation/b:Source/b:Tag"/>
  <xsl:if test="/b:Citation/b:Pages">
    <
xsl:text>, p. </xsl:text>
    <
xsl:value-of select="/b:Citation/b:Pages"/>
  </
xsl:if>
</
xsl:otherwise>

Does this solve your problems?

Mar 5, 2009 at 6:27 AM
It seems to work very well, thank you. The font however is still bold. Can I change this?

The next thing I would like to do is change the bibliography to look something like:

[TAG] (tabulator) APA style

I was thinking of copy/pasting what I need from the APA style into the IEEEwithtags. I see that the bibliography is currently using tables, but I would like to change it to tabs.

Thanks for your help.
Coordinator
Mar 5, 2009 at 7:31 AM
It seems the forum is rather unstable lately so messages tend to get lost when posting them.

The bold issue must be something with the style settings in Word. The IEEEwithTags style does not add any bold tags to its output. Do you have the issue with a blank document?

It might be easier to put parts from IEEEwithTags into APA than doing it the other way around.

(The following will be a lot easier if you have an xml editor which allows you to find closing tags.)

1)Create a copy of APA.xsl
2)Give your copy a new orginal name that will show up inside Word by replacing the OfficeStyleKey (see FAQ).
3)Replace the way in-text citations are handled by looking for the following code: 

<xsl:when test="b:Citation">
 
A whole bunch of code
</
xsl:when>


Replace it with the same section from IEEEwithTags. Now, under the line

<xsl:when test="b:Citation">

Add the following line underneath it:

<xsl:variable name="InTextCitationAsLink" select="'true'" />

Now is a good time to test if your in-text citations work as planned.

4)Finally, add the tag and tab in front of every bibliography entry. Look for a piece of code looking like this:

<xsl:attribute name="class">
  <
xsl:value-of select="'MsoBibliography'"/>
</xsl:attribute>


And add the following code right underneath it:

<xsl:text>[</xsl:text>
<
a name="{./b:Tag}">
  <
xsl:value-of select="./b:Tag"/>
</
a>
<
xsl:text>]</xsl:text>
<xsl:text disable-output-escaping="yes"><![CDATA[&#x9;]]></xsl:text>


Now your bibliography should display what you want.

On a closing note, using tabs with variable length tags makes it a lot harder to have alignment for the second line of a bibliography entry. And you can always fake tabs by dragging the the table column separator to the width of a tab (the border is invisible but the drag option will appear when you move over it).
Mar 7, 2009 at 10:37 PM
Thank you for your help. I have been able to get most of it to work:

1) Regarding the bold styles
The problem seems to be with my template. When I disable the InTextCitationAsLink there is no problem. When it's enabled for some reason it links to a bold style that keeps reappearing when I update citations. The error doesn't appear in a blank document.

2)
You are absolutely right about the tab. I now have problems with alignment of the second a third line Do you have any suggestions on how to use tables? I have some problems with the wrapping of even small tags using the method from IEEEwithtags.
Mar 8, 2009 at 8:03 AM
Hi again,

I solved the part about the tabs, so I don't get hanging lines. I simply modified the bibliography style to indent lines.

Is it possible to sort the tags by alphabetical order instead of reforder?
Coordinator
Mar 8, 2009 at 10:33 AM

To sort by tag rathere than reference order, look for the following line in IEEEwithTags:

<xsl:sort select="b:RefOrder" data-type="text"/>

and change it into:

<xsl:sort select="b:Tag" data-type="text"/>

If you worked with APA.xsl, you will have to look for the following line (appears twice):

<xsl:sort select="b:SortingString" />

and change it into:

<xsl:sort select="b:Tag" data-type="text"/>

I looked into the bold issue. It looks like the references are formatted using the balloon text format. No idea as to why it picks that format. You could change that style to never display bold, or you could just create a new character style and apply that to every citation you enter. Once a character style is applied to a citation, it will remain after an update. (For an example with superscript, see the third post at http://www.codeplex.com/bibliography/Thread/View.aspx?ThreadId=31497)

Mar 8, 2009 at 12:04 PM
Thanks again, it worked great.

In my template the linked citations become formatted with the Heading 2 style, not the baloon - quite strange. For now I will solve it using no links.
Aug 3, 2009 at 12:20 PM

I am using the IEEE - Refernence Ordered (my version) bibliography style too and I have the same problem with the bold numbers in the in-text citations. My citations are Heading 1 not ballon for some reason which I cant change to unbold because it is used in the rest of my document. I have selected the whole citation and changed the style which it obeys untill I update the bibliography or save the document and re-open it then it reversts back to the wrong style. It also doesnt have this problem in a new document. Is there maybe a way to force a style from the .XSL file or to force Unbold?

Aug 4, 2009 at 10:03 AM

I think I found a way to take the bold out. It is cumbersome (and has it's flaws) but it is the only way I know how (thanks to http://www.gmayor.com/formatting_word_fields.htm with their field codes switch list):

togle field code of in-text citation to get: { CITATION Bro01 \l 1033}

Edit field codes and add \*Charformat to get { CITATION Bro01 \l 1033 \*Charformat}

click OK

it formats it according to the first letter in the {} which you can set by right clicking and it staus if you update the fields

 

 

Coordinator
Aug 4, 2009 at 11:08 AM

Good that you found a solution.

An alternative option might be to assign a character style to all in-text citations. This normally stays when they get reformatted as well. The easiest way to do so would be by using something similar to http://bibword.codeplex.com/Wiki/View.aspx?title=Styles_FAQ#Q9 .  Of course, instead of setting

s.Font.Superscript = True

you would set things like bold to false:

s.Font.Bold = False

As you can run the macro whenever you want (for example once after you finished adding all your in-text citation), this should be a bit less cumbersome.

Aug 4, 2009 at 1:17 PM

thanks it worked. Brilliant.

Oct 25, 2009 at 4:49 PM

Hey everybody,

I would like to use the IEEE_with_Tags Style for my Master Thesis. It worked so far so good.

They only thing i would like to know is how can I  add the last access time of a webpage or document from a website to the bibliography?

The last access time should be displayed after the link to the web ressource, for example http://bibword.codeplex.com/ (Last visit: dd.mm.yyyy)

Hope that you can help me.

Thanks for your efforts in advance!

Kind Regards,

Wolfgang

 

Coordinator
Oct 27, 2009 at 6:22 PM

It's a rather old style which doesn't use the templates most styles on this site are based upon. Therefore, manipulating it, is a bit more tedious than just replacing a single line of text.

I'm going to explain the changes for webpages (InternetSite) but the changes for documents from websites (DocumentFromInternetSite) should be exactly the same. All you need to do is replace "InternetSite" with "DocumentFromInternetSite".

All information for formatting an InternetSite is located between the following two lines:

<!-- Begin of templates for InternetSite. -->

<!-- End of templates for InternetSite. -->

Between those lines, there are two templates, the first one is to indicate the important fields. Those are the fields that show up by default when you enter a new source in Word. Each field has the following form:

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

If you want to add the fields with the access date as important fields, you have to paste in the following lines:

  <b:ImportantField>
    <xsl:text>b:YearAccessed</xsl:text>
  </b:ImportantField>
  <b:ImportantField>
    <xsl:text>b:MonthAccessed</xsl:text>
  </b:ImportantField>
  <b:ImportantField>
    <xsl:text>b:DayAccessed</xsl:text>
  </b:ImportantField>

The second template is the one used to format the entry in the bibliography. It's defined as follows:

  <xsl:template name="FormatInternetSiteReference">
    <xsl:param name="reference" />

    <!-- A whole bunch of code -->

  </xsl:template>

You want to add the formatting information regarding the date you accessed the source at the bottom of this routine. So that is after all the code, but just before the "</xsl:template>". For good looks, we are going to assume that you only display the date, if you have provided at least the year you accessed the source. Also, the day will only be displayed if you provided a month.

  <xsl:if test="string-length($reference/b:YearAccessed) > 0">
    <!-- Intro. -->
    <xsl:text> (Last: </xsl:text>
    
    <!-- Only display the day if the month is available. -->
    <xsl:if test="string-length($reference/b:DayAccessed) > 0 and string-length($reference/b:MonthAccessed) > 0">
      <xsl:value-of select="$reference/b:DayAccessed"/>
      <xsl:text>.</xsl:text>
    </xsl:if>
    
    <!-- Display the month if available. -->
    <xsl:if test="string-length($reference/b:MonthAccessed) > 0">
      <xsl:value-of select="$reference/b:MonthAccessed"/>
      <xsl:text>.</xsl:text>
    </xsl:if>
    
    <!-- Display year. -->
    <xsl:value-of select="$reference/b:YearAccessed"/>
    <!-- Finish. -->
    <xsl:text>)</xsl:text>
  </xsl:if>

Yves

 

Nov 1, 2009 at 4:41 PM

Thanks a lot, it worked perfect!

You wrote, that this style won't use the templates. Is there a version of this style available, which will use the templates?

Wolfgang

Coordinator
Nov 2, 2009 at 6:56 AM

No. There is no official IEEE style with tags, so I probably won't host one.

What you could do is start from the IEEE reference order style which does use the template and replace "%RefOrder%" by "%Tag%". If you want the tags to be sorted, then you would have to add a sortkey to each supported sources looking like "<sortkey>%Tag%</sortkey>". Check the manual, and the other IEEE alphabetical style to see where to place a sortkey element.

Dec 12, 2011 at 6:43 PM

This was helpful to show page numbers for in text citations.  It took some digging to apply this to the IEEE-Reforder bib style.  The section where I successfully inserted the if statement (Yves Mar 4 2009 at 3:35 PM) was inside this "a href"

<xsl:when test="$params/general/citation_as_link = 'yes'">
              <a href="#{/b:Citation/b:Source/b:Tag}">
                <xsl:value-of select="$citation" disable-output-escaping="yes"/>

</a>

and the following xsl:otherwise statement.