LaTeX/Manually Managing References

From Wikibooks, open books for an open world
Jump to: navigation, search
LaTeX logo.svg

LaTeX

Getting Started
  1. Introduction
  2. Installation
  3. Installing Extra Packages
  4. Basics
  5. How to get help

Common Elements

  1. Document Structure
  2. Text Formatting
  3. Paragraph Formatting
  4. Colors
  5. Fonts
  6. List Structures
  7. Special Characters
  8. Internationalization
  9. Rotations
  10. Tables
  11. Title creation
  12. Page Layout
  13. Customizing Page Headers and Footers‎
  14. Importing Graphics
  15. Floats, Figures and Captions
  16. Footnotes and Margin Notes
  17. Hyperlinks
  18. Labels and Cross-referencing

Mechanics

  1. Errors and Warnings
  2. Lengths
  3. Counters
  4. Boxes
  5. Rules and Struts

Technical Texts

  1. Mathematics
  2. Advanced Mathematics
  3. Theorems
  4. Chemical Graphics
  5. Algorithms
  6. Source Code Listings
  7. Linguistics

Special Pages

  1. Indexing
  2. Glossary
  3. Bibliography Management
  4. More Bibliographies

Special Documents

  1. Scientific Reports (Bachelor Report, Master Thesis, Dissertation)
  2. Letters
  3. Presentations
  4. Teacher's Corner
  5. Curriculum Vitae

Creating Graphics

  1. Introducing Procedural Graphics
  2. MetaPost
  3. Picture
  4. PGF/TikZ
  5. PSTricks
  6. Xy-pic
  7. Creating 3D graphics

Programming

  1. Macros
  2. Plain TeX
  3. Creating Packages
  4. Themes

Miscellaneous

  1. Modular Documents
  2. Collaborative Writing of LaTeX Documents
  3. Export To Other Formats

Help and Recommendations

  1. FAQ
  2. Tips and Tricks

Appendices

  1. Authors
  2. Links
  3. Package Reference
  4. Sample LaTeX documents
  5. Index
  6. Command Glossary

edit this boxedit the TOC

A reference list is nothing more than a, well, list. A list with anchors, or keys, to properly refer to the different list items. The list environment is called thebibliography, it takes one mandatory argument. Every item in the list starts with \bibitem{bibkey}.

Citing an entry from your references works similar to the label and ref mechanism. The label is the key given to the bibitem, referencing is done by \cite.

\documentclass{article}
\usepackage{url}
\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 have discovered some interesting things~\cite{wombat2016}.

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

\begin{thebibliography}{1}
	\bibitem{wombat2016}
		Walther Wombat and Klaus Koala,
		``The true meaning of 42'' in: Journal of modern skepticism;
		2016
	\bibitem{lion2010}
		Laura Lion, Gabrielle Giraffe and Carl Capybara,
		``The dangers of asking the wrong question'', publishing house;
		2010
	\bibitem{wikibook}
		manually managing references, 
		\url{https://en.wikibooks.org/wiki/LaTeX/Manually_Managing_References}
		2016
\end{thebibliography}
\end{document}

ManualRefA.png

cite returns the number of our list entry in the list in brackets. An optional argument can be given to add some text within the brackets.

As one can see, there is no sorting. Sorting is left to the document author.

Style and punctuation has to be consistent in your bibliography. If you have trouble remembering to put the title into quotes, define a helper command and use it. There is another inconsistency in the image above. Can you spot it?

\documentclass{article}
\usepackage{url}
\newcommand{\bibTitle}[1]{``#1''}
\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 have discovered some interesting things~\cite{wombat2016}.

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

\begin{thebibliography}{1}
	\bibitem{wikibook}
		\bibTitle{Manually Managing References}, 
		\url{https://en.wikibooks.org/wiki/LaTeX/Manually_Managing_References};
		2016
	\bibitem{wombat2016}
		Walther Wombat and Klaus Koala,
		\bibTitle{The true meaning of 42} in: Journal of modern skepticism;
		2016
	\bibitem{lion2010}
		Laura Lion, Gabrielle Giraffe and Carl Capybara,
		\bibTitle{The dangers of asking the wrong question}, publishing house;
		2010
\end{thebibliography}
\end{document}

ManualRefB.png

You may ask yourself what the mandatory argument of the environment is doing. You can define your own label for any entry in your list. Use your widest entry inside the argument. Using that optional argument, you can create an author-year style.

\documentclass{article}
\usepackage{url}
\newcommand{\bibTitle}[1]{``#1''}
\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 have discovered some interesting things~\cite{wombat2016}.

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

\begin{thebibliography}{Wombat, 2016}
	\bibitem[Wikibook]{wikibook}
		\bibTitle{Manually Managing References}, 
		\url{https://en.wikibooks.org/wiki/LaTeX/Manually_Managing_References};
		2016
	\bibitem[Wombat, 2016]{wombat2016}
		Walther Wombat and Klaus Koala,
		\bibTitle{The true meaning of 42} in: Journal of modern skepticism;
		2016
	\bibitem{lion2010}
		Laura Lion, Gabrielle Giraffe and Carl Capybara,
		\bibTitle{The dangers of asking the wrong question}, publishing house;
		2010
\end{thebibliography}
\end{document}

ManualRefC.png


Keeping track of all the details and checking for consistency will cost a lot of time.