Text FormattingFormatting with fractions

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
MathDoodler
Posts: 6
Joined: Thu Jul 21, 2011 10:28 pm

Formatting with fractions

Post by MathDoodler »

Hello, I am new to the forums and to latex. I am trying to do something like I created below

$\stackrel{ \;\;\;\frac{a}{t}}{\stackrel{+\frac{a}{t}}{ \line(1,0){50}}}

What I am trying to do is place the + sign to the left and just have the fraction centered. Thank you and please let me know if this can be done or not and if it can be done would you please show me how it can be done. Thank you and I really appreciate all the help.

Recommended reading 2024:

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

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Re: Formatting with fractions

Post by Stefan Kottwitz »

Hi,

welcome to the board!
For me it's not clear what you try to achieve. If the + shall be left, use it at the beginning of the expression. And it's not clear if you mean vertical or horizontal centering. Perhaps attach a hand drawing of that expression here, and we show you how to code that.

Stefan
LaTeX.org admin
MathDoodler
Posts: 6
Joined: Thu Jul 21, 2011 10:28 pm

Formatting with fractions

Post by MathDoodler »

Stefan_K wrote:Hi,

welcome to the board!
For me it's not clear what you try to achieve. If the + shall be left, use it at the beginning of the expression. And it's not clear if you mean vertical or horizontal centering. Perhaps attach a hand drawing of that expression here, and we show you how to code that.

Stefan
Hello and thank you to the fast reply. The following is an image of what I am trying to do. It is not a really good image but it will show you what I am trying to do.

In my code I get close to this but the bottom fraction and the + sign is next to each other and I want to make the + sign move toward the left and the fractions to be center of the line. Thank you once again.
Image
MathDoodler
Posts: 6
Joined: Thu Jul 21, 2011 10:28 pm

Re: Formatting with fractions

Post by MathDoodler »

I solved it by playing around with my code. Just had to add a few spaces.
User avatar
shadgrind
Posts: 140
Joined: Thu Jul 16, 2009 12:39 am

Formatting with fractions

Post by shadgrind »

I would use a table, like this:

Code: Select all

\begin{tabular}{cc}
  {} & $\frac{a}{t}$\\[4pt]
   + & $\frac{a}{t}$\\[4pt]
  \hline
\end{tabular}
System: TeX Live 2012, Fedora 18 x86_64, GNU Emacs 24.2
MathDoodler
Posts: 6
Joined: Thu Jul 21, 2011 10:28 pm

Formatting with fractions

Post by MathDoodler »

shadgrind wrote:I would use a table, like this:

Code: Select all

\begin{tabular}{cc}
  {} & $\frac{a}{t}$\\[4pt]
   + & $\frac{a}{t}$\\[4pt]
  \hline
\end{tabular}
Thank you for the help. I will give this code a try. Thank you all.
MathDoodler
Posts: 6
Joined: Thu Jul 21, 2011 10:28 pm

Re: Formatting with fractions

Post by MathDoodler »

Yes the code worked great. Is there anyway to make the \hline move up a little closer to the + sign and the bottom fractions? If not that is ok because the code here is great. Thank you.
MathDoodler
Posts: 6
Joined: Thu Jul 21, 2011 10:28 pm

Re: Formatting with fractions

Post by MathDoodler »

Hello thanks to you all for the help.I got the + sign to move down closer to the the \hline by using a \parbox. Thank you once again.
Post Reply