[Tex/LaTex] Creating Entry in Bibtex for Executive Orders

bibtexlegal-style

Anybody have any idea on how to create the proper APA entry for an Executive Order in my .bib? I can't seem to find any guidance on what fields to use to make it work.

The reference should appear like this:

Exec. Order No. 13,423, 3 C.F.R. 3919. (2007).

Best Answer

If you want to do this with more than a hack, it would be best to use biblatex. Here's a sample using the apa style for biblatex.

Create a new .bib entry type

First we create a new bib entry type for executive orders. This allows us to enter the information properly rather than all in one line as would be necessary if you use the misc entry type. Most bibliography managers should allow you to create new entry types. So an @executiveorder entry has the following fields:

@executiveorder{Executive-Order2007,
        Number = {13423},
        Pages = {919},
        Volume = {3},
        Year = {2007}}

Plus an optional Note field.

Then we use biblatex to create a new bibliography driver for this entry type.

\documentclass{article}
% The following bib file contains a new entry type @executiveorder
% The required fields are Number, Pages, Volume and Year.
% The note field can also be used optionally
% Any other fields will be ignored

\begin{filecontents}{\jobname.bib}


@executiveorder{Executive-Order2007,
    Number = {13423},
    Pages = {919},
    Volume = {3},
    Year = {2007}}

@executiveorder{Executive-Order2008,
    Number = {10200},
    Pages = {200},
    Volume = {4},
    Year = {2008}}

\end{filecontents}

\usepackage[american]{babel}
\usepackage[utf8]{inputenc}
\usepackage{csquotes}
\usepackage[backend=biber,style=apa]{biblatex}
\addbibresource{\jobname.bib} 

\DeclareLanguageMapping{english}{american-apa}

% Define some fixed texts and abbreviations
% Note that the final punctuation for the abbreviations
% is handled by biblatex
\newcommand*{\execname}{Executive Order}
\newcommand*{\execcitename}{Exec.\ Ord}
\newcommand*{\execnumname}{No}
\newcommand*{\execcitenumname}{No}
\newcommand*{\CFRname}{C.\ F.\ R}

% Make a new driver for the executiveorder entry type
\DeclareBibliographyDriver{executiveorder}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \printtext{\execname}
  \newblock
  \printtext{\execnumname}\newunit
  \usebibmacro{execnumber}
  \newunit\addcomma\newblock
  \usebibmacro{execvolume}%
  \newblock
  \printtext{\CFRname}%
  \adddot\newunit
  \usebibmacro{execpage}%
  \newblock\newunit
  \usebibmacro{labelyear+extrayear}%
  \newunit\newblock
  \printfield{note}%
  \usebibmacro{apa:pageref}%
  \usebibmacro{apa:finpunct}%
  \usebibmacro{finentry}}

% Now define macros to print the parts of the reference itself
\newbibmacro*{execnumber}{%
  \printfield[execnumber]{number}
  %
  }
\newbibmacro*{execvolume}{%
  \printfield[execvolume]{volume}
  }
% The page reference is composed of the Volume+page without a space
\newbibmacro*{execpage}{%
  \usebibmacro{execvolume}
  \unspace
  \printfield[execpage]{pages}
  \newunit
  }

% formatting directives for the parts of the executive order
\DeclareFieldFormat{execnumber}{#1}
\DeclareFieldFormat{execvolume}{#1}
\DeclareFieldFormat{execpage}{#1}

% since Exec. Orders have no author, we adapt the noname cite macro
% to test for this entry type and use it to format the citation

\renewbibmacro*{cite:noname}{%
    \ifentrytype{executiveorder}{%
    \printtext{\execcitename}
    \adddot\newunit
    \printtext{\execcitenumname}
    \adddot\newunit
    \printfield[execnumber]{number}}
    {\printfield[citetitle]{labeltitle}}}



\begin{document}
\section*{What did the President do?}
The President, in  \cite{Executive-Order2007} ordered something.
He ordered something else the next year. \parencite{Executive-Order2008}

\printbibliography
\end{document}

output of code