Problem in twocolumn article below table in latex - latex

I faced a problem writing a twocolumn article in latex. I incorporated a regular table in singlecolumn mode, but when i change it back to doublecolumn below the table, when the text or the proof is large enough to start the second column, it goes over the table , which means that the second column starts at the beginning of the page as if the table doesnt exist. I left as comments the commands that i tried but didnt work.
thank you for your time.
\documentclass[10pt,twocolumn]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[greek,english]{babel}
\usepackage{alphabeta}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tabularx}
%\usepackage{wraptable}
%\usepackage{wrapfig}
%\usepackage{graphicx}
\usepackage{multicol}
\usepackage{makecell}
\usepackage{amsthm}
%\addto\captionsenglish{
% \renewcommand{\contentsname}{Ξ Ξ΅ΟΞΉΞ΅ΟΟμΡνα}
% }
\newenvironment{absolutelynopagebreak}
{\par\nobreak\vfil\penalty0\vfilneg
\vtop\bgroup}
{\par\xdef\tpd{\the\prevdepth}\egroup
\prevdepth=\tpd}
\author{text}
\title{text}
\date{5/4/2021}
\begin{document}
\maketitle
\section{text}
\par
text
\section{text}
\par
text
\section{text}
\par
text
\section{text}
\par
text
%\newpage
%\begin{absolutelynopagebreak}
\onecolumn
%\end{absolutelynopagebreak}
%\begin{wrapfig}
\begin{table}[t]
\caption{text}
\centering
\begin{tabular}{|m{4cm}|m{4cm}|m{5cm}|}
\hline
text & text & text\\
\hline
text & \parbox{3cm}{\begin{equation*} equation \end{equation*}} & text\\
\hline
text & \parbox{3cm}{\begin{equation*} equation \end{equation*}} & text\\
\hline
text & text & \makecell{text \\ text}\\
\hline
text & \parbox{3cm}{\begin{equation*} equation \end{equation*}} & \makecell{text\\text}\\
\hline
\end{tabular}
\end{table}
%\hrulefill
%\vspace{1cm}
\begin{absolutelynopagebreak}
\twocolumn
\end{absolutelynopagebreak}
\section{text}
% \vspace{10cm}
%\hrulefill
%\clearpage
% {\Large \textbf{5\hskip 0.6cm \selectlanguage{greek} text \textlatin{Maxwell}}}
%\par
\begin{proof}
\begin{equation}
equation
\end{equation}
\begin{equation}
equation
\end{equation}
\begin{equation}
equation
\end{equation}
\begin{equation}
equation
\end{equation}
\end{proof}
\\
text
%\end{wrapfig}
\end{document}

Instead of explicitly switching the text from one column to two columns back and forth within a page, you can use the starred (*) version of the table environment. That will make this table one-column, while the text stays as it is.
\documentclass[10pt,twocolumn]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[greek,english]{babel}
\usepackage{alphabeta}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tabularx}
\usepackage{multicol}
\usepackage{makecell}
\usepackage{amsthm}
\usepackage{lipsum}
\author{text}
\title{text}
\date{5/4/2021}
\begin{document}
\maketitle
\section{text}
\par
text
\section{text}
\par
text
\section{text}
\par
text
\section{text}
\begin{table*}[t]
\caption{text}
\centering
\begin{tabular}{|m{4cm}|m{4cm}|m{5cm}|}
\hline
text & text & text\\
\hline
text & \parbox{3cm}{\begin{equation*} equation \end{equation*}} & text\\
\hline
text & \parbox{3cm}{\begin{equation*} equation \end{equation*}} & text\\
\hline
text & text & \makecell{text \\ text}\\
\hline
text & \parbox{3cm}{\begin{equation*} equation \end{equation*}} & \makecell{text\\text}\\
\hline
\end{tabular}
\end{table*}
\lipsum[1-3]
\section{text}
\lipsum[1-3]
\begin{proof}
\begin{equation}
equation
\end{equation}
\begin{equation}
equation
\end{equation}
\begin{equation}
equation
\end{equation}
\begin{equation}
equation
\end{equation}
\end{proof}
\lipsum[1-2]
\end{document}
The result:

Related

How can I put an equation and an image in the same row? (Latex)

