• Hi,

    I have a bibliography grouped by year, and sorted by author, but I have 2 issues :

    1. I have a ?2003? entry at the end of the list (between ?1983? and ?1982?)
    2. All entries are numbered ?1.?

    Here is the shortcode I use :

    [zotpress order="desc" sortby="author" title="year"]

    I tried with different attributes (order, sortby, title, forcenumber), but nothing seems to work.

    Thank you for the help.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • The shortcode I use for pages like https://saarons.scrippsprofiles.ucsd.edu/publications/ is [zotpress collection=”######” sortby=”date” title=”year” order=”desc” highlight=”Aarons”] .

    The numbering is probably coming from the default style you set in your Zotpress options. I use APA; I get every item numbered “1.” if I switch to something like Vancouver.

    Katie’s parser for the shortcodes is very structured, understandably; you can’t really combine many options to do multiple things or swap in different terms.

    The sortby=”author” option is probably getting you the out-of-order citation, though I’m not sure, I couldn’t replicate it.

    Thread Starter Thomas L?Excellent

    (@tlexcellent)

    Thank you for your answer.

    Switching to apa style solved the number problem.

    For the sorting problem, I replaced lines 671-672 in the zotpress.shortcode.bib.js?with the code below ; not sure if it’s fully compatible, but here’s the code

    if ( jQuery("#"+$instance.attr("id")+" .zp-List h3[rel='"+orderedType+"']").length == 0 ) {
    						var insertedH3 = false;
    						if ( jQuery("#"+$instance.attr("id")+" .zp-List h3[rel]").length > 0 ) {
    							jQuery("#"+$instance.attr("id")+" .zp-List h3[rel]").each(function(){
    								var h3Rel = jQuery(this).attr("rel");
    								if (orderby == "asc") {
    									if (orderedType<h3Rel) {
    										insertedH3 = true;
    										jQuery(this).before( "<h3 rel='"+orderedType+"'>"+tempTitle+"</h3>\n" );
    										return false;
    									}
    								} else {
    									if (h3Rel<orderedType) {
    										insertedH3 = true;
    										jQuery(this).before( "<h3 rel='"+orderedType+"'>"+tempTitle+"</h3>\n" );
    										return false;
    									}
    								}
    							});
    						}
    						if ( !insertedH3 ) {
    							jQuery("#"+$instance.attr("id")+" .zp-List").append( "<h3 rel='"+orderedType+"'>"+tempTitle+"</h3>\n" );
    						}
    					}
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘All entries numbered 1 and bibliography grouped by year not chronological sorted’ is closed to new replies.