Cut last name or year?

Mar 3, 2009 at 9:03 AM
Edited Mar 3, 2009 at 9:06 AM

I want to reduce the number of characters of the last name to lets say 3 or 4. (e.g. "Lastname" will be "Last") How can I do that? I already tried a lot (e.g. substring) but I don't know where I can get direct access to the text and execute xslt in Bibword. In my own xslt its pretty simple:





xsl:value-of select="substring(b:Author/b:Author/b:NameList/b:Person/b:Last, 1, 4)"/>



or for the year:





xsl:value-of select="substring(b:Year, 3, 2)"/>







Another question: I changed ordering according lastname (works quite good). Nevertheless if I use the numbers they still are in the Ref order. Is there any chance to change this?



Mar 3, 2009 at 9:56 AM
BibWord is intended to get past the usage of xslt, so you can't use it directly from the data element.

In general, BibWord does not provide functionality for cutting parts of variables. There are a few exceptions though.

For Year and YearAccessed, you can display only the last two digits by using the 's' parameter which would turn '1998' into '98'. So the variables would look like:
  %Year:s%    and    %YearAccessed:s%

For Pages and CitationPages, you can abbreviate the last page by using the 'a' parameter which can turn '151-152' into 'p. 151-52' or 'p. 151-2'. So the variable would look like:
  %Pages:p. :p. :a2%   or    %Pages:p. :p. :a1%
For names, there is nothing you can do. If you want to do the cutting on every available last name, you could look into 'format-person-part-3' and adjust its structure like 'format-source-part-3' where every variable gets treated differently.

Numbered references and alphabetical ordering is not possible directly in Word. For an explaination as to why, see section 5.1 of the BibWord Guide. The section also describes the BibOrder variable which can be used as a solution to the issue. To use the BibOrder variable, you will need to apply the BibWord Extender tool. For examples of styles using numbered references and alphabetical ordering, see IEEE - Alphabetical Order*, ACM - Name Sequence*, and CSE - Name Sequence*.

Note that the BibWord Extender tool currently only runs on Windows. I plan on porting it to MacOS so it can be used with Word 2008 as well. However, as the tool requires .Net 3.5 and Mono does not support that yet (at least not officially), it might take me a while to find a solution.
Mar 3, 2009 at 12:16 PM
Edited Mar 3, 2009 at 12:22 PM
I will focus now on getting BibOrder working.

edit: oh cool I simply need to use "BibOrder" instead of the other variables. BibWord Extener also works great. puh... you did a quite good job (BibWord and extender), I needed about 1min for that ;)