How can I make a custom bibliography style?

P

p0

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


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

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.

Yves
 
A

Adam

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

p0 said:
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


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

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.

Yves
 
D

dswtan

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 said:
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/Release/ProjectReleases.aspx?ReleaseId=15183

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

HTH

Yves
 
C

Chrog

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 said:
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 said:
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/Release/ProjectReleases.aspx?ReleaseId=15183

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

HTH

Yves
 
P

p0

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:text>APA</xsl:text>
</xsl:when>

Change it into:
<xsl:when test="b:StyleName">
<xsl:text>LSA</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
 
C

chrog

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

p0

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
 
S

S

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 said:
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 said:
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/Release/ProjectReleases.aspx?ReleaseId=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
 
P

p0

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

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 said:
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
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 wordinstead,
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/Release/ProjectReleases.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
 
C

chrog

I continue to have more questions on organizing a new biliographic style in
Word. These posts have answered every question so far, but I am not sure if
it good etiquette to keep asking more questions here. (If it isn't I am
sorry).

1) I need to change the title of the automatic bibliography from
Bibliography to References.

2) I need to get rid of all the italics on the Titles and volume numbers.
(actually everywhere)

3) Journal volumes should never be place inside parentheses

4) The informaiton about a book chapter needs to be reversed. That is in
stead of

Smith, John. 2008. Good Bibliographies. In Jane Doe (Ed.) Academic
Scholarship. etc.

I need

Smith, John. 2008. Good Bibliographies. Academic Scholarship, ed. by Jane
Doe.etc.


Thanks for any responses and help.
 
P

p0

I continue to have more questions on organizing a new biliographic style in
Word.  These posts have answered every question so far, but I am not sure if
it good etiquette to keep asking more questions here.  (If it isn't I am
sorry).

Public forums are a better place to get your questions answered than
private communication. Besides, others get to comment on or extend the
solutions you got or might even benefit from them. So this is a good
place.
1) I need to change the title of the automatic bibliography from Bibliography to References.  

You can't. It is a built-in gallery. But that's not a problem, beneath
the built-in galeries ('Bibliography' and 'Works Cited') there is a
menu-item called 'Insert Bibliography'. This will insert a
bibliography without any title. Then above your bibliography, you can
put 'References' or whatever you want.
2)  I need to get rid of all the italics on the Titles and volume numbers.
(actually everywhere)

All italic information is set by the template called
ApplyItalicTitleNS. The function has two outcomes depending on a fixed
variable indicating if it should use italics or not. If it is not
allowed to use italics, it still formats title by adding opening and
closing stuff like quotation marks. If you are certain that you don't
want anything italic in your stylesheet and you don't want the
alternative formatting, you can just erase the functionality of that
template by replacing it with:

<xsl:template name="ApplyItalicTitleNS">
<xsl:param name="data" />

<xsl:copy-of select="msxsl:node-set($data)" />

</xsl:template>

If you do want the alternative formatting, you might try changing:

<xsl:variable name="prop_NoItalics">
<xsl:call-template name="templ_prop_NoItalics"/>
</xsl:variable>

into:

<xsl:variable name="prop_NoItalics">
<xsl:value-of select="'no'"/>
</xsl:variable>

This might give a strange effect on volumes though. If that is still
not what you want, you will have to go over every call to the
ApplyItalicTitleNS template and decide if you should make the call or
not. A lot more editing work, but still doable.
3) Journal volumes should never be place inside parentheses

They never are for journals. If you are still working from the APA
style, volume numbers of journals should be in italic (or just plain
after your previous question), not in brackets. Are you talking about
issue numbers for journals (and periodicals)? Or are you talking about
book sections where the volume number is between brackets together
with a lot of other information? And in case of the latter, does that
information has to remain inside the brackets or not?
4) The informaiton about a book chapter needs to be reversed.  That is in
stead of

Smith, John. 2008.  Good Bibliographies. In Jane Doe (Ed.) Academic
Scholarship.  etc.

I need

Smith, John. 2008. Good Bibliographies.  Academic Scholarship, ed. by Jane
Doe.etc.

Could you elaborate on the etc? Currently (apart from some punctuation
differences) it's actually:

Smith, John. 2008. Good Bibliographies. In Jane Doe (Ed.) Academic
Scholarship (Translator, edition, volume, pages). City, State,
Country, Publisher

Do you want the translator, edition, volume, pages information still
with the title (logically), or do you want it somewhere else as well?
So it could be

Smith, John. 2008. Good Bibliographies. Academic Scholarship, ed. by
Jane Doe. (Translator, edition, volume, pages). City, State, Country,
Publisher

but also

Smith, John. 2008. Good Bibliographies. Academic Scholarship
(Translator, edition, volume, pages), ed. by Jane Doe. City, State,
Country, Publisher

The latter being a lot less complex to achieve though they both can be
created. It might be easier if you could point me to an online manual
containing a description of the style you try to achieve.
Thanks for any responses and help.

On a side note, if you start making fundamental changes, you should
consider writing a style from scratch rather than trying to patch up
existing material.

