ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Taco Hoekwater <taco@elvenkind.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Two bibliography problems
Date: Sun, 10 Aug 2008 11:08:35 +0200	[thread overview]
Message-ID: <489EB013.3020209@elvenkind.com> (raw)
In-Reply-To: <02F19FE6-61AF-461B-860F-93322543DA88@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 665 bytes --]

Michael Green wrote:
> 
> The first problem, with the two periods after a book title, has been 
> with me since at least last year. I can reproduce it with the following:
> 
> [A] ConTeXt version.
> 
> ConTeXt  ver: 2008.08.05 18:47 MKIV  fmt: 2008.8.6  int: english/english

Ah. This is using an experimental version of the bib module. I uploaded
a new version of the module for testing two months ago, after reports
that the original bibl-apa was not quite following the apa guidelines.
There has been a lack of feedback up until now, so be careful,
there may well be more problems.

Meanwhile, you could try the attached bibl-apa.tex instead.

Best wishes,
Taco

[-- Attachment #2: bibl-apa.tex --]
[-- Type: text/x-tex, Size: 10086 bytes --]

%D \module
%D   [       file=bibl-apa,
%D        version=2008.06.09,
%D          title=APA bibliography style,
%D       subtitle=Publications,
%D         author={Taco Hoekwater},
%D           date=\currentdate,
%D      copyright={Public Domain}]
%C
%C Donated to the public domain. Use at your own risk

\unprotect

\setupcite
       [author,year]
       [\c!andtext={ and },
        \c!otherstext={ et al.},
        \c!pubsep={, },
        \c!lastpubsep={ and },
        \c!compress=\v!no,
        \c!inbetween={ },
        \c!left={(},
        \c!right={)}]

\setupcite
       [authoryear]
       [\c!andtext={ and },
        \c!otherstext={ et al.},
        \c!pubsep={, },
        \c!lastpubsep={ and },
        \c!compress=\v!yes,
        \c!inbetween={ },
        \c!left={(},
        \c!right={)}]

\setupcite
       [authoryears]
       [\c!andtext={ and },
        \c!otherstext={ et al.},
        \c!pubsep={, },
        \c!lastpubsep={ and },
        \c!compress=\v!yes,
        \c!inbetween={, },
        \c!left={(},
        \c!right={)}]

\setupcite
       [key,serial,authornum,page,short,type,doi,url]
       [\c!andtext={ and },
        \c!otherstext={ et al.},
        \c!pubsep={, },
        \c!lastpubsep={ and },
        \c!compress=\v!no,
        \c!inbetween={ },
        \c!left={[},
        \c!right={]}]

\setupcite
       [num]
       [\c!andtext={ and },
        \c!otherstext={ et al.},
        \c!pubsep={, },
        \c!lastpubsep={ and },
        \c!compress=\v!yes,
        \c!inbetween={--},
        \c!left={[},
        \c!right={]}]


\setuppublications[%
    \c!sorttype=,
    \c!criterium=,
    \c!refcommand=authoryears,
    \c!numbering=\v!no,
    \c!autohang=\v!no]

\setuppublicationlist
   [\c!width=24pt,
    \c!artauthor=\invertedshortauthor,
    \c!editor=\invertedshortauthor,
    \c!author=\invertedshortauthor,
    \c!namesep={, },
    \c!lastnamesep={ and },
    \c!finalnamesep={ and },
    \c!firstnamesep={, },
    \c!juniorsep={ },
    \c!vonsep={ },
    \c!surnamesep={, },
    \c!authoretallimit=5,
    \c!editoretallimit=5,
    \c!artauthoretallimit=5,
    \c!authoretaldisplay=5,
    \c!editoretaldisplay=5,
    \c!artauthoretaldisplay=5,
    \c!authoretaltext={ et al.},
    \c!editoretaltext={ et al.},
    \c!artauthoretaltext={ et al.},
]

\def\maybeyear#1{#1}

\def\etalchar#1{#1}

%D \macros{insertchapter,insertpublisher}

%D Some shortcuts.

% ((#1(type\ |)chapter#2)|#3)
 
\def\insertchap#1#2#3%
  {\insertchapter
    {#1\insertbibtype{}{\ }{chapter\ }}{#2}%
    {#3}}

% #1city, country: pubname#2
% #1country: pubname#2
% #1pubname#2
% #1city, country#2
% #3

\def\insertpublisher#1#2#3%
   {\insertpubname
       {\insertcity
            {#1}
            {\insertcountry{, }{}{}: }%
            {#1\insertcountry{}{: }{}}}%
       {#2}%
       {\insertcity
            {#1}
            {\insertcountry{, }{}{#2}}%
            {\insertcountry{#1}{#2}{#3}}}%
    }

\def\insertorg#1#2#3%
   {\insertorganization
       {\insertcity
            {#1}
            {\insertcountry{, }{}{#2}: }%
            {\insertcountry{}{: }{#2}}}%
       {}%
       {\insertcity
            {#1}
            {\insertcountry{, }{}{#2}}%
            {\insertcountry{}{#2}{#3}}}%
    }



\setuppublicationlayout[article]{%
   \insertartauthors{}{ }{\insertthekey{}{ }{}}%
   \insertpubyear{(}{). }{\unskip.}%
   \insertarttitle{\bgroup }{\egroup. }{}%
   \insertjournal{\bgroup \it}{\egroup}
    {\insertcrossref{In }{}{}}%
   \insertvolume
    {\bgroup \it, }
    {\insertissue{\egroup\/(}{)}{}\insertpages{, }{.}{.}}
    {\insertpages{, pp. }{.}{.}}%
   \insertnote{ }{.}{}%
   \insertcomment{}{.}{}%
}

\newif\ifeditedbook
\setuppublicationlayout[book]{%
   \insertauthors{}{ }{\inserteditors{}{, editor%
                         \ifnum\getvalue{editor@num}> 1 s\fi
                             \ \global\editedbooktrue 
                     }{\insertthekey{}{. }{}}}%
   \insertpubyear{(}{). }{\unskip.}%
   \inserttitle
        {\bgroup\it }%
        {\/\egroup 
         \ifeditedbook
           \global\editedbookfalse
           \insertvolume
                { Number~}%
                {\insertseries
                    { in~\bgroup}%
                    {\egroup. }%
                    {\insertcrossref{ in~}{}{. }}}%
                {\insertseries{ }{.}{.}}%
        \else
       \insertcrossref
        {\insertchap{, }{}{}%
         \insertpages{, pages }{. }{. }%
         \insertvolume{Volume~}{ of~}{}%
         }%
        {}%
        {\insertvolume
                   {, volume~}%
                   {\insertseries
                      { of~\bgroup\it}%
                      {\egroup}
                      {}}
                   {}%
                   \insertchap{, }{}{}%
                   \insertpages{, pages }{.}{.}%
                }%
        \fi}%
        {}%
   \insertedition{ }{ edition}{}%
   \insertpublisher{ }{.}{.}%
   \insertpages{ }{p. }{ }%
   \insertnote{}{.}{}%
}

\setuppublicationlayout[inbook]{%
   \insertauthors{}{ }{\inserteditors{}{, editor%
                         \ifnum\getvalue{editor@num}> 1 s\fi
                             \ \global\editedbooktrue 
                     }{\insertthekey{}{. }{}}}%
   \insertpubyear{(}{). }{\unskip.}%
   \inserttitle
     {\bgroup\it }%
     {\/\egroup
      \ifeditedbook
         \global\editedbookfalse
         \insertvolume
           { number~}%
           {\insertseries
              { in~\bgroup}%
              {\egroup. }%
              {\insertcrossref{ in~}{}{.}}}%
           {\insertseries{ }{.}{}}%
      \else
        \insertcrossref
          {\insertchap{, }{}{}%
           \insertpages{, pages }{. }{. }%
           \insertvolume{Volume~}{ of~}{}%
           }%
          {}%
          {\insertvolume
              {, volume~}%
              {\insertseries
                 { of~\bgroup\it}%
                 {\egroup}
                 {}}
              {}%
           \insertchap{, }{}{}%
           \insertpages{, pages }{.}{}%
           }%
        \fi}%
     { }%
   \insertedition{ }{ edition.}{}%
   \insertpublisher{ }{.}{.}%
   \insertnote{ }{.}{}%
}

\setuppublicationlayout[booklet]{%
   \insertauthors{}{ }{\insertthekey{}{. }{}}%
   \insertpubyear{(}{). }{}%
   \inserttitle{\bgroup }{\egroup \insertseries{ (}{)}{}. }{}%
   \insertedition{ }{ edition.}{}%
   \insertpublisher{ }{.}{.}%
   \insertpages{}{p. }{}%
   \insertnote{ }{.}{}%
}

\setuppublicationlayout[manual]{%
   \insertauthors{}{ }{\insertthekey{}{. }{}}%
   \insertpubyear{(}{). }{}%
   \inserttitle{\bgroup \it }{\/\egroup \insertseries{ (}{)}{}. }{}%
   \insertedition{ }{ edition.}{}%
   \insertorg{ }{.}{.}%
   \insertpages{}{p. }{}%
   \insertnote{ }{.}{}%
}

\setuppublicationlayout[incollection]{%
   \insertartauthors{}{ }{\insertthekey{}{. }{}}%
   \insertpubyear{(}{). }{}%
   \insertarttitle{\bgroup }{\egroup. }{}%
   \inserttitle
    {In \inserteditors{}%
        {, editor\ifnum\getvalue{editor@num}> 1 s\fi, }%
        {}%
    \bgroup\it}%
    {\egroup 
         \insertseries
              {\insertvolume{, number }{~in }{ }}%
              {}%
              {}%
         \insertchap{\unskip, }{ }{ }%
         \insertpages{\unskip, pages~}{. }{\unskip. }% 
          \insertedition{ }{ edition}{}%
          \insertpublisher{. }{.}{.}%
        }%
        {In \insertcrossref{}{}{}%
         \insertchap{\unskip, }{ }{ }%
         \insertpages{\unskip, pages~}{. }{\unskip. }% 
        }%
   \insertnote{ }{.}{}%
}

\setuppublicationlayout[inproceedings]{%
   \insertauthors{}{ }{}%
   \insertpubyear{(}{). }{}%
   \insertarttitle{\bgroup }{\egroup. }{}%%
   \inserttitle
    {In \inserteditors{}%
        {, editor\ifnum\getvalue{editor@num}> 1 s\fi, }%
        {}%
    \bgroup\it}%
    {\egroup 
         \insertseries
              {\insertvolume{, number }{~in }{ }}%
              {}%
              {}%
         \insertchap{\unskip, }{ }{ }%
         \insertpages{, pages~}{}{}%
         \insertorg{. }{.}{.}%
        }%
        {In \insertcrossref{}{}{}%
         \insertchap{\unskip, }{ }{ }%
         \insertpages{\unskip, pages~}{. }{\unskip. }% 
        }%
   \insertnote{ }{.}{}%
}

\setuppublicationlayout[proceedings]{%
   \inserteditors{}{, editor%
                         \ifnum\getvalue{editor@num}> 1 s\fi
                             \ \global\editedbooktrue 
                     }{\insertthekey{}{ }{}}%
   \insertpubyear{(}{). }{}%
   \inserttitle
    {\bgroup\it}%
    {\egroup 
     \insertseries
        {\insertvolume{, number }{~in }{ }}%
        {}%
        {}%
     \insertchap{\unskip, }{ }{ }%
     \insertpages{, pages~}{}{}%
     \insertorg{. }{.}{.}%
    }%
    {}%
   \insertnote{ }{.}{}%
}

\setuppublicationlayout[mastersthesis]{%
   \insertauthors{}{ }{}%
   \insertpubyear{(}{). }{}%
   \inserttitle{\bgroup }{\egroup \insertseries{ (}{)}{}. }{}%
   \insertbibtype{}{, }{Master's thesis, }%
   \insertpublisher{ }{.}{.}%
   \insertpages{ }{p. }{}%
   \insertnote{ }{.}{}%
}

\setuppublicationlayout[phdthesis]{%
   \insertauthors{}{ }{}%
   \insertpubyear{(}{). }{}%
   \inserttitle{\bgroup\it }{\egroup \insertseries{ (}{)}{}. }{}%
   \insertbibtype{}{, }{PhD thesis,}%
   \insertpublisher{ }{.}{.}%
   \insertpages{ }{ p. }{}%
   \insertnote{ }{.}{}%
}

\setuppublicationlayout[misc]{%
   \insertauthors{}{ }{\insertthekey{}{. }{}}%
   \insertpubyear{(}{). }{}%
   \inserttitle{\bgroup }{\egroup \insertseries{ (}{)}. }{}%
   \insertpublisher{ }{.}{.}%
   \insertpages{ }{p. }{}%
   \insertnote{ }{.}{}%
}

\setuppublicationlayout[techreport]{%
   \insertauthors{}{ }{}%
   \insertpubyear{(}{). }{}%
   \inserttitle{\bgroup }{\egroup \insertseries{ (}{)}{}. }{}%
   \insertbibtype{}{\insertvolume{ }{, }{, }}{Technical Report}%
   \insertpublisher{ }{.}{.}%
   \insertpages{ }{p. }{}%
   \insertnote{ }{.}{}%
}

\setuppublicationlayout[unpublished]{%
   \insertauthors{}{ }{}%
   \insertpubyear{(}{). }{}%
   \inserttitle{\bgroup }{\egroup \insertseries{ (}{)}{}. }{}%
   \insertpublisher{ }{.}{.}%
   \insertpages{ }{p. }{}%
   \insertbibtype{(}{)}{}%
   \insertnote{ }{.}{}%
}

\protect

[-- Attachment #3: Type: text/plain, Size: 487 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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2008-08-10  9:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1.1218276005.32655.ntg-context@ntg.nl>
2008-08-09 22:03 ` Michael Green
2008-08-10  9:08   ` Taco Hoekwater [this message]
2008-08-12  1:17 Michael Green
  -- strict thread matches above, loose matches on Subject: below --
2008-08-08 23:28 Michael Green
2008-08-09  7:53 ` Taco Hoekwater

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=489EB013.3020209@elvenkind.com \
    --to=taco@elvenkind.com \
    --cc=ntg-context@ntg.nl \
    /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).