General ⇒ Decrease margin on align environment
Decrease margin on align environment
I have some large formulas within align* environments.
I would like to keep the page as usual but move the align environment a few centimeters to the left (and obviously decrease the right "margin" in these locations).
Note that these environments extend over multiple pages in my case.
How can this be done easily?
Regards,
Marki
PS. I could decrease font size too, I know, but the fonts would need to be a lot smaller and I only have 30% very long lines, so that would be a bad deal. And yes, I have already put linebreaks wherever I can and I don't really want to put any more, as it doesn't make reading stuff easier because of opening/closing parentheses...)
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
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
Decrease margin on align environment
have a look here: Centering wide tables or figures, instead of a table like in that example just use a wide minipage that contains the align* environment.
Stefan
Re: Decrease margin on align environment

Decrease margin on align environment
Code: Select all
\documentclass{article}
\usepackage{framed,amsmath}
\usepackage{lipsum,color}
\definecolor{shadecolor}{rgb}{1,0.8,0.3}
\newenvironment{MyBox}{%
\def\FrameCommand{\fcolorbox{black}{shadecolor}}%
%\def\FrameCommand{}
\MakeFramed{\setlength{\hsize}{1.3\textwidth} \FrameRestore}}%
{\endMakeFramed}
\begin{document}
\lipsum[1-4]
\begin{MyBox}
\allowdisplaybreaks
\begin{align*}
a&=b+c+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+y+z \\
&=b+c+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+y+z \\
&=b+c+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+y+z \\
&=b+c+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+y+z \\
&=b+c+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+y+z \\
&=b+c+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+y+z \\
&=b+c+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+y+z \\
&=b+c+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+y+z \\
&=b+c+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+y+z \\
&=b+c+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+y+z \\
&=b+c+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+y+z \\
&=b+c+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+y+z \\
&=b+c+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+y+z \\
&=b+c+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+y+z \\
&=b+c+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+y+z
\end{align*}
\end{MyBox}
\end{document}
Re: Decrease margin on align environment
My output looks kind of weird though using this environment. :-\
It always seems to look more or less like that no matter what I set for the \hsize.
I'm not sure what could be useful to diagnoze this. I am using a book document and also ps4pdf, but I don't suppose that matters much.
- Attachments
-
- calcs.jpg (23.34 KiB) Viewed 9019 times
Re: Decrease margin on align environment
Re: Decrease margin on align environment
I was missing a newline somewhere in the align block so things got messed up in there.

That error seems to have been less prominent without using the custom environment though.
Thanks again, your solution works just fine for now.

Marki