OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [docbook] Ibids and op cits

On 07/01/2013 10:20 AM, Brad Scott wrote:
Hello everyone

How do you tend to deal with "Ibid" and "op cit" references?

Some BiBTeX or biblatex styles do this themselves. I originally relied on one of them that detected such things, but the journal style requirements changed, and I haven't converted the process to use the new biblatex style yet, so right now it's done in the XSLT. The following is untested, as I have redacted a whole heap of internal stuff which would just clutter an example.

  <xsl:template match="db:biblioref[@endterm]">
      <!-- if the previous citation is to the exact same place in the
           same work as the current citation -->
        test="@endterm=preceding::db:biblioref/@endterm and
              @units=preceding::db:biblioref/@units and
              @start=preceding::db:biblioref/@start and
              ((@end and @end=preceding::db:biblioref/@end)
              or (not(@end) and not(preceding::db:biblioref/@end)))">
      <!-- if the first author of the immediately preceding citation
           is the same as the first author of the current citation -->
      <xsl:when test="//db:biblioentry

        <!-- code for testing multi-authored works
             is left as an exercise for the reader -->
          <!-- detect gender from initial letter of authorID -->
          <xsl:when test="starts-with(//db:biblioentry
            <xsl:text>\textit(Eadem}, </xsl:text>
            <xsl:text>\textit(Idem}, </xsl:text>
        <xsl:call-template name="makeref">
          <xsl:with-param name="format" value="'omitauthor'"/>
      <!-- if the immediately preceding citation is the same work -->
<xsl:when test="preceding::db:biblioref[1][@endterm=current()/@endterm]">
        <xsl:call-template name="makeref">
          <xsl:with-param name="format" value="'location'"/>
      <!-- if there was any previous reference to this work -->
<xsl:when test="preceding::db:biblioref[@endterm=current()/@endterm]">
        <xsl:call-template name="makeref">
          <xsl:with-param name="format" value="'author'"/>
        <xsl:text>, \textit{op.~cit.}</xsl:text>
      <!-- otherwise is gets the full treatment -->
        <xsl:call-template name="makeref"/>

It doesn't handle multiple citations in the same biblioref element yet: I need to redefine @endterm to be IDREFS (as it should have been!)


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]