How do I left align the text and align these equal signs? As for the equal sign I used \,
and it kind of works but I want to be more close. Is there a smaller spacing than this or any way to better align these equal signs?
The expected output is something like this.
\documentclass{article}
\usepackage[utf8]{inputenc}
\begin{document}
Input data \,\, = 2000\\
Deleted data \,\,\,\,\,\,\,\,= 500\\
Remaining data = 2000 - 500 =1500
\end{document}
Sorry that I probably should have mentioned that I'm going to put the text inside a table like this. The solution @Mico gave works but not in this table. So I think the table change the formating somehow.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{booktabs}
\begin{document}
\begin{table}[]
\centering
\caption{This is a table}
\label{tab: this is a table}
\begin{tabular}{cc} \\ \toprule
\textbf{No} & \textbf{Example} \\ \midrule
1 & 9 \\
2 & 5 \\
3 & 3 \\ \midrule
\multicolumn{2}{l}{\begin{tabular}[c]{@{}l@{}}
\[
\setlength\arraycolsep{0pt}
\begin{array}{ L @{{}={}} l }
\text{Input data} & 2000 \\
\text{Deleted data} & 500 \\
\text{Remaining data} & 2000-500=1500
\end{array}
\]
\end{tabular}} \\ \bottomrule
\end{tabular}
\end{table}
\end{document}
tabular
?tabular
s, so why not just use atabular
with two columns that is placed in the cell? Aligning things will be very easy then.