Yves
 
N

Nat

Hi,

I have a problem with ISO 690 in Word 2007. It references 'JournalArticle'
and 'ConferenceProceedings' with Title, Year and not with Author, Year as is
the case with Boks, all other .

So instead of (Rogers, 2005) it displays (Towards Movement Friendly
Computing in an Office Environment, 2005).

Does anyone know how to change the XSL code.

Thanks
Natasa
 
G

grammatim

The bibliography tool is sadly broken. Despite what "p0" = Yves will
tell you, it was released before it was ready to be used, and there is
little hope of fixing it if you are not a master of XML programming.
And it has been stated here that the engineers who worked on it are no
longer at Microsoft, so it's not likely to be fixed.
 
P

p0

Hi,

I have a problem with ISO 690 in Word 2007. It references 'JournalArticle'  
and 'ConferenceProceedings' with Title, Year and not with Author, Year asis
the case with Boks, all other .  

So instead of (Rogers, 2005) it displays (Towards Movement Friendly
Computing in an Office Environment, 2005).

Does anyone know how to change the XSL code.

Thanks
Natasa  

Hello Natasa,

I suggest you make a copy of "ISO690.xsl" and name it "ISO690Alt.xsl"
or something before starting to mess around with it. In the new file,
look for:

<xsl:when test="b:OfficeStyleKey">
<xsl:text>ISO690FED</xsl:text>
</xsl:when>

and replace it by:

<xsl:when test="b:StyleName">
<xsl:text>ISO 690 - First Name Alternative</xsl:text>
</xsl:when>

If you save this style, and start Word 2007, a new style called "ISO
690 - First Name Alternative" will now be available.

First, I'll show you how to change the citation. Around line 3657, you
have a piece code looking like this:

<xsl:when test="(msxsl:node-set($ListPopulatedWithMain)/b:Citation/
b:Source/b:SourceType = 'JournalArticle' or
msxsl:node-set($ListPopulatedWithMain)/b:Citation/b:Source/
b:SourceType = 'ConferenceProceedings') and string-length(msxsl:node-
set($ListPopulatedWithMain)/b:Citation/b:Source/b:Title) > 0">
<xsl:value-of select="msxsl:node-set($ListPopulatedWithMain)/
b:Citation/b:Source/b:Title" />
</xsl:when>

This code actually says that if your source is a conference proceeding
or a journal article, it should display the title. If you would check
the code below, you would see that otherwise the main contributors are
displayed. As you don't want to display the title, remove the above
code. Now your citations for conference proceedings and journal
articles look like those for books.

Of course, your bibliography is still sorted by means of the title for
conference proceedings and journal articles. So you might want to
change that as well.

Elements are sorted based on the value generated for the SortingString
element.

<b:SortingString>
<xsl:if test = "(b:SourceType = 'JournalArticle' or b:SourceType =
'ConferenceProceedings') and string-length(b:Title) > 0">
<xsl:text> </xsl:text>
<xsl:value-of select="b:Title"/>
</xsl:if>

<xsl:variable name = "author0">
<xsl:for-each select="./b:Author/*[local-name()=
$MostImportantAuthorLocalName]">
<xsl:call-template name="formatPersons">
<xsl:with-param name = "forceMain" select = "'yes'" />
</xsl:call-template>
</xsl:for-each>
</xsl:variable>

<xsl:variable name = "author">
<xsl:choose>
<xsl:when test="string-length(./b:Author/*[local-name()=
$MostImportantAuthorLocalName]/b:Corporate) > 0">
<xsl:value-of select="./b:Author/*[local-name()=
$MostImportantAuthorLocalName]/b:Corporate"/>
</xsl:when>
<xsl:when test="string-length($author0) > 0">
<xsl:value-of select="$author0"/>
</xsl:when>
</xsl:choose>
</xsl:variable>

<xsl:if test="string-length($author) > 0">
<xsl:text> </xsl:text>
<xsl:value-of select="$author"/>
</xsl:if>

<xsl:if test="string-length(b:Title) > 0 and not (b:SourceType =
'JournalArticle' or b:SourceType = ConferenceProceedings')">
<xsl:text> </xsl:text>
<xsl:value-of select="b:Title"/>
</xsl:if>
</b:SortingString>

It looks like a lot of code, but it is pretty easy to grasp. There are
basically three IF clauses:
1)if its a journal article or conference proceedings and there is a
title, add the title
2)if there are authors, add the authors
3)if its not a journal article or conference proceedings and there is
a title, add the title

So you want this changed into something looking like:

<b:SortingString>
<xsl:variable name = "author0">
<xsl:for-each select="./b:Author/*[local-name()=
$MostImportantAuthorLocalName]">
<xsl:call-template name="formatPersons">
<xsl:with-param name = "forceMain" select = "'yes'" />
</xsl:call-template>
</xsl:for-each>
</xsl:variable>

