-
Notifications
You must be signed in to change notification settings - Fork 0
/
latex_notes.txt
52 lines (42 loc) · 2.01 KB
/
latex_notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
http://en.wikibooks.org/wiki/LaTeX
% Add line break with \\. To control additional space, for example:
\\[10pt]
% To control spacing after a command, it is recommended not to put a space at the end of
% the command itself, but instead always close a no-argument command with {}
% anyway. Use '\ ' to add a space if necessary. For example:
\newcommand{\libdde}{\texttt{libdde}}
The implementation is known as \libdde{}.
% http://tex.stackexchange.com/questions/31091/space-after-latex-commands
% Explicit space; prevent line break between words:
~
% Prevent extra space (full stop) after a period, use '\ '. Also note that a
% comma after the period prevents the spacing issue, although parentheses do
% not. If the character before the period is a capital letter, it is assumed to
% be an initial and the logic is circumvented. To force the extra space, use
% '\@.'. Note that question marks and exclamation points are treated the same
% as periods.
% http://en.wikibooks.org/wiki/LaTeX/Tips_and_Tricks#id_est_and_exempli_gratia_.28i.e._and_e.g..29
% Examples:
I said hello to Ms.\ Smith.
I think I read this in eighth grade, i.e.\ 2000 or 2001.
We rode on the MTA\@.
There are many types of books (fiction, memoir, etc\@.) that could be listed.
% Comment out a block:
\usepackage{verbatim}
\begin{comment}
\end{comment}
% Inline math:
\(...\) % Plain TeX (not recommended in LaTeX) is $...$
% Displayed math (separate from main text):
\[...\] % Plain TeX (not recommended in LaTeX) is $$...$$
% Ellipses: do not use '...', this will be too tightly spaced. Use \ldots,
% which may require forced spaces before or after ('\ ').
% Hyphens and dashes:
Use - for hypenated words (daughter-in-law).
Use -- for en-dashes, used in ranges (pages 5--7).
Use --- for em-dashes, used as punctuation between phrases ("A specter is haunting Europe---the specter of Communism.")
Use math mode or $-5$ for a minus sign.
% Tilde:
% https://tex.stackexchange.com/questions/9363/how-does-one-insert-a-backslash-or-a-tilde-into-latex
% Easiest comprise:
$\sim$