Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.
\documentclass[a4paper,12pt]{article}
\begin{document}
\title{Kubuntu Setup}

Don't forget your architecture is not i386, but x86_64.  Better to use {\tt  \$(uname -i)} instead of manually specifying this

\end{document}

Gives:

! Missing $ inserted. $ l.11 ...et your architecture is not i386, but x86_ 64. Better to use {\tt ...

?

share|improve this question
add comment

2 Answers

up vote 9 down vote accepted

The problem is the underscore. Use x86\textunderscore 64 or x86\_64.

\documentclass[a4paper,12pt]{article}
\begin{document}
\title{Kubuntu Setup}

Don't forget your architecture is not i386, but x86\textunderscore 64.  Better to use \texttt{\$(uname -i)} instead of manually specifying this

\end{document}

I also change tt to \texttt. Alternative you can use \ttfamily. For more information about this topic read l2tabu

Quoted from l2tabu:

Why not use obsolete commands? Obsolete commands do not support LATeX2ε’s new font selection scheme, or NFSS. {\bf foo}, for example, resets all font attributes which had been set earlier before it prints foo in bold face. This is why you cannot simply define a bold-italics style by {\it \bf Test} only. (This definition will produce: Test.) On the other hand, the new commands \textbf{\textit{Test}} will behave as expected producing: Test. Apart from that, with the former commands there is no ‘italic correction’, cf. for instance halfhearted ({\it half}hearted) to halfhearted (\textit{half}hearted).

share|improve this answer
    
Thanks. Though, what's wrong with using \tt? –  ptrcao Sep 25 '11 at 9:19
    
@ptrcao: This is old LaTeX2.09 syntax. But you are using LaTeX2e. –  Thorsten Donig Sep 25 '11 at 9:23
    
@ptrcao: Please see my edit. –  Marco Daniel Sep 25 '11 at 9:26
    
Thanks for clarifying Marco. –  ptrcao Sep 25 '11 at 9:32
add comment

The _ character is 'special', and is used for a subscript in math mode. Options for including it in text include

  • Escape the _ as \_ (awkward if you have a lot),
  • Load the underscore package, to allow _ to be used in text,
  • Using the \detokenize primitive, for verbatim-like text.
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.