255
votes
11answers
31k views

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

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?
211
votes
2answers
36k 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
209
votes
8answers
14k 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 ...
113
votes
9answers
35k 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 ...
120
votes
9answers
63k 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?
371
votes
38answers
134k 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. ...
107
votes
6answers
40k 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 ...
249
votes
1answer
33k views

What do \makeatletter and \makeatother do?

Many TeX “hacks” begin with \makeatletter and end with \makeatother. What do these commands do?
157
votes
11answers
87k 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 ...
189
votes
4answers
30k 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 ...
79
votes
2answers
137k 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 ...
42
votes
2answers
19k 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 ...
235
votes
1answer
37k 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 ...
175
votes
20answers
23k views

What is the best book to start learning LaTeX?

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 ...
28
votes
3answers
16k 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 ...
362
votes
4answers
141k 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 ...
155
votes
3answers
35k 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 ...
46
votes
5answers
21k 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 ...
127
votes
4answers
5k 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?
136
votes
1answer
21k 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}
71
votes
2answers
12k 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 ...
67
votes
5answers
63k 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 ...
108
votes
10answers
8k 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, ...
32
votes
2answers
2k 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 ...
381
votes
59answers
63k 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 ...
63
votes
6answers
55k 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 ...
199
votes
6answers
33k 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, ...
63
votes
3answers
8k 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 ...
77
votes
1answer
22k 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 ...
34
votes
1answer
30k 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. ...
45
votes
6answers
21k 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 ...
43
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 ...
66
votes
3answers
11k 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?
95
votes
4answers
4k 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 ...
48
votes
1answer
10k 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 ...
54
votes
3answers
15k 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 ...
144
votes
1answer
25k 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 ...
98
votes
3answers
16k 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 ...
143
votes
8answers
7k 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 $ ... $?
125
votes
3answers
7k 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 ...
136
votes
17answers
32k 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 ...
52
votes
1answer
6k 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 ...
231
votes
5answers
35k 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 ...
97
votes
23answers
10k views
+200

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 ...
36
votes
6answers
3k 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: ...
84
votes
14answers
21k 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 ...
63
votes
3answers
20k 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 ...
29
votes
1answer
10k views

Manual font installation

Frequently there are questions about, how to manually install a font, what very often means “Type1 font”. So I thought, we should write a general answer about the several aspects to regard. Beside ...
34
votes
3answers
3k views

Will two-letter font style commands (\bf , \it , …) ever be resurrected in LaTeX?

I understand that \bf and \it are now obsolete in LaTeX and that \textbf and \textit are proper, as they produce more sophisticated (in particular, cumulative and properly kerned) changes to font ...

15 30 50 per page