7

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).

11
  • 1
    Welcome to TeX.sx! Perhaps you could also show an example of or what is typically included in such a reference? Feb 16, 2013 at 21:48
  • Thank you! Typically, they are seen like this: Exec. Order No. 13,423, 3 C.F.R. 3919. (2007).
    – BoZiffer
    Feb 16, 2013 at 21:51
  • Are you concerned about the format of the reference or the citation (or both?). I would recommend biblatex-apa.
    – Alan Munn
    Feb 16, 2013 at 21:51
  • @AlanMunn mostly what information needs to be in the .bib file so that it appears in the format as shown above.
    – BoZiffer
    Feb 16, 2013 at 22:01
  • 1
    Well the easiest part of your problem is to 'cite' the reference without having it appear. Imagine the bib key is 'eo13423'; then you just use \nocite{eo13423} and it will be included in your reference list. also, you could consider using an @misc entry that just contains title (which holds all the information except the date) and year. If you aren't going to cite it in the document, this would be an easy solution.
    – jon
    Feb 16, 2013 at 23:45

1 Answer 1

10

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

6
  • I guess that these days, you'd use bib strings?
    – cfr
    Jun 24, 2018 at 16:51
  • @cfr Yes, probably. I haven't kept up much on that.
    – Alan Munn
    Jun 24, 2018 at 16:58
  • Hey @AlanMunn, I tried using your MWE as suggested, however it throws an error when compiling: ! Package biblatex Error: Bibliography macro 'labelyear+extrayear' undefined.
    – user168390
    Jul 24, 2019 at 7:32
  • 1
    @user168390 This is unfortunately an old answer, and various things have changed in biblatex in the meantime. I'll see if I can update it to work with current biblatex.
    – Alan Munn
    Jul 24, 2019 at 11:52
  • @user168390 For a very detailed explanation of how to do this using modern biblatex see How can I create entirely new data types with BibLaTeX/Biber?.
    – Alan Munn
    Jul 24, 2019 at 12:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .