ISO 690 Numerical Extension questions

Jul 14, 2008 at 9:52 PM

I am using the template in the subject of this message. I would like to introduce some small changes in the template which I enumerate below.

1) When I insert the reference list, one blank line appears before the list and 2 blank lines appear after the list. How could I delete these lines?
2) I would like to put the reference numbers in superscript, is it possible?
3) I would like also to put the citation numbers in superscript, is it possible?
4) When I insert the reference list, I would like to associate them to a pre-defined Word style, to say, something like "references", different from the "Normal". There is a way to do it?

Thank you very much for your attention

Roger Pizzato Nunes

Coordinator
Jul 18, 2008 at 10:46 PM
1)You can not (but there is a solution).
The lines are added by the built-in galleries of Word 2007 and can not be changed. However, there is no real need for using those galleries. Instead of clicking on the 'Bibliography' or 'Works Cited' galleries, just use the menu item under it: "Insert Bibliography". It will print the bibliography without anything else. You can then provide your own title for it.

2)Yes (if you are talking about the complete bibliography)
The output of the stylesheet is actually a subset of HTML. Luckily for you, the <sup> tag is supported. To display the reference numbers in superscript in the bibliography, you have to change lines 4085 from <p> to <sup class="MsoBibliography"> and line 4109 from </p> to </sup>. The class definition is added to fix an oversight by me in the stylesheet (see the answer to your fourth question).

3)No (if you are talking about in-text)
For the in-text citations this is not possible as far as I can tell. At first sight, one would expect the same trick to work as with the previous case. But the bibliography has its own style (see the answer to your fourth question) while in-text citations do not. They inherit the style of the paragraph in which they are used (most likely this will be Normal if it is in the middle of the the text). As far as I can tell, there is no direct way around it. When everything is written, you can of course manually select each in-text citation and set it to superscript.

4)Yes
A stylesheet uses 'MsoBibliography' as style for the bibliography. Once you inserted a bibliography into your text, you will then find a style call 'Bibliography' in the list of styles. That is the one used by the bibliography. By default it is indeed based on Normal, but you can finetune it however you want.

HTH

Yves
 
Coordinator
Jul 19, 2008 at 3:25 PM
The superscript issue for in-text citations (question 3) really bugged me, so I spend some time today trying to find a solution or workaround. By now I am totally convinced that it is not possible to solve this problem from within the stylesheet.

I did discover something else though. In word you can create new character styles and imply them to an in-text citation. Then when you execute the stylesheet again to 'reformat' all in-text citations and bibliographies, the character style you applied to the in-text citation remains. So the first time when you enter the in-text citation, you have to manually set its style to your prefered character style, and as of then, it will always be formatted correctly.

To create your own character style for citations, open up the style pane (alt+ctrl+shift+s). Then at the bottom click the "New style" button. In the window you get, set the following:

Name: Citation
Style type: Character
Style based on: Default Paragraph Font

Click the "Format ..." button and select "Font ...". Select "Superscript" and press "Ok".

Then whenever you have added an in-text citation, just select it, and set its style to the 'Citation' style you created. 

I agree it is not the ideal solution, but it is a workable one.

HTH
Jul 20, 2008 at 5:27 PM
Hello,
I tried to do this but I can't create the new style for the citation only. When I try to select the first citation and create a new style it does it to that whole paragraph. How do you do this?
Somehow my IEEE refs became all bold and I want them back in normal ... (I already re-dowloaded the IEEE style file and run it again but it does the samething; if I chose another style, APA or other, it goes back tonormal but when I go back to IEEE it makes them all bold again). Thanks again!
Jul 20, 2008 at 6:04 PM

Hi Yves,

Firstly, I would like to thank you about your answers.

Your answers 1, and 2 worked perfectly.

Your suggestion of defining a word style (question 3) for the in-text citations also shows to be successful. After every update I make, the style of the in-text citations remains the same J. Thus, it is really just necessary to set the at the first time.

However, I am still having problems with the default style for the bibliography list. When I insert a new bibliography list, the style associated by MS Word to this list is the "Normal". Could be this related with the fact of my MS Word version to be in Portuguese? I ask you about that because if I use one of the default styles which comes originally with MS Word (APA, ISO, and so on) the style assigned to the list is "Bibliografia", which means "Bibliography" in English. But if I change to the ISO 690 Numerical Extension and check in MS Word, the style associated to the list returns to “Normal”.

