Sunday, July 19, 2009

Memo: how to type doubledash "--" and underline "_" in LaTex?

How to type double dash in LaTex?
Sometimes we need to type "--" in LaTex, but the parser of Tex will deal with it into one dash.
If you try "- -" a space in two dash, it is not the same with "--".

So you can try
  • \texttt{ }: I think it is good but the format and size of character should be customized.
  • -{}-: Excellent. Nature!
Reference from

Underline is reserved character of LaTex
The reserved characters are
  • $ : dollar sign
  • & :
  • %
  • #
  • _
  • {
  • }
  • ~
  • ^
  • \
If you want to type them, just add a "\" before them.

No comments:

Clicky

Clicky Web Analytics