TransWikia.com

How to cite author[numeric_ref] in citation

TeX - LaTeX Asked by Bukaida on January 29, 2021

I am a beginner in LaTeX and do not know much about modification of the usual package. I am providing the minimum working code that I tried and then describe my problem.

I have the lauraPhd2016.bib with following data

    @article{wombat2016,
    author   = {Walther Wombat and Klaus Koala},
    title    = {The true meaning of 42},
    journal  = {Journal of modern skepticism},
    date     = {2016},
    keywords = {trusted},
}
@book{lion2010,
    author       = {Laura Lion and  Gabrielle Giraffe and Carl Capybara},
    title        = {The dangers of asking the wrong question},
    publisher    = {publishing house},
    date         = {2010},
    keywords     = {trusted},
}
@online{wikibook,
    title        = {Generating Bibliographies with biblatex and biber},
    organization = {Wikibooks},
    date         = {2016},
    urldate      = {2016-03-07},
    url          = {https://en.wikibooks.org/wiki/LaTeX/Generating_Bibliographies_with_biblatex_and_biber},
    keywords     = {untrusted},
}

That I used to generate my citation using Biber in the following article

documentclass{article}
usepackage[backend=biber,sorting=none]{biblatex}
addbibresource{lauraPhd2016.bib}
begin{document}
I doubt that there is any useful information here~cite{wikibook}.

All we know is limited, apart from knowing the answer we all know. Or do we? Wombat and Koala~cite{wombat2016} have discovered some interesting things.

Some people are too nosy. What can happen to them is described by Laura Lion~cite{lion2010}.

printbibliography
end{document} 

And the output I got is

Output PDF file

Now what I want to do is that instead of manually specifying author cite{key}, I want to make cite or something_other directly do the entire job automatically. The output should be "Author/s name [numeric ref number]" as displayed in the output file. A simple method will be helpful for a beginner like me.

One Answer

As mentioned by pst in the comments, with numeric styles you can use textcite to produce <author> [<number>] citations.

Generally, speaing textcite produces textual/narrative citations where the author name(s) can be integrated in the text flow with an additional label part that makes the reference unique (the exact nature of the additional label depends on the citation style).

documentclass{article}
usepackage[backend=biber, style=numeric, sorting=none]{biblatex}
addbibresource{biblatex-examples.bib}

begin{document}
Lorem textcite{sigfridsson}

ipsum autocite{sigfridsson}

printbibliography
end{document}

Lorem Sigfridsson and Ryde [1]//ipsum [1]

Answered by moewe on January 29, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP