# Half table border in Math (see example)

I need like this half table border.

• Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. Oct 20 '16 at 15:31
• Maybe you can adapt this solution to your problem. Or have a look at the packages empheq and mdframed. For the latter, this answer might be related. Oct 20 '16 at 15:45
• \begin{tabular}{|ll}\hline a & b\\ c & d\\ \end{tabular}
– Fran
Oct 21 '16 at 5:38
• @Fran thanks, I edit your comment and get result Oct 21 '16 at 8:29

You can do with some help by array.

Since there are both complex superscripts and subscripts, I chose to issue \displaystyle in every cell of the array, which raises them a bit.

Second trick: (locally) increase the apparent height of the cells, in order to better separate them.

\documentclass{article}
\usepackage{amsmath}
\usepackage{array}

\begin{document}

$\setlength{\extrarowheight}{1.5ex} % more room \begin{array}{ | *{4}{>{\displaystyle}l} @{\qquad} >{\displaystyle}l } \hline X_{1}^{(1)} & X_{1}^{(2)} & X_{1}^{(3)} & X_{1}^{(4)} & \sim 1-e^{-t^{2}} \\ X_{1}^{(1)} & X_{1}^{(2)} & X_{1}^{(3)} & & \sim 1-e^{-2(t^{2}-x^{2})} \\ \end{array}$

\end{document}


I solve my problem by this code:

$\left| \!{\overline {\, \begin{array}{l} {X_1}^{(1)}‎\hphantom{x}‎{\rm{ }}{X_2}^{(1)}‎\hphantom{x}{\rm{ }}{X_3}^{(1)}‎\hphantom{x}{\rm{ }}{X_4}^{(1)}‎\hphantom{xyz}‎\sim{1-e^{-t^2}}‎ \\ {X_1}^{(2)}‎\hphantom{x}{\rm{ }}{X_2}^{(2)}‎\hphantom{x}{\rm{ }}{X_3}^{(2)}‎\hphantom{xyzwasda}‎\sim{1-e^{-2(t^{2}-x^{2})}}‎ \\ \end{array} \,}} \right.$‎‎‎‎


But if your math formula is simple, @Fran's answer is nice (This comment was little need to edit.)

\begin{tabular}{11|}\hline a & ‎b‎‎‎‎‎‎‎‎‎‎‎\\‎
c & d‎‎‎‎‎‎\\ ‎\end{tabular}‎


❤️ Thank's all users for their comments.

You can simplfiy your code in this way:

\documentclass{article}
\begin{document}
$\begin{array}{|cccc@{\hspace{2em}}l} \hline\\[-1em] X_1^{(1)} & X_2^{(1)} & X_3^{(1)} & X_4^{(1)} & ‎\sim 1-e^{-t^2}‎ \\[1ex] X_1^{(1)} & X_2^{(2)} & X_3^{(2)} & & \sim 1-e^{-2(t^{2}-x^{2})} \\ \end{array}$
\end{document}


• \sim doesn't take an argument. Oct 21 '16 at 9:16
• @egreg of course. Nasty effect of the copy & paste :(
– Fran
Oct 21 '16 at 9:18