%%
%% \iffalse filename: specrefs.dtx \fi
%
%<*doc>
\input driver
\thisis{specrefs}{Specific Reference Types}

These reference types could fall under the umbrella \rtype{book} reference type,
but it is helpful to include them to provide unique formatting and/or to save on
data entry.

\input docparams
%</doc>
\hi@newcite{cjs}{Corpus Juris Secondum}{other}{%
    \hi@newcite@form{fc}{#1}{%
        \hi@citeguts{%
            \hi@kv@vol\space
            C.J.S.
            \hi@fn@arttitle{\hi@kv@name}%
            \hi@maybepage{ }%
        }%
        \hi@parens@add{\hi@paren@date}{\hi@kv@year}%
        \the\hi@param@parens
    }
    \protected@edef\reserved@a{%
        \hi@kv@vol\space C.J.S. \hi@fn@arttitle{\hi@kv@name}%
    }%
    \@expand{\hi@supra@form{#1}}\reserved@a i%
}
%<*doc>
\keyparameters{
    {vol}{The volume number.}
    {name}{The entry name.}
    {year}{The year of publication.}
}
%</doc>
%
\hi@newcite{rfc}{An IETF Request for Comments}{other}{%
    \expandafter\hi@book@titlethe\expandafter{\hi@kv@name}%
    \hi@abbrev@name{Internet Engineering Task Force}{\def\hi@kv@publisher}%
    \protected@edef\reserved@a{%
        https://datatracker.ietf.org/doc/html/rfc\hi@kv@number
    }
    \@expand{\KV@hi@url}\reserved@a i\@empty
    \protected@edef\hi@kv@number{RFC \hi@kv@number}%
    \@expand{\hi@supra@form{#1}}\hi@kv@number i%
    \hi@book@pubparen
    \hi@ifset\hi@kv@year{}{\PackageError\hi@pkgname{Year is required for #1}}%
    \hi@newcite@form{fc}{#1}{%
        \hi@citeguts{%
            \hi@ifset\hi@kv@author{%
                \hi@fn@bookauthor{\hi@kv@author@sortable}, % space
            }{}%
            \hi@fn@booktitle{\hi@kv@name}%
            \hi@maybepage{\hi@page@space\hi@kv@name}%
        }%
        \hi@book@paren
        \the\hi@param@parens
    }%
    \hi@newcite@form{ifc}{#1}{%
        \hi@kv@number
    }%
}
%<*doc>
This reference type automatically adds the serial number, inline citation
format, and URL based just on the RFC number.

\keyparameters{
    {author, name, year}{Bibliographic information for the RFC.}
    {number}{The RFC number.}
}
\bookparenparameters
%</doc>
%<*test>

\section{specrefs.dtx}


\defrfc{rfc1945}{
author=T. Berners-Lee et al.,
number=1945,
title=Hypertext Transfer Protocol---HTTP/1.0,
date=may 1996,
}

\AssertBox{\note{rfc1945 at 10}}{\InFootnote{\textsc{T. Berners-Lee et al.},
\textsc{Hypertext Transfer Protocol---HTTP/1.0}, at 10 (Internet Eng'g Task Force,
RFC 1945, May 1996), \url{https://datatracker.ietf.org/doc/html/rfc1945}.}}

%</test>
