Alterar margem esquerda para equações longas

Alterar margem esquerda para equações longas

Digamos que eu tenha uma equação longa e alinhada com a overfull \hboxof 20pte quero reduzir a margem esquerda de 10ptso have e overfull \hboxde only 10pt. Como posso conseguir isso sem adicionar um espaço negativo a cada linha?

\documentclass[11pt]{article}
\pdfoutput=1
\pagestyle{empty}

\usepackage{amsmath}

\begin{document}
My ``overfull {\textbackslash}hbox'' long equation example
\begin{align}
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\notag\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\notag\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\notag\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\notag\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\notag\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\notag\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\notag\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\notag\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\notag\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\notag\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\notag\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\notag\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x
\end{align}
\end{document}

insira a descrição da imagem aqui

Tentei com o adjustwidthambiente do changepagepacote mas às vezes não funciona (e não consigo entender o porquê).

NOTA 1.Preciso de uma solução que funcione por muito tempo,várias páginasequações "alinhadas". Não posso dividi-los.

NOTA 2.NÃO preciso redimensionar a equação. Eu sei que posso fazer isso, mas às vezes só preciso alterar a margem esquerda.

Responder1

Supondo que suas equações contenham muitos +e/ou -símbolos, você pode considerar a redução do valor do parâmetro de comprimento \medmuskip. Por exemplo, emitir a instrução \medmuskip=2mupermite que o alignambiente se ajuste confortavelmente.

O MWE completo:

\documentclass[11pt]{article}
\usepackage{amsmath,showframe}
\begin{document}
\begingroup % localize scope of next instruction
\medmuskip=2mu % <-- new
\begin{align}
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\notag\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\notag\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\notag\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\notag\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\notag\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\notag\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\notag\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\notag\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\notag\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\notag\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\notag\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\notag\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x
\end{align}
\endgroup
\end{document}

Responder2

O pacote changepagefunciona como anunciado :). Porém, não pode começar em uma página e parar na próxima!

Tente o seguinte MWE (como changepageé usado, funciona ...) altere a margem externa:

\documentclass[11pt,twoside]{article}
\usepackage{amsmath}
\usepackage[strict]{changepage}

%-------------------------------------- only for show page layout
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%

\begin{document}
My ``overfull \verb+\hbox+ long equation example
    \begin{adjustwidth*}{}{-\marginparwidth}
\begin{equation}
    \begin{aligned}
& x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x   \\
& x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x   \\
& x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x   \\
& x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x   \\
& x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x   \\
& x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x   \\
& x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x   \\
& x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x   \\
& x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x   \\
& x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x   \\
& x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x   \\
& x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x   \\
& x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x
    \end{aligned}
\end{equation}
    \end{adjustwidth*}
\end{document}

insira a descrição da imagem aqui

Editar: Caso você queira alterar a margem para a esquerda, ou seja, para dentro, por exemplo estender para 22mm, isso é feito com:

\documentclass[11pt,twoside]{article}
\usepackage{amsmath}
\usepackage[strict]{changepage}

%-------------------------------------- only for show page layout
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%

\begin{document}
My ``overfull \verb+\hbox+ long equation example
    \begin{adjustwidth*}{-22mm}{}
\begin{equation}
    \begin{aligned}
& x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x   \\
& x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x   \\
& x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x   \\
& x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x   \\
& x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x   \\
& x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x   \\
& x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x   \\
& x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x   \\
& x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x   \\
& x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x   \\
& x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x   \\
& x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x   \\
& x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x
    \end{aligned}
\end{equation}
    \end{adjustwidth*}
\end{document}

insira a descrição da imagem aqui

Se os exemplos de bot não funcionarem no seu documento, então você tem alguma incompatibilidade nele não inserida no seu MWE.

Responder3

Bastante fácil, mesmo sem fazer cálculos.

\documentclass[11pt]{article}

\usepackage{amsmath}

\begin{document}
My \verb|Overfull \hbox| long equation example
and some text some text some text some text
some text some text some text some text
\begin{equation}
\makebox[\textwidth]{%
$\begin{aligned}
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x
\end{aligned}$}
\end{equation}
\end{document}

insira a descrição da imagem aqui

Vejo que você está usando \pdfoutput=1. Não. Ajuntar com pdflatex.

Se quiser quebrar exibições, você também pode fazer isso com changepage(mas requer cálculos); também os números das equações serão alterados, é claro.

\documentclass[11pt]{article}

\usepackage{amsmath,changepage}
\usepackage{showframe} % just for the example

\allowdisplaybreaks

\begin{document}
My \verb|Overfull \hbox| long equation example
and some text some text some text some text
some text some text some text some text
\begin{adjustwidth}{-10pt}{-10pt}
\begin{align}
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+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x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x\\
&x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x
\end{align}
\end{adjustwidth}
My \verb|Overfull \hbox| long equation example
and some text some text some text some text
some text some text some text some text

\end{document}

informação relacionada