2

I would like to organize the papers I've read in the way outlined here https://academia.stackexchange.com/questions/10578/how-to-read-and-take-notes-on-research-papers/10616#10616.

But it kind of annoys me to write out author and year and things like that, which are already in my global bib-file (or should be). Also, I would like mistakes corrected everywhere if I correct them in the bib-file. Is there a way to get at the information from the bib-file for my latex-document?

So, instead of: (shamelessly copied from above post)

\section{Paper #1 Name, Authors, Date, \cite{...}}
My summary of the motivation and findings of the paper, or whatever I find interesting.
May be as short as a few sentences or as long as a page, depending on how relevant it is. 
\index{an important word}

I would want to write something like:

\section{\mycitetitle{citekeyfrombibfile}}
\citeurl{citekeyfrombibfile}
notes and so on

where \mycitetitle would expand to Title, Authors, Year and \citeurl would expand to the url (if available). I guess this would be a case for biblatex, but I am just starting with that and not yet sure what it can do.

3

Here is a solution using biblatex

\documentclass{article}
\usepackage[hyperref]{biblatex}
\usepackage{hyperref}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{Goossens1994LaTeX,
  author = {Michel Goossens and Frank Mittelbach and Alexander Samarin},
  title = {The \LaTeX{} Companion, $2^{nd}$ Edition},
  publisher = {Addison-Wesley},
  year = {1994},
  url = {www.tex.stackexchange.com}
}
\end{filecontents*}

\DeclareCiteCommand{\citepaper}[\section]
  {}
  {\bibyhyperref{Paper 
     \printfield{title}, 
     \printnames{author}, 
     \printfield{year} 
     \mkbibbrackets{\printfield{labelnumber}}}}
  {}
  {}
\addbibresource{\jobname.bib}

\begin{document}

\citepaper{Goossens1994LaTeX}

\end{document}

The solution implements a new cite command (\citepaper) printing the desired/required information.

enter image description here

  • Will this be clickable? I mean, can I click on it and it gives me the reference at the end of the file like the usual cite-command? (If I decide to have a bibliography at the end of the file) Does this give me an entry in the bibliography? And is there a way to make it flexible on whether it is a section or a subsection? That would be useful sometimes, although I guess I could just declare two separate commands. – fifaltra Oct 21 '14 at 8:15
  • 1
    updated the solution to include clickable hyperlinks – Guido Oct 21 '14 at 9:31
  • hm, the version with bibhyperref gives me Unknown command \citepaper, also it was fine without. Does this depend on the version of biblatex? – fifaltra Oct 21 '14 at 11:19
  • You have to use \citepaper also in \DeclareCiteCommand) – Guido Oct 21 '14 at 17:55
  • I just noticed there was a typo. It works perfectly now. – fifaltra Oct 22 '14 at 2:04
1

Why not bibentry?

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{mybib1.bib}
@book{Goossens1994LaTeX,
  author = {Michel Goossens and Frank Mittelbach and Alexander Samarin},
  title = {The \LaTeX{} Companion, $2^{nd}$ Edition},
  publisher = {Addison-Wesley},
  year = {1994{.}},
  url = {www.tex.stackexchange.com}
}
\end{filecontents*}
\usepackage{natbib}
\usepackage{bibentry}
\begin{document}
\bibliographystyle{unsrtnat}
\nobibliography{mybib1}

\subsection*{\bibentry{Goossens1994LaTeX}}

\end{document}

enter image description here

  • This seems to be dumping just everything, which might get ugly for some of my bib-file entries. – fifaltra Oct 21 '14 at 9:41
  • @fifaltra It is supposed to do that :-) Please ask a new question on how to modify the output of \bibentry so as to get specific content. – user11232 Oct 21 '14 at 9:42
1

Just for the sake of completeness, an alternative method I have found while waiting for answers is:

\documentclass{article}
\usepackage[hyperref]{biblatex}
\usepackage{hyperref}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{Goossens1994LaTeX,
 author = {Michel Goossens and Frank Mittelbach and Alexander Samarin},
 title = {The \LaTeX{} Companion, $2^{nd}$ Edition},
 publisher = {Addison-Wesley},
 year = {1994},
 url = {www.tex.stackexchange.com}
}
\end{filecontents*}
\addbibresource{\jobname.bib}

\newcommand{\mytitlecite}[1]
 {\texorpdfstring{\citetitle{#1}, \citeauthor{#1}, \citeyear{#1},\cite{#1}}{#1}}
\begin{document}

\section{\href{file.pdf}{Paper} \mytitlecite{Goossens1994LaTeX}}

\end{document}

Where file.pdf is the file containing the paper on the local file system. This also avoids warnings from hyperref. The other answer could be extended to do that however, and has the extra feature that the whole section title is clickable, not just the label.

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.