6

I have searched far and wide after a solution, but haven't found one that works. The most prominent ones looks like: \citetitle and \citeeditor using the natbib & hyperref packages and https://stackoverflow.com/questions/2496599/how-do-i-cite-the-title-of-an-article-in-latex

My relevant setup is:

\documentclass[a4paper,11pt,oldfontcommands]{memoir}
\usepackage[colorlinks=true]{hyperref}
\usepackage{natbib}
%\bibliographystyle{agsm}
\bibliographystyle{myabbrvnat}
\newcommand{\myand}{\&\ }
\setcitestyle{authoryear,aysep={},open={(},close={)}}
\begin{document}
In the book (Book Name) such and such is told to be true \citep{RefWorks:}.
\bibliography{cource}
\end{document}

with my source.bib-file looking like:

@book{RefWorks:1
     author={John Johnson},
     year={2015},
     title={Book Name},
     publisher={Publishing Company},
     address={United States of America},
     edition={1st},
     isbn={XXX-X-XXXX-XXXX-X}
}

Probably the reason why some of the suggestions that I have found won't work is the \bibliographystyle{myabbrvnat}. I can't remember where I found it, but it's to setup my bibliography the way I need it. Is that important? If needed to be posted, where can I post the text, since it goes over the character limit here?

I know there is a "sort of" solution, where I can make a citation aliasing like \defcitealias{RefWorks:1}{Book Name} and then insert it in the text like \citetalias{RefWorks:1} to give the title of the source. It's fine, but it's not what I'm looking for, because then I would need to set this up for my whole library, which would get tiresome.

Is there a way to setup a \cite+-type to give the title of a source?

Edit: I forgot to put hyperref package in my setup.

  • You should use biblatex and biber for this kind of job. Or, with traditional methods, you can look at the usebib package, as explained in the answer to the linked question. – egreg Apr 25 '15 at 12:35
  • I have tried, but if I switch, then it goes back to use "and" when there are two authors. I need "&" to indicate that, which I have with my current setup. – user38934 Apr 25 '15 at 13:05
  • Did you try with usebib, then? – egreg Apr 25 '15 at 13:06
  • It would be useful to know where & should be used instead of and. – egreg Apr 25 '15 at 13:19
  • If I use \usepackage{usebib} with \citetitle{RefWorks:1} I get a Compile error. – user38934 Apr 25 '15 at 13:27
3

I modified abbrvnat.bst to issue \myand{} instead of and (changing the places where " and " appears). Then prepared this input file:

\begin{filecontents*}{\jobname.bib}
@book{RefWorks:1,
     author={John Johnson},
     year={2015},
     title={Book Name},
     publisher={Publishing Company},
     address={United States of America},
     edition={1st},
     isbn={XXX-X-XXXX-XXXX-X}
}
@book{RefWorks:2,
     author={John Johnson and Jack Jackson},
     year={2015},
     title={Book Name},
     publisher={Publishing Company},
     address={United States of America},
     edition={1st},
     isbn={XXX-X-XXXX-XXXX-X}
}
\end{filecontents*}

\documentclass[a4paper,11pt,oldfontcommands,article]{memoir}

\usepackage{natbib}
\usepackage{usebib}
\bibliographystyle{myabbrvnat}
\setcitestyle{authoryear,aysep={},open={(},close={)}}
\bibinput{\jobname} % <--- the same argument as in \bibliography
\newcommand{\myand}{\&}

\begin{document}

In the book ``\usebibentry{RefWorks:1}{title}'' by 
\citeauthor{RefWorks:1}, such and such is told 
to be true \citep{RefWorks:1}.

In the book ``\usebibentry{RefWorks:2}{title}'' by 
\citeauthor{RefWorks:2}, such and such is told 
to be true \citep{RefWorks:2}.

\bibliography{\jobname}

\end{document}

This is the output

enter image description here

Note that filecontents is used just for convenience and you can use your own .bib file. Rememeber the limitation of usebib that fields must be delimited with braces and not with ".

On the other hand, one can coerce biblatex into producing the desired output:

\begin{filecontents*}{\jobname.bib}
@book{RefWorks:1,
     author={John Johnson},
     year={2015},
     title={Book Name},
     publisher={Publishing Company},
     address={United States of America},
     edition={1st},
     isbn={XXX-X-XXXX-XXXX-X}
}
@book{RefWorks:2,
     author={John Johnson and Jack Jackson},
     year={2015},
     title={Book Name},
     publisher={Publishing Company},
     address={United States of America},
     edition={1st},
     isbn={XXX-X-XXXX-XXXX-X}
}
\end{filecontents*}

\documentclass[a4paper,11pt,oldfontcommands,article]{memoir}

\usepackage[style=authoryear,firstinits,uniquename=init]{biblatex}
\addbibresource{\jobname.bib}
\AtBeginBibliography{%
  \DeclareNameAlias{author}{first-last}%
}
\renewcommand{\finalnamedelim}{%
  \ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}%
  \addspace\&\space
}

\begin{document}

In the book ``\citetitle{RefWorks:1}'' by 
\citeauthor{RefWorks:1}, such and such is told 
to be true \parencite{RefWorks:1}.

In the book ``\citetitle{RefWorks:2}'' by 
\citeauthor{RefWorks:2}, such and such is told 
to be true \parencite{RefWorks:2}.

\printbibliography

\end{document}

enter image description here

| improve this answer | |
  • It worked using your setup and placing \usebibentry{RefWorks:1}{title} in the text. My only question is (and I forgot to mention this, but I have edited my original entry to use hyperref) why is \usebibentry{RefWorks:1}{title} not an active reference, that I can click on, so it takes my to the bibliography, as if I have used \citep{RefWorks:1} ? – user38934 Apr 25 '15 at 19:56
  • @user38934 Because it isn't. Sorry, but I'm not interested in adding the feature. – egreg Apr 25 '15 at 20:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.