Text FormattingMathmatical text not working in between paragraphs.

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
Rahul
Posts: 29
Joined: Wed Jul 24, 2013 10:07 am

Mathmatical text not working in between paragraphs.

Post by Rahul »

hi,
Parenthesis {} are not occurring.Also in first D/2 ,2 is very large.+1,+2 are also very large not subscript type.

Code: Select all

\documentclass[12pt,journal,compsoc]{IEEEtran}
\usepackage{alltt}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{mathtools}
\usepackage{array}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{float}
\usepackage{lipsum}

\begin{document}
{ 
$D_(m/2)+1$,$D(m/2)+2$,...,$D_m$ 
} 
\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Mathmatical text not working in between paragraphs.

Post by kaiserkarl13 »

You seem to be confusing the function of parentheses, (), and braces, {}, in TeX. Also note that there are specific commands to get ellipses (...) in LaTeX. I've used amsmath's \dotsc here, for "dots with commas," since that's what you evidently wanted.

Is this what you were trying to do?

Code: Select all

    \documentclass[12pt,journal,compsoc]{IEEEtran}
    \usepackage{amsmath}
    \begin{document}
    $D_{m/2+1},D_{m/2+2},\dotsc,D_m$
    \end{document}
Rahul
Posts: 29
Joined: Wed Jul 24, 2013 10:07 am

Re: Mathmatical text not working in between paragraphs.

Post by Rahul »

Actually I want to include braces in the text.
You can try a run and see the differences and what I want.
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Mathmatical text not working in between paragraphs.

Post by cgnieder »

Do you mean like this:

Code: Select all

\documentclass[12pt,journal,compsoc]{IEEEtran}
\usepackage{mathtools}% loads amsmath
\begin{document}
$\{D_{(m/2)+1},D_{(m/2)+2},\dotsc,D_m\}$ 
\end{document}
Regards
site moderator & package author
Rahul
Posts: 29
Joined: Wed Jul 24, 2013 10:07 am

Re: Mathmatical text not working in between paragraphs.

Post by Rahul »

Code worked perfectly as it is very usual for Clemens.
:D :D :D
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Mathmatical text not working in between paragraphs.

Post by cgnieder »

The braces { and } have a special meaning in LaTeX: they can be used to denote a group in order to keep the scope of definitions or the effect of some commands local, they also denote beginning and end of an argument to a command (and also to the math subscript and superscript characters _{sub} and ^{super}. If you want to actually typeset the braces you can use the commands \{ and \}. You can also use in text \textbraceleft and \textbraceright or in math \lbrace and \rbrace.

Code: Select all

\documentclass[12pt,journal,compsoc]{IEEEtran}
\usepackage{mathtools}% loads amsmath
\begin{document}

{\bfseries local} scope

as \textbf{argument}

Text: \{\} \textbraceleft\textbraceright

Math: $\{\} \lbrace\rbrace$

\end{document}
Regards
site moderator & package author
Post Reply