Comments (11)
Please see the documentation of bibtex-completion-cite-commands
.
from helm-bibtex.
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 emacs -Q
doesn't trigger the problem here. So, it must be caused by other settings.
from helm-bibtex.
Also not that the biblatex standard commands parencite and textcite are missing in the list.
It seems that you originally intended to express Also, it's worth noting that ...
.
from helm-bibtex.
But I cannot find this variable at all:
from helm-bibtex.
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
from helm-bibtex.
On the other hand, the current predefined value of bibtex-completion-cite-commands
doesn't include the following entries:
\citet{key}
\citep{key}
from helm-bibtex.
Please feel free to make a pull request if you have ideas for improvements.
from helm-bibtex.
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"
from helm-bibtex.
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.
from helm-bibtex.
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:
Here are the top 20 most commonly used citation commands in LaTeX:
1. `\cite{}`: Cite a single reference.
2. `\citep{}`: Cite a reference in parentheses.
3. `\citet{}`: Cite a reference in the text itself, without parentheses.
4. `\citeauthor{}`: Cite only the author(s) of a reference.
5. `\citeyear{}`: Cite only the year of a reference.
6. `\nocite{}`: Include a reference in the bibliography without citing it in the text.
7. `\footnote{\cite{}}`: Create a footnote citation.
8. `\citep*{}`: Cite a reference with all authors' names included.
9. `\citealt{}`: Cite a reference without parentheses.
10. `\citeauthor*{}`: Cite a reference with all authors' names included, without using "et al.".
11. `\citep[][]{}`: Cite a reference with multiple optional parameters.
12. `\citealp{}`: Cite a reference without parentheses and with author names separated by commas.
13. `\citeauthor[][p.~]{}`: Cite a reference with page numbers and additional text before the citation.
14. `\citep{A, B}`: Cite multiple references in a single citation, separated by commas.
15. `\citeauthor{A, B}`: Cite multiple references with author names in a single citation, separated by commas.
16. `\citeyearpar{}`: Cite a reference in parentheses with the year.
17. `\citepalias{}`: Cite a reference with an alias (a short name for the citation).
18. `\citeauthoryear{}`: Cite a reference with both author names and year.
19. `\citeyear[][p.~]{}`: Cite a reference with the year and additional text before the citation.
20. `\citet*{}`: Cite a reference with all authors' names included, for use in the text.
These are 20 of the most commonly used citation commands in LaTeX. Remember to replace "A" and "B" with the actual reference keys you are citing.
from helm-bibtex.
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 nocite
, citet
, citep
.
from helm-bibtex.
Related Issues (20)
- Prenote and Postnote options for citations in org-mode HOT 4
- Symbol’s function definition is void: org-cite-register-processor HOT 7
- bibtex-completion-format-citation-org-cite gives wrong format HOT 2
- org-ref-helm-bibtex-insert-citation results in wrong type argument HOT 3
- helm-bibtex-candidates-formatter not applied (?) HOT 11
- Invalid image type 'svg' HOT 3
- Symbol’s value as variable is void: browse-url-mosaic-program HOT 4
- Inquiry about Automatic Updating of BibTeX Files from Online Databases in Helm-Bibtex. HOT 1
- Set the variable bibtex-completion-bibliography used by helm-bibtex to the dynamical generated bib files list corresponding to the current master tex file. HOT 14
- Trigger bibliography completion list in-situ in TeX source document when typing `\cite{}` command.
- The problem related to `(require 'helm-config)` and `(require 'helm-bibtex)`. HOT 9
- What's the mode hook defined in `helm-bibtex` to conditionally activate it when AUCTeX's `LaTeX-mode` is called? HOT 4
- Allow additional functions for format entry HOT 1
- Bug?: Abstract may be invalid if final character is `}` HOT 4
- Feature request: Integration with Zotra HOT 5
- Clarify documentation for `org-bibtex` bibliography. HOT 3
- helm-bibtex-follow doesn't fail properly for non-existent keys HOT 7
- Unicode Support HOT 3
- helm-bibtex fails to create window with (wrong-type-argument window-live-p nil) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from helm-bibtex.