I have this table, and as you can see I make the last arrow longer with loads of spaces. Is there a better way to make it as long as the other \plusarrow
s but at the same time with a centered text (only the equal sign)?
\documentclass[a4paper]{article}
\usepackage{amsmath}
\usepackage{ulem}
\usepackage{booktabs}
\newcommand{\plusarrow}{$\xrightarrow{+\Delta V \%}$}
\newcommand{\bmin}{\textbf{--}}
\begin{document}
\begin{table}[H]
\centering
\begin{tabular}{c l r c r}
& \textbf{Ricavi} & 2000 & \plusarrow{} &
\textbf{2140.00}\\
\bmin{} & Costi operativi \dashuline{variabili} [660] & &
\plusarrow{} & \textbf{706.20}\\
& Acquisti materie prime & 150\\
& Provvigioni passive & 180\\
& Lavoro straordinario & 20\\
& Lavorazioni esterne & 310\\
\midrule
= & \textbf{Margine di contribuzione} & 1340 & \plusarrow{} &
\textbf{1433.80}\\
\bmin{} & Costi operativi \dashuline{fissi} [860] & &
$\xrightarrow{\ ~~=~~\ }$ & \textbf{860.00}\\ %% HERE
& Lavoro ordinario & 420\\
& Ammortamenti & 210\\
& Affitti passivi & 90\\
& Canoni di leasing & 140\\
\midrule
= & \textbf{Risultato operativo lordo} & 480 & & \textbf{573.80}
\end{tabular}
\end{table}
\end{document}
This is the current result:
While it is perfectly fine, I don't like the hack that I used to make it work.
Best Answer
Simple solution using
Note that
\equalarrow
already contains$ $
in its definition. Also, I added the @Heiko's suggestion to adjust the vertical space created by the invisible content.