I have a LaTeX table (below is a snippet) that contains two values ββ(value 1: standard error, value 2: evaluation) after each \ underset. I would like to edit by adding \ bf {} to the second value after each \ underset if the second value divided by the first value is greater than 2 or less than -2.
For example, after the first \ underset (after "interception") -9.686 / 1.742 is <-2, so I want the original {-9.686} to read as \ bf {-9.686}. I have hundreds of variables, so manual transition is not preferred. I only work with Notepad ++, but if necessary, I can try Python. Any advice for regular expression and / or a suitable platform (editor / parser, etc.) for a PC would be much appreciated.
documentclass[letter]{article} \usepackage{amsmath, amsthm, amssymb} % Additional math packages \begin{document} \begin{table}[hptb] \begin{center} \begin{tabular}{|l||c|c|c|c|c|c|c|} \hline (Intercept)&$\underset{(1.742)}{-9.686}$&$\underset{(0.907)} {-9.085}$&$\underset{(0.663)}{-9.724}$&$\underset{(0.565)}{-9.077}$&$\underset{(0.619)} {-7.601}$&$\underset{(0.838)}{-5.273}$&$\underset{(1.120)}{-3.417}$\\ \end{tabular} \end{center} \end{table} \end{document}
I would like the output table to read like this.
Output table:
\begin{document} \begin{table}[hptb] \begin{center} \begin{tabular}{|l||c|c|c|c|c|c|c|} \hline (Intercept)&$\underset{(1.742)}{\bf{-9.686}}$&$\underset{(0.907)} {\bf{-9.085}}$&$\underset{(0.663)}{-9.724}$&$\underset{(0.565)}{\bf{- -9.077}}$&$\underset{(0.619)}{\bf{-7.601}}$&$\underset{(0.838)} {-5.273}$&$\underset{(1.120)}{-1.417}$\\ \end{tabular} \end{center} \end{table} \end{document}
source share