DAI bibliographic style

I've been working on a CSL style sheet for the German Archaeological Institute (DAI) author-date citation style, and I've almost got it down, but I'm stuck on one last thing. The bibliography is supposed to look as follows:

Cartledge 1977
P. Cartledge, Hoplites and Heroes, JHS 79, 1977, 45-64

How do I get the bibliography to provide the short author-date citation on the line above each full bibliographic citation? I've run into this with other citation styles as well, so I can't be the only one with this problem. Thanks!
  • Thanks! This did what I wanted:

    <group display="block">
    <text macro="contributors-short" suffix=" "/>
    <text macro="date"/>
    <group display="block">
    --- full citation info ---

    Except I can't seem to get rid of a line space between the author-date and the main entry -- <entry-spacing="0"> in the bibliography doesn't seem to help. Any suggestions on this?
  • <blockquote>Except I can't seem to get rid of a line space [...]</blockquote>How did you test your style? In your word processor?
  • Yup, I'm just running it through a single-spaced Word doc with a no-spacing style, and I get an extra line between the author-date and citation, and two between bibliographic entries. I'm not experienced enough with CSL to parse feedback from a validator or find a more universal preview platform (and I'm short on time). But I would be delighted to learn a better way to test the style. Thanks!
  • I believe what Zotero inserts there is a soft return:

    It should be possible to convince Word to no insert an extra line after that. My recommendation would be to show all formatting signs in Word to see what's going on.

    Word or Libre Office are the best places to test formatting output. For everything else, use the csl test pane:
    but unfortunately that's not very useful for line spacing and the like. A validator wouldn't help here at all.
  • Yes, it is a soft return -- thanks! I can't figure out how to force Word not to insert it, unfortunately, and I can't bulk delete the soft returns en masse, because I do need those that separate the author-date from the citation in the bibliography. I'll do this one by hand in the end, but if someone else eventually produces a solution, I'll be all ears!
  • wait - there are two soft returns? That just shouldn't be the case & we should see if it can be fixed - I'll see if I can replicate that.
  • So the formatting for the bibliography looks like this:

    Author-Date[soft return]
    [soft return]
    Bibliographic citation. PDQ, 1997, 10-15[soft return]
    [hard return]
    [soft return]
    Next author-date, etc.

    Let me know if you need the style sheet to make sense of all this -- it's a mess, but I would be happy to share it (and maybe someone could help me figure out why the editors stopped appearing in the main citations for edited volumes).
  • if you don't mind just putting it as a public gist on gist.github.com (no registration required) that'd make sense.
    The editors don't appear where exactly? In the in-text citation or at the end?
  • edited January 11, 2013
    In fact, I will ask that question formally. I can't figure out why, when I add the code to the bibliography layout to make a short author-date appear with each full reference, the editors of edited volumes disappear. That is,

    <bibliography hanging-indent="false" line-spacing="1" entry-spacing="0">
    <key macro="contributors"/>
    <key variable="issued"/>
    <group display="block">
    <text macro="contributors-short" suffix=" "/>
    <text macro="date"/>
    <group display="block">
    <text macro="contributors" suffix=", "/>
    <text macro="editor" suffix=", "/>
    <text macro="title"/>
    <text macro="secondary-contributors"/>
    <text macro="short-container-contributors"/>
    <text macro="edition" prefix=", "/>
    <text macro="container-title-short"/>
    <text macro="locators" suffix=", "/>
    <text macro="collection-title" prefix=", "/>
    <text macro="issue"/>
    <text macro="place-date"/>
    <text macro="journal-date"/>
    <text macro="locators-chapter"/>
    <text macro="locators-article"/>

    ... gives me the following:

    Shaw – Shaw 2000

    Kommos IV: The Greek Sanctuary (Princeton 2000)

    (with Shaw and Shaw missing as editors). But if I just clip out these lines:

    <group display="block">
    <text macro="contributors-short" suffix=" "/>
    <text macro="date"/>

    I get this instead, as the entry should be:

    J. Shaw – M. Shaw (eds.), Kommos IV: The Greek Sanctuary (Princeton 2000)

    What am I missing?
  • Sorry, adamsmith, I missed your comment before I posted, but it's probably clear from the previous. The editors appear in short form in both the citations and the bibliography, but for some form refuse to appear in long form in the bibliography when I adopt the fix proposed by Gracile for my original problem.
  • edited January 11, 2013
    I just posted it here: <https://gist.github.com/4514917>. The descriptive xml at the top is still thin, but I hadn't planned to share it until it actually worked.
  • edited January 11, 2013
    Your style does not validate.
    It's forbidden to put a "text" element (text value=...) inside a "names" element.

  • Thanks, Gracile -- I wasn't sure what that validation error was, but this explains it. I've fixed it now, and the text validates in the CSL validator, but I still have the problems with the missing editors. Most of the style I copied from the more recent American Journal of Archaeology style and modified, so I don't think it's a mess I made of the macros (the misplaced text element was my mistake, but I didn't make a lot of other changes).
  • the basic logic of what's happening is this:
    "Substituted variables are suppressed in the rest of the output to prevent duplication."


    I think the easiest way out here is to rewrite the substitute as an statement.
  • For the spacing, remove the display="block" from the second group, i.e.
    <group display="block">
    <text macro="contributors-short" suffix=" "/>
    <text macro="date"/>
    <text macro="contributors" suffix=", "/>
  • What adamsmith said.
    And for the missing editors, you can have a look at Rintze's comment here (it was the same issue).
  • Thanks to both of you! Swapping the substitute for a conditional worked, as did the removal of the second "block" display attribute. I now get this, which is what I wanted:

    Shaw – Shaw 2000
    J. Shaw – M. Shaw (eds.), Kommos IV: The Greek Sanctuary (Princeton 2000)

    I need to tweak a few other things, but if I can beat the code into something that's not embarrassing, I will send it in to be posted, with the appropriate caveats, I guess.
  • Hey there,

    is there any way to get your DAI-Style, cause I'm gonna need it so much. And my Skills in Programming are..lets see...non-existent! I would appreciate your work very much!

  • @adamtr - yes, I'd very much like to put the style online if you have something useful.
  • Hi adamtr,

    is there a new update on the status of your style? I just came across this thread as i have been working on a style for some time now "in the hidden". If there are still some things you'd need, i'd be happy to throw things into your code, while if your code is ready it would be nice to know when it will be put to the repository.

    In any case, thanks a lot for your work.

  • Hi adamtr
    is there any news about your desperately awaited style? it would be of great use for me too.
  • Hi, all -- sorry that I dropped off the map after last January (finished the chapter, hand-fixed the things that didn't work, and never had time to go back to the style). I don't know that I'm going to have time to do anything with this in the near future, but I'm happy to contribute what I have, warts and all, to the repository, with the appropriate caveats. If someone else has more time or better skills than I do, I would love to see it polished into shape for a real release!

  • the style is now up. Thanks to Adam. Please post any problems here.
Sign In or Register to comment.