Is it possible to do such a thing? I'm working on migrating out publication data while maintaining the current output styles for each. You can view the styles here http://ccom.unh.edu/index.php?p=&page=publications.php as examples.

I need to be able to change the output style for each publication type. If there is a good way to go about doing this, please, I'm all ears. Thanks.

Comments

rjerome’s picture

The short answer is yes.

How you do it depends on how you define "Style". If you are talking CSS styling, then we would have to add a div around the entry with the "publication type" as it's class. If you are talking about the citation style, then (assuming your are using the citeproc engine) you would have to make the appropriate changes to the ".csl" file which defines the style.

Ron.

lpeabody’s picture

Sorry, I was indeed referring to citation style.

I hadn't enabled the CiteProc module, though I just did and am looking it over now... though I still don't see an obvious way to do what I need to do. It seems like CiteProc just gives a bit more citation styling options. I don't see a clear way to assign different citation styles to different publication types. That is, have publication type A use citation style A, but have publication type B use citation style B. I've managed to set a default CSL file for all citations, but still can't figure out how to assign to individual pub types.

rjerome’s picture

I see what you are after now, and I'll have to change my short answer to NO, you can't do that. There are variations within a given style (say APA) based on the publication type, but no you can't have one type formatted in APA and other in Chicago. At least not as the code currently exists, technically it could be done.

lpeabody’s picture

That's unfortunate.

At the very minimum I need to be able to add additional biblio fields to those fields that are already being output. For example, I want to add the contents of biblio_custom1 to the end of the IEEE citation. How would this be done?

lpeabody’s picture

I think I can do what I want to do using CiteProc as you said at the beginning.

Going over the CSL files (haven't had much time this evening) I was just looking at the bibliography section, and there is embedded logic based on publication type to control the output of the text. This is exactly what I was looking for, and everything is clicking now. Thanks for jogging my brain.

lpeabody’s picture

Hmmm... It seems that once again I've jumped to conclusions.

I'm attempting to manipulate the CSL files to do my bidding but none of the changes I make are changing anything. For example, I'm using the IEEE citation style as the cite default, and I'm looking at the title macro...

   <macro name="title">
      <choose>
         <if type="bill book graphic legal_case motion_picture report song" match="any">
            <text variable="title" font-style="italic"/>
         </if>
         <else>
            <text variable="title" quotes="true"/>
         </else>
      </choose>
   </macro>

I change it to

   <macro name="title">
      <choose>
         <if type="bill book graphic legal_case motion_picture report song" match="any">
            <text variable="title" font-style="italic"/>
         </if>
         <else>
            <text variable="title" font-style="italic"/>
         </else>
      </choose>
   </macro>

...and I expect the title to change from quotes to italics, but after I save the file and refresh the page it stays quoted. I've tried multiple cache clears which haven't helped.

I'm back at square one.

lpeabody’s picture

Ah... I see now. It's pulling the XML straight from Zotero. How do I make CiteProc use the styles installed under biblio/modules/CiteProc/style?

EDIT: As you can tell I'm having a tough time locating documentation.

EDIT #2: Seems to be downloading from GitHub, but don't know where it's installing to.

lpeabody’s picture

I think there is a significant issue going on here. I don't know if this is working as intended, and if it is then it's non-intuitive. The latest development in my endeavor here is that I simply can't identify where Biblio is reading the CSL files that I've downloaded from. They are NOT downloaded into the style directory within the CiteProc module. I know it's not going out to Zotero to get the XML on the fly. This is a rather annoying problem.

EDIT: Why, oh why, is the CSL stored in the database? I can't edit that :(

rjerome’s picture

Yes, I know that's an issue, and a "CSL" editor function is in the works, it just hasn't hit the streets yet :-(

mattyohe’s picture

Looks like Zotero allows you to submit your own style. You just checkout the repo and issue a pull request.

http://www.zotero.org/support/dev/citation_styles

liam morland’s picture

Issue summary: View changes
Status: Active » Fixed

If you need further help, please re-open and provide details.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.