Text FormattingHow to write long equation in one or two line in Latex

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
amit522
Posts: 2
Joined: Tue Jan 20, 2015 9:07 am

How to write long equation in one or two line in Latex

Post by amit522 »

Hello there,
I have a problem in writing this equation in one line, as some of the matters are cut down due to the page size.
I want to split lit and write in two line, but I am not getting it.

Kinldy help me with this. my equation is

Code: Select all

\documentclass{article}
\usepackage{mathtools}
\begin{document}
\[
	T_8(z)=\frac{[1.6484,1.7156]z^7+[1.0937,1.1383]z^6+[-0.2142,-0.2058]z^5+[0.1490,0.1550]z^4
	+[-0.5263,-0.5057]z^3+[-0.2672,-0.2568]z^2+[0.0431,0.0449]z+[-0.0061,-0.0059]}%
	%
	{[23.52,24.48]z^8+[-1.7156,-1.6484]z^7+[-1.1383,-1.0937]z^6+[0.2058,0.2142]z^5+[-0.1550,-0.1490]z^4
	+[0.5057,0.5263]z^3+[0.2568,0.2672]z^2+[-0.0449,-0.0431]z+[0.0059,0.0061]}
\]
\end{document}
Last edited by Johannes_B on Tue Jan 20, 2015 10:36 am, 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
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

How to write long equation in one or two line in Latex

Post by Johannes_B »

I was thinking about splitfrac from the mathtools package. But the equation is just too long and really really hard to read. Can you lay down the information in another way?

Code: Select all

\documentclass{article}
\usepackage{mathtools}
\begin{document}
\[
	T_8(z)=\frac{\splitfrac{[1.6484,1.7156]z^7+[1.0937,1.1383]z^6+[-0.2142,-0.2058]z^5+[0.1490,0.1550]z^4}
	{+[-0.5263,-0.5057]z^3+[-0.2672,-0.2568]z^2+[0.0431,0.0449]z+[-0.0061,-0.0059]}}%
	%
	{\splitfrac{[23.52,24.48]z^8+[-1.7156,-1.6484]z^7+[-1.1383,-1.0937]z^6+[0.2058,0.2142]z^5}{+[-0.1550,-0.1490]z^4
	+[0.5057,0.5263]z^3+[0.2568,0.2672]z^2+[-0.0449,-0.0431]z+[0.0059,0.0061]}}
\]
\end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
amit522
Posts: 2
Joined: Tue Jan 20, 2015 9:07 am

How to write long equation in one or two line in Latex

Post by amit522 »

As stated by Johannes, in another possible way of the equation could be

Code: Select all

\documentclass{article}
\usepackage{mathtools}
\begin{document}
\[
        T_8(z)=\frac{[1.6484,1.7156]z^7+[1.0937,1.1383]z^6
                     +[-0.2142,-0.2058]z^5+[0.1490,0.1550]z^4
                     +[-0.5263,-0.5057]z^3+[-0.2672,-0.2568]z^2
                     +[0.0431,0.0449]z+[-0.0061,-0.0059]}
                    {[23.52,24.48]z^8+[-1.7156,-1.6484]z^7
                     +[-1.1383,-1.0937]z^6+[0.2058,0.2142]z^5
                     +[-0.1550,-0.1490]z^4+[0.5057,0.5263]z^3
                     +[0.2568,0.2672]z^2+[-0.0449,-0.0431]z+[0.0059,0.0061]}
\]
\end{document}
Post Reply