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 » Mon Aug 12, 2019 6:53 pm

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: 8387
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: LaTeX Citations using natbib

Post by Jon » Tue Aug 13, 2019 7:09 am

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 » Tue Aug 13, 2019 9:49 am

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: 8387
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: LaTeX Citations using natbib

Post by Jon » Tue Aug 13, 2019 1:09 pm

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 » Tue Aug 13, 2019 2:35 pm

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: 8387
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: LaTeX Citations using natbib

Post by Jon » Tue Aug 13, 2019 2:55 pm

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 » Tue Aug 13, 2019 3:28 pm

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: 8387
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: LaTeX Citations using natbib

Post by Jon » Wed Aug 14, 2019 4:55 pm

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 » Wed Aug 14, 2019 5:09 pm

Great news Jon! Thank you.

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

Re: LaTeX Citations using natbib

Post by sforero » Sat Sep 28, 2019 6:05 pm

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: 8387
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: LaTeX Citations using natbib

Post by Jon » Sat Sep 28, 2019 6:33 pm

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 » Sun Sep 29, 2019 11:47 am

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: 8387
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: LaTeX Citations using natbib

Post by Jon » Sun Sep 29, 2019 4:27 pm

Send your email with attachments to support@sonnysoftware.com

Jon
Sonny Software

Post Reply