You can use
\multicolumn{2}{l|}{\mbox{Substitute into (1), }V=0}
to give you a vertical rule at the end of your multicolumn
. Here's a complete MWE:
% arara: pdflatex
% !arara: indent: {overwrite: yes}
\documentclass{article}
\usepackage{array}
\begin{document}
\[
\begin{array}{>{\displaystyle}r>{\displaystyle}l|>{\displaystyle}r>{\displaystyle}l|>{\displaystyle}r>{\displaystyle}l}
\frac{\delta^2\psi_L}{\delta x^2} & = -k^2Ce^{ikx}-k^2Re^{-ikx} & \frac{\delta^2\psi_C}{\delta x^2} & = A\kappa^2e^{\kappa x}+B\kappa^2e^{-\kappa x} & \frac{\delta^2\psi_R}{\delta x^2} & = -Tk^2e^{ikx} \\
& & & & & \\
& =-k^2\psi_L & & =\kappa^2\psi_C & & =-k^2\psi_R \\
& & & & & \\
& =-\frac{2mE}{\hbar^2}\psi_L & & =\frac{2m(V-E)}{\hbar^2}\psi_C & & =-\frac{2mE}{\hbar^2}\psi_R \\
& & & & & \\
\multicolumn{2}{l|}{\mbox{Substitute into (1), }V=0}&\multicolumn{2}{c|}{\mbox{Substitute into (1)}}&\multicolumn{2}{c}{\mbox{Substitute into (1), }V=0}\\
& & & & & \\
E\psi_L & =E\psi_L & (E-V)\psi_C & =(E-V)\psi_C & E\psi_R & =\psi_R \\
\end{array}
\]
\end{document}
As a note: it looks you are hard coding a reference using (1)
; it's best to avoid this kind of thing, and use \ref
, \eqref
and friends.
You can get better spacing around your =
symbols by using
\begin{array}{>{\displaystyle}r@{}>{\displaystyle}l|>{\displaystyle}r@{}>{\displaystyle}l|>{\displaystyle}r@{}>{\displaystyle}l}
which removes the column separation; furthermore, you can use, for example
\renewcommand{\arraystretch}{3}
and remove the empty rows to set the row spacing.
% arara: pdflatex
% !arara: indent: {overwrite: yes}
\documentclass{article}
\usepackage{array}
\begin{document}
\[
\renewcommand{\arraystretch}{3}
\begin{array}{>{\displaystyle}r@{}>{\displaystyle}l|>{\displaystyle}r@{}>{\displaystyle}l|>{\displaystyle}r@{}>{\displaystyle}l}
\frac{\delta^2\psi_L}{\delta x^2} & {}= -k^2Ce^{ikx}-k^2Re^{-ikx} & \frac{\delta^2\psi_C}{\delta x^2} & {}= A\kappa^2e^{\kappa x}+B\kappa^2e^{-\kappa x} & \frac{\delta^2\psi_R}{\delta x^2} & {}= -Tk^2e^{ikx} \\
& {} =-k^2\psi_L & & {}=\kappa^2\psi_C & & {} =-k^2\psi_R \\
& {}=-\frac{2mE}{\hbar^2}\psi_L & & {} =\frac{2m(V-E)}{\hbar^2}\psi_C & & {}=-\frac{2mE}{\hbar^2}\psi_R \\
\multicolumn{2}{l|}{\mbox{Substitute into (1), }V=0}&\multicolumn{2}{c|}{\mbox{Substitute into (1)}}&\multicolumn{2}{c}{\mbox{Substitute into (1), }V=0}\\
E\psi_L & {} =E\psi_L & (E-V)\psi_C & {} =(E-V)\psi_C & E\psi_R & {} =\psi_R \\
\end{array}
\]
\end{document}
Following egreg's
suggestion, you can also use a new column type:
\newcolumntype{M}{>{\displaystyle}r@{}>{\displaystyle}l}
which allows you to write
\begin{array}{M|M|M}
You might also like to center the entries on the last row:
\multicolumn{2}{c|}{E\psi_L=E\psi_L} & \multicolumn{2}{c|}{(E-V)\psi_C=(E-V)\psi_C} & \multicolumn{2}{c}{E\psi_R=\psi_R} \\
A solution with cvssimple
:
\begin{filecontents*}{\jobname.csv}
11.0; 12.3; one; two
1.2; 33.11; five; six
\end{filecontents*}
\documentclass{article}
\usepackage{booktabs,tabulary}
\usepackage{csvsimple}
\begin{document}
\begin{tabulary}{\textwidth}{*{4}{L}}
\toprule
1 & 2 & 3 & 4 \\
\midrule
\csvreader[
separator=semicolon,
no head,
late after line=\\,
]{\jobname.csv}{}{%
\csvcoli & \csvcolii & \csvcoliii & \csvcoliv
}
\bottomrule
\end{tabulary}
\bigskip
\end{document}
Best Answer
The easiest way to improve the table is to give it a more "open" look -- by removing all vertical lines and using the line-drawing macros of the
booktabs
package for the horizontal lines. To assure that the tabular material takes up the entire available text block width, use atabular*
environment. And, as it appears to be necessary to render the table using\scriptsize
, reduce the font size of the caption as well; in the example below, I use one of the facilities of thecaption
to set the font size of the caption.