I want to put an equation with cases on the left and its graph on the right, in the same row. I try with different solutions I found on stackoverflow, but any of them could help me. This is the code I wrote in VSC:
\documentclass[12pt]{article}
\usepackage{blindtext}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{subcaption}
\usepackage{multirow}
\usepackage{graphicx}
\usepackage[utf8]{inputenc}
\usepackage{hyperref}
\usepackage{fancyhdr, color}
\usepackage[dvipsnames]{xcolor}
\usepackage[thinc]{esdiff}
\begin{itemize}
\item \textbf{Finestra rettangolare e area unitaria:}
\begin{tabular}{c c}
\begin{equation*} \Pi(t) =
\begin{cases}
1, & -\frac{1}{2} \leq t \leq -\frac{1}{2} \\
0, & altrove \\
\end{cases}
\end{equation*}
&
\includegraphics[scale=0.1]{Rectangular_Function_C.png}
\end{tabular}
But it doesn't work:
Function image
Don't use an equation inside a table cell. You can use inline math like $...$ instead
to vertically align the image with the equation, you can use the valign=m key from the adjustbox package
you shouldn't set multi-letter words in math mode, the kerning will be all wrong. Instead you can use \text{altrove}
\documentclass[12pt]{article}
\usepackage{blindtext}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{subcaption}
\usepackage{multirow}
\usepackage{graphicx}
\usepackage[utf8]{inputenc}
\usepackage{hyperref}
\usepackage{fancyhdr, color}
\usepackage[dvipsnames]{xcolor}
\usepackage[thinc]{esdiff}
\usepackage[export]{adjustbox}
\begin{document}
\begin{itemize}
\item \textbf{Finestra rettangolare e area unitaria:}
\begin{tabular}{c c}
$\displaystyle\Pi(t) =
\begin{cases}
1, & -\frac{1}{2} \leq t \leq -\frac{1}{2} \\
0, & \text{altrove} \\
\end{cases}
$
&
\includegraphics[width=3cm,valign=m]{example-image-duck}
\end{tabular}
\end{itemize}
\end{document}

Vertical and horizontal cell centering in LaTex table

I am making a LaTex table and have trouble centering text (and images) inside cells themselves. The table as a whole is centered on the page, but what I want is that text and images in every cell are centered both vertically and horizontally.
This is my code
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{multirow}
\usepackage[table,xcdraw]{xcolor}
\usepackage{tabularray}
\usepackage{float}
\usepackage{graphicx}
\begin{document}
\begin{table}[H]
\centering
\begin{tabular}{|c|c|c|c|}
\hline
\rowcolor[HTML]{C0C0C0}
\textbf{Particle} & \textbf{Orientation} & \textbf{Symbol} & \textbf{Letter} \\[4ex] \hline
& in & {\includegraphics[scale=0.8]{im/inel.jpg}} & $u$ \\[2ex] \cline{2-4}
\multirow{-2}{*}{fermion} & out & {\includegraphics[scale=0.8]{im/outel.jpg}} & $\overline{u}$ \\[2ex] \hline
& in & {\includegraphics[scale=0.8]{im/inpoz.jpg}} & $\overline{v}$ \\[2ex] \cline{2-4}
\multirow{-2}{*}{antifermion} & out & {\includegraphics[scale=0.8]{im/outpoz.jpg}} & $v$ \\[2ex] \hline
& in & {\includegraphics[scale=0.8]{im/inph.jpg}} & $\epsilon_\mu$ \\[2ex] \cline{2-4}
\multirow{-2}{*}{foton} & out & {\includegraphics[scale=0.8]{im/outph.jpg}} & $\epsilon_{\mu}^*$ \\[2ex] \hline
\end{tabular}
\end{table}
\end{document}
This is what my code gives me (also notice how some lines are obscured by the images - that is not how I wanted it):
And, this is what I want:
Any help is welcome! Thank you
You are already loading the tabularray package, just use it instead of a tabular:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{multirow}
\usepackage[table,xcdraw]{xcolor}
\usepackage{tabularray}
\usepackage{float}
\usepackage{graphicx}
\usepackage[export]{adjustbox}
\begin{document}
\begin{table}[H]
\centering
\begin{tblr}{
cells={valign=m,halign=c},
row{1}={bg=lightgray,font=\bfseries,rowsep=8pt},
colspec={QQQQ},
hlines,
vlines
}
Particle & Orientation & Symbol & Letter\\
\SetCell[r=2]{} fermion& in & \includegraphics[scale=0.5,valign=c]{example-image-duck} & $u$ \\
& out & \includegraphics[scale=0.5,valign=c]{example-image-duck}& $\overline{u}$ \\
\SetCell[r=2]{} antifermion & in & \includegraphics[scale=0.5,valign=c]{example-image-duck} & $\overline{v}$ \\
& out & \includegraphics[scale=0.5,valign=c]{example-image-duck} & $v$ \\
\SetCell[r=2]{} photon & in & \includegraphics[scale=0.5,valign=c]{example-image-duck} & $\epsilon_\mu$ \\
& out & \includegraphics[scale=0.5,valign=c]{example-image-duck} & $\epsilon_{\mu}^*$ \\
\end{tblr}
\end{table}
\end{document}