Regards,

Roger Pizzato Nunes

Jul 20, 2008 at 6:17 PM

Hi Hsilva,

The Yves' solution has worked for me. You have to select the box where in-text citations are and then set the style. In this way, just the text inside the box will be affected by selected style.

Roger Pizzato Nunes

Coordinator
Jul 20, 2008 at 9:51 PM
Hi Roger,

Regarding question 4, that was a bug on my part. I wrote the bibliography entries directly into a <td> element rather than into a <p> element inside the <td> element. So the class='MsoBibliography' attribute was actually assigned to the wrong element. I fixed the problem and uploaded a new version to http://www.codeplex.com/bibliography/Release/ProjectReleases.aspx?ReleaseId=15028.

If you have any other problems with it, just drop me a note.
Jul 20, 2008 at 11:58 PM

Hi Roger,

Thank you for your reply. Somehow I can't do it. When I select the box and create the style it changes the whole paragraph. Is it because I already have others refs after? Would this just work if we're starting from the beginning of inserting refs? I have already many refs so didn't want to re-do so I was just trying to create a 'first' one in the first paragraph of the file...

Thanks again,

Helena


rogerpn wrote:

Hi Hsilva,

The Yves' solution has worked for me. You have to select the box where in-text citations are and then set the style. In this way, just the text inside the box will be affected by selected style.

Roger Pizzato Nunes




Coordinator
Jul 21, 2008 at 10:34 AM
Edited Jul 21, 2008 at 10:59 AM


When I try to select the first citation and create a new style it does it to that whole paragraph.

If you apply a style to a part of a paragraph and the entire paragraph changes style, then the style you are applying is most likely a 'paragraph style' rather than a 'character style'. Make sure that you set the style type to 'Character' when formatting in-text citations.


Somehow my IEEE refs became all bold and I want them back in normal ... (I already re-dowloaded the IEEE style file and run it again but it does the samething; if I chose another style, APA or other, it goes back tonormal but when I go back to IEEE it makes them all bold again). Thanks again!


It might have something to do with the style you applied. But that is hard to tell without having access to the document. 
Jul 21, 2008 at 1:33 PM

Hi Yves,

It is working now. But I would like to return to the question 1 again…

If I click in references, after in Bibliography, and then in the “Bibliography” gallery of MS Word and set the Style to the default “ISO690 – Numerical Reference”, if I check the inserted references list, I will observe that there is no blank lines between the title Bibliography and the first Reference of the list. Also, I can change the style of the title Bibliography, being this one unchanged after every update I execute over the reference list.

However, if now I change the style to the “ISO690 – Numerical Reference – Extension”, the blank line between the title and first reference of the list appears. After your new modification in this style, I am able to delete the blank line (in the earlier version I can not). Nevertheless, If I change the style of the title Bibliography to one different of Normal, after each update in the list, its style returns to Normal again.


Would you know what could be happening?

Thanks again,

Roger Pizzato Nunes

Coordinator
Jul 21, 2008 at 4:29 PM
Edited Jul 21, 2008 at 5:01 PM
Hi Roger,

I kinda hoped you wouldn't return to your first question, because I know what the problem is. I also know the solution, it is just that the solution is a rather dirty one. :-(

When the created bibliography is returned from the stylesheet to Word, Word checks if it starts and ends with a non-empty paragraph element. If it does not, they are added.

To ensure the alignment of reference numbers and source data, I use a table with two columns. So the problem is, I return an HTML document with the following body:

<body>
  <
table width="100%">
    ...
  </table>
</
body>

And Word transforms it into an HTML document with the following body:

<body>
  <
p></p>
  <
table width="100%">
   
...
  </table>
  <
p></p>
</
body>

The solution exists in Word not giving the chance to add those two paragraphs by adding them ourselves. But we do not want to see any paragraphs there, so we have to hide them. The solution consists of adding the following line before <table> and after </table>:

<p class="MsoBibliography" style="line-height:0;">x</p>

