[Tex/LaTex] Align column content along \div symbol

horizontal alignmenttables

I would like to know if there is a way to align the content of a column along the position of a \div symbol. I know how to do it if there is a comma, but I don't know how to align along a different symbol.

\small
\begin{tabular}{lccccc}
\toprule
\textsc{Schema impiantistico} & $P_e$ [MW] & $\eta_I$ [\%] & $\eta_e$ [\%] & $\eta_t$ [\%] & $I_e$ \\ 
\midrule
Turbina a vapore a contropressione & $1\div 25$ & 88 & 15 & 73 & 0.17 \\ 
Turbina a vapore a condensazione e spillamento & $10\div 500$ & 65 & 30 & 35 & 0.46 \\ 
\midrule
Motore alternativo a recupero integrale & $0.1\div 10$ & 86 & 40 & 46 & 0.47 \\ 
Motore alternativo a recupero ad alta T & $0.1\div 10$ & 65 & 40 & 25 & 0.62 \\ 
Turbina a gas a recupero semplice & $1\div 100$ & 80 & 30 & 50 & 0.38 \\ 
Turbina a gas con post-combustione & $1\div 100$ & 83 & 25 & 58 & 0.30 \\ 
Turbina a gas con iniezione vapore & $5\div 60$ & 50 & 45 & 5 & 0.90 \\ 
Ciclo combinato (contropressione) & $20\div 50$ & 80 & 45 & 35 & 0.56 \\ 
Ciclo combinato (condensazione e spillamento) & $50\div 400$ & 70 & 50 & 20 & 0.71 \\ 
\bottomrule
\end{tabular} 
\end{table}

Best Answer

You can use the dcolumn package; however, instead of \div in the body of the table you need to choose an alphabetic symbol (here ?).

\documentclass{article}
\usepackage{booktabs,dcolumn}
\begin{document}
\small
\begin{tabular}{l D{?}{\,\div\,}{3.3} ccccc}
\toprule
\textsc{Schema impiantistico} &
 \multicolumn{1}{c}{$P_e$ (MW)} &
 $\eta_I$ (\%) &
 $\eta_e$ (\%) &
 $\eta_t$ (\%) &
 $I_e$ \\
\midrule
Turbina a vapore a contropressione             &  1  ?  25 & 88 & 15 & 73 & 0.17 \\
Turbina a vapore a condensazione e spillamento & 10  ? 500 & 65 & 30 & 35 & 0.46 \\
\midrule
Motore alternativo a recupero integrale        & 0.1 ?  10 & 86 & 40 & 46 & 0.47 \\
Motore alternativo a recupero ad alta T        & 0.1 ?  10 & 65 & 40 & 25 & 0.62 \\
Turbina a gas a recupero semplice              & 1   ? 100 & 80 & 30 & 50 & 0.38 \\
Turbina a gas con post-combustione             & 1   ? 100 & 83 & 25 & 58 & 0.30 \\
Turbina a gas con iniezione vapore             & 5   ?  60 & 50 & 45 &  5 & 0.90 \\
Ciclo combinato (contropressione)              & 20  ?  50 & 80 & 45 & 35 & 0.56 \\
Ciclo combinato (condensazione e spillamento)  & 50  ? 400 & 70 & 50 & 20 & 0.71 \\
\bottomrule
\end{tabular}
\end{document}

enter image description here

Related Question