[tufte-latex] override default citation style

1,500 views
Skip to first unread message

Alessandro Cuttin

unread,
Sep 17, 2010, 9:14:00 AM9/17/10
to tufte-latex
Hi there,

I have started using the tufte-book class and I like it so much!

However, I'd like to have the references in the natbib-way, so that I
can use both textual (\citep) and parenthetical (\citep) citations.
I have a lot of citations, and I don't want them to take all the room
in the page margin.

I saw on the goggle-code Issues page ( http://goo.gl/Y6rX ) that this
problem has been somehow already discussed.

All I'd like to have is a working natbib reference style. It is
necessary to modify the tufte-common.def file?

Kevin Godby

unread,
Sep 17, 2010, 9:42:57 AM9/17/10
to tufte...@googlegroups.com
Hello.

The tufte-book class uses natbib for its citations. We're overriding
the \cite command to print stuff in the sidenotes. But the other
natbib citation commands (such as \citep) should still work as you'd
expect with natbib.

Does that address your issue or did I miss the point?

[I'm in the process of (slowly) refactoring the Tufte-LaTeX code. One
of the improvements will be to allow for different citation packages
(e.g., natbib, biblatex, or none).]

--Kevin Godby

Alessandro Cuttin

unread,
Sep 17, 2010, 10:10:29 AM9/17/10
to tufte...@googlegroups.com
You didn't miss the point..
In fact, I'm able to use both \citet{} and \citep{}, with a bibliography style compatible with natbib (say: plainnat).
However, in the Bibliography page I don't see the citations' keys. The references are correctly listed, but without the respective key (as in the attachment).

I thought it was a malfunction due to the redefinition of the \cite command...
biblio.pdf
a_f_cuttin.vcf

Kevin Godby

unread,
Sep 17, 2010, 10:42:32 AM9/17/10
to tufte...@googlegroups.com
Hello, Alessandro.

On Fri, Sep 17, 2010 at 9:10 AM, Alessandro Cuttin <a.f.c...@gmail.com> wrote:
> You didn't miss the point..
> In fact, I'm able to use both \citet{} and \citep{}, with a bibliography
> style compatible with natbib (say: plainnat).
> However, in the Bibliography page I don't see the citations' keys. The
> references are correctly listed, but without the respective key (as in the
> attachment).
>
> I thought it was a malfunction due to the redefinition of the \cite
> command...

By 'citation key', do you mean the argument passed to the \citep or
\citet command? I don't think those typically appear in natbib's
author-year bibliographies.

--Kevin

Alessandro Cuttin

unread,
Sep 17, 2010, 2:09:05 PM9/17/10
to tufte...@googlegroups.com
No, I mean the citation key that LaTeX/BibTeX print in the output.

As an example: a \citep{Balanis1996} command in the source should appear in the output as [Balanis,1996] (in case of natbib citation style), or as [Bal96] (in case of alpha bibtex citation style).
Normally, in the output, the key [Balanis,1996] appears every time the command \cite{Balanis1996} is issued, and near the reference listed in the Bibliography page (as shown in the attachment).

With the natbib citation style (say \bibliographystyle{plainnat}), the keys near the references do not appear (as you see in the first attachment I posted)

Furthermore: when I switch from \bibliographystyle{alpha} to \bibliographystyle{plainnat} I get this error:

! Package natbib Error: Bibliography not compatible with author-year citations.

(natbib) Press &lt;return&gt; to continue in numerical citation style.


I hope the problem is stated more clearly... Thanks!
Alessandro 


--
You received this message because you are subscribed to the Google Groups "tufte-latex" group.
To post to this group, send email to tufte...@googlegroups.com.
To unsubscribe from this group, send email to tufte-latex...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/tufte-latex?hl=en.


biblio.pdf

Kevin Godby

unread,
Sep 17, 2010, 2:30:06 PM9/17/10
to tufte...@googlegroups.com
Hello.

On Fri, Sep 17, 2010 at 1:09 PM, Alessandro Cuttin
<alessand...@ieee.org> wrote:
> No, I mean the citation key that LaTeX/BibTeX print in the output.
> As an example: a \citep{Balanis1996} command in the source should appear in
> the output as [Balanis,1996] (in case of natbib citation style), or as
> [Bal96] (in case of alpha bibtex citation style).
> Normally, in the output, the key [Balanis,1996] appears every time the
> command \cite{Balanis1996} is issued, and near the reference listed in the
> Bibliography page (as shown in the attachment).
> With the natbib citation style (say \bibliographystyle{plainnat}), the keys
> near the references do not appear (as you see in the first attachment I
> posted)
> Furthermore: when I switch from \bibliographystyle{alpha}
> to \bibliographystyle{plainnat} I get this error:
>
> ! Package natbib Error: Bibliography not compatible with author-year
> citations.
>
> (natbib) Press &lt;return&gt; to continue in numerical citation style.
>
> I hope the problem is stated more clearly... Thanks!

Yes, I understand what you're saying now. I think that the plainnat
bibliography style just doesn't print those keys. (Since the citation
provides the author's last name and date, that's enough to locate the
entry in the bibliography.) To get those keys to appear in the
bibliography, you'll have to find a bibliography style that prints
those keys. While I know such styles exist, I don't know what they're
named.

--Kevin

Alessandro Cuttin

unread,
Sep 18, 2010, 11:27:56 AM9/18/10
to tufte-latex
I think you're right. I wrote a little test file and verified that it
is the default behavior of natbib (at least, on my ubuntu box).
Thanks, anyway!
Reply all
Reply to author
Forward
0 new messages