如何在flalign中的\ intertext中标记\ subsection? (胶乳)

问题描述 投票:1回答:1

我有一个flalign环境,因此列与整页的排列方式相同。我需要\subsection里面的flaligns,所以我用\intertext。我需要\label这些\subsections。那就是我失败的地方。它\label\subsection之后的第一个方程但不是\subsection本身或错误发生。

图片:

screenshot

当我尝试使用更多的flalign环境并在它们之间放置子部分时,它们没有以相同的方式对齐,看起来很明显。

感谢帮助。

\begin{flalign}
   &\text{Značení: } &&X\sim \text{Exp($\lambda$)} &&
   \\
   &\text{Parametry: } &&\lambda > 0 &&
   \\
   &\text{Nosič: } &&X \in (0,\infty) &&
   \\
   &\text{Hustota: } &&f(x)= 
   \begin{cases}
      \lambda e^{-\lambda x} & x>0
      \\
      0 & x\leq 0
   \end{cases}
   \\
   &\text{Distribuční funkce: } &&F(x)=
   \begin{cases}
      1-e^{-\lambda x} & x>0
      \\
      0 & x\leq 0
   \end{cases} &&
   \\
   &\text{Střední hodnota: } && \E X = \frac{1}{\lambda} &&
   \\
   &\text{Rozptyl: } && \var X = \frac{1}{\lambda^2} &&
   \\
\intertext{\subsection{Weibullovo rozdělení}}\label{priloha:weibdist}
   &\text{Značení: } &&X\sim \text{Weib($\alpha$, $\beta$)}&&
   \\
   &\text{Parametry: } &&\text{$\alpha$, $\beta>0$}&&
   \\
   &\text{Nosič: } &&X \in \langle 0,\infty)&&
   \\
   &\text{Hustota: } &&f(x)=
   \begin{cases}
      \alpha \beta^\alpha x^{\alpha-1} e^{-(\beta x)^\alpha} & x\geq 0
      \\
      0 & x< 0
   \end{cases}&&
   \\
   &\text{Distribuční funkce: } &&F(x)=
   \begin{cases}
      1-e^{-(\beta x)^\alpha} & x\geq 0
      \\
      0 & x< 0
   \end{cases}
   \\
   &\text{Střední hodnota: } &&\E X = \frac{1}{\beta} \Gamma\left(1+\frac{1}{\alpha}\right)
   \\
   &\text{Rozptyl: } &&\var X = \frac{1}{\beta^2} \left\lbrace\Gamma \left(1+\frac{2}{\alpha}\right)-\left[\Gamma\left(1+\frac{1}{\alpha}\right)\right]^2\right\rbrace
   \\
\intertext{\subsection{Gama rozdělení}}\label{priloha:gammadist}
   &\text{Značení: } &&X\sim \Gamma(\alpha,\;\beta)&&
   \\
   &\text{Parametry: } &&\alpha,\; \beta > 0
   \\
   &\text{Nosič: } &&X \in (0,\infty)
   \\
   &\text{Hustota: } &&f(x)=
   \begin{cases}
      \frac{\alpha^\beta}{\Gamma(\beta)}x^{\beta-1}e^{-\alpha x} & x>0
      \\
      0 & x\leq 0
   \end{cases}
   \\
   &\text{Střední hodnota: } && \E X = \frac{\beta}{\alpha}
   \\
   &\text{Rozptyl: } && \var X = \frac{\beta}{\alpha^2}
\end{flalign}
latex
1个回答
0
投票

从您显示的图像中,我建议使用具有固定宽度的表格。这将允许你打破像小节这样的事情:

\documentclass[12pt,fleqn]{article}
\usepackage{amsmath}
\usepackage{array}
\begin{document}
\subsection{First part}

\noindent%
{%
\abovedisplayskip=-\baselineskip
\belowdisplayskip=-.5\baselineskip
\begin{tabular}{@{}p{.3\textwidth}@{}p{.7\textwidth}@{}}
First equation: & \begin{equation} a+b+c=d \end{equation}\\
Second equation: & \begin{equation} a+b+c=d \end{equation}\\
\end{tabular}
}

\subsection{Second part}
\label{sub:1}

\noindent%
{%
\abovedisplayskip=-\baselineskip
\belowdisplayskip=-.5\baselineskip
\begin{tabular}{@{}m{.3\textwidth}@{}m{.7\textwidth}@{}}
Next equation: & \begin{equation} a+b+c+45867+ddlk=d \end{equation}\\
Another equation: & \begin{equation} a+b+c+sdfsdf+565=d \end{equation}\\
\end{tabular}
}

Here alignment is working, but labeling not. Second part is \ref{sub:1}. It referes to 3th equation instead of subsection.
\end{document}

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.