I supposed the include-command copy-pastes code in the compilation, it is wrong because the code stopped working. Please, see the middle part in the code. I only copy-pasted the code to the file and added the include-command.
$ cat results/frames.tex
10.31 & 8.50 & 7.40 \\
10.34 & 8.53 & 7.81 \\
8.22 & 8.62 & 7.78 \\
10.16 & 8.53 & 7.44 \\
10.41 & 8.38 & 7.63 \\
10.38 & 8.57 & 8.03 \\
10.13 & 8.66 & 7.41 \\
8.50 & 8.60 & 7.15 \\
10.41 & 8.63 & 7.21 \\
8.53 & 8.53 & 7.12 \\
Latex code, see the middle part
\begin{table}
\begin{tabular}{ | l | m | r |}
\hline
$t$ / s & $d_{1}$ / s & $d_{2}$ / s \\
$\Delta h = 0,01 s$ & $\Delta d = 0,01 s$ & $\Delta d = 0,01 s$ \\
\hline
% I JUST COPIED THE CODE from here to the file, included.
% It stopped working, why?
\include{results/frames.tex}
\hline
$\pi (\frac{d_{1}}{2} - \frac{d_{2}}{2})$ & $2 \pi R h$ & $2 \pi r h$ \\
\hline
\end{tabular}
\end{table}
Use \input instead of \include, that will work.
\include additionally performs a \clearpage command which will not work in the context of a table.
Try with \input, \include is old and very limited..
Related
I have a longtable and I would like that both the first part and the second part of the table are identical. As you can see in the figure, on the first page you have a row "test (total) | test | test | test |Stest | test" . I would also like to see this on the second page (to increase readability of the table)
`
\documentclass[a4paper]{report}
\usepackage[a4paper, total={6in, 9in}]{geometry}
\usepackage{graphicx} % Required for box manipulation
\usepackage{helvet}
\usepackage{subfig}
\usepackage[utf8]{inputenc}
%\usepackage{natbib}
\usepackage[square, comma, sort&compress]{natbib}
\usepackage[USenglish]{babel}
\usepackage[useregional]{datetime2}
\usepackage{pgfgantt}
\usepackage{listings}
\usepackage{wrapfig}
\usepackage{setspace}
\usepackage{parskip} % Used to create spaces between paragraphs
\usepackage{dirtytalk} % quotes by talk
%\usepackage[hidelinks]{hyperref}
\usepackage[colorlinks=true,citecolor=red]{hyperref}
\usepackage[acronym, toc]{glossaries} % Used to add a wordlist/glossaries
\usepackage{mathtools}
\usepackage{amsfonts}
\usepackage{color, colortbl}
\usepackage{booktabs}
\usepackage{float}
\usepackage{csquotes}
%zelf toegevoegd
\usepackage[most]{tcolorbox}
\usepackage{multirow} %table
\usepackage{xcolor,colortbl}
\usepackage{pdflscape}
\usepackage{pifont} %%%bullet points
\usepackage{longtable}
\usepackage{graphicx}
%\usepackage{geometry} %table margin
\begin{longtable}{l|ccc|ccc|}
\caption{test}
\label{test}\\
\cline{2-7}
& \multicolumn{3}{c|}{\cellcolor{lightgray}\textbf{Duration test}} & \multicolumn{3}{c|}{\cellcolor{lightgray}\textbf{test(Count)}} \\ \hline
\endfirsthead
%
\multicolumn{7}{c}%
{{\bfseries Table \thetable\ continued from previous page}} \\
\cline{2-7}
& \multicolumn{3}{c|}{\cellcolor{lightgray}\textbf{Duration test)}} & \multicolumn{3}{c|}{\cellcolor{lightgray}\textbf{test(Count)}} \\ \hline
\endhead
%
\multicolumn{1}{|l|}{\cellcolor[HTML]{EFEFEF}test(Total)} &
\multicolumn{1}{|c|}{\cellcolor[HTML]{EFEFEF}test} &
\multicolumn{1}{c|}{\cellcolor[HTML]{EFEFEF}test} &
{\cellcolor[HTML]{EFEFEF}test} &
\multicolumn{1}{|c|}{\cellcolor[HTML]{EFEFEF}test} &
\multicolumn{1}{c|}{\cellcolor[HTML]{EFEFEF}test} &
{\cellcolor[HTML]{EFEFEF}test} \\ \hline
\multicolumn{1}{|l|}{test}
& \multicolumn{1}{c|}{00:04} & \multicolumn{1}{c|}{C} & \multicolumn{1}{c|}{D}
& \multicolumn{1}{c|}{1} & \multicolumn{1}{c|}{F} & \multicolumn{1}{c|}{G} \\ \hline
\multicolumn{1}{|l|}{test}
& \multicolumn{1}{c|}{07:21} & \multicolumn{1}{c|}{C} & \multicolumn{1}{c|}{D}
& \multicolumn{1}{c|}{47} & \multicolumn{1}{c|}{F} & \multicolumn{1}{c|}{G} \\ \hline
\multicolumn{1}{|l|}{test}
& \multicolumn{1}{c|}{00:18} & \multicolumn{1}{c|}{C} & \multicolumn{1}{c|}{D}
& \multicolumn{1}{c|}{3} & \multicolumn{1}{c|}{F} & \multicolumn{1}{c|}{G} \\ \hline
\multicolumn{1}{|l|}{test}
& \multicolumn{1}{c|}{00:18} & \multicolumn{1}{c|}{C} & \multicolumn{1}{c|}{D}
& \multicolumn{1}{c|}{3} & \multicolumn{1}{c|}{F} & \multicolumn{1}{c|}{G} \\ \hline
\multicolumn{1}{|l|}{test}
& \multicolumn{1}{c|}{00:40} & \multicolumn{1}{c|}{C} & \multicolumn{1}{c|}{D}
& \multicolumn{1}{c|}{9} & \multicolumn{1}{c|}{F} & \multicolumn{1}{c|}{G} \\ \hline
\multicolumn{1}{|l|}{test}
& \multicolumn{1}{c|}{01:20} & \multicolumn{1}{c|}{C} & \multicolumn{1}{c|}{D}
& \multicolumn{1}{c|}{24} & \multicolumn{1}{c|}{F} & \multicolumn{1}{c|}{G} \\ \hline
\multicolumn{1}{|l|}{test}
& \multicolumn{1}{c|}{00:50} & \multicolumn{1}{c|}{C} & \multicolumn{1}{c|}{D}
& \multicolumn{1}{c|}{7} & \multicolumn{1}{c|}{F} & \multicolumn{1}{c|}{G} \\ \hline
\multicolumn{1}{|l|}{test}
& \multicolumn{1}{c|}{00:16} & \multicolumn{1}{c|}{C} & \multicolumn{1}{c|}{D}
& \multicolumn{1}{c|}{2} & \multicolumn{1}{c|}{F} & \multicolumn{1}{c|}{G} \\ \hline
\multicolumn{1}{|l|}{test}
& \multicolumn{1}{c|}{00:28} & \multicolumn{1}{c|}{C} & \multicolumn{1}{c|}{D}
& \multicolumn{1}{c|}{7} & \multicolumn{1}{c|}{F} & \multicolumn{1}{c|}{G} \\ \hline
\multicolumn{1}{|l|}{test}
& \multicolumn{1}{c|}{00:24} & \multicolumn{1}{c|}{NOB} & \multicolumn{1}{c|}{NOB}
& \multicolumn{1}{c|}{1} & \multicolumn{1}{c|}{NOB} & \multicolumn{1}{c|}{NOB} \\ \hline
\multicolumn{1}{|l|}{test}
& \multicolumn{1}{c|}{01:53} & \multicolumn{1}{c|}{C} & \multicolumn{1}{c|}{D}
& \multicolumn{1}{c|}{33} & \multicolumn{1}{c|}{F} & \multicolumn{1}{c|}{G} \\ \hline
\multicolumn{1}{|l|}{test}
& \multicolumn{1}{c|}{04:32} & \multicolumn{1}{c|}{C} & \multicolumn{1}{c|}{D}
& \multicolumn{1}{c|}{63} & \multicolumn{1}{c|}{F} & \multicolumn{1}{c|}{G} \\ \hline
\multicolumn{1}{|l|}{test}
& \multicolumn{1}{c|}{00:05} & \multicolumn{1}{c|}{C} & \multicolumn{1}{c|}{D}
& \multicolumn{1}{c|}{3} & \multicolumn{1}{c|}{F} & \multicolumn{1}{c|}{G} \\ \hline
\multicolumn{1}{|l|}{test}
& \multicolumn{1}{c|}{13:21} & \multicolumn{1}{c|}{C} & \multicolumn{1}{c|}{D}
& \multicolumn{1}{c|}{128} & \multicolumn{1}{c|}{F} & \multicolumn{1}{c|}{G} \\ \hline
\multicolumn{1}{|l|}{test}
& \multicolumn{1}{c|}{00:16} & \multicolumn{1}{c|}{C} & \multicolumn{1}{c|}{D}
& \multicolumn{1}{c|}{4} & \multicolumn{1}{c|}{F} & \multicolumn{1}{c|}{G} \\ \hline
\multicolumn{1}{|l|}{test}
& \multicolumn{1}{c|}{00:25} & \multicolumn{1}{c|}{C} & \multicolumn{1}{c|}{D}
& \multicolumn{1}{c|}{6} & \multicolumn{1}{c|}{F} & \multicolumn{1}{c|}{G} \\ \hline
\multicolumn{1}{|l|}{test}
& \multicolumn{1}{c|}{10:19} & \multicolumn{1}{c|}{C} & \multicolumn{1}{c|}{D}
& \multicolumn{1}{c|}{41} & \multicolumn{1}{c|}{F} & \multicolumn{1}{c|}{G} \\ \hline
\multicolumn{1}{|l|}{test}
& \multicolumn{1}{c|}{00:26} & \multicolumn{1}{c|}{C} & \multicolumn{1}{c|}{D}
& \multicolumn{1}{c|}{10} & \multicolumn{1}{c|}{F} & \multicolumn{1}{c|}{G} \\ \hline
\multicolumn{1}{|l|}{test}
& \multicolumn{1}{c|}{00:07} & \multicolumn{1}{c|}{C} & \multicolumn{1}{c|}{D}
& \multicolumn{1}{c|}{3} & \multicolumn{1}{c|}{F} & \multicolumn{1}{c|}{G} \\ \hline
\multicolumn{1}{|l|}{test}
& \multicolumn{1}{c|}{00:12} & \multicolumn{1}{c|}{C} & \multicolumn{1}{c|}{D}
& \multicolumn{1}{c|}{3} & \multicolumn{1}{c|}{F} & \multicolumn{1}{c|}{G} \\ \hline
\multicolumn{1}{|l|}{test}
& \multicolumn{1}{c|}{00:14} & \multicolumn{1}{c|}{C} & \multicolumn{1}{c|}{D}
& \multicolumn{1}{c|}{2} & \multicolumn{1}{c|}{F} & \multicolumn{1}{c|}{G} \\ \hline
\multicolumn{1}{|l|}{test}
& \multicolumn{1}{c|}{NOB} & \multicolumn{1}{c|}{C} & \multicolumn{1}{c|}{D}
& \multicolumn{1}{c|}{NOB} & \multicolumn{1}{c|}{F} & \multicolumn{1}{c|}{G} \\ \hline
\multicolumn{1}{|l|}{\textbf{Grand Total}} & \multicolumn{1}{c|}{43:49} & \multicolumn{1}{c|}{43:25} & \multicolumn{1}{c|}{48:50}
& \multicolumn{1}{c|}{401} & \multicolumn{1}{c|}{397} & \multicolumn{1}{c|}{51} \\\hline
\end{longtable}
`
I tried to duplicate the following part of the code
`
\multicolumn{1}{|l|}{\cellcolor[HTML]{EFEFEF}test(Total)} &
\multicolumn{1}{|c|}{\cellcolor[HTML]{EFEFEF}test} &
\multicolumn{1}{c|}{\cellcolor[HTML]{EFEFEF}test} &
{\cellcolor[HTML]{EFEFEF}test} &
\multicolumn{1}{|c|}{\cellcolor[HTML]{EFEFEF}test} &
\multicolumn{1}{c|}{\cellcolor[HTML]{EFEFEF}test} &
{\cellcolor[HTML]{EFEFEF}test} \\ \hline
`
You can add the row you want to appear at the top of every page to your longtable header.
Wrapping each and every cell into a \multicolumn is neither necessary nor useful for anything.
\documentclass[a4paper]{report}
\usepackage[a4paper, total={6in, 9in}]{geometry}
\usepackage{graphicx} % Required for box manipulation
\usepackage{helvet}
\usepackage{subfig}
\usepackage[utf8]{inputenc}
%\usepackage{natbib}
\usepackage[square, comma, sort&compress]{natbib}
\usepackage[USenglish]{babel}
\usepackage[useregional]{datetime2}
\usepackage{pgfgantt}
\usepackage{listings}
\usepackage{wrapfig}
\usepackage{setspace}
\usepackage{parskip} % Used to create spaces between paragraphs
\usepackage{dirtytalk} % quotes by talk
%\usepackage[hidelinks]{hyperref}
\usepackage[colorlinks=true,citecolor=red]{hyperref}
\usepackage[acronym, toc]{glossaries} % Used to add a wordlist/glossaries
\usepackage{mathtools}
\usepackage{amsfonts}
\usepackage{color, colortbl}
\usepackage{booktabs}
\usepackage{float}
\usepackage{csquotes}
%zelf toegevoegd
\usepackage[most]{tcolorbox}
\usepackage{multirow} %table
\usepackage{xcolor,colortbl}
\usepackage{pdflscape}
\usepackage{pifont} %%%bullet points
\usepackage{longtable}
\usepackage{graphicx}
%\usepackage{geometry} %table margin
\begin{document}
\begin{longtable}{|l|ccc|ccc|}
\caption{test}
\label{test}\\
\cline{2-7}
\multicolumn{1}{l|}{} & \multicolumn{3}{c|}{\cellcolor{lightgray}\textbf{Duration test}} & \multicolumn{3}{c|}{\cellcolor{lightgray}\textbf{test(Count)}} \\ \hline
\rowcolor[HTML]{EFEFEF}test(Total) & test & test & test & test & test & test\\\hline
\endfirsthead
\multicolumn{7}{c}{{\bfseries Table \thetable\ continued from previous page}} \\
\cline{2-7}
\multicolumn{1}{l|}{} & \multicolumn{3}{c|}{\cellcolor{lightgray}\textbf{Duration test)}} & \multicolumn{3}{c|}{\cellcolor{lightgray}\textbf{test(Count)}} \\ \hline
\rowcolor[HTML]{EFEFEF}test(Total) & test & test & test & test & test & test\\\hline
\endhead
%
test & 00:04 & C & D & 1 & F & G \\ \hline
test & 07:21 & C & D & 47 & F & G \\ \hline
test & 00:18 & C & D & 3 & F & G \\ \hline
test & 00:18 & C & D & 3 & F & G \\ \hline
test & 00:40 & C & D & 9 & F & G \\ \hline
test & 01:20 & C & D & 24 & F & G \\ \hline
test & 00:50 & C & D & 7 & F & G \\ \hline
test & 00:16 & C & D & 2 & F & G \\ \hline
test & 00:28 & C & D & 7 & F & G \\ \hline
test & 00:24 & NOB & NOB & 1 & NOB & NOB \\ \hline
test & 01:53 & C & D & 33 & F & G \\ \hline
test & 04:32 & C & D & 63 & F & G \\ \hline
test & 00:05 & C & D & 3 & F & G \\ \hline
test & 13:21 & C & D & 128 & F & G \\ \hline
test & 00:16 & C & D & 4 & F & G \\ \hline
test & 00:25 & C & D & 6 & F & G \\ \hline
test & 10:19 & C & D & 41 & F & G \\ \hline
test & 00:26 & C & D & 10 & F & G \\ \hline
test & 00:07 & C & D & 3 & F & G \\ \hline
test & 00:12 & C & D & 3 & F & G \\ \hline
test & 00:14 & C & D & 2 & F & G \\ \hline
test & NOB & C & D & NOB & F & G \\ \hline
test & 00:04 & C & D & 1 & F & G \\ \hline
test & 07:21 & C & D & 47 & F & G \\ \hline
test & 00:18 & C & D & 3 & F & G \\ \hline
test & 00:18 & C & D & 3 & F & G \\ \hline
test & 00:40 & C & D & 9 & F & G \\ \hline
test & 01:20 & C & D & 24 & F & G \\ \hline
test & 00:50 & C & D & 7 & F & G \\ \hline
test & 00:16 & C & D & 2 & F & G \\ \hline
test & 00:28 & C & D & 7 & F & G \\ \hline
test & 00:24 & NOB & NOB & 1 & NOB & NOB \\ \hline
test & 01:53 & C & D & 33 & F & G \\ \hline
test & 04:32 & C & D & 63 & F & G \\ \hline
test & 00:05 & C & D & 3 & F & G \\ \hline
test & 13:21 & C & D & 128 & F & G \\ \hline
test & 00:16 & C & D & 4 & F & G \\ \hline
test & 00:25 & C & D & 6 & F & G \\ \hline
test & 10:19 & C & D & 41 & F & G \\ \hline
test & 00:26 & C & D & 10 & F & G \\ \hline
test & 00:07 & C & D & 3 & F & G \\ \hline
test & 00:12 & C & D & 3 & F & G \\ \hline
test & 00:14 & C & D & 2 & F & G \\ \hline
test & NOB & C & D & NOB & F & G \\ \hline
test & 00:04 & C & D & 1 & F & G \\ \hline
test & 07:21 & C & D & 47 & F & G \\ \hline
test & 00:18 & C & D & 3 & F & G \\ \hline
test & 00:18 & C & D & 3 & F & G \\ \hline
test & 00:40 & C & D & 9 & F & G \\ \hline
test & 01:20 & C & D & 24 & F & G \\ \hline
test & 00:50 & C & D & 7 & F & G \\ \hline
test & 00:16 & C & D & 2 & F & G \\ \hline
test & 00:28 & C & D & 7 & F & G \\ \hline
test & 00:24 & NOB & NOB & 1 & NOB & NOB \\ \hline
test & 01:53 & C & D & 33 & F & G \\ \hline
test & 04:32 & C & D & 63 & F & G \\ \hline
test & 00:05 & C & D & 3 & F & G \\ \hline
test & 13:21 & C & D & 128 & F & G \\ \hline
test & 00:16 & C & D & 4 & F & G \\ \hline
test & 00:25 & C & D & 6 & F & G \\ \hline
test & 10:19 & C & D & 41 & F & G \\ \hline
test & 00:26 & C & D & 10 & F & G \\ \hline
test & 00:07 & C & D & 3 & F & G \\ \hline
test & 00:12 & C & D & 3 & F & G \\ \hline
test & 00:14 & C & D & 2 & F & G \\ \hline
test & NOB & C & D & NOB & F & G \\ \hline
\textbf{Grand Total} & 43:49 & 43:25 & 48:50
& 401 & 397 & 51 \\\hline
\end{longtable}
\end{document}
I am working with Stata to create a balance table for some data using the balancetable ado package. While I believe the balancetable commands are working, the output LaTeX document won't run the table that it is trying to print. Given that I am still learning how to use LaTeX, any assistance with trying to see what the syntax issue is with this LaTeX code would be much appreciated. I'm getting issues related to the document name, typesetting and compiler issues.
\begin{tabular}{l*{3}c}
\hline\hline
& (1) & (2) & (3) \\
\hline
agesq&677.315&717.395&40.079\\
&(428.784)&(431.252)&(41.341)\\
educ&10.088&10.346&0.257\\
&(1.614)&(2.011)&(0.172)\\
black&0.827&0.843&0.016\\
&(0.379)&(0.365)&(0.036)\\
hisp&0.108&0.059&-0.048*\\
&(0.311)&(0.237)&(0.027)\\
married&0.154&0.189&0.035\\
&(0.361)&(0.393)&(0.036)\\
nodegree&0.835&0.708&-0.127***\\
&(0.372)&(0.456)&(0.039)\\
mosinex&17.862&18.492&0.630\\
&(5.574)&(4.911)&(0.511)\\
re74&2.107&2.096&-0.011\\
&(5.688)&(4.887)&(0.516)\\
re75&1.267&1.532&0.265\\
&(3.103)&(3.219)&(0.303)\\
\hline
Observations & 260 & 185 & 445 \\
\hline\hline
\end{tabular}
```!LaTeX Error: Missing \begin{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.1 \begin{tabular}
{l*{3}c}
?```
In LaTeX, there's some lines you should always have. \documentclass{article} (doesn't have to be the article format). Afterwards, there is the document environment where your tabular environment would be in. This would look like:
\documentclass{article}
\begin{document}
\begin{tabular}{l*{3}c}
\hline\hline
& (1) & (2) & (3) \\ \hline
agesq & 677.315 & 717.395 & 40.079 \\
& (428.784) & (431.252) & (41.341) \\
educ & 10.088 & 10.346 & 0.257 \\
& (1.614) & (2.011) & (0.172) \\
black & 0.827 & 0.843 & 0.016 \\
& (0.379) & (0.365) & (0.036) \\
hisp & 0.108 & 0.059 & -0.048* \\
& (0.311) & (0.237) & (0.027) \\
married & 0.154 & 0.189 & 0.035 \\
& (0.361) & (0.393) & (0.036) \\
nodegree& 0.835 & 0.708 & -0.127*** \\
& (0.372) & (0.456) & (0.039) \\
mosinex & 17.862 & 18.492 & 0.630 \\
& (5.574) & (4.911) & (0.511) \\
re74 & 2.107 & 2.096 & -0.011 \\
& (5.688) & (4.887) & (0.516) \\
re75 & 1.267 & 1.532 & 0.265 \\
& (3.103) & (3.219) & (0.303) \\
\hline
Observations & 260 & 185 & 445 \\
\hline\hline
\end{tabular}
\end{document}
Indentations and spacing aren't required but they do make the document more understandable for the writer. Here's what this document generates:
I have my template set that subsections go into 2 columns, however when I try and insert a table, it does not compile instead being left blank. I think the reason is that the table is too wide/not being fitted.
Here is my LaTeX
\subsection{On examination}
\begin{table}[]
\begin{tabular}{|l|l|l|}
\hline
{\ul \textbf{Symptom}} & {\ul \textbf{Patient}} & {\ul \textbf{Normal}} \\ \hline
\textit{Temperature} & 36.7C & 36-36.8 \\ \hline
\textit{BMI} & 31 kg/m\textasciicircum{}2 & 18.5-24.9 \\ \hline
\textit{Heart Rate} & 70bpm & 60-100bpm \\ \hline
\textit{Blood Pressure} & 145/80 mmHg & \textless{}140/90mmHg \\ \hline
\textit{Respiratory Rate} & 12 breaths/min & 12-18 breaths/min \\ \hline
\textit{Misc} & & \\ \hline
\end{tabular}
\end{table}
How can somene create two tables side by side in beamer? I use the following to insert one table
\begin{table}
\begin{tabular}{l | c | c | c | c | c}
Model & intercept & X & Y & Adjusted $R^2$ & \\
\hline \hline
Coeff & 2.229 & -0.274 & 1.221 & 38\%\\
t-value & 3.404 & -0.49 & 3.907 \\
GMM-t & 2.542 & -0.444 & 3.814\\
\end{tabular}
\end{table}
which command should I use to have two tables side by side like the aforementioned table?
If your tables are narrow enough to fit side by side, you can simply place them next to each other like you would do for any normal letter.
\documentclass{beamer}
\begin{document}
\begin{frame}
\begin{table}
\begin{tabular}{l | c | c | }
Model & intercept & X \\
\hline \hline
Coeff & 2.229 & -0.274 \\
t-value & 3.404 & -0.49\\
GMM-t & 2.542 & -0.444 \\
\end{tabular}
\hfill
\begin{tabular}{l | c | c | }
Model & intercept & X \\
\hline \hline
Coeff & 2.229 & -0.274 \\
t-value & 3.404 & -0.49\\
GMM-t & 2.542 & -0.444 \\
\end{tabular}
\end{table}
\end{frame}
\end{document}
As suggested by this blog, you can try columns environment. For example, with code like
\begin{frame}{Example}
\begin{columns}
\begin{column}{0.3\textwidth}
\begin{table}
\begin{tabular}{c|c|c}
sid & bid & day \\ \hline \hline
22 & 101 & 10/10/96 \\
58 & 103 & 11/12/96 \\
\end{tabular}
\caption{reserves}
\end{table}
\end{column}
\begin{column}{0.3\textwidth}
\begin{table}
\begin{tabular}{c|c|c|c}
sid & sname & rating & age \\ \hline \hline
22 & dustin & 7 & 45.0 \\
31 & lubber & 8 & 55.5 \\
58 & rusty & 10 & 35.0 \\
\end{tabular}
\caption{Sailors}
\end{table}
\end{column}
\end{columns}
\end{frame}
You can get something like below (ignoring the background image)
I try to format my math like this in MathJax:
How can I do long division of polynomials in MathJax?
Old post, but I couldn't find an answer elsewhere, so here's how I solved this issue with two side-by-side arrays. Couldn't figure out how to make the lines shorter as I could in LaTex, but this was good enough for me:
<span class="math display">\[\begin{array}{r}
\\
x^2 - 3) \\
\phantom{.} \\
\phantom{.} \\
\phantom{.} \\
\phantom{.} \\
\phantom{.} \\
\phantom{.} \\
\phantom{.} \\
\phantom{.} \\
\phantom{.} \\
\end{array}
\begin{array}{rrrrrr}
& & x^3 & -2x^2 & +4x & -6 \\ \hline
x^5 & -2x^4 & + x^3 & &-8x & +18 \\
-x^5 & &+3x^3 \\ \hline
& -2x^4 & +4x^3 \\
& 2x^4 & &-6x^2 \\ \hline
& & 4x^3 & -6x^2 & -8x \\
& & -4x^3 & &+12x \\ \hline \\
& & &-6x^2 & +4x & +18 \\
& & & 6x^2 & & -18 \\ \hline
& & & & 4x
\end{array}\]</span>