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


___________________________________________________________________________________
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 via email to