Juan A. Navarro
  • Member for 11 years, 6 months
  • Last seen this week
Force figure placement in text
Accepted answer
708 votes

The short answer: use the “float” package and then the [H] option for your figure. \usepackage{float} ... \begin{figure}[H] \centering \includegraphics{slike/visina8} \caption{Write some caption ...

View answer
How can I use BibTeX to cite a web page?
Accepted answer
692 votes

A simple way of doing it in BibTeX is with a @misc entry: @misc{WinNT, title = {{MS Windows NT} Kernel Description}, howpublished = {\url{http://web.archive.org/web/20080207010024/http://www....

View answer
Remove ugly borders around clickable cross-references and hyperlinks
391 votes

I use something like \usepackage{xcolor} \hypersetup{ colorlinks, linkcolor={red!50!black}, citecolor={blue!50!black}, urlcolor={blue!80!black} } This gets rid of the ugly color ...

View answer
What packages do people load by default in LaTeX?
220 votes

The family of AMS math packages. At least amsmath and amssymb. Also amsthm if I need theorems and the class I'm using doesn't already define them. Particularly for writing equations, the AMS packages ...

View answer
What is the best way to use quotation mark glyphs?
Accepted answer
175 votes

A quick summary of the available solutions: Using an Unicode editor you can simply type “text” or ‘text’ in your code. This should work in XeTeX/LuaTeX and recent versions of LaTeX, just make sure ...

View answer
Why should I use LaTeX?
Accepted answer
142 votes

Superficially, one of the advantages of LaTeX over other more traditional systems (e.g. Word or OpenOffice) is the high typographical quality of the documents that you'll be able to produce. This is ...

View answer
What is the difference between TeX and LaTeX?
132 votes

In short TeX is all about formatting, for document/template designers, while LaTeX is all about content, for document writers. TeX is a typesetting system. It provides many commands which allow you ...

View answer
How to change font size for bibliography?
Accepted answer
121 votes

First I have to say that you should avoid fiddling with font sizes in order to squish more text into a document. Conferences and journals often discourage such formatting hacks; some might even reject ...

View answer
How can I automatically calculate sums in a LaTeX table?
Accepted answer
76 votes

LaTeX is a typesetting system, and trying to use it for anything other than that will probably lead you to frustration at some point or another. Unless your table is really very simple, I think going ...

View answer
Removing spaces between "words" in math mode
Accepted answer
68 votes

Math binary operators and relations automatically add appropriate spaces between the symbol and their operands. If you want to remove this space, you can turn the operator into a regular symbol by ...

View answer
How to arrange image and text to appear side by side?
Accepted answer
61 votes

The wrapfig package is perhaps the best package to provide such functionality. The following is an example of how to use such package \documentclass{article} \usepackage{graphicx,wrapfig,lipsum} %----...

View answer
Bold math: Automatic choice between \mathbf and \boldsymbol for Latin and Greek symbols?
Accepted answer
55 votes

You can use both commands together and define something like \usepackage{bm} \newcommand{\vect}[1]{\boldsymbol{\mathbf{#1}}} which should work for most cases.

View answer
Different command definitions with and without optional argument
53 votes

I want to thank for all of the other answers received. But lately I've turned into a huge fan of the etoolbox package, which provides a great abstraction to do exactly what I wanted at the LaTeX level ...

View answer
Correctly typesetting a tilde
Accepted answer
52 votes

It all depends on what do you want this glyph to stand for. If you want to use it in an url then add \usepackage{url} (or hyperref) to your preamble and then use \url{http://example.com/~user}. If ...

View answer
How can I specify a long list of math operators?
Accepted answer
37 votes

Updated solution using the features of etoolbox which has essentially implemented the “\MapCommand” and named it \forcsvlist \documentclass{article} \usepackage{amsmath} \usepackage{etoolbox} \...

View answer
Which one should be used in limit, \rightarrow or \to?
34 votes

In your document you should always use \to because it describes the meaning of what you're trying to write (i.e. a limit when x tends to some value). In general its a good idea to prefer the use of ...

View answer
Make MS Word document look like it has been typeset in LaTeX
33 votes

No, you can't do it. One of the biggest differences between LaTeX and Word (and most other word processors for that matter) is that LaTeX (based on TeX) does run optimization algorithms to decide ...

View answer
How to write a footnote attached to the author in a LaTeX paper?
31 votes

I think the command you're looking for is \thanks \documentclass{article} \title{My great paper} \author{One author\thanks{some info} \and Another author\thanks{more info}} \begin{document} \...

View answer
Prevent pdflatex from writing a bunch of files
30 votes

You already got lots of very good answers explaining why pdflatex needs all those auxiliary files. However you might still feel frustrated about having to live with all those files polluting a ...

View answer
Squeezing scientific paper to fit within page limits
29 votes

I generally don't like to fiddle with fonts, margin or spacing because it can look very ugly, many journals and conferences explicitly ask you not to do this, and it just feels kind of cheating. ...

View answer
How to write a footnote attached to the author in a LaTeX paper?
Accepted answer
26 votes

If your document class is amsart then the syntax is a bit different \documentclass{amsart} \title{My great paper} \author{Fist author} \thanks{The first author wants to thank someone.} \author{...

View answer
Loading a package conditionally
Accepted answer
22 votes

Use \if... switches, I do something like \newif\if@loadsomething\@loadsomethingfalse \DeclareOption{something}{\@loadsomethingtrue} ... \ProcessOptions\relax \if@loadsomething \RequirePackage{...

View answer
Problem with redefining Tabular environment with the \renewenvironment ‎command‎
Accepted answer
21 votes

A better approach is to define a new tabular environment with your own customizations \newenvironment{smalltabular}{\footnotesize\tabular}{\endtabular} And then use smalltabular instead of tabular. ...

View answer
Latex symbol for personal website url
Accepted answer
21 votes

How about \Mundus for a “World” symbol, or maybe \ComputerMouse ? Both also from marvosym. In any case have a look at the comprehensive symbol list for further ideas.

View answer
Automatic left and right commands
21 votes

Edit: I'm leaving this answer up for “academic purposes” but, consider Lev Bishop's answer for an easier solution than mine. Over the years I've evolved my own solution which I think turned out quite ...

View answer
How to keep up with packages and know which ones are obsolete?
20 votes

If you search on the CTAN catalogue, many obsolete packages have notes pointing to the newer packages they have been superseded by. For the particular example of subfigure, its catalogue entry has to ...

View answer
Typing and editing Beamer presentations
Accepted answer
20 votes

These are some of the things I do Have semantic markup for typing equations. It probably depends on your field, or the target audience, but on some of my slides about half of the content is equations....

View answer
How do I change my margins and spacing to fit the PhD thesis requirements of University XYZ?
Accepted answer
20 votes

For the margins use the geometry package. For your particular example use \usepackage[inner=2.5cm,outer=1.5cm,bottom=2cm]{geometry} Check the documentation of this package for more details and other ...

View answer
What packages do people load by default in LaTeX?
19 votes

This has been mentioned in some of the “big answers”, but thought it deserved special attention. Probably most documents should include: \usepackage[T1]{fontenc} This is to resolve some deficiencies ...

View answer
Changing style of alert environment in beamer
19 votes

Since (La)TeX doesn't have a “background color” for text, you would have to put your text inside a box which you can then color. Consider the following example using \colorbox. \documentclass{beamer} ...

View answer