Text FormattingHow are underscore and inequality signs inserted in LaTeX?

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
ptrcao
Posts: 88
Joined: Sun Dec 05, 2010 3:26 am

How are underscore and inequality signs inserted in LaTeX?

Post by ptrcao »

How are underscore and inequality signs inserted in LaTeX? I don't mean in math mode, I mean in normal text mode.
Last edited by ptrcao on Mon Mar 14, 2011 5:56 pm, edited 1 time in total.
OS info: Win XP | Debian 6.0 | Ubuntu 10.04
Latex editor of choice: TexWorks (for dual view feature)

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

How are underscore and inequality signs inserted in LaTeX?

Post by Stefan Kottwitz »

Hi ptrcao,

you could write \_ or \textunderscore. The underscore package could be useful if you frequently write undersores in text. Have a look at Special LaTeX characters for further symbols.

An inequality sign is a math symbol. Just write \( \neq \) or the like in your text, or use $ like in $\neq$. I guess you don't want to strike out a normal equal sign.

Stefan
LaTeX.org admin
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

How are underscore and inequality signs inserted in LaTeX?

Post by gmedina »

Hi,

just a complement to Stefan_K's answer: the tipa package offers the \textdoublebarslash command to be used in text mode:

Code: Select all

\documentclass{book}
\usepackage{tipa}
\begin{document}
\textdoublebarslash
\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
ptrcao
Posts: 88
Joined: Sun Dec 05, 2010 3:26 am

Re: How are underscore and inequality signs inserted in LaTe

Post by ptrcao »

How about ">" and "<" symbols - I'm having trouble entering those in normal text mode. Do I really have to enter into math mode? These are just standard ASCII symbols, I would've thought they'd have been supported in normal text mode?
OS info: Win XP | Debian 6.0 | Ubuntu 10.04
Latex editor of choice: TexWorks (for dual view feature)
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

How are underscore and inequality signs inserted in LaTeX?

Post by gmedina »

Use the Cork encoding:

Code: Select all

\documentclass{article}
\usepackage[T1]{fontenc}
\begin{document}

<>

\end{document}
Please note that those signs used in text mode are not equal and do not behave like the same symbols used in math mode for the math relations "less than" and "greater than".
1,1,2,3,5,8,13,21,34,55,89,144,233,...
ptrcao
Posts: 88
Joined: Sun Dec 05, 2010 3:26 am

How are underscore and inequality signs inserted in LaTeX?

Post by ptrcao »

How about < and > as separate symbols in text mode?
OS info: Win XP | Debian 6.0 | Ubuntu 10.04
Latex editor of choice: TexWorks (for dual view feature)
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

How are underscore and inequality signs inserted in LaTeX?

Post by gmedina »

ptrcao wrote:How about < and > as separate symbols in text mode?
Please explain what do you mean by "separate symbols".
1,1,2,3,5,8,13,21,34,55,89,144,233,...
ptrcao
Posts: 88
Joined: Sun Dec 05, 2010 3:26 am

Re: How are underscore and inequality signs inserted in LaTe

Post by ptrcao »

For example, what I'm writing up is some instructions for installing and launching a program, and I'm using ">" to indicate a series of links in breadcrumb fashion, like "click on Start > Applications > Games > Solitaire". I can't seem to just type in a solitary ">" without a complaint from my LaTeX text editor. And "\>" doesn't work either.
OS info: Win XP | Debian 6.0 | Ubuntu 10.04
Latex editor of choice: TexWorks (for dual view feature)
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

How are underscore and inequality signs inserted in LaTeX?

Post by gmedina »

ptrcao wrote:I can't seem to just type in a solitary ">" without a complaint from my LaTeX text editor. And "\>" doesn't work either.
If you load the fontenc package with T1 option as I suggested in my previous reply, you can simply type > and < without problems. Another option is to use \textgreater and \textless
1,1,2,3,5,8,13,21,34,55,89,144,233,...
ptrcao
Posts: 88
Joined: Sun Dec 05, 2010 3:26 am

How are underscore and inequality signs inserted in LaTeX?

Post by ptrcao »

gmedina wrote:
ptrcao wrote:I can't seem to just type in a solitary ">" without a complaint from my LaTeX text editor. And "\>" doesn't work either.
If you load the fontenc package with T1 option as I suggested in my previous reply, you can simply type > and < without problems. Another option is to use \textgreater and \textless
TY gmedina (and Stefan_K)! fontenc does the job. :)
OS info: Win XP | Debian 6.0 | Ubuntu 10.04
Latex editor of choice: TexWorks (for dual view feature)
Post Reply