Need help with code...

Hi,

I have finally found a style which almost match my needs in Danish archaeology...
Elsevier-Harvard does it best, but I still need to change book title from "title" to "sentence", since we only use cap letters in the beginning of the title and also, more important it needs to be in italic - can anyone please help me, by telling me what to look for in the code?

Thanks in advance!!!!

Maria
  • Search for <macro name="title"> in the style. Then after the line:
    <else-if type="bill book graphic legal_case motion_picture report song speech" match="any">

    replace: <text variable="title"/> by : <text variable="title" text-case="sentence" font-style="italic"/>

    I haven't tested but that should work for book (and bill, graphic, legal case, motion pic, report, song, speech). Make the same changes on the relevant line if you need it for report, thesis and webpage too.

    You may have to change the macro called "author-short" (<macro name="author-short">) too.
  • Okay, thanks. I'll try that later tonight. I also need to chance the "In:" (like In: bla bla title) to just plain I (for Danish) and last it writes the page number like "pp. 32-43" I need it to say "S. 32-34""
    And last - when I have a book section - I need the book title to be also sentence and italic, what do I look for here?

    AND THANKS!!!
  • You can turn your style to danish (1st line):
    <style class="in-text" version="1.0" demote-non-dropping-particle="sort-only" default-locale="da-DK"> ("en-US" is replaced by "da-DK").
    Then your style will rely on the danish locale.

    FYI, book section is called "chapter" in CSL style: search for "if type="chapter" (in ), then edit the line
    <text variable="container-title" text-case="title"/> (text-case= has to be "sentence")

    I might be wrong (I can't test here).
  • Amazing! :-) It's working!!! Thank you so much! I really appreciate it!

    One final little bitzy thing ;-) : How do I make the font size of the title or book section larger? It seems like the title is one font smaller than the rest of the text?
  • edited February 15, 2012
    "It seems like the title is one font smaller than the rest of the text?"
    Highly unlikely - at least it's not something that Zotero sets. My guess would be that you're using a font with poor italics rendering.

    I would actually not use text-case="sentence" but rather leave text-case out entirely - that way Zotero uses whatever is in the title field as-is.
    Sentence case will override capitalized proper nouns.
  • Okay that would be great since I often edit the titles as I add them...
    If I would like to change the font style to ex "Cambria", what do I have to search for?
  • Sorry but my questions keeps adding on - how do I remove the "," from citations - for now citations is shown as "Andersen, 2006" - I just "want Andersen 2006"
  • For the second question:
    Find
    <group delimiter=", ">
    <text macro="author-short"/>
    <text macro="issued"/>
    </group>

    and remove the comma from the first line. The font isn't determined by Zotero - it's the Word default font: http://www.zotero.org/support/kb/word_default_font
  • Great, thank you!

    Hehe, sorry... one more - I would like to remove the "," from the bibliography

    Andersen, N. H., 2006

    so it would be

    Andersen, N. H. 2006
  • remove the suffix.
    <text macro="author" suffix=","/>
  • thank you!!! final fina final - how do I make the "Ed." in small types - ed.
  • somewhere you'll see a line that starts with <label and has text-case="capitalize-first" remove the text-case="capitalize-first"
  • Perfect..... Thank you, now I have saved the rtf file as a .csl file, but when I try to add it into zotero it says that it's not a valid csl file? I have validated it, at it's fine - what do I do wrong?
  • it can't be .rtf. It needs to be a plain text file - you can set that somewhere in TextEdit (which I assume you're using?)
  • yes I am using textedit, how do I change it to plain text?
  • Ok, I've found it - but how do I change it into csl - just by changing the .end?
  • finally. Thank you so much! BIG HELP! :-) Now I can get on with my master... ;-)
Sign In or Register to comment.