New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inquiry about citation commands supported by helm-bibtex package. #431
Comments
Please see the documentation of |
A lot of other customization variables are missing in your screenshot. Must be a problem in your configuration because the variable I mentioned does definitely exist as you can easily confirm: https://github.com/tmalsburg/helm-bibtex/blob/master/bibtex-completion.el#L277 |
In my case, the configuration for helm and helm-bibtex is as follows: (use-package helm
:bind (:map helm-command-map
("C-c h" . helm-execute-persistent-action)))
(use-package helm-bibtex
:init
(setq
bibtex-completion-pdf-field "File"
;;https://github.com/tmalsburg/helm-bibtex#insert-latex-cite-commands
bibtex-completion-cite-prompt-for-optional-arguments nil)
:bind-keymap
("<menu>" . helm-command-prefix)
:bind
(
:map helm-command-map
("b" . helm-bibtex)
("B" . helm-bibtex-with-local-bibliography)
("n" . helm-bibtex-with-notes)
("<menu>" . helm-resume)
)
:config
(require 'helm-config)
;;https://github.com/tmalsburg/helm-bibtex#application-used-for-opening-pdfs
;;https://github.com/tmalsburg/helm-bibtex/issues/386
(defun bibtex-completion-open-pdf-external (keys &optional fallback-action)
(let ((bibtex-completion-pdf-open-function
(lambda (fpath) (start-process "evince" "*helm-bibtex-evince*" "/usr/bin/evince" fpath))))
(bibtex-completion-open-pdf keys fallback-action)))
(helm-bibtex-helmify-action bibtex-completion-open-pdf-external helm-bibtex-open-pdf-external)
(helm-add-action-to-source
'helm-bibtex
'(("P" helm-bibtex-open-pdf-external "Open PDF file in external viewer (if present)")))
;;https://github.com/tmalsburg/helm-bibtex#browser-used-for-opening-urls-and-dois
(setq bibtex-completion-browser-function
(lambda (url _) (start-process "firefox" "*firefox*" "firefox" url)))
) I confirm the above configuration alone when testing with |
On the other hand, the current predefined value of \citet{key}
\citep{key} |
Please feel free to make a pull request if you have ideas for improvements. |
An exhaustive grep via ug gives me the following list, but I don't know whether they are all related to this variable: werner@X10DAi:/opt/texlive/2023$ ug -Ii -oh '\{[a-zA-Z0-9]*cite[a-zA-Z0-9]*\}' | sort -u | tr '{}' ' ' |awk '{print "\""$1"\""}' |paste -sd,
"ABCIciteoptionwasused","ABCItextondemand","abntcite","abntex2cite","ABNTovercite","acrocite","acrogroupcite","agsmcite","aiDataCite","ALCitem","allnocited","anbtex2cite","andincite","andincitecn","andothersincite","andothersincitecn","apacite","apaciteclassic","apacitex","atcite","AtEachCitekey","AtEveryCite","AtEveryCitekey","AtEveryMultiCite","AtIntrocite","AtMultiEveryCite","AtNextCite","AtNextCitekey","AtNextMultiCite","atpcite","AtVolcite","AtXrefcite","authornumcite","autocite","Autocite","autocites","Autocites","AutoPuncItemize","AutoPuncItemizeE","AutoPuncItemizeO","autopuncitems","AutoPuncItems","AutoPuncItemsE","AutoPuncItemsO","avolcite","Avolcite","avolcites","Avolcites","backcite","backcitepages","backcitesections","badciteauthor","badcitefullauthor","badcitekey","badciteyear","bibcite","bibcitefn","bibcitelabel","bibentrycite","biblikecite","bibliographycite","biblistcite","blockcite","bplsecitems","breakcites","breakffcites","btCiteSect","btPrintCited","btPrintNotCited","btxcite","btxcitereference","btxcitevariant","calcite","Capacite","cc2cite","cccite","ccite","cfcite","checkcites","ChemCite","chicitecommande","chicitecommandechars","chicitecommandelarge","chscite","chslacite","cite","Cite","CITE","citeaffixed","citeall","citeallclaves","citealldefaultcite","citeallfinentry","citeallgroupseparator","citeallseparator","citealn","citealp","citealt","CiteAltPunct","citeannotesep","citeasnoun","citeathn","citeauthor","Citeauthor","citeauthorformat","citeauthorlist","citeauthorname","citeauthoronline","citeauthorstar","citeauthoryear","citeautoscript","citeb","citebib","citebibtex","citebook","citebordercolor","CiteByAuthor","CiteByFootnote","CiteByNumber","CiteBySuperscript","CiteByTag","citecfilm","citecmd","citecolor","CiteColor","citecolour","citecommand","citecompletefilm","citeconference","citecount","citecounter","citecountnopage","citecountpage","citecountpages","cited","citedas","citedash","citedate","citedby","citedbypage","citedbytitle","citedest","citedoi","citedornocited","citedstring","citeepisode","citeeprint","citefield","citefilm","citefinalnamedelim","citefirst","citefn","citeform","citefull","citefullauthor","Citefullauthor","citefullfilm","citefulltitle","citehack","citehandout","citeheading","citehyperref","citeincite","citeincitef","citeincites","citeindex","citeindexfile","citeinit","citeinxref","citeisbn","citeissue","citeissues","citejournal","citejournaltitle","citejz","citekey","citeKey","CiteKey","citelabel","citelabeldate","citelatex","citeleft","citelet","citelist","CiTelWork","citemid","citemidpenalty","citemize","cItemList","CiteMoveChars","citemultinamedelim","citen","citename","citenotitle","citenum","citenumfont","citeonce","citeonline","citeonly","citeopt","citeoption","citeorder","citep","Citep","citepack","citepackcode","citepage","citepages","citepalias","citepaper","citeprefix","citeprepenalty","CitePropriete","citepunct","citepunctpenalty","citequote","citequoteparenv","citerange","citeref","Citeref","citerequest","citereset","citerevsdnamedelim","citeright","cites","Cites","citesavefn","citeseen","citesel","CITESEL","citesep","citeseries","citesetup","citeshorthand","citeshortin","citesnum","citesort","citestyle","citet","Citet","citeta","citetalias","citetitle","Citetitle","citetlist","citetoend","citetotal","citetracker","citetrackerfalse","citetrackertrue","citetranslator","citeurl","citeURL","citeurlpost","citeurlpre","citex","citexref","citeyear","citeyearpar","cmscitesortdate","cmsciteyear","colorforcite","combcite","compactcite","compcitedelim","crosscite","datacite","DBIBcitekey","dcucite","DeclareAutoCiteCommand","DeclareCiteCommand","DeclareCitePunctuationPosition","DeclareInnerCiteDelim","DeclareInnerCiteDelimAlias","DeclareInnerCiteDelims","DeclareInnerCiteDelimsAlias","DeclareMultiCiteCommand","DeclareOuterCiteDelim","DeclareOuterCiteDelimAlias","DeclareOuterCiteDelims","DeclareOuterCiteDelimsAlias","defcitealias","DeferNextCitekeyHook","delimandincite","delimandincitecn","delimandothersincite","descitem","detailcite","detailscite","detailscites","docitem","DocItem","drftcite","Drftcite","drftffcite","DSMcite","DTLcite","DTLnocite","dvngcite","egcite","emojicite","endmcitethebibliography","entrynocite","expcites","explicite","Explicite","explicitement","extracites","extradateonlycompcitedelim","extradateonlycompciterangedelim","extranameonlycompcitedelim","extranameonlycompciterangedelim","fciteissue","fciteissues","ffciteform","ffciteleft","ffcitemid","ffcitepunct","ffciteright","filmcite","firstcite","firstcitefull","fixcitedash","fnotecite","footcite","footcitecount","footcitelabeldate","footcites","Footcites","footcitestar","footcitet","footcitetext","footcitetextlabeldate","footcitetexts","footcitetotal","footfullcite","footidemcite","footidemcites","foottextcite","foottextcites","fshowcited","ftvolcite","fulcite","fullcite","fullcitefilm","fullciteincite","fullciteincites","fullocite","fvolcite","Fvolcite","fvolcites","Fvolcites","gbcitecomp","gbcitelabel","gbcitelocal","gbcitelocalcase","gbcitepunctcn","gcite","gentextcite","gentextcites","globalcitecopy","glstopicItem","GOCiter","harvardcite","headlesscite","Headlesscite","headlesscites","headlessfullcite","headlessparencite","headlessparenshortcite","HMcitecolor","howcited","hycitebordercolor","hycitecolor","hypercite","icite","idemcite","idemcites","ideographiciterationmark","ifciteibid","ifciteidem","ifciteindex","ifciteseen","ifciteuseshorthand","iffirstcitekey","iflastcitekey","ifnocite","ifvolcite","Implicite","indxcite","inlinecite","inparencite","inreferencesasfullcite","intciteorder","introcite","introcitebreak","introcitepunct","introcitesep","introcitewidth","invalidcitestyle","jbusehowcitedforcite","jdcite","klucite","Latincite","lexcitecountinteger","mancite","mancitepar","markdownRendererCite","markdownRendererTextCite","mautocite","Mautocite","maxcitecounter","maxcitenames","mcite","mcitebibitemcount","mciteheadsortkey","mciteplus","mcitesubitemcount","MciteSubReferenceLabel","mcitethebibliography","mincitenames","mincitesep","miscItem","mkinnercitedelims","mkinnerfootcitedelims","mkinnerparencitedelims","mkinnertextcitedelims","mkoutercitedelims","mkouterfootcitedelims","mkouterparencitedelims","mkoutersupercitedelims","mkoutertextcitedelims","mkshcite","mkvolcitenote","mlarepeatedcites","multicite","multicitecount","multicitedelim","multiciterangedelim","multicites","multicitesubentrydelim","multicitesubentryrangedelim","multicitetotal","mycitecolor","natcite","neutralcite","newcites","nmbibcitenumber","nmbibSetCiteall","noapacite","nocccite","nocite","nocitecount","nocited","nocitemeta","nocites","nocitetags","noffcitecount","normalcite","notcite","notecite","Notecite","notffcite","notoccite","nptextcite","numcites","numCites","nwejmfootcite","ocite","ocites","onlinecite","Opacite","opcited","opencite","origcite","overcite","Overcite","OverciteFont","pagescite","parcitename","parencite","Parencite","parencitelabeldate","parencites","Parencites","parenfullcite","partofcited","partofcitedflag","pcite","pciteissue","pciteissues","pcitenote","pdfcitecolor","pincite","pnotecite","Pnotecite","poormancitea","posscite","Posscite","posscites","Posscites","possesivcite","possessivecite","ppexplicite","ppExplicite","PPexplicite","PPExplicite","prevcite","previewcite","Previewcite","previewcites","Previewcites","printscrcite","ProCite","pvolcite","Pvolcite","pvolcites","Pvolcites","rawcite","realcitepagesomitcmd","redefcite","refcite","RegisterCiteDelims","reviewcite","Reviewcite","reviewcites","Reviewcites","runcite","savedcitecounter","scauthorcite","scauthorscite","sccite","scite","SciTE","scitehere","sciteissue","sdcite","sentencecitename","SetCiteCommand","setcitestyle","setupcite","sfcite","sfcites","shcite","shortcite","shortformcite","shortformcites","shorthandcite","shorthandrefcite","shortrefcite","showcites","sidecite","skbslidecite","skelcite","smartcite","Smartcite","smartcites","Smartcites","sortcites","starnocited","strongcitedelim","subcite","supercite","supercitedelim","superciterangedelim","supercites","supercitesubentrydelim","supercitesubentryrangedelim","surnamecite","svolcite","Svolcite","svolcites","Svolcites","tcite","textcite","Textcite","textcitecount","textcitedelim","textcitehyperref","textcitelabeldate","textcitemaxnames","textcites","Textcites","textcitesdelim","textcitestar","textcitetotal","textpreviewcite","textreviewcite","Textreviewcite","textreviewcites","Textreviewcites","thiscite","totalcites","tvolcite","Tvolcite","tvolcites","Tvolcites","UndeclareCiteDelims","UndeclareInnerCiteDelim","UndeclareInnerCiteDelims","UndeclareOuterCiteDelim","UndeclareOuterCiteDelims","uppercasecite","usecitecmd","UseEveryCiteHook","UseEveryCitekeyHook","UseEveryMultiCiteHook","usefullcite","UseNextCiteHook","UseNextCitekeyHook","UseNextMultiCiteHook","UseVolciteHook","volcite","Volcite","volcitedelim","volcitenote","volcitepages","volcites","Volcites","volcitevolume","workscited","xcite","xcitebordercolor","xrefcite","xrefcitedascheck","ycite","ycites","yearcite","yearpagescite" |
I'm not sure whether it makes sense to include all cite commands in existence as this would make tab-completion for citations commands much less useful. I think a good default would be to include something like the top-10 most used citation commands. Not trivial though to find out what they are. |
See the answer given by GPT-4:
|
Hm, it's not clear that GPT-4 actually has internal access to the frequencies of commands. Also not that the biblatex standard commands parencite and textcite are missing in the list. Seems slightly suspicious to me. But there are certainly some commands in that list that should be included, notably |
It seems that you originally intended to express |
As was discussed in tmalsburg#431, add support for some additional typical citation commands in `natbib`
Hi here,
I am interested in knowing if helm-bibtex supports all the following citation commands in LaTeX:
Thank you very much for your time and assistance.
Best regards,
Zhao
The text was updated successfully, but these errors were encountered: