ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Joel via ntg-context <ntg-context@ntg.nl>
To: "ntg-context@ntg.nl" <ntg-context@ntg.nl>
Cc: Joel <uaru99@yahoo.com>
Subject: Displaying names in Chicago-Turabian "note" style
Date: Tue, 21 Dec 2021 17:51:17 +0000 (UTC)	[thread overview]
Message-ID: <864272370.146201.1640109077959@mail.yahoo.com> (raw)
In-Reply-To: <864272370.146201.1640109077959.ref@mail.yahoo.com>


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

I could not find any existing solution for using Chicago-Turabian "note" style in ConTeXt, so I have started my own attempt.

Chicago-Turabian uses footnotes to display the author's details on the same page, but also uses a bibliography to display an alphabetical list of the sources again at the end. The footnotes display somewhat differently each time a source is shown. The first time a source is cited, the footnote contains a long, detailed reference. Subsequent reappearances of the same citation are abbreviated somewhat. And "ibid" is used when the source is cited twice in a row. The bibliography entry contains really detailed information, similar to what was shown in the first footnote, with minor differences.

This code uses three macros: \turabian, used only the first time a source is reference, \shortturabian, used for subsequent references of the same source, and `\ibid, for when a source is referenced twice in a row. Each of these macros simply creates a footnote, showing the author's details, and also uses \nocite to make sure an entry is added to \placelistofpublications. Page details are optionally added in #2, and this information only appears in the footnotes.
I am having trouble getting the code to display the author's names correctly. Every attempt ends with strange results, like "FirstLast" with no space or just "Initial Last". Chicago-Turabian displays the names differently, depending on the placement:

(1) First, the \turabian macro should show in ordinary First + Last order in the footnote, example: "Anna Burns, Robert Smith, and Judith Green", but if the number of authors exceeds 3, it display "Anna Burns et al."

(2) Second, the \shorturabian macro should show just the Last names in the footnote: "Burns, Smith, and Green", also using "Burns et al." if there are more than 3 names.

(3) The \ibid macro doesn't show any names.

(4) Finally, the actual bibliographic entry in \placelistofpublications uses a strange format, with the first author listed as Last + First order, all subsequent authors in First + Last order, such as "Burns, Anna, Robert Smith, and Judith Green.", meanwhile "et al." is never used in the bibliography, even if there are 100 authors.

Any help would be greatly appreciated!
--Joel
Minimal working example follows:

\startbuffer [bib]
@Book{ball1996,
author = {Ball, Larry},
title = {Desert lawmen: The high sheriffs \word{of} New Mexico \word{and} Arizona, 1846-1912},
publisher = {University \word{of} New Mexico Press},
year = {1996},
address = {Albuquerque, NM},
isbn = {9780826317001}
}
 
@Book{minear2009,
author = {Minear, Tish and Limon, Janet},
title = {Discover Native America: Arizona, Colorado, New Mexico, \word{and} Utah},
publisher = {Hippocrene Books},
year = {2009},
address = {New York, NY},
isbn = {9780781803274}
}

\stopbuffer

\define[3]\ifisempty{%
        \setbox0=\hbox{#1\unskip}%
        \ifdim\wd0=0pt
            #2%
        \else
            #3%
        \fi
}%

\usebtxdataset[bib.buffer]

\startbtxrenderingdefinitions[chicagonum]

\definebtx[chicagonum]
    [default=default,
    specification=chicagonum,
    otherstext={\btxspace{\it\btxlabeltext{others}}},
    etallimit=10,
    etaldisplay=\btxparameter\c!etallimit,
    journalconversion=\v!normal,
    monthconversion=\v!month,
    title=yes,
    separator:names:2={\btxcomma},
    separator:names:3={\btxcomma\btxlabeltext{and}\space},
    separator:names:4={\btxspace\btxlabeltext{and}\space}]
   
\setupbtxlist[chicagonum]

\definebtxrendering[chicagonum]
    [specification=chicagonum,
    sorttype=authoryear,
    numbering=no]


\startsetups btx:chicagonum:list:book
    \btxdoif{author}{
        \btxflush{author}
        \btxperiod
    }
    \btxdoif{title}{
        {\it\Words \btxflush{title}}
        \btxperiod
    }
    \btxdoif{address}{
        \btxflush{address}
        \btxcolon
    }
    \btxdoif{publisher}{
        \btxflush{publisher}
        \btxcomma
    }
    \btxdoif{year}{
        \btxflush{year}
        \btxperiod
    }
    \removeunwantedspaces
\stopsetups


\startsetups btx:chicagonum:list:article
    \btxdoif{author}{
        \btxflush{author}
        \btxperiod
    }
    \btxdoif{title}{
        \quotation{\Words \btxflush{title}}
        \btxperiod
    }
    \btxdoif{journal}{
        {\it\Words \btxflush{journal}}
    }    
    \btxdoif{volume}{
        \btxflush{volume}
        \btxcomma
    }
    \btxdoif{number}{
        no.~\btxflush{number}
    }
    \btxdoifelse{month}{
        (\btxflush{month} \btxflush{year})
        \btxcolon
    }{
        \btxdoif{year}{
            (\btxflush{year})
        }
        \btxcolon
   }
    \btxdoif{pages}{
        \btxflush{pages}
        \btxperiod
    }
    \removeunwantedspaces
\stopsetups

\stopbtxrenderingdefinitions


\setupbtx[chicagonum][dataset=default,
    authorconversion={normal},
     etallimit=]

\setupbtx[chicagonum:list:author]
    [authorconversion={normal},
     etallimit=]
\setupbtx[chicagonum:cite:author]
    [authorconversion={normal},
     etallimit=3,
     etaldisplay=1]

\usebtxdefinitions[chicagonum]

\define[2]\turabian{%
    \footnote{%
        \ifisempty{\cite[author][#1]}{}{\cite[author][#1]}%
        \ifisempty{\cite[title][#1]}{}{,\ {\it\Words \cite[title][#1].}}%
        \ifisempty{\cite[address][#1]\cite[publisher][#1]\cite[year][#1]}{}{\ (}%
            \cite[address][#1]: ~%
            \ifisempty{\cite[journal][#1]}{\ifisempty{\cite[publisher][#1]}{}{\cite[publisher][#1]:\ }}{\cite[journal][#1]:\ }%
            \ifisempty{\cite[year][#1]}{}{,\ \cite[year][#1]}%
        \ifisempty{\cite[address][#1]\cite[publisher][#1]\cite[year][#1]}{}{)}%
        \ifisempty{#2}{.}{,\ #2.}%
    }%
    \nocite[#1]%
}%


\define[2]\shortturabian{%
    \footnote{%
        \ifisempty{\cite[author][#1]}{}{\cite[author][#1]}%
        \ifisempty{#2}{.}{,\ #2.}%
    }%
    \nocite[#1]%
}%

\define[2]\ibid{
    \footnote{%
        Ibid\ifisempty{#2}{.}{,\ #2.}%
    }%
    \nocite[#1]%
}

\starttext

    \input knuth \turabian{ball1996}{1\endash 23}    
    
    \input knuth \turabian{minear2009}{32\endash 23}
    
        \ibid{minear2009}{32\endash 23}
        \ibid{minear2009}{}
    \input knuth \turabian{ball1996}{}    
    
    \input knuth \shortturabian{minear2009}{121\endash 99}
    
    \startchapter[title=Bibliography]
        \placelistofpublications
    \stopchapter

\stoptext



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

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

       reply	other threads:[~2021-12-21 17:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <864272370.146201.1640109077959.ref@mail.yahoo.com>
2021-12-21 17:51 ` Joel via ntg-context [this message]
2021-12-21 18:02   ` Wolfgang Schuster via ntg-context
2021-12-21 18:18   ` Joey McCollum via ntg-context

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=864272370.146201.1640109077959@mail.yahoo.com \
    --to=ntg-context@ntg.nl \
    --cc=uaru99@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).