This project is read-only.

Itallics in the citation text

Mar 12, 2010 at 12:27 PM

I've been tweaking the "Harvard - Exter" style to meet the requirements at my University, Sunderland, and I've run into a problem that I can't see my way out of.

The title should be in itallics which is the way it came for the bibliography but in the citation, if there is no author name and title is used instead then I would like it to be in itallics too. The string is currently

{%Author:1|Editor:1|ShortTitle|Title%, }{%Year|"no date"%{%YearSuffix%}}{, %CitationPages:p. :pp. %}

and I can't see how to modify it to get itallics without also getting Author and editor in italics.

I took a quick look at the "format-title" template to see if I could modifiy it so title always displayed as itallic or if I could add a :i option to request itallics but haven't figured it out yet.

Mar 12, 2010 at 1:00 PM

There is unfortunately no straightforward way to do this.

Normally I would suggest combining variables within one condition, but the use of a string ("no date") will prevent this from working.

Your best option is as you assumed to extend the format-title template. At the bottom you currently have

    <!-- Return the result. -->
    <xsl:value-of select="$casing"/>

You could change that into:

    <xsl:when test="contains($options, 'i')">
      <xsl:value-of select="$casing"/>
      <xsl:value-of select="$casing"/>

This way you can indeed just add an ":i" behind your title.

Mar 12, 2010 at 2:20 PM

Thanks that gives me what I need