A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How can I make a custom bibliography style?



 
 
Thread Tools Display Modes
  #21  
Old August 25th, 2008, 06:40 PM posted to microsoft.public.word.docmanagement
p0
external usenet poster
 
Posts: 258
Default How can I make a custom bibliography style?

Hi Adam,

This can be done by means of the \m switch (http://
office.microsoft.com/en-us/word/HA102157071033.aspx).

Place your mouse on a citation, right click and select "Edit
field...". You will be presented with a window in which you can add
the extra sources by means of there tags. Something like "CITATION
XYZ05 \l 1033" will be already filled in. All you have to do, is
change it into "CITATION XYZ05 \m ABC06 \m KLM07 \l 1033".

Yves


On 25 aug, 15:14, Adam wrote:
Hi,
All the information on the styles you published are really interesting, but
I haven't been able to find a solution to my problem. *I was wondering if it
is possible when you cite different sources at the same time to have all of
them included in a single bracket: instead of having (1)(5)(12) to have
(1,5,12)?
Thank you in advance,

Adam



"p0" wrote:
On 5 aug, 03:07, SaulG wrote:
Hi to all,
I've been reading all the info gathered here and it all seems pretty
interesting. I was also looking for a way to change (1) to this [1]; the
solutions that are here are really nice. I would like to know if the
following is possible:


When I insert thebibliographylist, the space between the [1] and the text
is too small; i would like to know if this space can be modified. I've tried
to do so with XLS releases here but the list is always managed as a table, so
the TAB Key won't do the work, and neither SPACE.


The format i'm looking for is this
[1] * * xyz
* * * * *abc
The space between the [1] and xyz should be the same as a TAB Key.


Thank you all in advance.
SaulG


Hi,


The easiest way, without having to dig into the XSLT, is to just
change the indentation of all the cells in a column to whatever you
want. For example, if you were to select the column with numbers
(first column), you then have to click the arrow at the bottom of the
paragraph ribbon on the home tab. In the window that pops up, you can
then set 'Right' under indentation to something like '0,2 cm'. That
will change the white space between the numbers and the text.


HTH,


Yves
--
http://www.codeplex.com/bibliography- Tekst uit oorspronkelijk bericht niet weergeven -




  #22  
Old August 27th, 2008, 02:53 PM posted to microsoft.public.word.docmanagement
Adam
external usenet poster
 
Posts: 545
Default How can I make a custom bibliography style?

Thank you so much, it will make my report clearer!

"p0" wrote:

Hi Adam,

This can be done by means of the \m switch (http://
office.microsoft.com/en-us/word/HA102157071033.aspx).

Place your mouse on a citation, right click and select "Edit
field...". You will be presented with a window in which you can add
the extra sources by means of there tags. Something like "CITATION
XYZ05 \l 1033" will be already filled in. All you have to do, is
change it into "CITATION XYZ05 \m ABC06 \m KLM07 \l 1033".

Yves


On 25 aug, 15:14, Adam wrote:
Hi,
All the information on the styles you published are really interesting, but
I haven't been able to find a solution to my problem. I was wondering if it
is possible when you cite different sources at the same time to have all of
them included in a single bracket: instead of having (1)(5)(12) to have
(1,5,12)?
Thank you in advance,

Adam



"p0" wrote:
On 5 aug, 03:07, SaulG wrote:
Hi to all,
I've been reading all the info gathered here and it all seems pretty
interesting. I was also looking for a way to change (1) to this [1]; the
solutions that are here are really nice. I would like to know if the
following is possible:


When I insert thebibliographylist, the space between the [1] and the text
is too small; i would like to know if this space can be modified. I've tried
to do so with XLS releases here but the list is always managed as a table, so
the TAB Key won't do the work, and neither SPACE.


The format i'm looking for is this
[1] xyz
abc
The space between the [1] and xyz should be the same as a TAB Key.


Thank you all in advance.
SaulG


Hi,


The easiest way, without having to dig into the XSLT, is to just
change the indentation of all the cells in a column to whatever you
want. For example, if you were to select the column with numbers
(first column), you then have to click the arrow at the bottom of the
paragraph ribbon on the home tab. In the window that pops up, you can
then set 'Right' under indentation to something like '0,2 cm'. That
will change the white space between the numbers and the text.


HTH,


Yves
--
http://www.codeplex.com/bibliography- Tekst uit oorspronkelijk bericht niet weergeven -





  #23  
Old August 27th, 2008, 07:49 PM posted to microsoft.public.word.docmanagement
dswtan
external usenet poster
 
Posts: 5
Default How can I make a custom bibliography style?