<xsl:variable name = "author">
<xsl:choose>
<xsl:when test="string-length(./b:Author/*[local-name()=
$MostImportantAuthorLocalName]/b:Corporate) > 0">
<xsl:value-of select="./b:Author/*[local-name()=
$MostImportantAuthorLocalName]/b:Corporate"/>
</xsl:when>
<xsl:when test="string-length($author0) > 0">
<xsl:value-of select="$author0"/>
</xsl:when>
</xsl:choose>
</xsl:variable>

<xsl:if test="string-length($author) > 0">
<xsl:text> </xsl:text>
<xsl:value-of select="$author"/>
</xsl:if>

<xsl:if test="string-length(b:Title) > 0">
<xsl:text> </xsl:text>
<xsl:value-of select="b:Title"/>
</xsl:if>
</b:SortingString>

So now that the order of the bibliography is fixed, one thing is left
to do: displaying the journal articles and conference proceedings in
such a way that the authors are displayed before the title.

In the code there is a section looking like this (it's easily
identifiable as it is just above the single <b> in the entire code:

<xsl:if test="b:SourceType='ConferenceProceedings' or
b:SourceType='JournalArticle'">
<xsl:call-template name = "ApplyItalicTitleNS">
<xsl:with-param name = "data">
<xsl:choose>
<xsl:when test="(/b:Bibliography/b:Source[position()=
$prevBook]/b:SourceType = 'JournalArticle' or
/b:Bibliography/b:Source[position()=$prevBook]/b:SourceType =
'ConferenceProceedings') and /b:Bibliography/b:Source[position()=
$prevBook]/b:Title = b:Title">
<xsl:call-template name="templ_prop_ISO690_SameAuthor"/>
<xsl:call-template name="templ_prop_Dot"/>
</xsl:when>
<xsl:when test="b:SourceType = 'JournalArticle' or
b:SourceType = 'ConferenceProceedings'">
<xsl:copy-of select ='$TitleOfMonographParts'/>
</xsl:when>
</xsl:choose>
</xsl:with-param>
</xsl:call-template>
</xsl:if>

Removing the above code will remove the title for journal articles and
conference proceedings from the beginning. Actually, it removes them
completely from the bibliography. So now we have to add them again
else where. Now if you scroll until the end of the 'b'tag (denoted by
</b>) you will see that a choose construction is given handling all
the source types. So here you would want to display the title again
and change

<xsl:when test="b:SourceType='JournalArticle'">

into

<xsl:when test="b:SourceType='JournalArticle'">
<i>
<xsl:copy-of select ='$TitleOfMonographParts'/>
</i>

And

<xsl:when test="b:SourceType='ArticleInAPeriodical'">

into

<xsl:when test="b:SourceType='ArticleInAPeriodical'">
<i>
<xsl:copy-of select ='$TitleOfMonographParts'/>
</i>

I added the 'i' tags so that the titles are displayed in italic, if
that is not what you want, you can just remove them.

I compiled all the changes described in this post into an xsl file
which you can find at http://www.codeplex.com/bibliography/Release/ProjectReleases.aspx?ReleaseId=17634

HTH,

Yves
 
J

Jan

Hey guys,

i need a special type of bibliography style, called "William Giles
Campbell's: Form and Style: Thesis, Reports, Term Papers".
I found that the built in MLA Style fits in the bibliography, but for the
footnote citations i need the following format:
Jacob Brownowski, The Ascent of Man <-underlined, (Boston: Little, Brown,
1973).

If someone can help me it would be great!
Thanks!
 
G

grammatim

Usually a typed underline is a makeshift replacement for italics: can
you check with whoever is requiring this style whether you can
substitute italics?
 
P

p0

MLA in-text citations consist out of authors only (e.g.: (Doe and Doe)
and (Beethoven)). So what he asks for is not just switching from
italics to underline, but rather a rewrite of the entire in-text/
footnote citation (not bibliography) formatting routine.

Although this is possible, it requires a lot of work. So much work in
fact that I doubt anyone will be able to help him.

Yves
 
G

grammatim

Footnotes like that, with full bibliographical information, are
normally only done when no bibliography (reference list) is provided
at all. Otherwise, the redundancy is immense.
 
P

p0

It depends on the style. A lot of legal styles want both, full in-text
citation (through footnotes) and a bibliographic list. I guess it
makes it easier for people wanting to look stuff up.

You are right on it being redundant. But you have to admit that most
bibliographic styles are not really an example of smart thinking or
the result of bright minds at work. Compared to author-date styles,
this "William Giles Campbell" style is more redundant but also more
intelligent. It is not uncommon for someone to write multiple articles
(conferences, journals, book sections) a year. The described system
makes it easy for the reader to know what is being cited. In an
ordinary author-date system, is not only the formatting harder (you
need to display more or less authors, add a suffix to the year, ...),
its result is also meaningless for most people reading the work. They
have no idea who "Doe" is, and even if they do, how should they know
what "Doe" wrote sometime during 2008. A reference number pointing to
the bibliography at the end would be just as clear and a lot less
redundant. It also wouldn't require some complex formatting scheme. If
you really wanted a scheme similar to author-date which would be
useful for ordinary people, then at least the title should be somehow
included as it tells more about the work being cited than the name of
the author does.

Yves
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top