Math & ScienceMath On One Line

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
mdk31
Posts: 20
Joined: Wed Mar 11, 2009 4:38 am

Math On One Line

Post by mdk31 »

I'm working in a two column environment and I'm trying to get my math to show up on one line.

Code: Select all

\documentclass{article}

\begin{document}

\begin{equation*}

\frac{0.98 \text{ $R_{Jupiter}$}}{1} \times \frac{11.209 \text{ $R_{Earth}$}}{1 \text{ $R_{Jupiter}$}} \times \frac{1 \text{ $R_{Sun}$}}{109.125 \text{ $R_{Earth}$}} 

\end{equation*}
When I have this long equation, it does into the other column. Is there a way to shrink it down? I'm not sure I want to put it on two separate lines.

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

Math On One Line

Post by Stefan Kottwitz »

Hi,

one way could be to use \scalebox or \resizebox of the graphicx package, for example:

Code: Select all

\resizebox{.3\textwidth}{!}{\parbox{\textwidth}{
\begin{equation*}
...
\end{equation*}}}
Btw. why do you use \text this way? Do you want to get something like this?

Code: Select all

\frac{0.98 R_\text{Jupiter}}{1}
Stefan
LaTeX.org admin
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Math On One Line

Post by localghost »

Take a look at the marvosym package. Amongst others it provides astronomical symbols for the planets.

Code: Select all

\documentclass[11pt,a4paper,english,twocolumn]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{babel}
\usepackage[includeheadfoot,margin=2cm]{geometry}
\usepackage{amsmath}
\usepackage{marvosym}
\usepackage{blindtext}

\begin{document}
  \blindtext[3]
  \begin{equation}
    \frac{0.98\,R_\text{Jupiter}}{1} \times \frac{11.209\,R_\text{Earth}}{1\,R_\text{Jupiter}} \times \frac{1\,R_\text{Sun}}{109.125\,R_\text{Earth}}
  \end{equation}

  \begin{equation}
    \frac{0.98\,R_\text{\Jupiter}}{1} \times \frac{11.209\,R_\text{\Earth}}{1\,R_\text{\Jupiter}} \times \frac{1\,R_\text{\Sun}}{109.125\,R_\text{\Earth}}
  \end{equation}
  \blindtext[4]
\end{document}
This way you can shorten the equation to fit one column.


Best regards
Thorsten¹
Post Reply