I just want to replace the first @{} as @{ \extracolsep{\fill} } show in MWE's comment.
When try to use \patchcmd, it failed!
You know, I have a lot of this style table in my document. So want to some automatic code to do this patch work.
Thanks a lot in advance!
MWE:
\documentclass{article}
\usepackage{longtable,booktabs}
\setlength\LTleft{0pt}
\setlength\LTright{0pt}
\begin{document}
\begin{longtable}[]{@{}llll@{}}
%\begin{longtable}[]{@{\extracolsep{\fill}}llll@{}}
\caption{\label{tab:simple-table} A Table}\tabularnewline
\toprule
Name & Income & Job & Color \
\midrule
\endfirsthead
\toprule
Name & Income & Job & Color \
\midrule
\endhead
Jane & 123456 & Research Assistant & red \
John & 50 & N/A & blue \
William & 3200 & Cleaner & blue \
\bottomrule
\end{longtable}
\end{document}

.texis produced from pandoc. 2)Both replace the@{ }as the same@{ \extracolsep{\fill} }also ok, but HOW to do this patch? – user26992 Sep 10 '22 at 08:17llll? (I don't have pandoc installed) – David Carlisle Sep 10 '22 at 08:22pandoc.exeto convert the.markdownto.tex. You know, the other tables may be have different tabular, such asrcclllorcccrrrrrrrrrrrlll, not fixed settings. – user26992 Sep 10 '22 at 08:40