Math & SciencePage break within the array.

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Page break within the array.

Post by cgnieder »

Pushpkant wrote:The second problem is I want to make newenvironment for this, so that I don't have to change whole document. But the "\align" is showing the equation number and "\align*" is not working.
You could use the environ package:

Code: Select all

\documentclass{article}

\usepackage{mathtools}
\usepackage{environ}

\NewEnviron{alg}{ \begin{align*}\BODY\end{align*} }

\begin{document}

\begin{alg}
 & \Rightarrow & \sin\theta &=\sin\frac{\phi}{2}
\end{alg}

\end{document}
site moderator & package author

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

Pushpkant
Posts: 7
Joined: Wed Jul 25, 2012 8:22 pm

Page break within the array.

Post by Pushpkant »

Thank's a lot Stephan and cgnieder.

But I have found more convenient way to write these equations without changing my whole document.

I just used IEEEeqnarray instead of array
the IEEEeqnarray allow the pagebreaks,
here is the code:

Code: Select all

\documentclass[12pt,a4paper]{article}
\usepackage{amsmath}
\usepackage[retainorgcmds]{IEEEtrantools}
%%%%%%
\newcommand{\integral}[2]
{\int #1 \:\mathrm{d}#2}
\newcommand{\RA}{\Rightarrow}
%%%%%
\allowdisplaybreaks[1]
\interdisplaylinepenalty=00
%%%%%%%
\newenvironment{my_alg}
{
\begin{IEEEeqnarray*}{r/r/l"r}
}
{
\end{IEEEeqnarray*}
}
%%%%%%%
\begin{document}
\begin{my_alg}
    &\integral{\frac{a+b\sin{x}}{\cos^2{x}}}{x}
          &=\integral{\left(a\sec^2{x}+b\tan{x}
        \sec{x}\right)}{x}\\
\RA &\integral{\frac{a+b\sin{x}}{\cos^2{x}}}{x}
    &=a\tan{x}+b\sec{x}+c\\
\end{my_alg}
\end{document}
Thank's Again
Post Reply