So the body becomes:

<body>
  <
p class="MsoBibliography" style="line-height:0;">x</p>
  <
table width="100%">
   
...
  </table>
  <
p class="MsoBibliography" style="line-height:0;">x</p>
</
body>

Now you will no longer see the 'empty' lines but they will still be there and even contain data (the x's). Therefore I consider this solution to be a rather dirty hack.

Yves

Jul 21, 2008 at 7:00 PM

Hi Yves,

I understood now. Many thanks again by your always clear responses. I agree with you that this one is not a elegant solution.

But do you know if there is a way in assigning a specific style (different of the Normal) for these two extra lines that MS Word automatically inserts?

Or, instead of using the MS Word Galleries, using the method you have previously mentioned (References->Bibliography->Insert Bibliography), do you know if it is possible to introduce modifications inside the “ISO 690 – Numerical Reference – Extension” in such a way that once one has assigned a custom style for the first line inserted by MS Word (between reference title and the first reference of the list), this style, after every update in the references list, remains the same?

The first blank line, after each update in the lists, obstinately returns to the Normal style.

Roger Pizzato Nunes

Coordinator
Jul 21, 2008 at 8:01 PM
Hi Roger,

You can define any style you want for them, but as far as I am aware, the style has to be defined from within the stylesheet. So you can not set it from within the Word document if you hope to keep the style after an update. In the line <p class="MsoBibliography">x</p> you can substitute 'MsoBibliography' for any other predefined style as far as I am aware. For example MsoTitle or MsoSubTitle.
Jul 21, 2008 at 9:27 PM

Hi Yves,

It has worked well. Although one has to impose a fixed MS Word style inside the template, this is still a good solution.

I would like to make you just one more question. This is related to the in-text citation.

If I insert a new citation inside the box of another one, the character separating each of them is “; “. However, I would like to change this character to “,”. Instead of appearing, as an example, [1;1], I would like [1,2]. I have looked for “;” inside the template or some function that call this separator but I have not found.

Do you have a suggestion?

Thanks again…

Roger Pizzato Nunes

Coordinator
Jul 21, 2008 at 10:12 PM
Hi Roger,

At line 4037-4039, you have the following code:

<xsl:if test="not(/b:Citation/b:LastAuthor)">
  <
xsl:call-template name="templ_prop_GroupSeparator"/>
</
xsl:if>

That code checks if the citation you try to display is not the last one in a group of citations. If it is not, it will display a separator. The group separator is culture dependant and stored in an XML tree that they grab somewhere from inside Word. It is passed along with the source to the stylesheet. So you can not change it at its source. You can ofcourse just replace the call-template with your separator, giving you something like:

<xsl:if test="not(/b:Citation/b:LastAuthor)">
  <
xsl:text>,</xsl:text>
</
xsl:if>

It is better not to touch the template 'templ_prop_GroupSeparator' since that separator is still used by other formatting functions.

Yves
Jul 21, 2008 at 10:38 PM

Yves,

Perfect!

I am very grateful for your help and, principally, by your promptness into quickly answer the questions.

I have collected all these changes inside a template. The agency which normalize technical documents here in Brazil, called ABNT, did not reach an agreement with Microsoft, because its philosophy resides on ODF. For this reason, an ABNT template has not been included inside MS Word.

With your help, I became able to build my own template.

Roger Pizzato Nunes

May 19, 2009 at 11:08 AM

Hello all!

I've just read all the post. I've been also looking for an answer for my problem but I didn't find it.

I'm using ISO 690 Numerical Extension in my work, and I'm trying to get no [] or ( ) in the in-text citation. I have reached in the xsl file, but I didn't find the solution. Can you help me?

Thank you

James

Coordinator
May 19, 2009 at 11:17 AM

For replacing brackets in non-BibWord styles, see the general information at http://bibword.codeplex.com/Wiki/View.aspx?title=FAQ#Q6

For ISO 690, you can look at the version at http://bibword.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=14646 which has square brackets. The brackets are displayed using "<xsl:text>[</xsl:text>" and "<xsl:text>]</xsl:text>". Removing those should get you what you want.

May 19, 2009 at 11:33 AM

Thank you, Yves!!! It works!

James