Share via

Remove space before inline citation in IEEE style

Anonymous
2023-08-01T11:57:11+00:00

Currently, when I insert a reference, Word automatically inserts a space before the citation. I have already edited the .xsl code to make the reference number superscript, but I do not see what I need to delete to remove the space.

Any and all help would be much appreciated.

Please find the relevant edited code below:

                        <xsl:for-each select="b:Citation">

                                    <xsl:variable name="SourceType">

                                                <xsl:value-of select="b:Source/b:SourceType"/>

                                    </xsl:variable>

                                    <xsl:choose>

                                                <xsl:when test="$SourceType = 'Book' or

                $SourceType = 'BookSection' or

                $SourceType = 'Film' or

                                                $SourceType = 'Case' or

                $SourceType = 'JournalArticle' or

                $SourceType = 'ArticleInAPeriodical' or

                                        $SourceType = 'Misc' or

                                        $SourceType = 'ElectronicSource' or

                                        $SourceType = 'Report' or

                                                $SourceType = 'DocumentFromInternetSite' or

                                        $SourceType = 'Art' or

                                        $SourceType = 'SoundRecording' or

                                                $SourceType = 'Performance' or

                                                $SourceType = 'Interview' or

                                        $SourceType = 'InternetSite' or

                                                $SourceType = 'Patent' or

                $SourceType = 'ConferenceProceedings' ">

                                                            <html xmlns="http://www.w3.org/TR/REC-html40">

                                                                        <body><xsl:element name="sup">

                                                                                    <xsl:variable name ="cPages">

                                                                                                <xsl:value-of select="count(b:Pages)" />

                                                                                    </xsl:variable>

                                                                                    <xsl:variable name ="initValueOfPages">

                                                                                                <xsl:value-of select="b:Pages"/>

                                                                                    </xsl:variable>

                                                                                    <xsl:variable name ="pages">

                                                                                                <xsl:choose>

                                                                                                            <xsl:when test="contains($initValueOfPages, '-')">

                                                                                                                        <xsl:value-of select="concat('pp. ',$initValueOfPages)"/>

                                                                                                            </xsl:when>

                                                                                                            <xsl:when test="contains($initValueOfPages, ',')">

                                                                                                                        <xsl:value-of select="concat('pp. ',$initValueOfPages)"/>

                                                                                                            </xsl:when>

                                                                                                            <xsl:otherwise>

                                                                                                                        <xsl:value-of select="concat('p. ',$initValueOfPages)"/>

                                                                                                            </xsl:otherwise>

                                                                                                </xsl:choose>

                                                                                    </xsl:variable>

                                                                                    <xsl:if test="b:FirstAuthor">

                                                                                                <xsl:call-template name ="templ_prop_SecondaryOpen"/>

                                                                                    </xsl:if>

                                                                                    <xsl:call-template  name="RefOrder"/>

                                                                                    <xsl:if test="count(b:Pages)>0">

                                                                                                <xsl:call-template name="displayPageOrPages" >

                                                                                                            <xsl:with-param name="pages" select ="$pages"/>

                                                                                                </xsl:call-template>

                                                                                    </xsl:if>

                                                                                    <xsl:if test="b:LastAuthor">

                                                                                                <xsl:call-template name="templ_prop_SecondaryClose"/>

                                                                                    </xsl:if>

                                                                                    <xsl:if test="not(b:LastAuthor)">

                                                                                                <xsl:call-template name="templ_prop_ListSeparator"/>

                                                                                                <xsl:call-template name ="templ_prop_Space"/>

                                                                                    </xsl:if>

                                                                        </xsl:element></body>

                                                            </html>

                                                </xsl:when>

                                    </xsl:choose>

                        </xsl:for-each>

            </xsl:template>

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

3 answers

Sort by: Most helpful
  1. Anonymous
    2023-08-01T13:40:40+00:00

    I am sorry for the inconvenience, unfortunately, I don't have any further troubleshooting to offer.

    There are many knowledgeable users active on the forum and I hope that someone else can offer further insight on your issue.

    Thanks,

    Adeyemi

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2023-08-01T12:47:37+00:00

    Hi Adeyemi,

    Thank you for your response. I appreciate that it may be the style to have a space ahead of the citation, but, for my needs, I would like to remove this.

    Unfortunately, I could not find any instances of <xsl:text> </xsl:text> in the Microsoft IEEE2006OfficeOnline.xsl file and so this has not solved my problem.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2023-08-01T12:32:38+00:00

    Hello,

    I’m Adeyemi and I’d be happy to help you with your question.

    In IEEE style, citations are numbered in square brackets and are usually placed at a relevant point in the sentence, for example after the author’s name or the quote you’re citing, or just at the end of the sentence as described here: https://www.scribbr.com/ieee/ieee-in-text-citation/ Note: This is a non-Microsoft website. The page appears to be providing accurate, safe information. Watch out for ads on the site that may advertise products frequently classified as a PUP (Potentially Unwanted Products). Thoroughly research any product advertised on the site before you decide to download and install it.'

    Each citation number should be enclosed in square brackets on the same line as the text, before any punctuation, with a space before the bracket, you can get more details about this here: https://www.bath.ac.uk/publications/library-guides-to-citing-referencing/attachments/ieee-style-guide.pdf. Note: This is a non-Microsoft website. The page appears to be providing accurate, safe information. Watch out for ads on the site that may advertise products frequently classified as a PUP (Potentially Unwanted Products). Thoroughly research any product advertised on the site before you decide to download and install it.'

    One possible solution could be to search for any instances of <xsl:text> </xsl:text> in your .xsl file and remove the space between the tags. This will remove any spaces that are being added by the XSL transformation.

    I hope this helps!

    Give back to the Community. Help the next person who has this issue by indicating if this reply solved your problem. Click Yes or No below

    Regards, Adeyemi

    Was this answer helpful?

    0 comments No comments