Description
citeproc
has no support for pandoc
's AuthorInText
.[1][2] It will
be good if citeproc
implements AuthorInText
natively.
The pandoc
executable simulates AuthorInText
by emitting
AuthorOnly
and SuppressAuthor
in sequence for the associated
key.[3] I believe citeproc
could do likewise. The consequence of
this is that, citeproc
will offer AuthorOnly
and AuthorInText
as
two new features, in addition to existing linkCitations
, in
CiteprocOptions
[4].
[1]: CitationItemType
of citeproc
makes no mention of AuthorInText
. So, AuthorInText
is not supported by citeproc
.
data CitationItemType =
AuthorOnly -- e.g., Smith
| SuppressAuthor -- e.g., (2000, p. 30)
| NormalCite -- e.g., (Smith 2000, p. 30)
deriving (Show, Eq, Ord)
[2]: CitationMode
of pandoc-types
supports AuthorInText
in additon to SuppressAuthor
.
data CitationMode
= AuthorInText
| SuppressAuthor
| NormalCitation
deriving (Show, Eq, Ord, Read, Typeable, Data, Generic)
[3]: In fromPandocCitations
of pandoc
simulates AuthorInText
by emitting in AuthorOnly
and SuppressAuthor
in sequence for the associated key.
in if Pandoc.citationId c == "*"
then []
else
case citationMode c of
AuthorInText -> [ cit{ citationItemType = AuthorOnly
, citationItemSuffix = Nothing }
, cit{ citationItemType =
Citeproc.SuppressAuthor
, citationItemPrefix = Nothing } ]
NormalCitation -> [ cit ]
Pandoc.SuppressAuthor
-> [ cit{ citationItemType =
Citeproc.SuppressAuthor } ]
[4]: CiteprocOptions of
citeproc`
newtype CiteprocOptions =
CiteprocOptions
{ linkCitations :: Bool
-- Create hyperlinks from citations to bibliography entries
}
deriving (Show, Eq)