• Home   /  
  • Archive by category "1"

Bibliography In Latex Without Numbering All The Bones

The answer really depends on how you have set up your document and how you create your bibliogrphy etc (are you using bibtex, biblatex, ...?).

Any way one solution, which may or may not be appropriate is to add the following to your preamble:

Actually, this solution makes the bibliography more compact, which you mightn't like.

Another solution, that it closer is spirit to what you tried, is to modify . If you look at the definition of (using, for example, ), you will see that it calls and this is where the command comes from. Hence, you can get what you want with the following:

The difference between these two approaches is the indentation of the bibliography entries. The first attempt produces

whereas the second gives you

The first approach is the more robust and the second may have unintended side-effects, not least because it doesn't cater for the optional argument that accepts.

answered Aug 14 '14 at 2:44

Permission is granted to copy, distribute, and/or modify this document under the terms of the Creative Commons Attribution-ShareAlike 3.0 Unported License.


If you have saved this file to your computer, click on a link in the contents to go to that section.

Getting Started
  1. Introduction
  2. Installation
  3. Installing Extra Packages
  4. Basics
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. Importing Graphics
  14. Floats, Figures and Captions
  15. Footnotes and Margin Notes
  16. Hyperlinks
  17. Labels and Cross-referencing
  1. Errors and Warnings
  2. Lenghts
  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. Letters
  2. Presentations
  3. Teacher's Corner
  4. Curriculum Vitae
Creating Graphics
  1. Introducing Procedural Graphics
  2. MetaPost
  3. Picture
  4. PGF/TikZ
  5. PSTricks
  6. Xy-pic
  7. Creating 3D graphics
  1. Macros
  2. Plain TeX
  3. Creating Packages
  4. Themes
  1. Modular Documents
  2. Collaborative Writing of LaTeX Documents
  3. Export To Other Formats
Help and Recommendations
  1. FAQ
  2. Tips and Tricks
  1. Authors
  2. Links
  3. Package Reference
  4. Sample LaTeX documents
  5. Index
  6. Command Glossary


What is TeX?

TeX is a language created by Donald Knuth to typeset documents attractively and consistently. Knuth started writing the TeX typesetting engine in 1977 to explore the potential of the digital printing equipment that was beginning to infiltrate the publishing industry at that time, in the hope that he could reverse the trend of deteriorating typographical quality that he saw affecting his own books and articles. While TeX is a programming language in the sense that it is Turing complete, its main job is that of a markup language for describing how your document should look. The fine control TeX offers over document structure and formatting makes it a powerful—and formidable—tool. TeX is renowned for being extremely stable, for running on many different kinds of computers, and for being virtually bug free. The version numbers of TeX are converging toward '"`UNIQ--postMath-00000001-QINU`"', with a current version number of 3.1415926.

The name TeX is intended by its developer to be /'tɛx/, /x/ being the velar fricative, the final consonant of loch and Bach. (Donald E. Knuth, The TeXbook) The letters of the name are meant to represent the capital Greek letters tau, epsilon, and chi, as TeX is an abbreviation of τέχνη (ΤΕΧΝΗ – technē), Greek for both "art" and "craft", which is also the root word of technical. English speakers often pronounce it /'tɛk/, like the first syllable of technical.

The tools TeX offers "out of the box" are relatively primitive, and learning how to perform common tasks can require a significant time investment. Fortunately, document preparation systems based on TeX, consisting of collections of pre-built commands and macros, do exist. These systems save time by automating certain repetitive tasks; however, this convenience comes at the cost of complete design flexibility. One of the most popular macro packages is called LaTeX.

What is LaTeX?

LaTeX (pronounced either "Lah-tech" or "Lay-tech") is a set of macros for TeX created by Leslie Lamport. Its purpose is to simplify TeX typesetting, especially for documents containing mathematical formulae. Within the typesetting system, its name is formatted as LaTeX.

In addition to the commands and options LaTeX offers, many other authors have contributed extensions, called packages or styles, which you can use for your documents. Many of these are bundled with most TeX/LaTeX software distributions; more can be found in the Comprehensive TeX Archive Network (CTAN).

Why should I use LaTeX?

Most readers will be familiar with WYSIWYG (What You See Is What You Get) typesetting systems such as LibreOffice Writer, Microsoft Word, or Google Docs. Using LaTeX is fundamentally different from using these other programs—instead of seeing your document as it comes together, you describe how you want it to look using commands in a text file, then run that file through the LaTeX program to build the result. While this has the disadvantage of needing to pause your work and take multiple steps to see what your document looks like, there are many advantages to using LaTeX:

  • You can concentrate purely on the structure and contents of the document. LaTeX will automatically ensure that the typography of your document—fonts, text sizes, line heights, and other layout considerations—are consistent according to the rules you set.
  • In LaTeX, the document structure is visible to the user, and can be easily copied to another document. In WYSIWYG applications it is often not obvious how a certain formatting was produced, and it might be impossible to copy it directly for use in another document.
  • Indexes, footnotes, citations and references are generated easily and automatically.
  • Mathematical formulae can be easily typeset. (Quality mathematics was one of the original motivations of TeX.)
  • Since the document source is plain text,
    • Document sources can be read and understood with any text editor, unlike the complex binary and XML formats used with WYSIWYG programs.
    • Tables, figures, equations, etc. can be generated programmatically with any language.
    • Changes can be easily tracked with version control software.

When the source file is processed by the LaTeX program, or engine, it can produce documents in several formats. LaTeX natively supports DVI and PDF, but by using other software you can easily create PostScript, PNG, JPEG, etc.