Yves -- this is great help, thank you. The () -- [] requirement is common in
my experience in technical academic research. I'm really surprised that
square brackets was not the default or a switch allowed this transformation,
but I expect Word ran with whatever was the official standard. It is not de
facto common practice though. I really hope your help is made more prominent
in due course, e.g. in the on-line help for Word, because it took quite a
while to find it in here!

"p0" wrote:

On 9 jul, 10:46, Marc Trumpi
wrote:
Hi Yves,

To expand a little on the former posts, I would like to use the IEEE style,
but instead of using standard numbering ( [1], [2]...) I would like to insert
the 'tag' between the brackets.
For instance:
[5] R. Hauffe, et al., "Methods for Passive Fiber Chip Coupling of
Integrated Optical Devices," IEEE Transactions on Advanced Packaging, vol..
24, no. 4, pp. 450-455, Nov. 2001.
would become
[Hau01] R. Hauffe, et al., "Methods for Passive Fiber Chip Coupling of
Integrated Optical Devices," IEEE Transactions on Advanced Packaging, vol..
24, no. 4, pp. 450-455, Nov. 2001.
And of course I would like the inline citations to be the same.

Any ideas on how to do this?


Hi Marc,

It comes down to replacing b:RefOrder with b:Tag in all but one place
in the stylesheet.

I posted a version at http://www.codeplex.com/bibliography...eleaseId=15183

Don't forget to read the remarks section at that page on how to change
the sorting order.

HTH

Yves

  #24  
Old September 4th, 2008, 04:06 AM posted to microsoft.public.word.docmanagement
Chrog
external usenet poster
 
Posts: 4
Default How can I make a custom bibliography style?

Hello, I have been reading this string of posts and I think that maybe
someone here might be able to help me. I need to alter the APA style to the
LSA style. They are pretty much the same except Word 2007 keeps truncating
some author's first names, and putting parentheses aroung the date.

I am pretty sure there is a limit on the string length for the author's name
that might be increased but I have no idea where to look for it. I have no
clue how to fix the parentheses issue.



"dswtan" wrote:

Yves -- this is great help, thank you. The () -- [] requirement is common in
my experience in technical academic research. I'm really surprised that
square brackets was not the default or a switch allowed this transformation,
but I expect Word ran with whatever was the official standard. It is not de
facto common practice though. I really hope your help is made more prominent
in due course, e.g. in the on-line help for Word, because it took quite a
while to find it in here!

"p0" wrote:

On 9 jul, 10:46, Marc Trumpi
wrote:
Hi Yves,

To expand a little on the former posts, I would like to use the IEEE style,
but instead of using standard numbering ( [1], [2]...) I would like to insert
the 'tag' between the brackets.
For instance:
[5] R. Hauffe, et al., "Methods for Passive Fiber Chip Coupling of
Integrated Optical Devices," IEEE Transactions on Advanced Packaging, vol..
24, no. 4, pp. 450-455, Nov. 2001.
would become
[Hau01] R. Hauffe, et al., "Methods for Passive Fiber Chip Coupling of
Integrated Optical Devices," IEEE Transactions on Advanced Packaging, vol..
24, no. 4, pp. 450-455, Nov. 2001.
And of course I would like the inline citations to be the same.

Any ideas on how to do this?


Hi Marc,

It comes down to replacing b:RefOrder with b:Tag in all but one place
in the stylesheet.

I posted a version at http://www.codeplex.com/bibliography...eleaseId=15183

Don't forget to read the remarks section at that page on how to change
the sorting order.

HTH

Yves

  #25  
Old September 4th, 2008, 08:15 AM posted to microsoft.public.word.docmanagement
p0
external usenet poster
 
Posts: 258
Default How can I make a custom bibliography style?

On 4 sep, 05:06, Chrog wrote:
Hello, I have been reading this string of posts and I think that maybe
someone here might be able to help me. *I need to alter the APA style to the
LSA style. *They are pretty much the same except Word 2007 keeps truncating
some author's first names, and putting parentheses aroung the date.

I am pretty sure there is a limit on the string length for the author's name
that might be increased but I have no idea where to look for it. *I have no
clue how to fix the parentheses issue. *


Before toying around with the APA.xsl I suggest you make a copy of it
and call it LSA.xsl. Put the copy in the same directory as APA.xsl.
Open up your new created LSA.xsl and look for a piece of xml looking
like this:
xsl:when test="b:OfficeStyleKey"
xsl:textAPA/xsl:text
/xsl:when

Change it into:
xsl:when test="b:StyleName"
xsl:textLSA/xsl:text
/xsl:when

Save the entire thing. Now when you start up Word, there will be an
LSA entry in the style list to pick from. Starting from here, you
should only play around with LSA.xsl and NOT with APA.xsl.

