数学模式方程超出了文本的其余部分

数学模式方程超出了文本的其余部分

我正在写一个像这样的长正合序列2和这个1

在 latex 文档中。但它超出了其余文本的宽度。我在数学模式下写了这些。我怎样才能让它足够小,以便它与同一页上其余文本的宽度相同?

谢谢。

编辑-这是代码(与上面的长精确序列不同):

\documentclass[12pt,a4paper]{report}
\makeatletter
% these two slashes-commands for continuous chapter numbering in parts of the document
\makeatother
\usepackage{titlesec}
\titleformat{\chapter}{\normalfont\huge}{\thechapter.}{20pt}{\huge\bf} %for chapter headings
\RequirePackage{etoolbox}
\usepackage{tikz-cd} % and in the above line to use commutative diagrams
\usepackage{amsfonts}
\usepackage[utf8]{inputenc}
\usepackage{amsthm}
% below four lines to just one or two cyrillic letter
\DeclareFontFamily{U}{wncy}{}
\DeclareFontShape{U}{wncy}{m}{n}{<->wncyr10}{}
\DeclareSymbolFont{mcy}{U}{wncy}{m}{n}
\DeclareMathSymbol{\Sh}{\mathord}{mcy}{"58} 
 %Cyrillic letter command over
\usepackage{sagetex}
\usepackage[toc]{appendix} % to make appendi appear in the table of contents
 \usepackage{amssymb}  %to use direct sum symbol
 \usepackage{graphicx} %toinsert images
 \usepackage{amsmath} %to use matrices
 \usepackage{hyperref}
 \usepackage{bm} % to use bold font in math mode use \bm{ insert math mode text}
 \usepackage{mathrsfs} %for scripted english characters
 \usepackage{mathtools}
 \usepackage{tikz-cd} % to draw commutative diagrams
 \usepackage{enumitem}

Then there is a long exact sequence of cohomological groups
\[
0 \longrightarrow H^0(G_K,P) \longrightarrow H^0(G_K,M) \longrightarrow H^0(G_K,N) \\
H^1(G_K,P) \longrightarrow H^1(G_K,M) \longrightarrow H^1(G_K,N),
\]

\[
\begin{tikzcd}
  0 \arrow{r} & 
\frac{E'(K)}{\phi(E(K))} \arrow{r}{\delta} \arrow{d} &
H^{1}(G_K, E[\phi]) \arrow{r} \arrow{d}{Res_v} &
WC(E/K)[\phi] \arrow{r} \arrow{d} & 0 \\
0 \arrow{r} &
\frac{E'(K_v)}{\phi(E(K_v))} \arrow{r}{\delta_{v}} \arrow{d} &
H^{1}(G_{v}, E[\phi]) \arrow{r} \arrow{d} & 
WC(E/K_{v})[\phi] \arrow{r} \arrow{d} & 0 \\
0 \arrow{r} & 
\prod\limits_{v \in M_K} \frac{E'(K_v)}{\phi(E(K_v))} \arrow{r}{\prod\limits_{v \in M_K}\delta_{v}} &
\prod\limits_{v \in M_K} H^{1}(G_{v}, E[\phi]) \arrow{r} &
\prod\limits_{v \in M_K} WC(E/K_{v})[\phi] \arrow{r} & 0 
\tag{$**$} 
\label{starstar}
\end{tikzcd}  
\]
\end{document}

答案1

amsmath您需要使用( ) 包数学格式之一mathtools,它能够编写多行方程式。例如,在您的案例中,方便的multline环境是:

\documentclass[12pt,a4paper]{report}
\usepackage{mathtools}

%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%

\begin{document}
Then there is a long exact sequence of cohomological groups
    \begin{multline*}
0 \longrightarrow H^0(G_K,P) \longrightarrow H^0(G_K,M) \longrightarrow H^0(G_K,N) \\
\longrightarrow H^1(G_K,P) \longrightarrow H^1(G_K,M) \longrightarrow H^1(G_K,N),
    \end{multline*}
or
    \[
\begin{multlined}[0.8\linewidth]
0 \longrightarrow H^0(G_K,P) \longrightarrow H^0(G_K,M) \longrightarrow H^0(G_K,N) \\
\longrightarrow H^1(G_K,P) \longrightarrow H^1(G_K,M) \longrightarrow H^1(G_K,N),
\end{multlined}
    \]    
\end{document}

给出

在此处输入图片描述

(红线表示文字边框)

请注意,仅当(长)方程式嵌套或具有数学环境(如(参见第二个示例)等)时,equation\[ ...\]允许将其分解为更多行。amsmathmathtoolsmultlined

相关内容