use
\scalebox{0.7}{\parbox{\linewidth}{%
...
}}
Otherwise you'll get two paragraphs inside scalebox
. However, two equation environments can be replaced by one of the align
environments from amsmath
.
You shouldn't be using either \begin{equation*} ... \end{equation*}
or \[ ... \]
inside the columns of a tabular
environment. Instead, simply change the column definition of the right-hand column from c
to >{$\displaystyle}c<{$}
; this will ensure that all cells in the second column will automatically be in math mode.
You have several (syntax) errors in the equations. Also, write \exp
and \ln
instead of just exp
and ln
; that way, "exp" and "ln" will be typeset using upright letters.
Also, where possible, avoid using fractional expressions using \frac
in the second column; instead, using "inline-style" fractions, e.g., a/b
instead of \frac{a}{b}
.
\documentclass{article}
\usepackage{mathtools,array}
\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}
\newcommand\FWHM{\mathrm{FWHM}}
\begin{document}
\begin{table}[!htb]
\centering
\renewcommand{\arraystretch}{2.75}
\begin{tabular}{|l|>{$\displaystyle}l<{$}|}
\hline
\multicolumn{2}{|c|}{Square Pulse} \\
\hline
Pulse &
I(t)=
\begin{cases}
1; & \abs{t}\le\tfrac{1}{2}\Delta t_{p}^{\FWHM}\\[1.5ex]
0; & \abs{t}> \tfrac{1}{2}\Delta t_{p}^{\FWHM}
\end{cases}
\\
\hline
Autocorrelation &
A^{(2)}(\tau)=
\begin{cases}
1-\abs*{\tau\big/\Delta\tau_{A}^{\FWHM}};
& \abs{\tau}\le\Delta\tau_{A}^{\FWHM}\\[2ex]
0; & \abs{\tau}>\Delta\tau_{A}^{\FWHM}
\end{cases}
\\
\hline
Relationship & {\Delta}t_{p}^{\FWHM}=\Delta\tau_{A}^{\FWHM} \\
\hline
\multicolumn{2}{|c|}{Gaussian Pulse} \\
\hline
Pulse & I(t)=\exp\Bigl[-\bigl(2\sqrt{\ln2t}/{\Delta}t_{p}^{\FWHM}\bigr)^2\Bigr] \\
\hline
Autocorrelation &
A^{(2)}(\tau)=\exp\Bigl[-\bigl(2\sqrt{\ln2\tau}/\Delta\tau_{A}^{\FWHM}\bigr)^2\Bigr] \\
\hline
Relationship &
{\Delta}t_{p}^{\FWHM}=\Delta\tau_{A}^{\FWHM} \\
\hline
\end{tabular}
\caption{The relationship between the initial pulse and autocorrelation of square pulse and Gaussian pulse}
\label{table AC1}
\end{table}
\end{document}
Addendum: Your table contains lots of vertical and horizontal lines, which actually don't enhance the readability of its contents. You may want to give some thought to giving the table a more "open" look, e.g., by getting rid all vertical lines and most horizontal lines. I hope you will agree that the following table is much more "inviting" to the readers' eye (and brain...).
\documentclass{article}
\usepackage{mathtools,array,booktabs}
\DeclarePairedDelimiter{\abs}{\lvert}{\rvert} % "absolute value" macro
\newcommand\FWHM{\mathrm{FWHM}}
\begin{document}
\begin{table}[!htb]
\centering
\renewcommand{\arraystretch}{1.25}
\begin{tabular}{@{}l>{$\displaystyle}l<{$}@{}}
\toprule
\multicolumn{2}{@{}l}{\bfseries Square Pulse} \\
\addlinespace
Pulse &
I(t)=
\begin{cases}
1; & \abs{t}\le\tfrac{1}{2}\Delta t_{p}^{\FWHM}\\[1ex]
0; & \abs{t}> \tfrac{1}{2}\Delta t_{p}^{\FWHM}
\end{cases}
\\
\addlinespace
Autocorrelation &
A^{(2)}(\tau)=
\begin{cases}
1-\abs*{\tau\big/\Delta\tau_{A}^{\FWHM}};
& \abs{\tau}\le\Delta\tau_{A}^{\FWHM}\\[1ex]
0; & \abs{\tau}>\Delta\tau_{A}^{\FWHM}
\end{cases}
\\
\addlinespace
Relationship & {\Delta}t_{p}^{\FWHM}=\Delta\tau_{A}^{\FWHM} \\
\midrule
\multicolumn{2}{@{}l}{\bfseries Gaussian Pulse} \\
\addlinespace
Pulse & I(t)=\exp\bigl[-\bigl(2\sqrt{\ln2t}\big/{\Delta}t_{p}^{\FWHM}\bigr)^2\,\bigr] \\
\addlinespace
Autocorrelation &
A^{(2)}(\tau)=\exp\bigl[-\bigl(2\sqrt{\ln2\tau}\big/\Delta\tau_{A}^{\FWHM}\bigr)^2\,\bigr] \\
\addlinespace
Relationship &
{\Delta}t_{p}^{\FWHM}=\Delta\tau_{A}^{\FWHM} \\
\bottomrule
\end{tabular}
\caption{Relationship between initial pulse and autocorrelation for square and Gaussian pulses}
\label{table AC1}
\end{table}
\end{document}
Best Answer
Latexit will have a preamble and a postamble of its own which you can access through its preferences (
Edit > Preferences
)The standard preamble contains a
\begin{displaymath}
and the postamble\end{displaymath}
:Hence if you add
\begin{equation}
and\end{equation}
in your code, you will get an error:Remove
\begin{equation}
and\end{equation}
, you get the result:PS: Since the equations are exported as images from latexit and inserted elsewhere, I feel that it is not a good idea to use equation number (which is inserted by
equation
environment) and a label. It is better if they are included in the main document. However, for your own reasons if you want them, replace\begin{displaymath}
with\begin{equation}
in the preamble and\end{displaymath}
with\end{equation}
in the postamble of latexit.