Cambiar el margen izquierdo para ecuaciones largas

Cambiar el margen izquierdo para ecuaciones largas

Digamos que tengo una ecuación alineada larga con a overfull \hboxof 20pty quiero reducir el margen izquierdo de 10ptso to have y overfull \hboxof only 10pt. ¿Cómo puedo conseguir esto sin añadir un espacio negativo a cada línea?

\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}

ingrese la descripción de la imagen aquí

Intenté con el adjustwidthambiente del changepagepaquete pero, a veces, no funciona (y no puedo entender por qué).

NOTA 1.Necesito una solución que funcione durante mucho tiempo,varias páginasecuaciones "alineadas". No puedo dividirlos.

NOTA 2.NO necesito cambiar el tamaño de la ecuación. Sé que puedo hacerlo, pero a veces sólo necesito cambiar el margen izquierdo.

Respuesta1

Suponiendo que sus ecuaciones contengan muchos símbolos +y/o -, puede considerar reducir el valor del parámetro de longitud \medmuskip. Por ejemplo, dar la instrucción \medmuskip=2mupermite que el alignentorno se adapte cómodamente.

El 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}

Respuesta2

El paquete changepagefunciona como se anuncia :). Sin embargo, ¡no puede comenzar en una página y detenerse en la siguiente!

Pruebe el siguiente MWE (como changepagese usa, funciona...) cambie el margen lateral:

\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}

ingrese la descripción de la imagen aquí

Editar: En caso de que desee cambiar el margen izquierdo, es decir, el interior, por ejemplo extenderlo a 22 mm, esto se logra con:

\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}

ingrese la descripción de la imagen aquí

Si los ejemplos de bots no funcionan en su documento, entonces tiene alguna discrepancia que no está incluida en su MWE.

Respuesta3

Bastante fácil, incluso sin hacer 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}

ingrese la descripción de la imagen aquí

Veo que estás usando \pdfoutput=1. No. Compilar con pdflatex.

Si desea romper pantallas, también puede hacerlo con changepage(pero requiere cálculos); Por supuesto, también se desplazarán los números de las ecuaciones.

\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+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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+x+x+x+x+x+x+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}

información relacionada