8

This is what one of my sources looks like

@misc{Madlena11, 
Author={Chavala Madlena},
Publisher={Guardian},   
Title = {Telecomix: tech support for the Arab spring}, 
url = {http://www.guardian.co.uk/technology/2011/jul/07/telecomix-arab-spring}
}

However, sometimes I have a source that doesn't have an Author such as:

@misc{RT12, 
%Author={},
Publisher={RT TV Network},   
Title = {Anti-ACTA day: Angry crowds take action}, 
url = {http://rt.com/news/acta-protests-rallies-europe-089/}
}

My problem is when the Author is not listed it doesn't sort by Publisher or even display the publisher in the references, nor the URL. How can I fix this?

2 Answers 2

12

Use the key field:

@misc{RT12, 
key={some string reflecting how you wish the entry alphabetized},
Publisher={RT TV Network},   
Title = {Anti-ACTA day: Angry crowds take action}, 
url = {http://rt.com/news/acta-protests-rallies-europe-089/}
}

Assuming you want the entry to be sorted as "RT TV Network", then use

key={RT TV Network}

The url field is used only if the bibliography style knows about it. For example, with

\usepackage[numeric]{natbib}
\bibliographystyle{plainnat}

then URLs are showed. And the contents of key will be used in place of the author.

Example

\begin{filecontents*}{\jobname.bib}
@misc{Madlena11, 
Author={Chavala Madlena},
Publisher={Guardian},   
Title = {Telecomix: tech support for the {Arab} spring}, 
url = {http://www.guardian.co.uk/technology/2011/jul/07/telecomix-arab-spring}
}

@misc{RT12, 
key={aaaa},
Publisher={RT TV Network},   
Title = {{Anti}-{ACTA} day: {Angry} crowds take action}, 
url = {http://rt.com/news/acta-protests-rallies-europe-089/}
}

\end{filecontents*}

\documentclass{article}

\usepackage[numbers]{natbib}
\usepackage{url}

\begin{document}
\cite{Madlena11}, \cite{RT12}

\bibliographystyle{plainnat}
\bibliography{\jobname}
\end{document}

The filecontents* is just for having the .bib file inside the source. Note also the braces to force capitalization.

enter image description here

3
  • Can you be a little more specific what I can use as the string for the key. Also, why would the URL not get displayed in either situation?
    – DomX23
    May 4, 2012 at 23:03
  • Also is there a similar way to display the publishers?
    – DomX23
    May 4, 2012 at 23:07
  • Unfortunately, now I do not get any errors or warnings but it still does not display the publisher. THis is what it looks like @misc{RT12, key={RT TV Network}, Publisher={RT TV Network}, Title = {Anti-ACTA day: Angry crowds take action}, url = {rt.com/news/acta-protests-rallies-europe-089} } Also, urls are not displaying using what you have provided. What am I doing wrong?
    – DomX23
    May 4, 2012 at 23:42
0

Another option (especially if you don't like having the key field displayed at the beginning of your entry (or at all) or have to customize each bibliographic entry to use key instead of publisher) is to customize the BST file. Since your provided code has natbib using plainnat, you can find plainnat.bst in your TeX repository and place a local copy with a different name (like plainnat-copy.bst) into your working directory. There are four steps in modifying your local copy of plainnat-copy.bst: First, update the misc function to account for your usage of publisher instead of howpublished. Second, update the presort function to sort by publisher when there is no author. Third, write the rule for how to sort by publisher. Fourth, have your TeX file use your newly customized BST file.

Note: I am using the 2007 version of plainnat.bst, which is the latest as of this posting in 2022.

  1. In your local copy of plainnat-copy.bst, search for the misc function and replace all instances of howpublished with publisher. I show the new version here:
FUNCTION {misc}
{ output.bibitem
  format.authors output
  author format.key output
  title publisher new.block.checkb
  format.title output
  publisher new.block.checka
  publisher output
  format.date output
  format.issn output
  format.url output
  new.block
  note output
  fin.entry
  empty.misc.check
}
  1. Search for the presort function (starts with FUNCTION {presort}). As you work here, note that the language in the BST file implements a postfix notation. We'll focus just on this portion from the middle of the function:
        { type$ "manual" =
            'author.organization.sort
            'author.sort
          if$
        }

Perhaps you'll recognize that this is the innermost of a set of nested if statements that apply different sorting rules to different bibliographic entry types and that there is not yet a branch for the misc type. By default, when the algorithm gets to this innermost if, the test type$ "manual" = returns false (because your entry is a misc not a manual) so the algorithm skips the next (first) option and applies the author.sort rule to all misc entries. We'll modify this second option to insert the next deeper level in these nested if statements to establish a branch specific to misc entries.

        { type$ "manual" =
            'author.organization.sort
            { type$ "misc" =
              author empty$
              and
                'publisher.sort
                'author.sort
                if$
            }
          if$
        }

For anchoring, take note that the first two lines and the last two lines are the same in the original version and this modified version; I replaced only the middle line with the new code for the misc type. The new logic is as follows: If the entry is not a manual type, then the algorithm proceeds to the second line following, which is the next deeper level in the nested if statements. Then it tests whether the type is misc and has no author; if both of these are true, then it will apply the publisher.sort rule (which we'll write in step 3 below); else it will apply the author.sort rule, so that all other entries are not affected by this change.

  1. For the publisher.sort function, paste the following code into your plainnat-copy.bst right above the presort function that you just modified so that this publisher.sort function is between editor.organization.sort and presort functions:
FUNCTION {publisher.sort}
{ publisher empty$
    { key empty$
        { "to sort, need author, publisher, or key in " cite$ * warning$
          ""
        }
        { key sortify }
      if$
    }
    { "The " #4 publisher chop.word sortify }
  if$
}
  1. In your TeX file, you'll need to change this line to account for your newly customized file: \bibliographystyle{plainnat-copy}. Here's the MWE:
\begin{filecontents*}{\jobname.bib}
@misc{Madlena11, 
Author={Chavala Madlena},
Publisher={Guardian},   
Title = {Telecomix: tech support for the {Arab} spring}, 
url = {http://www.guardian.co.uk/technology/2011/jul/07/telecomix-arab-spring}
}

@misc{RT12, 
Publisher={RT TV Network},   
Title = {{Anti}-{ACTA} day: {Angry} crowds take action}, 
url = {http://rt.com/news/acta-protests-rallies-europe-089/}
}

\end{filecontents*}

\documentclass{article}

\usepackage[numbers]{natbib}
\usepackage{url}

\begin{document}
\cite{Madlena11}, \cite{RT12}

\bibliographystyle{plainnat-copy}
\bibliography{\jobname}
\end{document}

Here's the output: screenshot of typeset MWE

You must log in to answer this question.

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