The parentheses around the year are put there during the declaration
of the "enclosedYearDot" variable by the following code (located
around line 5039):

xsl:variable name="enclosedYearDot"
xsl:if test="string-length($year)0"
xsl:call-template name="templ_prop_APA_GeneralOpen"/
xsl:value-of select="$year"/
xsl:call-template name="templ_prop_APA_GeneralClose"/
xsl:call-template name="templ_prop_Dot"/
/xsl:if
/xsl:variable

By removing the calls to templ_prop_APA_GeneralOpen and
templ_prop_APA_GeneralClose you will remove the brackets. So you would
get:

xsl:variable name="enclosedYearDot"
xsl:if test="string-length($year)0"
!--xsl:call-template name="templ_prop_APA_GeneralOpen"/--
xsl:value-of select="$year"/
!--xsl:call-template name="templ_prop_APA_GeneralClose"/--
xsl:call-template name="templ_prop_Dot"/
/xsl:if
/xsl:variable

Note that right under the declaration of enclosedYearDot,
enclosedDateDot and enclosedDateEmptyDot are declared. They put
'entire' dates between brackets. So you also might want to change
those if you don't want brackets around any date.


The name of one of the main contributors to a work is formatted as
follows:

xsl:template name="formatMainAuthor"
xsl:call-template name="formatNameCore"
xsl:with-param name="FML"
xsl:call-template name="templ_prop_APA_MainAuthors_FML"/
/xsl:with-param
xsl:with-param name="FM"
xsl:call-template name="templ_prop_APA_MainAuthors_FM"/
/xsl:with-param
xsl:with-param name="ML"
xsl:call-template name="templ_prop_APA_MainAuthors_ML"/
/xsl:with-param
xsl:with-param name="FL"
xsl:call-template name="templ_prop_APA_MainAuthors_FL"/
/xsl:with-param
xsl:with-param name="upperLast"no/xsl:with-param
xsl:with-param name="withDot"yes/xsl:with-param

/xsl:call-template
/xsl:template

