LaTeX Citations using natbib

A place for users to ask each other questions, make suggestions, and discuss Bookends.
Post Reply
sforero
Posts: 13
Joined: Fri Mar 30, 2018 7:10 pm

LaTeX Citations using natbib

Post by sforero »

Hello,
I noticed that when using the natbib citation command with options (for example: \citep[see][chap.~2]{jon90}), Bookends does not recognize the citation key "jon90". It works properly when using no option (for example: \citep{jon90}). I hope there is a quick fix!! (besides having to scan the file, build the bib file, and then insert the options on the citations again...) Thank you.
Jon
Site Admin
Posts: 10048
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: LaTeX Citations using natbib

Post by Jon »

No quick fix I'm afraid. Bookends won't recognize that as a temp citation. And if it did, it wouldn't know what to do with the text between \citep and {jon90}.

Jon
Sonny Software
sforero
Posts: 13
Joined: Fri Mar 30, 2018 7:10 pm

Re: LaTeX Citations using natbib

Post by sforero »

Jon, thank you. Couldn’t the scan (when BIBTEX is enabled) recognize the \cite command and then ignore everything after it until it finds the opening bracket { ? This way, the various \cite commands (e.g, \citep, \citet, \citealp, \citealt) with or without options in [] and with or without *, get recognized through the scan when building the HITS list. Since this is only to scan the document, Bookends is not expected to do anything with those commands, simply ignore them but recognize they are citations. Thanks for considering this feature to the the scanning process.
Jon
Site Admin
Posts: 10048
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: LaTeX Citations using natbib

Post by Jon »

So you just want to find the citations and mark them? You can do the scan and, once it's complete, mark that reference yourself by clicking on its checkbox.

Jon
Sonny Software
sforero
Posts: 13
Joined: Fri Mar 30, 2018 7:10 pm

Re: LaTeX Citations using natbib

Post by sforero »

Since I’m using BibTeX, when I do the scan in Bookends I do not generate a bibliography. However, Bookends finds all citations in the LaTeX document and selects all of them in Hits. I then generate a Bibliography in Bookends using BibTeX format. I think these are the recommended steps in the user guide. Everything works fine when using \cite, \citet, \citep. However, Bookends will not select references in Hits when they appear with other forms of the \cite command often used, like \citep*, \citealt, \citealp, \citep[]. Since all commands start with \cite, and references always go within brackets {}, I hope you consider this feature update so Bookends selects all references in Hits even when using these alternate forms of /cite. Thanks for your help Jon!!
Jon
Site Admin
Posts: 10048
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: LaTeX Citations using natbib

Post by Jon »

The problem is that Bookends will actually format the document when you scan it, and it won't know how to handle the text in [ ]. So although it would work for you it wouldn't be consistent with the simpler citations. I could have Bookends ignore any instructions in [ ] (just remove them, I suppose). What do other LatTeX users think?

Jon
Sonny Software
sforero
Posts: 13
Joined: Fri Mar 30, 2018 7:10 pm

Re: LaTeX Citations using natbib

Post by sforero »

I don’t believe Bookends is doing anything with whatever appears after “\cite” and before “{keys}” when scanning a document (without generating a bibliography), as is the case when using the recommended steps to use Bookends with BibTeX and LaTeX. It is BibTeX who takes care of interpreting those commands when generating the bibliography in LaTeX. Thanks again!!
Jon
Site Admin
Posts: 10048
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: LaTeX Citations using natbib

Post by Jon »

The next update will have the ability to recognize citations such as \citep[see][chap.~2]{jon90}.

Jon
Sonny Software
sforero
Posts: 13
Joined: Fri Mar 30, 2018 7:10 pm

Re: LaTeX Citations using natbib

Post by sforero »

Great news Jon! Thank you.
sforero
Posts: 13
Joined: Fri Mar 30, 2018 7:10 pm

Re: LaTeX Citations using natbib

Post by sforero »

Hello Jon,
I tested the functionality to recognize citations such as \citep[see][chap.~2]{jon90} when scanning, but I am finding several issues.
Bookends is not recognizing all citations (even some that were recognized before the latest Bookends upgrade using regular \citep or \citet commands) and is producing many unmatched citations (which were not happening before the latest Bookends upgrade).
I hope you can help!
Thank you.
Jon
Site Admin
Posts: 10048
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: LaTeX Citations using natbib

Post by Jon »

You should contact tech support with your library and a VERY short text file I can scan that shows this.

Jon
Sonny Software
sforero
Posts: 13
Joined: Fri Mar 30, 2018 7:10 pm

Re: LaTeX Citations using natbib

Post by sforero »

Thank you. I submitted a request but did not find a way to attach files. Please let me know how to proceed.
Jon
Site Admin
Posts: 10048
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: LaTeX Citations using natbib

Post by Jon »

Send your email with attachments to support@sonnysoftware.com

Jon
Sonny Software
Post Reply