Math & ScienceItalics after mathematical symbol

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
JayZeeGP
Posts: 2
Joined: Sun Apr 08, 2012 12:49 pm

Italics after mathematical symbol

Post by JayZeeGP »

Hello everyone.
First of all I'd like to say sorry if my English is not perfect, I am Spanish.
I am using Kile in a Fedora distribution (also tried it in Kubuntu).
My problem is the following, whenever I use a mathematical symbol, the text after it just appears to be in italics and inserted in the same line until the paragraph ends without respecting the end of line and the paragraph sizes.

Code: Select all

\subsubsection{Descripción matemática de un qubit}
  Es un vector de módulo unidad en un espacio vectorial complejo bidimensional.
Los dos estados básicos de 
un qubit son |0\rangle (ket cero) y |1\rangle (ket uno),
que corresponden al 0 y al 1 del bit...
output.png
output.png (31.32 KiB) Viewed 12524 times
I hope you can help me, thanks a lot ;)
Last edited by Stefan Kottwitz on Sun Apr 08, 2012 1:17 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10359
Joined: Mon Mar 10, 2008 9:44 pm

Italics after mathematical symbol

Post by Stefan Kottwitz »

Hi,

welcome to the board!

You need to use math mode for mathematical symbols, such as by enclosing formulas in \( ... \) or $ ... $.

Code: Select all

... un qubit son $|0\rangle$ (ket cero) y $|1\rangle$ (ket uno)
Stefan
LaTeX.org admin
JayZeeGP
Posts: 2
Joined: Sun Apr 08, 2012 12:49 pm

Re: Italics after mathematical symbol

Post by JayZeeGP »

Thanks a lot. I am so sorry for asking such a silly doubt... I swear I searched everywhere but I just didn't know it worked like that. It looks just fine now :)
User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Italics after mathematical symbol

Post by Juanjo »

Just a suggestion: it seems that you are using quite frequently the notation |symbol>. So it is useful to define a command for this. Assuming that you have loaded the amsmath package, let:

Code: Select all

\newcommand{\ket}[1]{\ensuremath{\lvert#1\rangle}}
Now you can simply write

Code: Select all

Los dos estados b\'asicos de un qubit son \ket{0} (ket cero) y \ket{1} (ket uno)
to get the desired output.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
Post Reply