Overleaf Appendix Table Numbering

I am using overleaf to write a journal article and want to move a lot of my results table to the Appendix. So I write the following commands:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{booktabs}
\usepackage{outlines}
\usepackage{dirtytalk}
\usepackage{latexsym}
\usepackage{tabularx}
\usepackage{amsmath}
\usepackage{booktabs,caption}
\usepackage{longtable}
\usepackage{appendix}
\usepackage[para,online,flushleft]{threeparttable}
\usepackage[affil-it]{authblk}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage[a4paper, total={6in, 8in}]{geometry}
\renewcommand{\baselinestretch}{1.5}
\begin{document}
\bibliographystyle{IEEEtran}
\bibliography{bibliography.bib}
\appendix
\section{Tables}
\begin{table}[!]
\begin{scriptsize}
\centering
\caption{Reduced Form Estimates using Linear Probability Model}
\label{tab:my-table}
\begin{tabular}{#{}lcccc#{}}
\hline
\hline
& (1) & (2) & (3) & (4) \\
VARIABLES & A & B & C & D \\
\hline
&&&& \\
&&&& \\
&&&& \\
\hline
\multicolumn{5}{c}{\textit{Note:}Robust standard errors in parentheses *** p$<$0.01, ** p$<$0.05, * p$<$0.1 }
\end{tabular}
\end{scriptsize}
\end{table}
\end{document}
While the section is recognized as appendix and tables, the numbering of the tables continue from the main text. How do I go from for example: Table 12 to Table A1?
Thanks
You could use
\setcounter{table}{0}
\renewcommand{\thetable}{A\arabic{table}}
to change the numbering style of the appendix tables
Please also note that scriptsize is NOT an environment, it is a macro.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{booktabs}
\usepackage{outlines}
\usepackage{dirtytalk}
\usepackage{latexsym}
\usepackage{tabularx}
\usepackage{amsmath}
\usepackage{booktabs,caption}
\usepackage{longtable}
\usepackage{appendix}
\usepackage[para,online,flushleft]{threeparttable}
\usepackage[affil-it]{authblk}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage[a4paper, total={6in, 8in}]{geometry}
\renewcommand{\baselinestretch}{1.5}
\begin{document}
\bibliographystyle{IEEEtran}
\bibliography{bibliography.bib}
\begin{table}[htbp]
%\begin{scriptsize}
\scriptsize
\centering
\caption{Reduced Form Estimates using Linear Probability Model}
\label{tab:my-table-}
\begin{tabular}{#{}lcccc#{}}
\hline
\hline
& (1) & (2) & (3) & (4) \\
VARIABLES & A & B & C & D \\
\hline
&&&& \\
&&&& \\
&&&& \\
\hline
\multicolumn{5}{c}{\textit{Note:}Robust standard errors in parentheses *** p$<$0.01, ** p$<$0.05, * p$<$0.1 }
\end{tabular}
%\end{scriptsize}
\end{table}
\appendix
\setcounter{table}{0}
\renewcommand{\thetable}{A\arabic{table}}
\section{Tables}
\begin{table}[htbp]
%\begin{scriptsize}
\scriptsize
\centering
\caption{Reduced Form Estimates using Linear Probability Model}
\label{tab:my-table}
\begin{tabular}{#{}lcccc#{}}
\hline
\hline
& (1) & (2) & (3) & (4) \\
VARIABLES & A & B & C & D \\
\hline
&&&& \\
&&&& \\
&&&& \\
\hline
\multicolumn{5}{c}{\textit{Note:}Robust standard errors in parentheses *** p$<$0.01, ** p$<$0.05, * p$<$0.1 }
\end{tabular}
%\end{scriptsize}
\end{table}
\end{document}

align tabularx header and cell/column with "itemize content" plus table borders are not connected

I have the Tabularx structure as follows how can I align each column or cell based on my need particularly the cells or column with the itemized item. currently, itemized items are aligned to right and I want to be aligned to the center or left. how to align header to the center? also, the intersections on the corner are not connected!!!. what should I do?
Thank you in advanced
Document is as follow:
\begin{document}
\begin{tabularx}{\textwidth}{|*{3}{>{\compress}X|}}
\caption{caption}
\label{tab:table1lable} \\
\toprule
head1 & head2 & head3 \\
\midrule
\endfirsthead
%---------------------------------------------------------------%
\caption{caption} \\ %\hfill(continued)
\toprule
head1 & head2 & head3 \\
\midrule
\endhead
%---------------------------------------------------------------%
\multicolumn{3}{r}{\footnotesize\textit{continued on the next page}}
\endfoot
\bottomrule
\endlastfoot
\hline
A&B&C\\
\hline
col1\_content &
\begin{itemize}
\item col2 list item1
\item col2 list item2
\end{itemize} &
\begin{itemize}
\item col3 list item1
\item col3 list item2
\end{itemize}
\end{tabularx}
\end{document}
full latex package and preamble is below :
\documentclass[
%draft,
final,
paper=a4,
paper=portrait,
fontsize=12pt,
version=last,
twoside,
ngerman,
titlepage,
toc=listof,
toc=bibliography,
usenames,dvipsnames,svgnames,table
]{scrbook}
\usepackage[a4paper,left=3cm,right=4cm,top=2cm,bottom=3cm]{geometry}
\usepackage[T1]{fontenc}
%\usepackage[ngerman]{babel}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[babel]{csquotes}
%\usepackage[babel,german=quotes]{csquotes}
\usepackage[super]{nth}
%
\usepackage{mathptmx}%
\usepackage{tabularx}
\usepackage{setspace}
\onehalfspacing
% Fix for floats
\usepackage{scrhack}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{xcolor}
\usepackage{textcomp}
\usepackage{booktabs}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\usepackage{hyperref}
\usepackage{caption}
% Fehler mit nicht zentrierten Captions beheben
\captionsetup{width=2\textwidth}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage{ifdraft}
\ifdraft{\let\ifxdraft\iftrue}{\let\ifxdraft\iffalse}
% Hurenkind und Schusterjunge
\clubpenalty = 10000
\widowpenalty = 10000
\displaywidowpenalty = 10000
\usepackage{listings}
\lstdefinestyle{code}{
backgroundcolor=\color{white},
basicstyle=\footnotesize\ttfamily,,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
commentstyle=\color{blue},
extendedchars=true,
frame=single,
identifierstyle=,
keepspaces=true,
keywordstyle=\color{Sepia},
language=C,
numbers=left,
numbersep=5pt,
numberstyle=\tiny\color{gray},
rulecolor=\color{black},
showspaces=false,
showstringspaces=false,
showtabs=false,
stepnumber=1,
stringstyle=\color{orange},
tabsize=1,
title=\lstname
}
\lstdefinestyle{text}{
backgroundcolor=\color{white},
basicstyle=\footnotesize\ttfamily,,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
extendedchars=true,
frame=single,
keepspaces=true,
numbers=left,
numbersep=5pt,
numberstyle=\tiny\color{gray},
rulecolor=\color{black},
showspaces=false,
showstringspaces=false,
showtabs=false,
stepnumber=1,
tabsize=1,
title=\lstname
}
\usepackage{enumitem}
\usepackage{tabularx, makecell}
\usepackage{booktabs}
\usepackage{multicol}
\usepackage{ltablex}
\keepXColumns
\makeatletter
\newcommand*{\compress}{\#minipagetrue}
\makeatother
%
\usepackage{colortbl} % color table
\definecolor{maroon}{cmyk}{0,0.87,0.68,0.32}
\newcommand{\gray}{\rowcolor[gray]{.90}}
%
\usepackage{xargs} % Use more than one optional parameter in a new commands
\usepackage[font=small,labelfont=bf,tableposition=top]{caption}
% caption for tabular x
\usepackage{siunitx} % SI Unit
\usepackage{marginnote} % add margin note
%\marginnote{This is a margin note using the geometry package, set at 3cm vertical offset to the line it is typeseted.}[3cm]
\usepackage{tabularx} % table
\title{Business Intelligence to Support an Indicator-Based Waste Incineration Process}
\author{Mohammadjavad Ranji}
\date{\today}
\makeatletter
\let\ThesisTitle\#title
\let\ThesisDate\#date
\makeatother
\begin{document}
\begin{tabularx}{\textwidth}{|*{3}{>{\compress}X|}}
\caption{caption}
\label{tab:table1lable} \\
\toprule
head1 & head2 & head3 \\
\midrule
\endfirsthead
%---------------------------------------------------------------%
\caption{caption} \\ %\hfill(continued)
\toprule
head1 & head2 & head3 \\
\midrule
\endhead
%---------------------------------------------------------------%
\multicolumn{3}{r}{\footnotesize\textit{continued on the next page}}
\endfoot
\bottomrule
\endlastfoot
\hline
A&B&C\\
\hline
col1\_content &
\begin{itemize}
\item col2 list item1
\item col2 list item2
\end{itemize} &
\begin{itemize}
\item col3 list item1
\item col3 list item2
\end{itemize}
\end{tabularx}
\end{document}
The best way to avoid gaps in the line surrounding table cells is not to use vertical lines. Have a look at the user guide of the booktabs package for more information on how to get a professional looking table
as you are using the enumitem package, you can set the leftmargin to avoid extra horizontal space at the left side of the cell
\documentclass{scrbook}
\usepackage{enumitem}
\usepackage{makecell}
\usepackage{booktabs}
\usepackage{ltablex}
\keepXColumns
\makeatletter
\newcommand*{\compress}{\#minipagetrue}
\makeatother
\usepackage{tabularx} % table
\begin{document}
\begin{tabularx}{\textwidth}{#{}*{3}{>{\compress}X}#{}}
\caption{caption}
\label{tab:table1lable} \\
\toprule
head1 & head2 & head3 \\
\cmidrule(r){1-1} \cmidrule(lr){2-2} \cmidrule(l){3-3}
\endfirsthead
%---------------------------------------------------------------%
\caption{caption} \\ %\hfill(continued)
\toprule
head1 & head2 & head3 \\
\cmidrule(r){1-1} \cmidrule(lr){2-2} \cmidrule(l){3-3}
\endhead
%---------------------------------------------------------------%
\multicolumn{3}{r}{\footnotesize\textit{continued on the next page}}
\endfoot
\bottomrule
\endlastfoot
A&B&C\\
\addlinespace
col1\_content &
\begin{itemize}[leftmargin=*]
\item col2 list item1
\item col2 list item2
\end{itemize} &
\begin{itemize}[leftmargin=*]
\item col3 list item1
\item col3 list item2
\end{itemize}
\end{tabularx}
\end{document}

LuaLaTeX: horitontal alignment of verbatim-environments inside a tabularx-environment

First, I'm fully aware that my code is probably not the ideal way to realize what I want to do. However I'm not a professional LaTeX User and this is the way I figured out.
I made a minimal example that hopefully works when compiled(compiler: LuaLaTeX) to display my problem.
I'm trying to make a beamer-frame with a tabularx-table, which contains in-line verbatim-environments on the one hand and equation-environments on the other. The "Y" column-type is a modified form of the "X" environment of tabularx, which I found on another Stackoverflow-thread.
The precise problem now is the following: I'd like the verbatim-expressions to be aligned with the equation-expressions or at least to be vertically centered in each cell.
As mentioned, I'm far from being an expert and I've exhausted all of my Ideas, so I'm very thankful for any form of ideas and suggestions. :)
\documentclass[c, 10pt]{beamer}
\usepackage{polyglossia}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{siunitx}
\usepackage{tabularx}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{siunitx}
\usepackage{placeins}
\usepackage{multirow}
\usepackage{booktabs}
\usepackage{verbatim}
\usepackage{fancyvrb}
\usepackage{nicefrac}
\usepackage{array}
\setdefaultlanguage{english}
\usetheme{JuanLesPins}
\usecolortheme{seahorse}
\newcolumntype{Y}{>{\centering\arraybackslash} X}
\begin{document}
\begin{frame}[fragile, allowframebreaks]{Symbols and Commands}
\begin{block}{\centering \large{Division}}
\begin{table}[h]
\centering
\renewcommand\baselinestretch{0.01}\selectfont
\begin{tabularx}{\textwidth}{Y Y Y}
\toprule
\multicolumn{1}{m{.3\textwidth}}{\centering Code} & \multicolumn{2}{m{.6\textwidth}}{\centering Examples}\\
\midrule
\verb|\dfrac{a}{b}| &
{\begin{equation*}
\dfrac{a}{b}
\end{equation*}} &
{\begin{equation*}
\mathrm{e}^{\dfrac{1}{k_BT}}
\end{equation*}} \\
\verb|\frac{a}{b}| &
{\begin{equation*}
\frac{a}{b}
\end{equation*}} &
{\begin{equation*}
\mathrm{e}^{\frac{1}{k_BT}}
\end{equation*}} \\
\verb|\nicefrac{a}{b}| &
{\begin{equation*}
\nicefrac{a}{b}
\end{equation*}} &
{\begin{equation*}
\mathrm{e}^{\nicefrac{1}{k_BT}}
\end{equation*}} \\
\bottomrule
\end{tabularx}
\end{table}
\end{block}
\end{frame}
\end{document}
To place unnumbered equations in a table, I would rather use inline math instead of equation environments. To get the same rendering of fractions as in equations, add \displaystyle.
Off-topic:
don't load packages multiple times
don't use fragile, allowframebreaks unless they are really necessary for the frame
floating specifier like [H] don't make sense in a document class without floating mechanism
you don't need \centering in beamer tables, they are centred by default
the syntax \large{...} is wrong, \large is a switch and does not take an argument, so it should be \large Division. Anyway it would be better to not put formatting instructions inside an macro argument, but to set the appropriate beamer template that controls the font of the block title
\documentclass[c, 10pt]{beamer}
%\usepackage{polyglossia}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{siunitx}
\usepackage{tabularx}
%\usepackage{amsmath}
%\usepackage{amssymb}
%\usepackage{siunitx}
%\usepackage{placeins}
\usepackage{multirow}
\usepackage{booktabs}
%\usepackage{verbatim}
%\usepackage{fancyvrb}
\usepackage{nicefrac}
\usepackage{array}
%\setdefaultlanguage{english}
\usetheme{JuanLesPins}
\usecolortheme{seahorse}
\newcolumntype{Y}{>{\centering\arraybackslash} X}
\setbeamerfont{block title}{size=\large}
\begin{document}
\begin{frame}
\frametitle{Symbols and Commands}
\begin{block}{\centering Division}
\begin{table}
% \centering
% \renewcommand\baselinestretch{0.01}\selectfont
\begin{tabularx}{\textwidth}{Y Y Y}
\toprule
Code & \multicolumn{2}{c}{Examples}\\
\midrule
\verb|\dfrac{a}{b}| &
$\displaystyle\dfrac{a}{b}$ &
$\displaystyle\mathrm{e}^{\dfrac{1}{k_BT}}$ \\\addlinespace
\verb|\frac{a}{b}| &
$\displaystyle\frac{a}{b}$ &
$\displaystyle\mathrm{e}^{\frac{1}{k_BT}}$ \\\addlinespace
\verb|\nicefrac{a}{b}| &
$\displaystyle\nicefrac{a}{b}$ &
$\displaystyle\mathrm{e}^{\nicefrac{1}{k_BT}}$ \\
\bottomrule
\end{tabularx}
\end{table}
\end{block}
\end{frame}
\end{document}

Resources