with the following definitions (which you can't change directly):
templ_prop_APA_MainAuthors_FML = %L, %f %m
templ_prop_APA_MainAuthors_FM = %f %m
templ_prop_APA_MainAuthors_ML = %L, %m
templ_prop_APA_MainAuthors_FL = %L, %f
where lower case characters stands for initials and upper case
characters for the full name part. So if you don't want any of the
main authors names abbreviated, you could change the routine into:

xsl:template name="formatMainAuthor"
xsl:call-template name="formatNameCore"
xsl:with-param name="FML"
xsl:value-of select="'%L, %F %M'"/
/xsl:with-param
xsl:with-param name="FM"
xsl:value-of select="'%F %M'"/
/xsl:with-param
xsl:with-param name="ML"
xsl:value-of select="'%L, %M'"/
/xsl:with-param
xsl:with-param name="FL"
xsl:value-of select="'%L, %F'"/
/xsl:with-param
xsl:with-param name="upperLast"no/xsl:with-param
xsl:with-param name="withDot"yes/xsl:with-param

/xsl:call-template
/xsl:template

Once again, note that there is also a formatting routine for secondary
authors right beneath it (formatSecondaryName) which you might want to
change as well to your preferred format.

Yves
  #26  
Old September 4th, 2008, 06:49 PM posted to microsoft.public.word.docmanagement
Chrog
external usenet poster
 
Posts: 4
Default How can I make a custom bibliography style?

Thanks this did the trick; it is working great!!!! One other quesiton that
you might be able to help with. When there are two authors for some source
the second is always listed as LAST, FIRST but I want it the other way around.

For example:
Smith, John and Jane Doe. 2020. etc.

not

Smith, John and Doe, Jane. 2020. etc.

I tried to make some adjustments in the (formatSecondaryName) part of the
code but nothing changed. Any advice?


"p0" wrote:

On 4 sep, 05:06, Chrog wrote:
Hello, I have been reading this string of posts and I think that maybe
someone here might be able to help me. I need to alter the APA style to the
LSA style. They are pretty much the same except Word 2007 keeps truncating
some author's first names, and putting parentheses aroung the date.

I am pretty sure there is a limit on the string length for the author's name
that might be increased but I have no idea where to look for it. I have no
clue how to fix the parentheses issue.


Before toying around with the APA.xsl I suggest you make a copy of it
and call it LSA.xsl. Put the copy in the same directory as APA.xsl.
Open up your new created LSA.xsl and look for a piece of xml looking
like this:
xsl:when test="b:OfficeStyleKey"
xsl:textAPA/xsl:text
/xsl:when

Change it into:
xsl:when test="b:StyleName"
xsl:textLSA/xsl:text
/xsl:when

Save the entire thing. Now when you start up Word, there will be an
LSA entry in the style list to pick from. Starting from here, you
should only play around with LSA.xsl and NOT with APA.xsl.

The parentheses around the year are put there during the declaration
of the "enclosedYearDot" variable by the following code (located
around line 5039):

xsl:variable name="enclosedYearDot"
xsl:if test="string-length($year)0"
xsl:call-template name="templ_prop_APA_GeneralOpen"/
xsl:value-of select="$year"/
xsl:call-template name="templ_prop_APA_GeneralClose"/
xsl:call-template name="templ_prop_Dot"/
/xsl:if
/xsl:variable

By removing the calls to templ_prop_APA_GeneralOpen and
templ_prop_APA_GeneralClose you will remove the brackets. So you would
get:

xsl:variable name="enclosedYearDot"
xsl:if test="string-length($year)0"
!--xsl:call-template name="templ_prop_APA_GeneralOpen"/--
xsl:value-of select="$year"/
!--xsl:call-template name="templ_prop_APA_GeneralClose"/--
xsl:call-template name="templ_prop_Dot"/
/xsl:if
/xsl:variable

Note that right under the declaration of enclosedYearDot,
enclosedDateDot and enclosedDateEmptyDot are declared. They put
'entire' dates between brackets. So you also might want to change
those if you don't want brackets around any date.


The name of one of the main contributors to a work is formatted as
follows:

xsl:template name="formatMainAuthor"
xsl:call-template name="formatNameCore"
xsl:with-param name="FML"
xsl:call-template name="templ_prop_APA_MainAuthors_FML"/
/xsl:with-param
xsl:with-param name="FM"
xsl:call-template name="templ_prop_APA_MainAuthors_FM"/
/xsl:with-param
xsl:with-param name="ML"
xsl:call-template name="templ_prop_APA_MainAuthors_ML"/
/xsl:with-param
xsl:with-param name="FL"
xsl:call-template name="templ_prop_APA_MainAuthors_FL"/
/xsl:with-param
xsl:with-param name="upperLast"no/xsl:with-param
xsl:with-param name="withDot"yes/xsl:with-param

/xsl:call-template
/xsl:template

with the following definitions (which you can't change directly):
templ_prop_APA_MainAuthors_FML = %L, %f %m
templ_prop_APA_MainAuthors_FM = %f %m
templ_prop_APA_MainAuthors_ML = %L, %m
templ_prop_APA_MainAuthors_FL = %L, %f
where lower case characters stands for initials and upper case
characters for the full name part. So if you don't want any of the
main authors names abbreviated, you could change the routine into:

xsl:template name="formatMainAuthor"
xsl:call-template name="formatNameCore"
xsl:with-param name="FML"
xsl:value-of select="'%L, %F %M'"/
/xsl:with-param
xsl:with-param name="FM"
xsl:value-of select="'%F %M'"/
/xsl:with-param
xsl:with-param name="ML"
xsl:value-of select="'%L, %M'"/
/xsl:with-param
xsl:with-param name="FL"
xsl:value-of select="'%L, %F'"/
/xsl:with-param
xsl:with-param name="upperLast"no/xsl:with-param
xsl:with-param name="withDot"yes/xsl:with-param

/xsl:call-template
/xsl:template

Once again, note that there is also a formatting routine for secondary
authors right beneath it (formatSecondaryName) which you might want to
change as well to your preferred format.

Yves

  #27  
Old September 5th, 2008, 07:25 AM posted to microsoft.public.word.docmanagement
p0
external usenet poster
 
Posts: 258
Default How can I make a custom bibliography style?

formatSecondaryName is for a possible second group of contributors to
a work (for example in book sections) not for the second (or further)
person of the main contributors.

I suggest adding a template "formatMainAuthorAfterFirst" to the
stylesheet. As the name suggests, it describes how to format the main
author after the first person. Since you want first name followed by
last name, the template would look something like this:

xsl:template name="formatMainAuthorAfterFirst"
xsl:call-template name="formatNameCore"
xsl:with-param name="FML"
xsl:value-of select="'%F %M %L'"/
/xsl:with-param
xsl:with-param name="FM"
xsl:value-of select="'%F %M'"/
/xsl:with-param
xsl:with-param name="ML"
xsl:value-of select="'%M %L'"/
/xsl:with-param
xsl:with-param name="FL"
xsl:value-of select="'%F %L'"/
/xsl:with-param
xsl:with-param name="upperLast"no/xsl:with-param
xsl:with-param name="withDot"yes/xsl:with-param

/xsl:call-template
/xsl:template

Currently, a set of main authors is formatted using the following
code:

xsl:template name="formatPersonsAuthor"
xsl:if test="string-length(b:Corporate)=0"
xsl:for-each select="b:NameList/b:Person"
xsl:if test="position() = 1"
xsl:call-template name="formatMainAuthor"/
/xsl:if
xsl:if test="6 = position() and position() != 1"
xsl:call-template name="formatMainAuthor"/
/xsl:if
xsl:call-template name="formatPersonSeperatorMain"/
/xsl:for-each
/xsl:if

xsl:if test="string-length(b:Corporate)0"
xsl:value-of select="b:Corporate"/
/xsl:if
/xsl:template

Here you can see that Microsoft already thought of people who want
their second person displayed differently from their first. The second
'if' statement (xsl:if test="6 = position() and position() != 1")
indicates how the persons 2 to 6 should be handled. In the above code,
they should be handled just like the first person. So here you can
call your newly defined template instead of the old one. Hence you
would change the code from:

xsl:if test="6 = position() and position() != 1"
xsl:call-template name="formatMainAuthor"/
/xsl:if

into:

xsl:if test="6 = position() and position() != 1"
xsl:call-template name="formatMainAuthorAfterFirst"/
/xsl:if

Regards,

Yves

On 4 sep, 19:49, chrog wrote:
Thanks this did the trick; it is working great!!!! *One other quesiton that
you might be able to help with. *When there are two authors for some source
the second is always listed as LAST, FIRST but I want it the other way around.

For example:
Smith, John and Jane Doe. 2020. *etc. *

not

Smith, John and Doe, Jane. 2020. etc.

I tried to make some adjustments in the (formatSecondaryName) part of the
code but nothing changed. *Any advice?



"p0" wrote:
On 4 sep, 05:06, Chrog wrote:
Hello, I have been reading this string of posts and I think that maybe
someone here might be able to help me. *I need to alter the APA style to the
LSA style. *They are pretty much the same except Word 2007 keeps truncating
some author's first names, and putting parentheses aroung the date.


I am pretty sure there is a limit on the string length for the author's name
that might be increased but I have no idea where to look for it. *I have no
clue how to fix the parentheses issue. *


Before toying around with the APA.xsl I suggest you make a copy of it
and call it LSA.xsl. Put the copy in the same directory as APA.xsl.
Open up your new created LSA.xsl and look for a piece of xml looking
like this:
* xsl:when test="b:OfficeStyleKey"
* * xsl:textAPA/xsl:text
* /xsl:when


Change it into:
* xsl:when test="b:StyleName"
* * xsl:textLSA/xsl:text
* /xsl:when


Save the entire thing. Now when you start up Word, there will be an
LSA entry in the style list to pick from. Starting from here, you
should only play around with LSA.xsl and NOT with APA.xsl.


The parentheses around the year are put there during the declaration
of the "enclosedYearDot" variable by the following code (located
around line 5039):


* xsl:variable name="enclosedYearDot"
* * xsl:if test="string-length($year)0"
* * * xsl:call-template name="templ_prop_APA_GeneralOpen"/
* * * xsl:value-of select="$year"/
* * * xsl:call-template name="templ_prop_APA_GeneralClose"/
* * * xsl:call-template name="templ_prop_Dot"/
* * /xsl:if
* /xsl:variable


By removing the calls to templ_prop_APA_GeneralOpen and
templ_prop_APA_GeneralClose you will remove the brackets. So you would
get:


* xsl:variable name="enclosedYearDot"
* * xsl:if test="string-length($year)0"
* * * !--xsl:call-template name="templ_prop_APA_GeneralOpen"/--
* * * xsl:value-of select="$year"/
* * * !--xsl:call-template name="templ_prop_APA_GeneralClose"/--
* * * xsl:call-template name="templ_prop_Dot"/
* * /xsl:if
* /xsl:variable


Note that right under the declaration of enclosedYearDot,
enclosedDateDot and enclosedDateEmptyDot are declared. They put
'entire' dates between brackets. So you also might want to change
those if you don't want brackets around any date.


The name of one of the main contributors to a work is formatted as
follows:


* xsl:template name="formatMainAuthor"
* * xsl:call-template name="formatNameCore"
* * * xsl:with-param name="FML"
* * * * xsl:call-template name="templ_prop_APA_MainAuthors_FML"/
* * * /xsl:with-param
* * * xsl:with-param name="FM"
* * * * xsl:call-template name="templ_prop_APA_MainAuthors_FM"/
* * * /xsl:with-param
* * * xsl:with-param name="ML"
* * * * xsl:call-template name="templ_prop_APA_MainAuthors_ML"/
* * * /xsl:with-param
* * * xsl:with-param name="FL"
* * * * xsl:call-template name="templ_prop_APA_MainAuthors_FL"/
* * * /xsl:with-param
* * * xsl:with-param name="upperLast"no/xsl:with-param
* * * xsl:with-param name="withDot"yes/xsl:with-param


* * /xsl:call-template
* /xsl:template


with the following definitions (which you can't change directly):
* * templ_prop_APA_MainAuthors_FML = %L, %f %m
* * templ_prop_APA_MainAuthors_FM = %f %m
* * templ_prop_APA_MainAuthors_ML = %L, %m
* * templ_prop_APA_MainAuthors_FL = %L, %f
where lower case characters stands for initials and upper case
characters for the full name part. So if you don't want any of the
main authors names abbreviated, you could change the routine into:


* xsl:template name="formatMainAuthor"
* * xsl:call-template name="formatNameCore"
* * * xsl:with-param name="FML"
* * * * xsl:value-of select="'%L, %F %M'"/
* * * /xsl:with-param
* * * xsl:with-param name="FM"
* * * * xsl:value-of select="'%F %M'"/
* * * /xsl:with-param
* * * xsl:with-param name="ML"
* * * * xsl:value-of select="'%L, %M'"/
* * * /xsl:with-param
* * * xsl:with-param name="FL"
* * * * xsl:value-of select="'%L, %F'"/
* * * /xsl:with-param
* * * xsl:with-param name="upperLast"no/xsl:with-param
* * * xsl:with-param name="withDot"yes/xsl:with-param


* * /xsl:call-template
* /xsl:template


Once again, note that there is also a formatting routine for secondary
authors right beneath it (formatSecondaryName) which you might want to
change as well to your preferred format.


Yves

  #28  
Old September 5th, 2008, 04:19 PM posted to microsoft.public.word.docmanagement
Chrog
external usenet poster
 
Posts: 4
Default How can I make a custom bibliography style?

Thank you very much for your help! It works perfectly.

"p0" wrote:

formatSecondaryName is for a possible second group of contributors to
a work (for example in book sections) not for the second (or further)
person of the main contributors.

I suggest adding a template "formatMainAuthorAfterFirst" to the
stylesheet. As the name suggests, it describes how to format the main
author after the first person. Since you want first name followed by
last name, the template would look something like this:

xsl:template name="formatMainAuthorAfterFirst"
xsl:call-template name="formatNameCore"
xsl:with-param name="FML"
xsl:value-of select="'%F %M %L'"/
/xsl:with-param
xsl:with-param name="FM"
xsl:value-of select="'%F %M'"/
/xsl:with-param
xsl:with-param name="ML"
xsl:value-of select="'%M %L'"/
/xsl:with-param
xsl:with-param name="FL"
xsl:value-of select="'%F %L'"/
/xsl:with-param
xsl:with-param name="upperLast"no/xsl:with-param
xsl:with-param name="withDot"yes/xsl:with-param

/xsl:call-template
/xsl:template

Currently, a set of main authors is formatted using the following
code:

xsl:template name="formatPersonsAuthor"
xsl:if test="string-length(b:Corporate)=0"
xsl:for-each select="b:NameList/b:Person"
xsl:if test="position() = 1"
xsl:call-template name="formatMainAuthor"/
/xsl:if
xsl:if test="6 = position() and position() != 1"
xsl:call-template name="formatMainAuthor"/
/xsl:if
xsl:call-template name="formatPersonSeperatorMain"/
/xsl:for-each
/xsl:if

xsl:if test="string-length(b:Corporate)0"
xsl:value-of select="b:Corporate"/
/xsl:if
/xsl:template

Here you can see that Microsoft already thought of people who want
their second person displayed differently from their first. The second
'if' statement (xsl:if test="6 = position() and position() != 1")
indicates how the persons 2 to 6 should be handled. In the above code,
they should be handled just like the first person. So here you can
call your newly defined template instead of the old one. Hence you
would change the code from:

xsl:if test="6 = position() and position() != 1"
xsl:call-template name="formatMainAuthor"/
/xsl:if

into:

xsl:if test="6 = position() and position() != 1"
xsl:call-template name="formatMainAuthorAfterFirst"/
/xsl:if

Regards,

Yves

On 4 sep, 19:49, chrog wrote:
Thanks this did the trick; it is working great!!!! One other quesiton that
you might be able to help with. When there are two authors for some source
the second is always listed as LAST, FIRST but I want it the other way around.

For example:
Smith, John and Jane Doe. 2020. etc.

not

Smith, John and Doe, Jane. 2020. etc.

I tried to make some adjustments in the (formatSecondaryName) part of the
code but nothing changed. Any advice?



"p0" wrote:
On 4 sep, 05:06, Chrog wrote:
Hello, I have been reading this string of posts and I think that maybe
someone here might be able to help me. I need to alter the APA style to the
LSA style. They are pretty much the same except Word 2007 keeps truncating
some author's first names, and putting parentheses aroung the date.


I am pretty sure there is a limit on the string length for the author's name
that might be increased but I have no idea where to look for it. I have no
clue how to fix the parentheses issue.


Before toying around with the APA.xsl I suggest you make a copy of it
and call it LSA.xsl. Put the copy in the same directory as APA.xsl.
Open up your new created LSA.xsl and look for a piece of xml looking
like this:
xsl:when test="b:OfficeStyleKey"
xsl:textAPA/xsl:text
/xsl:when


Change it into:
xsl:when test="b:StyleName"
xsl:textLSA/xsl:text
/xsl:when


Save the entire thing. Now when you start up Word, there will be an
LSA entry in the style list to pick from. Starting from here, you
should only play around with LSA.xsl and NOT with APA.xsl.


The parentheses around the year are put there during the declaration
of the "enclosedYearDot" variable by the following code (located
around line 5039):


xsl:variable name="enclosedYearDot"
xsl:if test="string-length($year)0"
xsl:call-template name="templ_prop_APA_GeneralOpen"/
xsl:value-of select="$year"/
xsl:call-template name="templ_prop_APA_GeneralClose"/
xsl:call-template name="templ_prop_Dot"/
/xsl:if
/xsl:variable


By removing the calls to templ_prop_APA_GeneralOpen and
templ_prop_APA_GeneralClose you will remove the brackets. So you would
get:


xsl:variable name="enclosedYearDot"
xsl:if test="string-length($year)0"
!--xsl:call-template name="templ_prop_APA_GeneralOpen"/--
xsl:value-of select="$year"/
!--xsl:call-template name="templ_prop_APA_GeneralClose"/--
xsl:call-template name="templ_prop_Dot"/
/xsl:if
/xsl:variable


Note that right under the declaration of enclosedYearDot,
enclosedDateDot and enclosedDateEmptyDot are declared. They put
'entire' dates between brackets. So you also might want to change
those if you don't want brackets around any date.


The name of one of the main contributors to a work is formatted as
follows:


xsl:template name="formatMainAuthor"
xsl:call-template name="formatNameCore"
xsl:with-param name="FML"
xsl:call-template name="templ_prop_APA_MainAuthors_FML"/
/xsl:with-param
xsl:with-param name="FM"
xsl:call-template name="templ_prop_APA_MainAuthors_FM"/
/xsl:with-param
xsl:with-param name="ML"
xsl:call-template name="templ_prop_APA_MainAuthors_ML"/
/xsl:with-param
xsl:with-param name="FL"
xsl:call-template name="templ_prop_APA_MainAuthors_FL"/
/xsl:with-param
xsl:with-param name="upperLast"no/xsl:with-param
xsl:with-param name="withDot"yes/xsl:with-param


/xsl:call-template
/xsl:template


with the following definitions (which you can't change directly):
templ_prop_APA_MainAuthors_FML = %L, %f %m
templ_prop_APA_MainAuthors_FM = %f %m
templ_prop_APA_MainAuthors_ML = %L, %m
templ_prop_APA_MainAuthors_FL = %L, %f
where lower case characters stands for initials and upper case
characters for the full name part. So if you don't want any of the
main authors names abbreviated, you could change the routine into:


xsl:template name="formatMainAuthor"
xsl:call-template name="formatNameCore"
xsl:with-param name="FML"
xsl:value-of select="'%L, %F %M'"/
/xsl:with-param
xsl:with-param name="FM"
xsl:value-of select="'%F %M'"/
/xsl:with-param
xsl:with-param name="ML"
xsl:value-of select="'%L, %M'"/
/xsl:with-param
xsl:with-param name="FL"
xsl:value-of select="'%L, %F'"/
/xsl:with-param
xsl:with-param name="upperLast"no/xsl:with-param
xsl:with-param name="withDot"yes/xsl:with-param


/xsl:call-template
/xsl:template


Once again, note that there is also a formatting routine for secondary
authors right beneath it (formatSecondaryName) which you might want to
change as well to your preferred format.


Yves


  #29  
Old September 9th, 2008, 09:46 PM posted to microsoft.public.word.docmanagement
s
external usenet poster
 
Posts: 82
Default How can I make a custom bibliography style?

Hi Yves,
Thanks for your awesome code! I was just wondering...when I hit the 'insert
citation' button, all my references in the main text are reference [1] even
though they are sorted and numbered correctly in the actual bibliography at
the end. Any help would be appreciated. THANKS!
S

"Nandha" wrote:

A million thanks to you Yves.
It was released 2 days ago, i didn't relize it. It is actually perfect, i
was mistaken to understand your words at that time. I realized that what i
want is just like this, the number to apear in order and the bibliography
apear as its appearance in the document.

Once again thank you sooo much

PS : i tried to understand the XSL file, bleeeh its not easy isn't it, too
complex

"p0" wrote:

On 19 jun, 09:56, Nandha wrote:
Dear Yves, i think sorting is better than nothing, and my option would go to
the first one

[1] xyz
abc (with abc being under xyz)

so this means that i cannot put numbers in thecitation( i have to do it
manually )?, because in the chicago style, it will put (names, years) instead
of (index number) basically forcitationi would like to use the numbered
ISO, but for thebibliographyi would like to use the chicago style with
number, but any of that improvement is fine by me. Because i already got the
answer, no matter what we will have to edit it manually in the end.

Thank you Yves

PS : I gave up writing my thesis using LATEX because of time limit (don't
have much time to make a template), so i will use WYSIWYG like word instead,
but i am beginning to like word cause you can work with script using visual
studio, also.



Dear Nandha,

If you check the numbered ISO style (ISO 690 - Numerical Reference)
you will see that the entries in the bibliography at the bottom are
not sorted by name but rather by their position as in-text citation.
This is the only way you can use numbers as references in Word 2007.

http://www.codeplex.com/bibliography...eleaseId=14597
will do partially what you want. By removing the sorting rule (as
explained on the release notes) you will have your bibliography in
order. So if you then convert both your bibliography and your in-text
citations to static text, you will just have to do a find, replace
operation to change every [x] into an [y].

LaTeX also has WYSIWYG-editors, for example LEd (http://
www.latexeditor.org/). It is just that some projects stubbornly refuse
to build them in reasoning that you do not need them to verify the
layout.

BR,

Yves

  #30  
Old September 10th, 2008, 03:06 PM posted to microsoft.public.word.docmanagement
p0
external usenet poster
 
Posts: 258
Default How can I make a custom bibliography style?

Hi S,

By the sound of it, I'm guessing the in-text citation fields are not
updated. Once you finished your text, go to the bibliography style
selection dropdown box and select the style you want again. That way,
all CITATION and BIBLIOGRAPHY fields in your text will be updated.

Yves

On 9 sep, 22:46, S wrote:
Hi Yves,
Thanks for your awesome code! I was just wondering...when I hit the 'insertcitation' button, all my references in the main text are reference [1] even
though they are sorted and numbered correctly in the actualbibliographyat
the end. Any help would be appreciated. THANKS!
S



"Nandha" wrote:
A million thanks to you Yves.
It was released 2 days ago, i didn't relize it. It is actually perfect, i
was mistaken to understand your words at that time. I realized that what i
want is just like this, the number to apear in order and thebibliography
apear as its appearance in the document.


Once again thank you sooo much


PS : i tried to understand the XSL file, bleeeh its not easy isn't it, too
complex


"p0" wrote:


On 19 jun, 09:56, Nandha wrote:
Dear Yves, i think sorting is better than nothing, and my option would go to
the first one


[1] xyz
* * *abc (with abc being under xyz)


so this means that i cannot put numbers in thecitation( i have to do it
manually )?, because in the chicago style, it will put (names, years) instead
of (index number) basically forcitationi would like to use the numbered
ISO, but for thebibliographyi would like to use the chicago style with
number, but any of that improvement is fine by me. Because i already got the
answer, no matter what we will have to edit it manually in the end.


Thank you Yves


PS : I gave up writing my thesis using LATEX because of time limit (don't
have much time to make a template), so i will use WYSIWYG like word instead,
but i am beginning to like word cause you can work with script using visual
studio, also.


Dear Nandha,


If you check the numbered ISO style (ISO 690 - Numerical Reference)
you will see that the entries in thebibliographyat the bottom are
not sorted by name but rather by their position as in-textcitation.
This is the only way you can use numbers as references in Word 2007.


http://www.codeplex.com/bibliography...eases.aspx?Rel....
will do partially what you want. By removing the sorting rule (as
explained on the release notes) you will have yourbibliographyin
order. So if you then convert both yourbibliographyand your in-text
citations to static text, you will just have to do a find, replace
operation to change every [x] into an [y].


LaTeX also has WYSIWYG-editors, for example LEd (http://
www.latexeditor.org/). It is just that some projects stubbornly refuse
to build them in reasoning that you do not need them to verify the
layout.


BR,


Yves



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:32 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.