Terms regarding TeX

Document preparation systems

LaTeX is a document preparation system based on TeX. So the system is the combination of the language and the macros.


TeX distributions are collections of packages and programs (compilers, fonts, and macro packages) that enable you to typeset without having to manually fetch files and configure things.


An engine is an executable that can turn your source code into a printable output format. The engine by itself only handles the syntax. It also needs to load fonts and macros to fully understand the source code and generate output properly. The engine will determine what kind of source code it can read, and what format it can output (usually DVI or PDF).

All in all, distributions are an easy way to install what you need to use the engines and the systems you want. Distributions usually target specific operating systems. You can use different systems on different engines, but sometimes there are restrictions. Code written for TeX, LaTeX or ConTeXt are (mostly) not compatible. Additionally, engine-specific code (like font for XeTeX) may not be compiled by every engine.

When searching for information on LaTeX, you might also stumble upon XeTeX, ConTeXt, LuaTeX or other names with a -TeX suffix. Let's recap most of the terms in this table.

AMSTeXA legacy TeX macro-based document preparation system used by the American Mathematical Society (AMS) from 1982 to 1985. It evolved into the AMS-LaTeX collection which includes the amsmath package used in nearly every LaTeX document as well as mutliple AMS publication layout standards (document classes).
ConTeXtA TeX macro-based document preparation system designed by Hans Hagen and Ton Otten of Pragma ADE in the Netherlands around 1991. It is compatible with the pdfTeX, XeTeX and LuaTeX engines.

ConTeXt assumes the content author (writer of the document’s text) and the style author (designer of the document’s layout and appearance) are the same. It has a consistent and easy to understand syntax that provides the author with the tools and freedom necessary to produce a document with any desired layout. In cases where there are no standards to follow, ConTeXt provides creative freedom at the expense of required additional effort. ConTeXt excels at producing high-quality works with creative flair, such as textbooks and literature with artistically distinctive layouts.

LaTeXA TeX macro--based document preparation system designed by Leslie Lamport.

LaTeX assumes the content author and style author are different people. This allows authors (researchers, students, etc.) to concentrate on content and forget about design while allowing publishers (journals, graduate departments, etc.) to enforce institutional standards. Separation of content and design comes with the costs of package management, a less consistent syntax, and added complexity (compared to ConTeXt) if an author wishes to deviate from the layout designer's specification (documentclass). LaTeX excels at producing high-quality academic documents that conform to publication requirements, such as journal articles and theses.

MetaFontA high-quality font system designed by Donald Knuth along with TeX.
MetaPostA descriptive vector graphics language based on MetaFont.
TeXThe original language designed by Donald Knuth.
TexinfoA TeX macro--based document preparation system designed by Richard Stallman that specializes in producing technical documentation (software manuals).
, a TeX engine which supports Unicode input and and fonts. See Fonts.
, A TeX engine with embedded Lua support, aiming at making TeX internals more flexible. Like XeTeX, supports Unicode input and modern font files.
, Generates PDF output.
, The "original" TeX engine. Generates DVI output.
TeX DistributionsDescriptions
MacTeXA TeX Live based distribution targetting Mac OS X.
MiKTeXA TeX distribution for Windows.
TeX LiveA cross-platform TeX distribution.

What's next?

The next chapter we discuss installing LaTeX on your system. Then we will typeset our first LaTeX file.

Learning more

One of the most frustrating things beginners and even advanced users might encounter using LaTeX is the difficulty of changing the look of your documents. While WYSIWYG programs make it trivial to change fonts and layouts, LaTeX requires you to learn new commands and packages to do so. Subsequent chapters will cover many common use cases, but know that this book is only scratching the surface.

Coming from a community of typography enthusiasts, most LaTeX packages contain excellent documentation. This should be your first stop if you have questions—if a package's manual has not been installed on your machine as part of your TeX distribution, it can be found on CTAN.

Other useful resources include:


If this is the first time you are trying out LaTeX, you don't even need to install anything. For quick testing purpose you may just create a user account with an online LaTeX editor and continue this tutorial in the next chapter. These websites offer collaboration capabilities while allowing you to experiment with LaTeX syntax without having to bother with installing and configuring a distribution and an editor. When you later feel that you would benefit from having a standalone LaTeX installation, you can return to this chapter and follow the instructions below.

LaTeX is not a program by itself; it is a language. Using LaTeX requires a bunch of tools. Acquiring them manually would result in downloading and installing multiple programs in order to have a suitable computer system that can be used to create LaTeX output, such as PDFs. TeX Distributions help the user in this way, in that it is a single step installation process that provides (almost) everything.

At a minimum, you'll need a TeX distribution, a good text editor and a DVI or PDF viewer. More specifically, the basic requirement is to have a TeX compiler (which is used to generate output files from source), fonts, and the LaTeX macro set. Optional, and recommended installations include an attractive editor to write LaTeX source documents (this is probably where you will spend most of your time), and a bibliographic management program to manage references if you use them a lot.


TeX and LaTeX are available for most computer platforms, since they were programmed to be very portable. They are most commonly installed using a distribution, such as teTeX, MiKTeX, or MacTeX. TeX distributions are collections of packages and programs (compilers, fonts, and macro packages) that enable you to typeset without having to manually fetch files and configure things. LaTeX is just a set of macro packages built for TeX.

The recommended distributions for each of the major operating systems are:

  • TeX Live is a major TeX distribution for *BSD, GNU/Linux, Mac OS X and Windows.
  • MiKTeX is a Windows-specific distribution.
  • MacTeX is a Mac OS-specific distribution based on TeX Live.

These, however, do not necessarily include an editor. You might be interested in other programs that are not part of the distribution, which will help you in writing and preparing TeX and LaTeX files.

*BSD and GNU/Linux

In the past, the most common distribution used to be teTeX. As of May 2006 teTeX is no longer actively maintained and its former maintainer Thomas Esser recommended TeX Live as the replacement.[1]

The easy way to get TeX Live is to use the package manager or portage tree coming with your operating system. Usually it comes as several packages, with some of them being essential, other optional. The core TeX Live packages should be around 200-300 MB.

If your *BSD or GNU/Linux distribution does not have the TeX Live packages, you should report a wish to the bug tracking system. In that case you will need to download TeX Live yourself and run the installer by hand.

You may wish to install the content of TeX Live more selectively. See below.

Mac OS X

Mac OS X users may use MacTeX, a TeX Live-based distribution supporting TeX, LaTeX, AMSTeX, ConTeXt, XeTeX and many other core packages. Download MacTeX.pkg on the MacTeX page, unzip it and follow the instructions. Further information for Mac OS X users can be found on the TeX on Mac OS X Wiki.

Since Mac OS X is also a Unix-based system, TeX Live is naturally available through MacPorts and Fink. Homebrew users should use the official MacTeX installer because of the unique directory structure used by TeX Live. Further information for Mac OS X users can be found on the TeX on Mac OS X Wiki.

Microsoft Windows

Microsoft Windows users can install MiKTeX onto their computer. It has an easy installer that takes care of setting up the environment and downloading core packages. This distribution has advanced features, such as automatic installation of packages, and simple interfaces to modify settings, such as default paper sizes.

There is also a port of TeX Live available for Windows.

Custom installation with TeX Live

This section targets users who want fine-grained control over their TeX distribution, like an installation with a minimum of disk space usage. If it is none of your concern, you may want to jump to the next section.

Picky users may wish to have more control over their installation. Common distributions might be tedious for the user caring about disk space. In fact, MikTeX and MacTeX and packaged TeX Live features hundreds of LaTeX packages, most of them which you will never use. Most Unix with a package manager will offer TeX Live as a set of several big packages, and you often have to install 300–400 MB for a functional system.

TeX Live features a manual installation with a lot of possible customizations. You can get the network installer at tug.org. This installer allows you to select precisely the packages you want to install. As a result, you may have everything you need for less than 100 MB. TeX Live is then managed through its own package manager, tlmgr. It will let you configure the distributions, install or remove extra packages and so on.

You will need a Unix-based operating system for the following. Mac OS X, GNU/Linux or *BSD are fine. It may work for Windows but the process must be quite different.

TeX Live groups features and packages into different concepts:

  • Collections are groups of packages that can always be installed individually, except for the Essential programs and files collection. You can install collections at any time.
  • Installation Schemes group collections and packages. Schemes can only be used at installation time. You can select only one scheme at a time.

Minimal installation

We will give you general guidelines to install a minimal TeX distribution (i.e., only for plain TeX).

  1. Download the installer at http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz and extract it to a temporary folder.
  2. Open a terminal in the extracted folder and log in as root.
  3. Change the umask permissions to 022 (user read/write/execute, group/others read/execute only) to make sure other users will have read-only access to the installed distribution.
# umask 022
  1. Launch .
  2. Select the minimal scheme (plain only).
  3. You may want to change the directory options. For example you may want to hide your personal macro folder which is located at TEXMFHOME. It is by default. Replace it by to hide it.
  4. Now the options:
    1. use letter size instead of A4 by default: mostly for users from the USA.
    2. execution of restricted list of programs: it is recommended to select it for security reasons. Otherwise it allows the TeX engines to call any external program. You may still configure the list afterwards.
    3. create format files: targetting a minimal disk space, the best choice depends on whether there is only one user on the system, then deselecting it is better, otherwise select it. From the help menu: "If this option is set, format files are created for system-wide use by the installer. Otherwise they will be created automatically when needed. In the latter case format files are stored in user's directory trees and in some cases have to be re-created when new packages are installed."
    4. install font/macro doc tree: useful if you are a developer, but very space consuming. Turn it off if you want to save space.
    5. install font/macro source tree: same as above.
    6. Symlinks are fine by default, change it if you know what you are doing.
  5. Select portable installation if you install the distribution to an optical disc, or any kind of external media. Leave to default for a traditional installation on the system hard drive.

At this point it should display

1 collections out of 85, disk space required: 40 MB

or a similar space usage.

You can now proceed to installation: start installation to hard disk.

Don't forget to add the binaries to your PATH as it's noticed at the end of the installation procedure.

First test

In a terminal write

$ tex '\empty Hello world!\bye' $ pdftex '\empty Hello world!\bye'

You should get a DVI or a PDF file accordingly.


Formerly, TeX distributions used to be configured with the tool from the teTeX distribution. TeX Live still features this tool, but recommends using its own tool instead: . Note that as of January 2013 not all features are implemented by . Only use when you cannot do what you want with .

List current installation options:

tlmgr option

You can change the install options:

tlmgr option srcfiles 1 tlmgr option docfiles 0 tlmgr paper letter

See the man page for more details on its usage. If you did not install the documents as told previously, you can still access the man page with

tlmgr help

Installing LaTeX

Now we have a running plain TeX environment, let's install the base packages for LaTeX.

# tlmgr install latex latex-bin latexconfig latex-fonts

In this case you can omit as they are auto-resolved dependencies to LaTeX. Note that resolves some dependencies, but not all. You may need to install dependencies manually. Thankfully this is rarely too cumbersome.

Other interesting packages:

# tlmgr install amsmath babel carlisle ec geometry graphics hyperref lm marvosym oberdiek parskip graphics-def url
amsmathThe essentials for math typesetting.
babelInternationalization support.
carlisleBundle package required for some babel features.
ecRequired for T1 encoding.
geometryFor page layout.
graphicsThe essentials to import graphics.
hyperrefPDF bookmarks, PDF followable links, link style, TOC links, etc.
lmOne of the best Computer Modern style font available for several font encodings (such as T1).
marvosymSeveral symbols, such as the official euro.
oberdiekBundle package required for some geometry features.
parskipLet you configure paragraph breaks and indents properly.
graphics-defRequired for some graphics features.
urlRequired for some hyperref features.

If you installed a package you do not need anymore, use

# tlmgr remove <package>


If you are using Babel for non-English documents, you need to install the hyphenation patterns for every language you are going to use. They are all packaged individually. For instance, use

# tlmgr install hyphen-{finnish,sanskrit}

for finnish and sanskrit hyphenation patterns.

Note that if you have been using another TeX distribution beforehand, you may still have hyphenation cache stored in you home folder. You need to remove it so that the new packages are taken into account. The TeX Live cache is usually stored in the folder ( stands for the year). You may safely remove this folder as it contains only generated data. TeX compilers will re-generate the cache accordingly on next compilation.


By default TeX Live will install in . The distribution is quite proper as it will not write any file outside its folder, except for the cache (like font cache, hyphenation patters, etc.). By default,

  • the system cache goes in ;
  • the user cache goes in .

Therefore TeX Live can be installed and uninstalled safely by removing the aforementioned folders.

Still, TeX Live provides a more convenient way to do this:

# tlmgr uninstall

You may still have to wipe out the folders if you put untracked files in them.


TeX and LaTeX source documents (as well as related files) are all text files, and can be opened and modified in almost any text editor. You should use a text editor (e.g. Notepad), not a word processor (Microsoft Word, LibreOffice Writer). Dedicated LaTeX editors are more useful than generic plain text editors, because they usually have autocompletion of commands, spell and error checking and handy macros.


BaKoMa TeX

BaKoMa TeX is an editor for Windows and Mac OS with WYSIWYG-like features. It takes care of compiling the LaTeX source and updating it constantly to view changes to document almost in real time. You can take an evaluation copy for 28 days.


Emacs is a general purpose, extensible text processing system. Advanced users can program it (in elisp) to make Emacs the best LaTeX environment that will fit their needs. In turn beginners may prefer using it in combination with AUCTeX and Reftex (extensions that may be installed into the Emacs program). Depending on your configuration, Emacs can provide a complete LaTeX editing environment with auto-completion, spell-checking, a complete set of keyboard shortcuts, table of contents view, document preview and many other features.


Gedit with gedit-latex-plugin is also worth trying out for users of GNOME. GEdit is a cross-platform application for Windows, Mac, and Linux


Gummi is a LaTeX editor for Linux, which compiles the output of pdflatex in realtime and shows it on the right half of the screen[2].


LyX is a popular document preparation system for Windows, Linux and Mac OS. It provides a graphical interface to LaTeX, including several popular packages. It contains formula and table editors and shows visual clues of the final document on the screen enabling users to write LaTeX documents without worrying about the actual syntax. LyX calls this a What You See Is What You Mean (WYSIWYM) approach.[3]

LyX saves its documents in their own markup, and generates LaTeX code based on this. The user is mostly isolated from the LaTeX code and not in complete control of it, and as such LyX is not a normal LaTeX editor. However, as LaTeX is underlying system, knowledge of how that works is useful also for a LyX user. In addition, if one wants to do something that is not supported in the GUI, using LaTeX code may be required.


TeXmaker is a cross-platform editor very similar to Kile in features and user interface. In addition it has its own PDF viewer.


TeXstudio is a cross-platform open source LaTeX editor forked from Texmaker.


TeXworks is a dedicated TeX editor that is included in MiKTeX and TeX Live. It was developed with the idea that a simple interface is better than a cluttered one, and thus to make it easier for people in their early days with LaTeX to get to what they want to do: write their documents. TeXworks originally came about precisely because a math professor wanted his students to have a better initial experience with LaTeX.

You can install TeXworks with the package manager of your Linux distribution or choose it as an install option in the Windows or Mac installer.


Vim is another general purpose text editor for a wide variety of platforms including UNIX, Mac OS X and Windows. A variety of extensions exist including LaTeX Box and Vim-LaTeX.

*BSD and GNU/Linux-only


Kile is a LaTeX editor for KDE (cross platform), providing a powerful GUI for editing multiple documents and compiling them with many different TeX compilers. Kile is based on Kate editor, has a quick access toolbar for symbols, document structure viewer, a console and customizable build options. Kile can be run in all operating systems that can run KDE.


LaTeXila is another text editor for Linux (Gnome).

Mac OS X-only


TeXShop, the model for the TeXworks editor and previewer, is for Mac OS and is bundled with the MacTeX distribution. It uses multiple windows, one for editing the source, one for the preview, and one as a console for error messages. It offers one-click updating of the preview and allows easy crossfinding between the code and the preview by using CMD-click along with many features to make editing and typesetting TeX source easier.


TeXnicle is a free editor for Mac OS that includes the ability to perform live updates. It includes a code library for the swift insertion of code and the ability to execute detailed word counts on documents. It also performs code highlighting and the editing window is customisable, permitting the user to select the font, colour, background colour of the editing environment. It is in active development.


Archimedes is an easy-to-use LaTeX and Markdown editor designed from the ground up for Mac OS X. It includes a built-in LaTeX library, code completion support, live previews, macro support, integration with sharing services, and PDF and HTML export options. Archimedes's Magic Type feature lets users insert mathematical symbols just by drawing them on their MacBook's trackpad or Magic Trackpad.


Texpad is an integrated editor and viewer for Mac OS with a companion app for iOS devices. Similar to TeXShop, Texpad requires a working MacTeX distribution to function, however it can also support other distributions side-by-side with MacTex. It offers numerous features including templates, outline viewing, auto-completion, spell checking, customizable syntax highlighting, to-do list integration, code snippets, Markdown integration, multi-lingual support, and a Mac OS native user interface. Although Texpad offers a free evaluation period, the unlocked version is a paid download.





TeXnicCenter is a popular free and open source LaTeX editor for Windows. It also has a similar user interface to TeXmaker and Kile.


WinEdt is a powerful and versatile text editor with strong predisposition towards creation of LaTeX/TeX documents for Windows. It has been designed and configured to integrate with TeX Systems such as MiTeX or TeX Live. Its built-in macro helps in compiling the LaTeX source to the WYSIWYG-like DVI or PDF or PS and also in exporting the document to other mark-up languages as HTML or XML.



Online solutions

To get started without needing to install anything, you can use a web-hosted service featuring a full TeX distribution and a web LaTeX editor.

  • Authorea is an integrated online framework for the creation of technical documents in collaboration. Authorea's frontend allows you to enter text in LaTeX or Markdown, as well as figures, and equations (in LaTeX or MathML). Authorea's versioning control system is entirely based on Git (every article is a Git repository).
  • Overleaf is a secure, easy to use online LaTeX editor with integrated rapid preview - like EtherPad for LaTeX. Start writing with one click (no signup required) and share the link. It supports real time preview, figures, bibliographies and custom styles.
  • ShareLaTeX.com is a secure cloud-based LaTeX editor offering unlimited free projects. Premium accounts are available for extra features such as collaborative editing, version control and Dropbox integration.
  • SimpleLaTeX is an online editor and previewer for short LaTeX notes, which can be optionally cached or shared. Previews are available in SVG, PNG, and PDF. It also includes a simple GUI for editing tables.
  • Verbosus is a professional Online LaTeX Editor that supports collaboration with other users and is free to use. Merge conflicts can easily resolved by using a built-in merge tool that uses an implementation of the diff-algorithm to generate information required for a successful merge.

Bibliography management

Bibliography files () are most easily edited and modified using a management system. These graphical user interfaces all feature a database form, where information is entered for each reference item, and the resulting text file can be used directly by BibTeX.


Mac OS X-only

  • BibDesk is a bibliography manager based on a BibTeX file. It imports references from the internet and makes it easy to organize references using tags and categories[4].


Finally, you will need a viewer for the files LaTeX outputs. Normally LaTeX saves the final document as a (Device independent file format), but you will rarely want it to. DVI files do not contain embedded fonts and many document viewers are unable to open them.

Usually you will use a LaTeX compiler like to produce a PDF file directly, or a tool like to convert the DVI file to PDF format. Then you can view the result with any PDF viewer.

Practically all LaTeX distributions have a DVI viewer for viewing the default output of , and also tools such as for converting the result automatically to PDF and PS formats.

Here follows a list of various PDF viewers.

Tables and graphics tools

LaTeX is a document preparation system, it does not aim at being a spreadsheet tool nor a vector graphics tool.

If LaTeX can render beautiful tables in a dynamic and flexible manner, it will not handle the handy features you could get with a spreadsheet like dynamic cells and calculus. Other tools are better at that. The ideal solution is to combine the strength of both tools: build your dynamic table with a spreadsheet, and export it to LaTeX to get a beautiful table seamlessly integrated to your document. See Tables for more details.

The graphics topic is a bit different since it is possible to write procedural graphics from within your LaTeX document. Procedural graphics produce state-of-the-art results that integrates perfectly to LaTeX (e.g. no font change), but have a steep learning curve and require a lot of time to draw.

For easier and quicker drawings, you may want to use a WYSIWYG tool and export the result to a vector format like PDF. The drawback is that it will contrast in style with the rest of your document (font, size, etc.). Some tools have the capability to export to LaTeX, which will partially solve this issue. See Importing Graphics for more details.


  1. ↑teTeX Home Page (Retrieved January 31, 2007)
  2. ↑Gummi
  3. ↑LyX
  4. ↑BibDesk

Add-on features for LaTeX are known as packages. Dozens of these are pre-installed with LaTeX and can be used in your documents immediately. They should all be stored in subdirectories of named after each package. The directory name "texmf" stands for “TEX and METAFONT”. To find out what other packages are available and what they do, you should use the CTAN search page which includes a link to Graham Williams' comprehensive package catalogue.

A package is a file or collection of files containing extra LaTeX commands and programming which add new styling features or modify those already existing. There are two main file types: class files with extension, and style files with extension. There may be ancillary files as well. When you try to typeset a document which requires a package which is not installed on your system, LaTeX will warn you with an error message that it is missing. You can download updates to packages you already have (both the ones that were installed along with your version of LaTeX as well as ones you added). There is no limit to the number of packages you can have installed on your computer (apart from disk space!), but there is a configurable limit to the number that can be used inside any one LaTeX document at the same time, although it depends on how big each package is. In practice there is no problem in having even a couple of dozen packages active.

Most LaTeX installations come with a large set of pre-installed style packages, so you can use the package manager of the TeX distribution or the one on your system to manage them. See the automatic installation. But many more are available on the net. The main place to look for style packages on the Internet is CTAN. Once you have identified a package you need that is not in your distribution, use the indexes on any CTAN server to find the package you need and the directory where it can be downloaded from. See the manual installation.

Automatic installation

If on an operating system with a package manager or a portage tree, you can often find packages in repositories.

With MikTeX there is a package manager that allows you to pick the package you want individually. As a convenient feature, upon the compilation of a file requiring non-installed packages, MikTeX will automatically prompt to install the missing ones.

With TeX Live, it is common to have the distribution packed into a few big packages. For example, to install something related to internationalization, you might have to install a package like . With TeX Live manually installed, use to manage packages individually.

tlmgr install <package1> <package2> ... tlmgr remove <package1> <package2> ...

The use of is covered in the Installation chapter.

If you cannot find the wanted package with any of the previous methods, see the manual installation.

Instructions for specific operating systems

On Ubuntu, with releases such as Trusty, you can use texlive and texlive-extra packages, e.g. texlive-full, texlive-latex-extra, texlive-math-extra, texlive-plain-extra, texlive-bibtex-extra, texlive-generic-extra, and language packages, which are all available here on the Ubuntu packages site, as well as here for Trusty updates. You can install these packages with .

Manual installation

Downloading packages

What you need to look for is usually two files, one ending in and the other in . The first is a DOCTeX file, which combines the package program and its documentation in a single file. The second is the installation routine (much smaller). You must always download both files. If the two files are not there, it means one of two things:

  • Either the package is part of a much larger bundle which you shouldn't normally update unless you change LaTeX version of LaTeX;
  • or it's an older or relatively simple package written by an author who did not use a file.

Download the package files to a temporary directory. There will often be a with a brief description of the package. You should of course read this file first.

Installing a package

There are five steps to installing a LaTeX package. (These steps can also be used on the pieces of a complicated package you wrote yourself; in this case, skip straight to Step 3.)

1. Extract the files Run LaTeX on the file. That is, open the file in your editor and process it as if it were a LaTeX document (which it is), or if you prefer, type latex followed by the filename in a command window in your temporary directory. This will extract all the files needed from the file (which is why you must have both of them present in the temporary directory). Note down or print the names of the files created if there are a lot of them (read the log file if you want to see their names again).

2. Create the documentation Run LaTeX on the file. You might need to run it twice or more, to get the cross-references right (just like any other LaTeX document). This will create a file of documentation explaining what the package is for and how to use it. If you prefer to create PDF then run pdfLaTeX instead. If you created a as well, it means that the document contains an index, too. If you want the index to be created properly, follow the steps in the indexing section. Sometimes you will see that a (glossary) file has been produced. Run the following command instead:

makeindex -s gglo.ist -o name.gls name.glo

3. Install the files While the documentation is printing, move or copy the package files from your temporary directory to the right place[s] in your TeX local installation directory tree. Packages installed by hand should always be placed in your "local" directory tree, not in the directory tree containing all the pre-installed packages. This is done to a) prevent your new package accidentally overwriting files in the main TeX directories; and b) avoid your newly-installed files being overwritten when you next update your version of TeX.

For a TDS(TeX Directory Structure)-conformant system, your "local installation directory tree" is a folder and its subfolders. The outermost folder should probably be called or . Its location depends on your system:

The "right place" sometimes causes confusion, especially if your TeX installation is old or does not conform to the TeX Directory Structure(TDS). For a TDS-conformant system, the "right place" for a LaTeX file is a suitably-named subdirectory of . "Suitably-named" means sensible and meaningful (and probably short). For a package like paralist, for example, I'd call the directory .

Often there is just a file to move, but in the case of complex packages there may be more, and they may belong in different locations. For example, new BibTeX packages or font packages will typically have several files to install. This is why it is a good idea to create a sub-directory for the package rather than dump the files into misc along with other unrelated stuff. If there are configuration or other files, read the documentation to find out if there is a special or preferred location to move them to.

TypeDirectory (under or )Description
Adobe Font Metrics for Type 1 fonts
BibTeX bibliography
BibTeX style
Document class file
package documentation
Font encoding
Font Definition files for METAFONT fonts
Font Definition files for PostScript Type 1 fonts
Font mapping files
METAFONT outline
package documentation
PostScript Type 1 outline
Style file: the normal package content
TeX source for package documentation
Plain TeX macro files
TeX Font Metrics for METAFONT and Type 1 fonts
TrueType font
TeX virtual fonts
othersother types of file unless instructed otherwise

For most fonts on CTAN, the is .

4. Update your index Finally, run your TeX indexer program to update the package database. This program comes with every modern version of TeX and has various names depending on the LaTeX distribution you use. (Read the documentation that came with your installation to find out which it is, or consult http://www.tug.org/fonts/fontinstall.html#fndb):

  • teTeX, TeX Live, fpTeX:
  • web2c:
  • MacTeX: MacTeX appears to do this for you.
  • MikTeX: (or use the GUI)
  • MiKTeX 2.7 or later versions, installed on Windows XP through Windows 7: Start -> All Programs -> MikTex -> Settings. In Windows 8 use the keyword Settings and choose the option of Settings with the MiKTex logo. In Settings menu choose the first tab and click on Refresh FNDB-button (MikTex will then check the Program Files directory and update the list of File Name DataBase). After that just verify by clicking 'OK'.

5. Update font maps If your package installed any TrueType or Type 1 fonts, you need to update the font mapping files in addition to updating the index. Your package author should have included a file for the fonts. The map updating program is usually some variant on , depending on your distribution:

  • TeX Live and MacTeX: (if you installed the files in a personal tree) or (if you installed the files in a system directory).
  • MikTeX: Run , add the line " to the file that opens, then run .

See http://www.tug.org/fonts/fontinstall.html.

The reason this process has not been automated widely is that there are still thousands of installations which do not conform to the TDS, such as old shared Unix systems and some Microsoft Windows systems, so there is no way for an installation program to guess where to put the files: you have to know this. There are also systems where the owner, user, or installer has chosen not to follow the recommended TDS directory structure, or is unable to do so for political or security reasons (such as a shared system where the user cannot write to a protected directory). The reason for having the directory (called on some systems) is to provide a place for local modifications or personal updates, especially if you are a user on a shared or managed system (Unix, Linux, VMS, Windows NT/2000/XP, etc.) where you may not have write-access to the main TeX installation directory tree. You can also have a personal subdirectory in your own login directory. Your installation must be configured to look in these directories first, however, so that any updates to standard packages will be found there before the superseded copies in the main tree. All modern TeX installations should do this anyway, but if not, you can edit yourself.

Checking package status

The universal way to check if a file is available to TeX compilers is the command-line tool .

$ kpsewhich tikz /usr/local/texlive/2012/texmf-dist/tex/plain/pgf/frontendlayer/tikz.tex

will actually search for files only, not for packages. It returns the path to the file. For more details on a specific package use the command-line tool (TeX Live only):

tlmgr info <package>

The tool has lot more options. To consult the documentation:

tlmgr help

Package documentation

To find out what commands a package provides (and thus how to use it), you need to read the documentation. In the subdirectory of your installation there should be directories full of .dvi files, one for every package installed. This location is distribution-specific, but is typically found in:

TeX Live

Generally, most of the packages are in the subdirectory, although other packages (such as BibTeX and font packages) are found in other subdirectories in . The documentation directories have the same name of the package (e.g. ), which generally have one or more relevant documents in a variety of formats (, , , etc.). The documents generally have the same name as the package, but there are exceptions (for example, the documentation for is found at ). If your installation procedure has not installed the documentation, the DVI files can all be downloaded from CTAN. Before using a package, you should read the documentation carefully, especially the subsection usually called "User Interface", which describes the commands the package makes available. You cannot just guess and hope it will work: you have to read it and find out.

You can usually automatically open any installed package documentation with the texdoc command:

texdoc <package-name>

External resources

The best way to look for LaTeX packages is the already mentioned CTAN: Search. Additional resources form The TeX Catalogue Online:

See Also


This tutorial is aimed at getting familiar with the bare bones of LaTeX.

Before starting, ensure you have LaTeX installed on your computer (see Installation for instructions of what you will need).

  • We will first have a look at the LaTeX syntax.
  • We will create our first LaTeX document.
  • Then we will take you through how to feed this file through the LaTeX system to produce quality output, such as postscript or PDF.
  • Finally we will have a look at the file names and types.

The LaTeX syntax

When using LaTeX, you write a plain text file which describes the document's structure and presentation. LaTeX converts this source text, combined with markup, into a typeset document. For the purpose of analogy, web pages work in a similar way: HTML is used to describe the document, which is then rendered into on-screen output - with different colours, fonts, sizes, etc. - by your browser.

You can create an input file for LaTeX with any text editor. A minimal example looks something like the following (the commands will be explained later):

\documentclass{article}\begin{document} Hello world! \end{document}


LaTeX normalises spaces in its input files so that whitespace characters, such as [space] or [tab], are treated uniformly as "space". Several consecutive "spaces" are treated as one, "space" opening a line is generally ignored, and a single line break also yields “space”. One or more line breaks (empty lines) define the end of a paragraph. An example of applying these rules is presented below: the left-hand side shows the user's input (.tex), while the right-hand side depicts the rendered output (.dvi/.pdf/.ps).

It does not matter whether you enter one or several spaces after a word. An empty line starts a new paragraph.

It does not matter whether you enter one or several spaces after a word.

An empty line starts a new paragraph.

Reserved Characters

The following symbols are reserved characters that either have a special meaning under LaTeX or are unavailable in all the fonts. If you enter them directly in your text, they will normally not print but rather make LaTeX do things you did not intend.

# $ % ^ & _ { } ~ \

As you will see, these characters can be used in your documents all the same by adding a prefix backslash:


In some circumstances, the bracket characters [ and ] can also be considered as reserved characters, as they are used to give optional parameters to some commands. If you want to print these directly after some command, like in this situation: it will fail, as [text] will be considered as an option given to . You can achieve the correct output this way: .

The backslash character cannot be entered by adding another backslash in front of it (); this sequence is used for line breaking. For introducing a backslash in math mode, you can use instead.

The commands and produce respectively a tilde and a hat which is placed over the next letter. For example gives ñ. That's why you need braces to specify there is no letter as argument. You can also use and to enter these characters; or other commands .

If you want to insert text that might contain several particular symbols (such as URIs), you can consider using the command, which will be discussed later in the section on formatting. For source code, see Source Code Listings

The 'less than' (<) and 'greater than' (>) characters are the only visible ASCII characters (not reserved) that will not print correctly. See Special Characters for an explanation and a workaround.

Non-ASCII characters (e.g. accents, diacritics) can be typed in directly for most cases. However you must configure the document appropriately. The other symbols and many more can be printed with special commands as in mathematical formulae or as accents. We will tackle this issue in Special Characters.

LaTeX groups

Sometimes a certain state should be kept local, i.e. limiting its scope. This can be done by enclosing the part to be changed locally in curly braces. In certain occasions, using braces won't be possible. LaTeX provides and to begin and end a group, respectively.

\documentclass{article}\begin{document} normal text {\itshape walzing \bfseries Wombat} more normal text normal text \bgroup\itshape walzing \bfseries Wombat\egroup{} more normal text \end{document}

Environments form an implicit group.

LaTeX environments

Environments in LaTeX have a role that is quite similar to commands, but they usually have effect on a wider part of the document. Their syntax is:

\begin{environmentname} text to be influenced \end{environmentname}

Between the and the you can put other commands and nested environments. The internal mechanism of environments defines a group, which makes its usage safe (no influence on the other parts of the document). In general, environments can accept arguments as well, but this feature is not commonly used and so it will be discussed in more advanced parts of the document.

Anything in LaTeX can be expressed in terms of commands and environments.

LaTeX commands

LaTeX commands are case sensitive, and take one of the following two formats:

  • They start with a backslash and then have a name consisting of letters only. Command names are terminated by a space, a number or any other "non-letter".
  • They consist of a backslash and exactly one non-letter.

Some commands need an argument, which has to be given between curly braces after the command name. Some commands support optional parameters, which are added after the command name in square brackets . The general syntax is:


Most standard LaTeX commands have a switch equivalent. Switches have no arguments but apply on the rest of the scope, i.e. the current group or environment. A switch should (almost) never be called outside of any scope, otherwise it will apply on the rest of the document.


% \emph is a command with argument, \em is a switch.\emph{emphasized text}, this part is normal % Correct{\em emphasized text}, this part is normal % Correct\em emphasized text, this part is normal % Incorrect\em{emphasized text}, this part is normal % Incorrect

When LaTeX encounters a character while processing an input file, it ignores the rest of the current line, the line break, and all whitespace at the beginning of the next line.

This can be used to write notes into the input file, which will not show up in the printed version.

This is an % stupid% Better: instructive <---- example: Supercal% ifragilist% icexpialidocious

This is an example: Supercalifragilisticexpialidocious

Note that the character can be used to split long input lines that do not allow whitespace or line breaks, as with Supercalifragilisticexpialidocious above.

The core LaTeX language does not have a predefined syntax for commenting out regions spanning multiple lines. Refer to multiline comments for simple workarounds.

Our first document

Now we can create our first document. We will produce the absolute bare minimum that is needed in order to get some output; the well known Hello World! approach will be suitable here.

  • Open your favorite text-editor. vim, emacs, Notepad++, and other text editors will have syntax highlighting that will help to write your files.
  • Reproduce the following text in your editor. This is the LaTeX source.
% hello.tex - Our first LaTeX example!\documentclass{article}\begin{document} Hello World! \end{document}
  • Save your file as .

When picking a name for your file, make sure it bears a extension.

What does it all mean?

The first line is a comment. This is because it begins with the percent symbol (%); when LaTeX sees this, it simply ignores the rest of the line. Comments are useful for people to annotate parts of the source file. For example, you could put information about the author and the date, or whatever you wish.
This line is a command and tells LaTeX to use the article document class. A document class file defines the formatting standard to follow, which in this case is the generic article format. Journals, university departments, etc. can provide these files to ensure publication standards are met. In many instances, the same document content can be reformatted for submission to a different publisher simply by substituting the required document class file. There are numerous generic document classes available to choose from if one is not provided.
This line is the beginning of the environment called document; it alerts LaTeX that content of the document is about to commence. Anything above this command is known generally to belong in the preamble.
This was the only actual line containing real content - the text that we wanted displayed on the page.
The document environment ends here. It tells LaTeX that the document source is complete, anything after this line will be ignored.

As we have said before, each of the LaTeX commands begins with a backslash (). This is LaTeX's way of knowing that whenever it sees a backslash, to expect some commands. Comments are not classed as a command, since all they tell LaTeX is to ignore the line. Comments never affect the output of the document, provided there is no white space before the percent sign.

Building a document

We then feed our input file into a LaTeX engine, a program which generates our final document.

There are several LaTeX engines in modern use: , , and . There are important differences between the three, but we'll discuss those elsewhere - any of them will work for building our first document.

Generating the document

LaTeX itself does not have a GUI, though some LaTeX installations feature a graphical front-end where you can click LaTeX into compiling your input file. Assuming you're not using one of those:

  1. Open a terminal and navigate to the directory containing your file.
  2. Type the command: (The extension is not required, although you can include it if you wish.)
  3. Various bits of info about LaTeX and its progress will be displayed. If all went well, the last two lines displayed in the console will be:
Output written on hello.pdf (1 page). Transcript written on hello.log.

This means that your source file has been processed and the resulting document is called hello.pdf. You can view it with any PDF viewer installed on your system.

In this instance, due to the simplicity of the file, you only need to run the LaTeX command once. However, if you begin to create complex documents, including bibliographies and cross-references, etc., LaTeX needs to be executed multiple times to resolve the references. This will be discussed in the future when it comes up.

Autobuild Systems

Screenshot of TeXworks on Ubuntu 12.10.

One thought on “Bibliography In Latex Without Numbering All The Bones

Leave a comment

L'indirizzo email non verrà pubblicato. I campi obbligatori sono contrassegnati *