3

I need to split the following equation which is into a table, in the second column. As the equation is under square root, I find it difficul to split. I tried to use \begin{split} environment but it does not work properly within a table. I also tried to change \sqrt[] into a power ^{1/2} but I couldn't find a solution. This is the equation.

P_{ij}^{[n]}=\sqrt[]{\frac{1}{C}\cdot \sum_{(xy) s.t. u_{xy} \in I_{ij}}\biggl[\biggl(\frac{1}{C}\cdot \sum_{(xy) s.t. u_{xy} \in I_{ij}}w_{(ij),(xy)}^{[n]}\biggr)-w_{(ij),(xy)}^{[n]}\biggr]^2}

Thanks for your help!

This is the table

\begin{table}[htbp]
\centering
\caption{Some of the rules available to create new images.}
\label{tabella1}
\renewcommand{\arraystretch}{3}
\begin{tabular}{cc}
    \toprule
    \textbf{Name} & \textbf{Equation} \\
    \midrule
    Mean & $P_{ij}^{[n]}=\frac{1}{C}\cdot \sum_{(xy) s.t. u_{xy} \in I_{ij}}w_{(ij),(xy)}^{[n]}$ \\
    \midrule
    Variance & $P_{ij}^{[n]}=\sqrt[]{\frac{1}{C}\cdot \sum_{(xy) s.t. u_{xy} \in I_{ij}}\biggl[\biggl(\frac{1}{C}\cdot \sum_{(xy) s.t. u_{xy} \in I_{ij}}w_{(ij),(xy)}^{[n]}\biggr)-w_{(ij),(xy)}^{[n]}\biggr]^2}$ \\
    \midrule
    \text{Maximum} &$ P_{ij}^{[n]}=\max_{(xy) s.t. u_{xy} \in I_{ij}}\biggl(w_{(ij),(xy)}^{[n]}\biggr)$ \\
    \midrule
    \text{Minimum} &$ P_{ij}^{[n]}=\min_{(xy) s.t. u_{xy} \in I_{ij}}\biggl(w_{(ij),(xy)}^{[n]}\biggr)$ \\
    \bottomrule
\end{tabular}
\renewcommand{\arraystretch}{1}

\end{table}

  • 3
    please always post a complete small document that shows the problem. In particular here the answer depends completely on how wide your table column is, and you have given no information at all. – David Carlisle Dec 29 '20 at 11:36
  • In particular I don't think the (x,y) s,t clauses add anything so is this output already narrow enough?? – David Carlisle Dec 29 '20 at 11:56
  • Thanks for your answer. I put the entire table, is it enough or I have to put other informations? And no, I need to write all, unfortunately. – Serena Dec 29 '20 at 12:11
  • well it's a bit better but still we don't know your page width so don't know the column width. (I'm surprised you need the s.t clause looks rather odd really and gives no extra information, but if you must, you must) – David Carlisle Dec 29 '20 at 12:22
  • Yes, it's an A4 paper and all the table should be maximum 12 cm in width. – Serena Dec 29 '20 at 14:13
4

You haven't said how wide your page is and I would remove the superfluous (xy) s.t. clauses to look more like

enter image description here

However assuming default article class width and keeping the s.t then this appears to fit:

enter image description here

\documentclass{article}

\usepackage{amsmath,booktabs}

\begin{document}

\begin{table}[htbp]
\centering
\caption{Some of the rules available to create new images.}
\label{tabella1}
\renewcommand{\arraystretch}{3}
\begin{tabular}{cc}
    \toprule
    \textbf{Name} & \textbf{Equation} \\
    \midrule
    Mean & $\displaystyle
P_{ij}^{[n]}=\frac{1}{C}\cdot \sum_{\substack{(xy)\\\text{s.t. }u_{xy} \in I_{ij}}}w_{(ij),(xy)}^{[n]}$ \\
    \midrule
    Variance & $\displaystyle
P_{ij}^{[n]}=\sqrt[]{\frac{1}{C}\cdot
\!\sum_{\substack{(xy)\\\text{s.t. }u_{xy} \in I_{ij}}}\biggl[\biggl(\frac{1}{C}\cdot
\!\sum_{\substack{(xy)\\\text{s.t. }u_{xy} \in I_{ij}}}w_{(ij),(xy)}^{[n]}\biggr)-w_{(ij),(xy)}^{[n]}\biggr]^2}$ \\
    \midrule
    \text{Maximum} &$\displaystyle
 P_{ij}^{[n]}=\max_{\substack{(xy)\\\text{s.t. }u_{xy} \in I_{ij}}}\biggl(w_{(ij),(xy)}^{[n]}\biggr)$ \\
    \midrule
    \text{Minimum} &$\displaystyle
 P_{ij}^{[n]}=\min_{\substack{(xy)\\\text{s.t. }u_{xy} \in I_{ij}}}\biggl(w_{(ij),(xy)}^{[n]}\biggr)$ \\
    \bottomrule
\end{tabular}

\end{table}
\end{document}
  • 1
    +1. What you call "variance", others might call "standard deviation"... :-) – Mico Dec 29 '20 at 12:36
  • 1
    @Mico I didn't look at the first column:-) – David Carlisle Dec 29 '20 at 12:39
  • Thanks so much for your help! Now it is perfectly in the page. – Serena Dec 29 '20 at 14:33
2

(Remark: This answer is based on the original form of the OP's query, which contained just one formula. The OP subsequently posted an table with four [4] equations.)

One of the following forms? Observe that the "s.t." qualifiers don't seem to be needed, and neither are the \cdot terms. In the first row, the \smash instructions in the square root expression along with the subsequent \vphantom directive serve to keep the surd from having to become excessively tall. Observe that neither the \smash directives nor the \vphantom instruction are needed in the second form. And, do observe that I've rearranged some of the terms to make it easy on readers to notice that P_{ij}^{[n]} is a standard deviation.

enter image description here

\documentclass{article}
\usepackage{mathtools} % for \smashoperator macro
%% macros for two terms that occur several times:
\newcommand\wterm{w_{(ij),(xy)}^{[n]}}
\newcommand\sumterm{\smashoperator{\sum_{\substack{(xy)\\ u_{xy} \in I_{ij}}}}}

\begin{document}
\begin{align*}
P_{ij}^{[n]}
% first form
&=\sqrt{   \frac{1}{C} \smash{\sumterm}\biggl[ \wterm 
  -\frac{1}{C} \Bigl(\,\smash{\sumterm} \wterm\Bigr) \biggr]^2} \vphantom{\sumterm} \\
% second form
&=\Biggl\{ \frac{1}{C}\sumterm \biggl[ \wterm 
  - \frac{1}{C} \Bigl(\,\sumterm\wterm\Bigr) \biggr]^2 \Biggr\}^{1/2}
\end{align*}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.