Skip to content
This repository has been archived by the owner on Apr 30, 2021. It is now read-only.

Issue with strip-periods #185

Closed
kit-lloyd opened this issue Oct 21, 2015 · 6 comments
Closed

Issue with strip-periods #185

kit-lloyd opened this issue Oct 21, 2015 · 6 comments

Comments

@kit-lloyd
Copy link

I am having a problem with csl working with pandoc-citeproc; specifically with Ibid and above n processing as required by the Australian Guide to Legal Citation.

The command I am using is pandoc -s -S --latex-engine=xelatex --filter pandoc-citeproc -- -o test

.pdf test.md

The csl and bibliography are specified in the md documents YAML

aglc.csl is from the Zotero style repository (modified to take out the bibliography and capitalise ibid)

The problem is that "Ibid" is output in the pdf and latex file as "Ibid.," rather than just "Ibid"

For some reason the "strip-periods" does not seem to work and also I do not know how to have the redundant "," removed.

Also I cannot seem to get 'Above n' working

CSL functions well everywhere else and Ibid and Above n work in other applications.

Any suggestions would be greatly appreciated.

This is the Ibid code:

  <citation et-al-min="4" et-al-use-first="1">
      <layout suffix="." delimiter="; ">
        <choose>
          <if position="ibid-with-locator">
            <text term="ibid" strip-periods="true"
  text-case="capitalize-first"/>
            <group delimiter=" ">
              <text variable="locator" strip-periods="true"/>
            </group>
          </if>
          <else-if position="ibid">
            <text term="ibid" strip-periods="true"
  text-case="capitalize-first"/>
          </else-if>
          <else-if position="subsequent">

as for above n ... it does not get inserted (the rest of the processing work fine, such as stripping the authors name) ... but above n and the locator are omitted.

Here is the above n code ...

  <else-if position="subsequent">
            <choose>
              <if type="legal_case bill legislation manuscript"
  match="any">
                <!--don't use short form and above note for legal
  citations -->
                <group delimiter=" ">
                  <group delimiter=", ">
                    <text macro="author-note"/>
                    <choose>
                      <if match="any" variable="title-short">
                        <text macro="title-short"/>
                      </if>
                      <else>
                        <text macro="title"/>
                      </else>
                    </choose>
                  </group>
                  <!-- we could work with title-short here-->
                  <group delimiter=" ">
                    <text macro="date-parenthesis"/>
                    <text macro="article-case-info"/>
                    <text macro="book-container"/>
                    <text macro="publisher"/>
                  </group>
                </group>
                <text macro="manuscript-catchall" prefix=", "/>
                <text macro="date-news" prefix=", "/>
                <group delimiter=", " prefix=" ">
                  <text macro="looseleaf"/>
                  <text macro="page-first"/>
                  <text variable="locator"/>
                </group>
              </if>
              <else>
                <group delimiter=", ">
                  <text macro="author-short"/>
                  <choose>
                    <if disambiguate="true">
                      <text macro="title-short"/>
                    </if>
                  </choose>
                  <text variable="first-reference-note-number"
  prefix="above n "/>
                  <text variable="locator"/>
                </group>
              </else>
            </choose>
@jgm
Copy link
Owner

jgm commented Oct 23, 2015

Can you provide test.md so I can test?

@kit-lloyd
Copy link
Author

Hi John,

Sorry I didn’t know how to upload to GitHub …. here they are:

Kit Lloyd

On 23 Oct 2015, at 2:30 pm, John MacFarlane notifications@github.com wrote:

Can you provide test.md so I can test?


Reply to this email directly or view it on GitHub #185 (comment).

@jgm
Copy link
Owner

jgm commented Oct 23, 2015

here they are:

Where?

@kit-lloyd
Copy link
Author

@jgm
Copy link
Owner

jgm commented Oct 23, 2015

Note to self. I can confirm from trace output that we're getting

      , Output
          [ OStr "ibid." emptyFormatting { stripPeriods = True } ]
          emptyFormatting

at an intermediate step of processing (citeproc:collapsed). But in cits_map, we just have

    , Formatted { unFormatted = [ Str "ibid." , Note [ Para [] ] ] }

@jgm jgm closed this as completed in c0f5adf Oct 23, 2015
@jgm
Copy link
Owner

jgm commented Oct 23, 2015

For the first-reference-note issue, see #31.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants