270
votes
11answers
35k views

How to look up a symbol or identify a math symbol or character?

I know what my symbol or character looks like, but I don't know what the command is or which math alphabet it came from. How do I go about finding this out?
234
votes
2answers
53k views

How to influence the position of float environments like figure and table in LaTeX?

How to influence the position of float environments like figure and table in LaTeX? This is a general question and should collect useful answers for all users. I hope we can use this as a reference
220
votes
8answers
16k views

Why is \[ … \] preferable to $$ … $$?

I've heard that you should use \[ ... \] for displayed equations instead of $$ ... $$, but why is that? I'd assumed that it's so that you can more easily tell which are starting and which are ending ...
125
votes
9answers
42k views

How to install “vanilla” TeXLive on Debian or Ubuntu?

Debian and Ubuntu have very good texlive packaging. But I'd like to use tlmgr to have a more fine-grained control about upgrades and which packages I want to be installed. So how do I install ...
403
votes
40answers
160k views

LaTeX Editors/IDEs

What editors/IDEs are available for easing the process of writing TeX/LaTeX documents? Please state some useful features like code completion, spell checking, building final DVI or PDF files, etc. ...
129
votes
9answers
74k views

Keeping tables/figures close to where they are mentioned

Is there any package or a method to force LaTeX to keep floating environments like table and figure closer to where they are declared?
119
votes
6answers
50k views

How do I update my TeX distribution?

I'm trying to compile a document that only works with an up-to-date distribution, so I'd like to know: how do I update my distribution? Please provide screenshots where appropriate. List of answers ...
275
votes
1answer
37k views

What do \makeatletter and \makeatother do?

Many TeX “hacks” begin with \makeatletter and end with \makeatother. What do these commands do?
170
votes
11answers
101k views

Where do I place my own .sty files, to make them available to all my .tex files?

I know how to define a package - but how do I make it available (to myself) at all times? Say I have the package file commonstuff.sty, that I want to be able to include in any .tex file I create on ...
46
votes
2answers
25k views

Question mark instead of citation number

I've browsed the forums and found a number of posts that have addressed this issue, but none of the solutions seem to work for me. I have the following script that I just copied from the bibtex home ...
201
votes
4answers
34k views

Drawing on an image with TikZ

Recently I have learned how to draw simple stuff with TikZ. I really like it. Now I wonder if it is possible to draw with TikZ on a image. Instead of pasting a image in Illustrator and adding some ...
87
votes
2answers
154k views

How can I manually install a package on MiKTeX (Windows)

I'm new to LaTeX, investigating using it for some work projects. I'm using MiKTeX on Windows. My employer's locked-down network blocks the application's automatic installation function. I can take ...
52
votes
5answers
33k views

How do I find out what fonts are used in a document/picture?

Is it possible to identify the font used in a specific document/picture? Answers to this question should identify: Possible methods to do this (perhaps one answer per method) and adequately ...
184
votes
21answers
29k views

What are good learning resources for a LaTeX beginner?

Which book (free or otherwise) was the most useful to you when you started learning LaTeX? I am frequently asked this question by friends who want to learn LaTeX, and I recommend the book which got ...
246
votes
1answer
41k views

Guidelines for customizing biblatex styles

Suppose I've just made the switch to biblatex. I have chosen one of the built-in styles (numeric, alphabetic, authoryear, authortitle, verbose) or of the custom styles available at CTAN, and I've ...
136
votes
4answers
6k views

What is the use of percent signs (%) at the end of lines?

I see that the code in many packages and examples contains percent signs % at the end of (many) lines. What are they used for? Do they affect the parsing of those lines?
396
votes
4answers
160k views

When should I use \input vs. \include?

There are two different commands to incorporate another file into the source of some document, \input and \include. When should I use one or the other? What are the differences between them? Are there ...
32
votes
3answers
20k views

What can I use to typeset MATLAB code in my document?

This question led to a new package: matlab-prettifier Does anybody have a quick and easy way to typeset some relatively long MATLAB code in the appendix? I looked up a few methods, and the ...
117
votes
10answers
9k views

Which packages should be loaded after hyperref instead of before?

The hyperref documentation says: "Make sure it comes last of your loaded packages". The reason is that it redefines many LaTeX commands. It's a rule of thumb that helps to avoid errors. However, ...
75
votes
2answers
14k views

Should \tikzset or \tikzstyle be used to define TikZ styles?

The PGF/TikZ manual states in section 12.4 Using Graphic Options, page 120 (v2.10), that TikZ styles can be set using: \tikzset{my style/.style={<tikz options>},...} However, in several ...
164
votes
3answers
45k views

How do I use a particular font for a small section of text in my document?

The standard font packages make global changes to the fonts in my document. What if I want to use a particular font for just a portion of my text? How do I find the right name of the font? How do I ...
143
votes
1answer
26k views

Should I use center or centering for figures and tables?

What is the correct way to center figures and tables (figure, table)? \begin{center} ... \end{center} or \begin{centering} ... \end{centering}
70
votes
3answers
12k views

How to change the name of document elements like “Figure”, “Contents”, “Bibliography” etc.?

I'd like to modify the names used to typeset some of my document elements. For example, the caption of figure floats should change from "Figure" to "Fig.", and my \tableofcontents sectioning heading ...
74
votes
5answers
78k views

eqnarray vs align

I want to include a list of related equations, say, for a proof, in my LaTeX document. As far as I know, I have two good options, eqnarray and align. What is the difference between them, and how do I ...
34
votes
2answers
3k views

Why does an environment's label have to appear after the caption?

\documentclass{article} \usepackage{algorithm} \begin{document} \setcounter{section}{54} \section{A section with no label} \begin{algorithm} \label{myalg} \caption{An algorithm with the label ...
68
votes
6answers
70k views

Column and row padding in tables

How do you guys go about controlling column padding in tables? Update To clarify, I'm looking for a way to control both vertical and horizontal padding. So, if I had a simple table like in the ...
45
votes
2answers
4k views

Importing a Single Symbol From a Different Font

Is there a general way to change the font of a particular symbol without switching packages? For example, suppose I'm using Computer Modern for my entire document, but I want the "subset" operator to ...
84
votes
2answers
26k views

Continuous v. per-chapter/section numbering of figures, tables, and other document elements

Some document elements (e.g., figures in the book class) are numbered per chapter (figure 1.1, 1.2, 2.1, ...). How can I achieve continuous numbering (figure 1, 2, 3, ...)? And vice versa: Some ...
35
votes
1answer
36k views

Create a local texmf tree in MiKTeX

In TeX Live there are TEXMFLOCAL for admin and TEXMFHOME for user pre-defined, but in MiKTeX there’s by default no local texmf tree installed, though it is useful, cf. Purpose of local texmf trees. ...
405
votes
63answers
71k views

Showcase of beautiful typography done in TeX & friends

If you were asked to show examples of beautifully typeset documents in TeX & friends, what would you suggest? Preferably documents available online (I'm aware I could go to a bookstore and find ...
201
votes
6answers
37k views

What to do to switch to biblatex?

Because of the great answers posted around in the site, I'm finally considering to do the switch and move to biblatex. So, the question is what do I have to do? To give the question some focus, ...
45
votes
6answers
23k views

Adding a large brace next to a body of text

I'm writing a short document listing some chronological events. I want to pick out a period with a big brace. Here's a quick mockup: What's the best way to do this? Can I set the size declaratively ...
66
votes
3answers
13k views

Does it matter if I use \textit or \it, \bfseries or \bf, etc

I typically use \textit{Some italicized text} while some of my colleagues use {\it Some other text} Should I bother changing one or the other, or does it matter?
100
votes
5answers
5k views

Consistent typography

When working with large documents, or even across multiple (smaller) documents, I often find that I forget which typographical consistencies I should stick to. With TeX being inherently consistent in ...
52
votes
2answers
14k views

How do I install an individual package on a Linux system?

I need to install a new TeX/LaTeX/ConTeXt package on my computer. I'm running Ubuntu/Fedora/Slackware/Some-Version-Of Linux. What are the possible ways to do this? Note:   We get a ...
42
votes
2answers
3k views

Why should the minimal class be avoided?

In a comment to my answer to Drawing a rectangle along the border of a circle, Peter Grill said that he read that the minimal class should not be used for a Minimal Working Example. I wonder why, and ...
156
votes
1answer
29k views

bibtex vs. biber and biblatex vs. natbib

I've heard of many different bibliography-related packages/platforms/?. What's the difference between the following, which is good for what tasks, advantages/disadvantages, which one is the most ...
57
votes
3answers
19k views

Center figure that is wider than \textwidth

I have a figure that is wider than the \textwidth of my document. (I don't want to change the \textwidth.) As a result, the leftmost part of the figure is flush with the left margin, while the ...
128
votes
3answers
8k views

What is the difference between Fragile and Robust commands?

So I've read a few times about this, the “moving arguments” and all that. But what does it really mean? Could someone explain in a few words what is going on at the TeX level, what is the difference ...
101
votes
3answers
19k views

Frequently loaded packages: Differences between pdfLaTeX and XeLaTeX

Until now, I have been compiling my LaTeX documents with pdfLaTeX. My standard document preamble includes the "usual suspects" for non-English speakers (inputenc, fontenc, babel) and a bunch of other ...
147
votes
8answers
8k views

Are \( and \) preferable to dollar signs for math mode?

Along the lines of Why is \[ ... \] preferable to $$?, what reasons are there (if any) to favor \( ... \) over $ ... $?
101
votes
24answers
11k views

Tools for automating document compilation

A lot of people write makefiles that say something like paper.pdf: paper.tex pdflatex paper bibtex paper pdflatex paper pdflatex paper To handle re-running TeX to ...
55
votes
1answer
7k views

Difference between “right of=” and “right=of” in PGF/TikZ

In the PGF/TikZ manual, sometimes I see the option right of=somenode instead of right=of somenode. They look very similar, but the effects are different. The distance between nodes positioned with ...
241
votes
5answers
38k views

Differences between LuaTeX, ConTeXt and XeTeX

I’m interested in the differences and commonalities between the “new” (La)TeX processors: LuaTeX, XeTeX, and ConTeXt. Personally, I’ve only used XeTeX so far and without having the time to try out ...
140
votes
17answers
36k views

Compiling documents online

I have heard rumors that you can compile documents online, and more specifically that Google has a free online compiler, but I have never been able to find any. Is there a way to compile documents ...
38
votes
6answers
4k views

\subseteq + \circ as a single symbol (“open subset”)

I'm trying to create symbols \opn for "open subset" and \cls "closed subset". I want them to look like this: My current solution is: ...
32
votes
7answers
7k views

Conditional typesetting / build

Let's say I have .tex file which is a set of problems and solutions, of which I want to make two pdf files, one which includes the solutions and one which doesn't. so I need to build the .tex file ...
66
votes
3answers
23k views

subcaption vs. subfig: Best package for referencing a subfigure

On this question a comment by Martin H says, that one should forget about the subfigure and subfig packages and use subcaption. As subfig replaces subfigure, no argument there. I am currently using ...
91
votes
14answers
24k views

Workflow for converting LaTeX into Open Office / MS Word Format

I often have to write up reports based on the analysis of some data. I use R to analyse the data and export tables, figures, and text. This is then included into a LaTeX document either using input or ...
39
votes
9answers
3k views

Biblatex with Biber: Configuring my editor to avoid undefined citations

Running the minimal example \documentclass{article} \usepackage{filecontents} \begin{filecontents*}{\jobname.bib} @ARTICLE{example, author = {Other, Anthony Norman}, title = {Some things I ...

15 30 50 per page