If I've the following code that is autogenerated (adapted here for sharing) from another tool, that I cannot modify,:
\documentclass[oneside,a4paper]{book}
\usepackage{longtable}
\usepackage{tablefootnote}
\usepackage{booktabs}
\begin{document}
\begin{longtable}[]{@{}ll@{}}
\toprule
\begin{minipage}[b]{0.29\columnwidth} Value\strut \end{minipage} & \begin{minipage}[b]{0.65\columnwidth} Description\strut \end{minipage}\tabularnewline
\midrule
\endhead
\begin{minipage}[t]{0.29\columnwidth} \textbf{Value 1}\strut \end{minipage} & \begin{minipage}[t]{0.65\columnwidth} Some details for 1\strut \end{minipage}\tabularnewline
\begin{minipage}[t]{0.29\columnwidth} \textbf{Value 2}\strut \end{minipage} & \begin{minipage}[t]{0.65\columnwidth} Some details for 2\strut \end{minipage}\tabularnewline
\bottomrule
\end{longtable}
\end{document}
Is there a way that I can easily replace \tabularnewline
with \hline
in the latex preamble somehow?
I've tried things like this, but with no success. Relax seems to work, but the switch to hline does not.
\let\toprule\hline
\let\midrule\hline
\let\bottomrule\relax
\let\tabularnewline\hline
I'm basically trying to get horizontal lines at the top, bottom and after every row, so that it ends up looking like this (done using manual search and replace as a proof of concept):
Is this possible?
\tabularnewline
to\hline
as that is not what dis macro does. You might be able to redefine it in to something silimar to\\\hline
. Note that I would still use\toprule
and friends as they have better spacing than\hline
.