Addingreferencesandcitationstoanydocumentcanbeatime-consumingtask.Youmayneedtoincludeasinglereferencemultipletimesandalsoensureeachonefollowsaconsistentreferencingstyle.
ThegoodnewsisthatLaTeX’sbibliographymanagementtoolBibTeXmakesmuchoftheworkinvolvedinreferencemanagementabreeze.ThisisbecauseBibTeXbibliographyentriesarekeptwithinaseparateBibTeXdatabasefilethatcanbeimportedeasilyintoyourmaindocument.
SomeofthebenefitsofusingBibTeXfileforreferenceinLaTexinclude:
Ingeneral,usingbibfileforreferencingsavesalotoftime.Thismakesitusefulforresearchersthatneedtociteorincludealargenumberofreferencesthatarepresentedconsistentlyintheirdocument.TableofContents
Thenextstepistoobtainyourcitation.LookforthepaperyouwishtociteinGoogleScholar.OnceyouhavelocatedthepaperonGoogleScholar’ssearchresults,lookforasetofinvertedcommasnexttoastarsymbol.
title={Sleepdurationasariskfactorforthedevelopmentoftype2diabetes},
author={Yaggi,HKlarandAraujo,AndreBandMcKinlay,JohnB},
journal={Diabetescare},volume={29},
number={3},pages={657–661},year={2006},publisher={AmDiabetesAssoc}
}YoucanalsoaddasecondcitationbyfollowingthesamestepsforasecondpaperinGoogleScholar.@article{weitzman1982chronobiology,title={Chronobiologyofaging:temperature,sleep-wakerhythmsandentrainment},
author={Weitzman,ElliotDandMoline,MargaretLandCzeisler,CharlesAandZimmerman,JanetC},
journal={Neurobiologyofaging},volume={3},number={4},
CallingareferenceintheLaTexbibliographyisalsoquitestraightforward.Inanewline,youcantype:Thereferencesforthepaperinourexampleare\cite{yaggi2006sleep}and\cite{weitzman1982chronobiology}.
Rememberthatthedocumentkeysarevitalforcitingeachpaper,soensureyouenterthemcorrectly.[Needexampleofwhatthislookslike]Step6–ManagingandCreatingYourPreferredLaTexBibliographyStylesInthenextline,youcanchooseyourpreferredbibliographystyle.Forthisexample,wewillbeusingIEEEreferencingstyle.Thisisanumberedreferencingbibliographystylethatusescitationnumbersprovidedinsquarebracketsinyourdocument.
Typethefollowing:\bibliographystyle{ieeetr}\bibliography{citation}Youcanalsoaddreferencesinthefollowingbibtexstylesbysimplyincludingthestylecodeinplaceofieeetr:
Plain
Withthisbibliographystyle,referencesareshowninalphabeticalorderandarelabelednumerically.Useplainintheabovecodetoaddcitationsinthisstyle.UnsrtReferencesappearinorderofcitationandarelabelednumerically.Useunsrtintheabovecodetoaddcitationsinthisstyle.AlphaSameasplain,butthereferencesarelabeledbyentry.Usealphaintheabovecodetoaddcitationsinthisstyle.
AbbrvSameasplain,butfirstnamesandjournalnamesuseabbreviations.Useabbrvintheabovecodetoaddcitationsinthisstyle.ACMThisstyleshowsin-textcitationsasnumbersenclosedinsquarebracketsandseparatedwithcommassuchas[1,2].Useacmintheabovecodetoaddcitationsinthisstyle.Step7–CompilingtheCodeforReferenceinLaTexNext,compileandrunyourcode.Yourdocumentwillrefreshafewtimes.YoucanthenviewthebibliographyattheendoftheLaTeXdocument.ThereferencesforourIEETRstyleexamplewillshowupas:
ThefirstlineofcodeinaLaTeXdocumentisreferredtoastheDocumentclassdeclarationcommand.Itresemblesthefollowing:\documentclass[options]{class}DocumentclassinformsLaTexaboutwhichlayoutstandardtouse.Somecommondocumentclassesinclude:article:Forarticlesfromscientificjournalsandpresentations.book:Forbooks.letter:ForwritinglettersQ3:HowdoyouaddreferencesinLaTeXwithoutcitationsIfyouwishtolistreferenceswithoutcitingtheminthetextbody,youcanaddasingleinputusing:\nocite{keyname}Youcanthenmarkanykeywithinthe.bibfilebyusing:\nocite{*}Addthiscommandforeachentryinthebibdatafileor\nocite{key}forasingleonethatisn’tcitedinthetext.Q4:HowdoyoureferencelabelsinLaTeXYoucanreferencelabelsinLaTeXbyplacinga\label{key}commandbehindasectioningcommand,chapter,orimage.Youshouldthenassignauniquekeytoit.Followingthis,youcanuse\ref{key}and\pageref{key}commandstoreferencethem.
Ifeelyoushouldtelltouse\bibliography{}commandandrefertothe.bibfilehere.
Iwanttocitein4referencing,forexample:[1-4]But,Isee:[1],[2],[3],[4]