# Tilde and slash in LaTeX

I am getting strange errors in LaTeX:

perhaps you should insert a ~' before "\ref"
missing \ ' after "i.e."
missing \ ' after "i.e."


I understand that the first expects me to put a tilde before the reference, so something like this figure~\ref{myfigure}, but why is it necessary? I can compile without the tilde and everything works fine. Besides that, it is annoying to have to write it like this in case I want to reference many figures. For example, I have this statement in my paper:

Figures \ref{figure:normal_rendering} and \ref{figure:silhouette_rendering} illustrates the silhouette rendering process.


With the form proposed I should keep adding figure before any \ref; it sounds weird to read: "Figure 1, figure 2, and figure 3 illustrates the silhouette rendering process" rather then just "Figure 1, 2, and 3 illustrates the silhouette rendering process".

What about the second and third errors? Any help?

-
I guess you mean warnings rather than errors? Also, have a look at Is a period after an abbreviation the same as an end of sentence period regarding the i.e.\ . – Stefan Kottwitz Feb 23 '11 at 14:23
AFAIK that aren't normal LaTeX errors. (Are they warnings?). Are you loading any special packages for it? The ~ makes sure that the line is not broken between Figure and \ref, which would look bad. You don't need to put Figure in front of every \ref when referencing several figures. – Martin Scharrer Feb 23 '11 at 14:26
It certainly looks like the result of some package, but searching all .sty files of TL2010 for relevant regexps (e.g. "missing.*after") doesn't provide relevant hits. Also, I've never run across a package that might do this, and it seems to require more parsing than one would normally do from within LaTeX. Perhaps it is the OP's editor which gives these messages? (Which are certainly not errors.) – Villemoes Feb 23 '11 at 19:28
Just for the record, the warning messages in the original post come from lacheck, a LaTeX syntax checker that most likely got called automatically from a TeX-Editor. While they are warnings and can certainly be ignored, they are obviously helpful to achieve properly typeset text as can be seen in the other answers. – kjyv Jan 27 '14 at 19:34

## Tilde/hardspace

You definitely want to write for a single figure Figure~\ref{x} (or Fig.\,\ref{x} or whatever) because you don't want the number to split over a line separate from the Figure text.

For multiple strings of figure numbers, such as ‘Figures 1, 4, and 7’, the exact placement of the hardspace is somewhat a matter of taste. I usually write Figures 1 and~2 and Figures 1, 4, and~7 but you might sometimes want to restrict the breaking a little more.

In both these cases, I recommend looking at the refstyle or cleveref package to automate some of this with markup.

## ‘i.e.’ and other acronyms

After a period in the text, TeX assumes you have finished as sentence and by default puts a larger-than-usual amount of space there. So when you use ‘i.e.’ in a sentence you either need to add a comma after it (my preference) or indicate that the final . is not a sentence-ending period. So, any of:

i.e., blah blah
i.e.\ blah blah
i.e.\@ blah blah


The second two will print identically. I prefer the second in text and the third when defining shorthand commands with \newcommand`.

-
Very good answer! Thanks man. – Rafid Feb 24 '11 at 13:07