Italicizing a title in Chicago Style
Someone from this forum was really helpful the last time I had a question, so again, I apologize if this is a stupid one.
I'm using a slight variation on Chicago Style (that I altered from Chicago with help from someone here), and I need the title in "document" (as opposed to "website") to be italicized. Right now it's just in quotes. I tried putting in a couple of lines where I thought it would go in the style document, but nothing happened.
Thanks in advance for the help!
I'm using a slight variation on Chicago Style (that I altered from Chicago with help from someone here), and I need the title in "document" (as opposed to "website") to be italicized. Right now it's just in quotes. I tried putting in a couple of lines where I thought it would go in the style document, but nothing happened.
Thanks in advance for the help!
text variable="title"
and you should add to this line:
font-style="italic"
See: http://www.zotero.org/support/dev/csl_syntax_summary#formatting
<else-if type="document">
<text variable="title" font-style="italic"/>
</else-if>
right under this:
<else-if type="book">
<text variable="title" font-style="italic"/>
</else-if>
And nothing happened.
Try to add the document block *before* the book block. Is there any change?
[edit: see noksagt's answer which is more complete...]
Validation: http://www.zotero.org/support/dev/creating_citation_styles#xml_validation
<macro name="title-note">
<choose>
<if variable="title" match="none">
<text variable="genre"/>
</if>
<else-if type="book">
<text variable="title" font-style="italic"/>
</else-if>
<else>
<text variable="title" quotes="true"/>
</else>
<else>
<text variable="title" type="document" font-style="italic"/>
</else>
<macro name="title-note">
<choose>
<if variable="title" match="none">
<text variable="genre"/>
</if>
<else-if type="book">
<text variable="title" font-style="italic"/>
</else-if>
<else>
<text variable="title" quotes="true" font-style="italic"/>
</else>
Website uses unitalicized, quoted titles. This is absolutely perfect as-is.
Document, which we use for PDFs, needs to have an italicized, unquoted title.
How do I make that happen? I'm not a programmer.
<macro name="title-note">
<choose>
<if variable="title" match="none">
<text variable="genre"/>
</if>
<else-if type="webpage">
<text variable="title" quotes="true"/>
</else-if>
<else>
<text variable="title" font-style="italic"/>
</else>
</choose>
<choose>
<if variable="title" match="none">
<text variable="genre"/>
</if>
<else-if type="book">
<text variable="title" font-style="italic"/>
</else-if>
<else-if type="webpage">
<text variable="title" quotes="true"/>
</else-if>
<else>
<text variable="title" font-style="italic"/>
</else>
</choose>
</macro>
the downside of using document is that you have to use the fallback option for these, so anything that is not a book or a webpage will appear as unquote italics now. You'll have to specify all item types that you don't want to appear in that way. So if, for example, you want journal articles also in normal and quoted you'd have to change the webpage line to
<else-if type="webpage article-journal" match="any">
edit: I'm glad we agree ;-)
Now as long as we're all here, does anyone know how I might put a period on the end of every citation? If that's impossible, adding a period at the end of each URL would be helpful. Is there a way to program that in?
if not, change
<layout> in the citation section to
<layout suffix=".">
<layout prefix="" suffix="." delimiter="; ">
But there is no period on the end of my footnotes. Any thoughts?
Thank you all so much for your help!
In the current Zotero version 2.0.2 you could adapt the following workaround to specifically test for the type Document:
<choose>
<if type="book chapter article-journal article-magazine article-newspaper thesis personal_communication manuscript interview webpage patent map speech broadcast song" match="none">
<!-- type is Document -->
</if>
</choose>