公式超出 Latex 中的页面边界

公式超出 Latex 中的页面边界

\documentclass[a4paper, 12pt]{article}
\usepackage{amsfonts}
%\usepackage{amsbsy}
\usepackage{amssymb}
\usepackage{amsmath}
%\usepackage[a4paper, total={6in, 8in}]{geometry}
\usepackage{graphics}
%\usepackage{epsfig}
\usepackage{tgbonum}                           
\usepackage{tikz}
\usepackage{flexisym}
%\usepackage{subfigure}
\usepackage{cite}
\usepackage{nth}
\usepackage{amsthm}
\usepackage{enumitem}
\usepackage[a4paper, total={6.25in, 9in}]{geometry}
\usepackage{mathtools}

%\documentclass[a4paper, 12pt]{article}

\usepackage{amsfonts}

\usepackage{tikz}
\usepackage{amsmath}
\begin{document}

$$L\left(\Gamma_{(k,2k)};x\right)=\Psi(L(G_1))\Psi(L(G_2))-\Psi(L(G_1))\Psi(L_4(G_2))-\Psi(L(G_2))\Psi(L_3(G_1))=x(x-1)^{(6k-2)} \times\bigl(x^3-(3k+5)x^2+(2k^2+8k+7)x-(3+3k) \bigr)\times \bigl(x^2-(k+3)x+2\bigr)\bigl(x^2-(2k+4)x+1 \bigr)$$
\end{document}


I am trying to write this code in latex. But it does not fit in the page. How to do this?

答案1

在此处输入图片描述

\documentclass[12pt]{article}
\usepackage{mathtools}
\usepackage{amssymb}
\usepackage[showframe,
            a4paper, total={6.25in, 9in}]{geometry}

\begin{document}
\begin{align*}
L\left(\Gamma_{(k,2k)};x\right)
    & = \Psi(L(G_1))\Psi(L(G_2))-\Psi(L(G_1))\Psi(L_4(G_2))-\Psi(L(G_2))\Psi(L_3(G_1))  \\
    & = x(x-1)^{(6k-2)} \times\bigl(x^3-(3k+5)x^2+(2k^2+8k+7)x-(3+3k) \bigr)            \\
    &\qquad   \times \bigl(x^2-(k+3)x+2\bigr)\bigl(x^2-(2k+4)x+1 \bigr)
\end{align*}
\end{document}

注意:有些包你加载两次,mathools就会被取代amsmath,所以你不需要amsmath再次加载,字体也是如此:amssymb也要加载amsfonts...

答案2

相关内容