我的内联方程超出了边界。我想知道是否有解决方案?以下是MWE
:
\documentclass[12pt,letterpaper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{makeidx}
\usepackage{graphicx}
\usepackage{lmodern}
\usepackage{kpfonts}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\begin{document}
where the first equality in \ref{inequality} follows from $\lceil\frac{s}%
{t}\rceil=\lfloor\frac{s+t-1}{t}\rfloor$ for integer $s$ and $t$ and the
inequality follows from the feasibility condition. We also assume that the
item can be ordered at any day of the week and these orders arrive instantly.
For each day $t\in W$ define $p_{x,t,n,j} \left(
\text{for all }x=0,\cdots,u_{j}\text{ }\text{and }
n\in N_{x,t,j}
\right)$ to be the joint probability of
\end{document}
答案1
一个解决方案是使用\bracr
如下宏:
或史蒂芬莱姆克建议使用显示数学:
参考:
代码L
\documentclass[12pt,letterpaper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{makeidx}
\usepackage{graphicx}
\usepackage{lmodern}
\usepackage{kpfonts}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm,showframe]{geometry}
\makeatletter
\def\@BracContents{} % default (used by \suchthat)
\newcommand{\BracKern}{\kern-\nulldelimiterspace}
\newcommand{\@Brac}[3]{% #1,#3 = left/right bracket type
\ensuremath{%
\begingroup\def\@BracContents{#2}%
\mathopen{\left#1\vphantom{#2}\BracKern\right.}% left bracket
#2% content
\mathclose{\left.\BracKern\vphantom{#2}\right#3}% right bracket
\endgroup%
}%
}
\newcommand{\bracr}[1]{\@Brac{(}{#1}{)}}%
\makeatother
\begin{document}
\section{Use macro:}
where the first equality in \ref{inequality} follows from $\lceil\frac{s}%
{t}\rceil=\lfloor\frac{s+t-1}{t}\rfloor$ for integer $s$ and $t$ and the
inequality follows from the feasibility condition. We also assume that the
item can be ordered at any day of the week and these orders arrive instantly.
For each day $t\in W$ define $p_{x,t,n,j} \bracr{
\text{for all }x=0,\cdots,u_{j}\text{ }\text{and }
n\in N_{x,t,j}
}$ to be the joint probability of
\section{Display Math:}
where the first equality in \ref{inequality} follows from $\lceil\frac{s}%
{t}\rceil=\lfloor\frac{s+t-1}{t}\rfloor$ for integer $s$ and $t$ and the
inequality follows from the feasibility condition. We also assume that the
item can be ordered at any day of the week and these orders arrive instantly.
For each day $t\in W$ define
\[
p_{x,t,n,j} \left(
\text{for all }x=0,\cdots,u_{j}\text{ }\text{and }
n\in N_{x,t,j}
\right)
\]
to be the joint probability of
\end{document}
答案2
您输入公式的方式值得怀疑。以下是我输入的方式:
For each day $t\in W$ define $p_{x,t,n,j}$ (for all $x=0$,~\dots, $u_{j}$
and $n\in N_{x,t,j}$) to be the joint probability of
这些括号是不是数学,不应大于平常。您只是陈述一个附带条件,只需交替使用文本和数学即可。