italics doesn't show in citations

edited February 1, 2018
Hello

I have recently updated the "University College Lillebælt - Harvard" style, and have tried and failed to show law titles in italic in citations. I use the following code:


<macro name="author-citation">
<choose>
<if type="legislation">
<names variable="author">
<name name-as-sort-order="all" initialize-with="."/>
<substitute>
<text variable="title" font-style="italic"/>
</substitute>
</names>
</if>
<else-if type="entry-dictionary entry-encyclopedia article-newspaper chapter broadcast motion_picture" match="any">
<text macro="author-special"/>
</else-if>
<else>
<names variable="author">
<name name-as-sort-order="all" initialize-with="."/>
<substitute>
<names variable="editor"/>
<names variable="composer"/>
<text term="anonymous"/>
</substitute>
</names>
</else>
</choose>
</macro>


The title is written as wanted, except it isn't italicized, and I can't figure out why not.

PS: I'm using LibreOffice.
  • And there are no authors for that legislation?
  • Yes, there is no authors for that legislation.

    The danish legislation is traditionally divided in primary legislation (laws) typically referenced by title or law number, and secondary legislation typically referenced by the responsible Ministry.
    Since Zotero only has one 'legislation' type, I deal with this by having the relevant ministry as author on secondary legislation, and no author on primary legislation.
  • You could check if it's this: https://www.zotero.org/support/kb/italics_in_word_bibliographies though I thought that was only an issue in Word
  • I considered the "italics in word bibliographies" problem, so I tried to put a bit of non-italicized text in before the title. All of the text came out plain, so it doesn't seem like that is the issue.
  • yeah, we'd have to see the whole style -- is that the version with the current PR on github?
  • Yes, I sent the current pull request about 12 hours ago. I kept the font-style="italics" bit in, even though it doesn't seem to work, since it does no harm either.
  • I just tried using the style in Word for Windows, and here it works as required.

    So the problem resides in LibreOffice and not in the csl code.

    Thanks for taking the time to answer.
  • https://github.com/zotero/zotero-libreoffice-integration/issues/35#issuecomment-357914784
    There's a caveat for LibreOffice plugin, where partial inline citation styling disappears and only styling applied to the whole chunk of text applies. This is due to an optimization, which speeds up citation style updates for libreoffice 2x. I'm not in favor of reverting this until someone on the forums comes with a very compelling argument for why partial custom styling of inline citations is that important
  • @adomasven All Emerald author-date journals require et-al to be in italics. That’s a pretty substantial number of styles that will be rendered wrong in LibreOffice.
  • And not just Emerald: https://github.com/citation-style-language/styles/search?utf8=✓&amp;q="<et-al+font-style="italic"/>"&amp;type=

    There are likely other scenarios, but the et al alone, I'd argue, should be sufficient to revert.

    Just to be clear, though, "inline" does not refer to footnotes, right? Because if partial styling doesn't work there, we get pretty much every footnote style fundamentally wrong.
  • Uh-oh. Notes are clear and I'm reverting the inline thing now.
  • Fixed now in the Zotero Beta. We'll put out a release version with the fix within the next day.
  • Fixed in 5.0.34.5, available now.
  • Hi, I'm using Chicago 17th edition author-date in MS Word 2016 and in my in-text citations et al. sometimes appears in roman and sometimes in italics, in the same document. I've refreshed the bibliography but the problem persists. Is there an explanation and a fix?
  • Not really. That should never be in italics. Does that consistently happen with some items, including in new documents?
  • Thanks, adamsmith.
    I created a test document and input the same citations as in the chapter in which the italics had occurred. All of these came out with et al. in roman, as they should be.
    I then went back to the chapter, deleted the offending citations, and input them afresh. When I refreshed they all came out in roman.
    I'm still puzzled as to why it happened in the first place, but for now I'll do a search through the whole 600+ page MS and replace the italic et al citations with new ones.
  • We are also experiencing this error, we are running Word 2010 and some users are running Office 365. This issue is still an issue in both versions of Word. Any idea if this will be fixed in the near future? The work around to add a shorter reference title as a "dummy reference" does not always work as some of our documents have no logical place to insert another reference, our other work around is to delete part of the title but this is not ideal as we should not be altering titles.
  • I'm assuming "this error" refers to https://www.zotero.org/support/kb/italics_in_word_bibliographies (this thread is all over the map discussed with the OP actually experiencing a since-fixed bug)

    This is a Word issue that they haven't bothered to fix for a decade or so and there's nothing we're aware of that Zotero can do about it, so not likely it'll get fixed I'm afraid.

    Note that you can add the dummy item using "Edit bibliography" and simply add the Abu Aardvard (or similar) reference through that dialog, so you don't need to actually cite the work in the document.
  • Thank you, editing the bibliography solved this problem.
Sign In or Register to comment.