public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Can a given publisher's citations be listed first?
@ 2023-09-08 10:17 'William Lupton' via pandoc-discuss
       [not found] ` <CAEe_xxi5Q+BhE+O2EjfnYZAyF=_hr7HMcgKHcNKEYoFiJNSraw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: 'William Lupton' via pandoc-discuss @ 2023-09-08 10:17 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 948 bytes --]

Hello,

I'd like to sort references so a given publisher's ("BBF") references are
listed first, and am wondering whether it's possible to compare the
publisher variable with "BBF". I tried, but it doesn't seem to work (and
the CSL spec. doesn't appear to indicate that you can do this), so I've
fallen back on using original-publisher (I'll have to make sure that all
the BBF references use this rather than publisher). This works, but I'd
prefer the first approach. Any suggestions?

CSL is attached.

Thanks,
William

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAEe_xxi5Q%2BBhE%2BO2EjfnYZAyF%3D_hr7HMcgKHcNKEYoFiJNSraw%40mail.gmail.com.

[-- Attachment #1.2: Type: text/html, Size: 1407 bytes --]

[-- Attachment #2: bbf.csl --]
[-- Type: application/octet-stream, Size: 2401 bytes --]

<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl"
       class="in-text" version="1.0"
       demote-non-dropping-particle="never"
       page-range-format="chicago"
       default-locale="en-GB">
  <!-- This style was originally edited with the Visual CSL Editor
       (https://editor.citationstyles.org/visualEditor/) -->
  <info>
    <title>BBF</title>
    <id>http://www.zotero.org/styles/bbf</id>
    <link rel="self" href="http://www.zotero.org/styles/bbf"/>
    <author>
      <name>William Lupton</name>
      <email>wlupton@broadband-forum.org</email>
    </author>
    <summary>Broadband Forum (BBF) style</summary>
    <updated>2020-03-18T12:35:57+00:00</updated>
    <category/>
  </info>
  <!-- XXX this doesn't work; can't compare strings? -->
  <macro name="publisher-is-bbf">
    <choose>
      <if publisher="BBF">
        <text value="BBF"/>
      </if>
      <else>
        <text value=""/>
      </else>
    </choose>
  </macro>
  <macro name="publisher">
    <choose>
      <if variable="publisher">
        <text variable="publisher"/>
      </if>
      <else>
        <text variable="original-publisher"/>
      </else>
    </choose>
  </macro>
  <citation>
    <!-- XXX This delimiter may not be ideal -->
    <layout delimiter="; ">
      <!-- XXX should remove this? it won't always be what we want -->
      <text variable="title-short" suffix=" "/>
      <group prefix="[" suffix="]">
        <text variable="locator" suffix="/"/>
        <text variable="citation-number"/>
      </group>
    </layout>
  </citation>
  <bibliography entry-spacing="0">
    <sort>
      <!-- XXX would prefer to use this but it doesn't work -->
      <key macro="publisher-is-bbf"/>
      <!-- XXX so am currently using this -->
      <key variable="original-publisher"/>
      <key variable="publisher"/>
      <key variable="call-number"/>
      <key variable="title"/>
    </sort>
    <layout>
      <text variable="citation-number" prefix="[" suffix="]"
            display="left-margin"/>
      <group delimiter=", " display="right-inline">
        <text variable="call-number" text-decoration="underline"/>
        <text variable="title" font-style="italic"/>
        <text macro="publisher"/>
        <date date-parts="year" form="text" variable="issued"/>
        <text variable="URL"/>
      </group>
    </layout>
  </bibliography>
</style>

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-10-13 16:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-08 10:17 Can a given publisher's citations be listed first? 'William Lupton' via pandoc-discuss
     [not found] ` <CAEe_xxi5Q+BhE+O2EjfnYZAyF=_hr7HMcgKHcNKEYoFiJNSraw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-09-08 11:53   ` Bastien DUMONT
2023-09-08 12:03     ` 'William Lupton' via pandoc-discuss
     [not found]       ` <CAEe_xxhJ=OgH-FR9U5Q8H7guSuXufC3XxUfKiMVa+mZhjp45Sg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-09-11  9:59         ` 'William Lupton' via pandoc-discuss
     [not found]           ` <CAEe_xxgf_LcjS=Z=482ShAeMvMLdrmfHvYbEfMkVShcEuncROw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-09-11 10:11             ` Bastien DUMONT
2023-09-11 10:27               ` 'William Lupton' via pandoc-discuss
     [not found]                 ` <CAEe_xxgw3Ys_prePE_gxqJqe4HWZWW8CsrwyyY7Y2VovDD9crg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-09-13 10:22                   ` 'William Lupton' via pandoc-discuss
     [not found]                     ` <CAEe_xxg92Yut7LZgw1+QrSW9EWxje5jVta6WAppctkfKsCxLDw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-10-06 14:50                       ` Bernardo C. D. A. Vasconcelos
     [not found]                         ` <76dc5598-cf59-4fee-b516-1ab7171fbe5en-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-10-13 10:28                           ` 'William Lupton' via pandoc-discuss
     [not found]                             ` <CAEe_xxg4TLjd_Htgaws32VnYiBmCaH0tWtfcZecopf0jTBCY0A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-10-13 16:28                               ` bernardovasconcelos-Re5JQEeQqe8AvxtiuMwx3w

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).