# Decimal Alignment in tabulary package

How to achieve Decimal alignment as well auto fit table in tabulary package, below is my code, or is there any other way to achieve both, please guide,

\documentclass{article}

\renewcommand{\arraystretch}{1.5}

\usepackage{tabulary}

\usepackage{showframe}

\usepackage[newcommands]{ragged2e}

\begin{document}

\begin{table}
\caption{Sample Table 1 }\label{table_specrot}
\begin{center}
\begin{tabulary}{0.9\textwidth}{LLCL}
\hline
Definition and Validation of Dynamic Video Reframing based on &1.1 & Definition and Validation of & Definition and Validation of Dynamic \\
\hline
Definition and Validation of Dynamic Video Reframing based on &1.441 & Definition and Validation of & Definition and Validation of Dynamic \\
Definition and Validation of Dynamic &1.2 & Definition and Validation of  & Definition and Validation of \\
\hline
\end{tabulary}
\end{center}
\end{table}

\end{document}


Just use an aligned column, as normal:

\documentclass{article}

\renewcommand{\arraystretch}{1.5}

\usepackage{tabulary}

\usepackage{showframe}

\usepackage[newcommands]{ragged2e}

\usepackage{dcolumn}

\begin{document}

\begin{table}
\caption{Sample Table 1 }\label{table_specrot}
\centering
\begin{tabulary}{0.9\textwidth}{LD..{1.2}CL}
\hline
Definition and Validation of Dynamic Video Reframing based on &1.1 & Definition and Validation of & Definition and Validation of Dynamic \\
\hline
Definition and Validation of Dynamic Video Reframing based on &1.441 & Definition and Validation of & Definition and Validation of Dynamic \\
Definition and Validation of Dynamic &1.2 & Definition and Validation of  & Definition and Validation of \\
\hline
\end{tabulary}

\end{table}


There's no requirement that all columns should be LCR:

\documentclass{article}

\usepackage{tabulary,siunitx}

\usepackage{showframe}

\usepackage[newcommands]{ragged2e}

\begin{document}

\begin{table}
\caption{Sample Table 1 }\label{table_specrot}
\medskip
\centering
\begin{tabulary}{0.9\textwidth}{LS[table-format=1.3]CL}
\hline
Definition and Validation of Dynamic Video Reframing based on &1.1 & Definition and Validation of & Definition and Validation of Dynamic \\
\hline
Definition and Validation of Dynamic Video Reframing based on &1.441 & Definition and Validation of & Definition and Validation of Dynamic \\
Definition and Validation of Dynamic &1.2 & Definition and Validation of  & Definition and Validation of \\
\hline
\end{tabulary}
\end{table}

\end{document}


I removed the setting to \arraystretch. If you want a better layout, use booktabs.

\documentclass{article}

\usepackage{tabulary,siunitx,booktabs}

\usepackage{showframe}

\usepackage[newcommands]{ragged2e}

\begin{document}

\begin{table}
\caption{Sample Table 1 }\label{table_specrot}
\medskip
\centering
\begin{tabulary}{0.9\textwidth}{LS[table-format=1.3]CL}
\toprule
Definition and Validation of Dynamic Video Reframing based on &1.1 & Definition and Validation of & Definition and Validation of Dynamic \\
\midrule
Definition and Validation of Dynamic Video Reframing based on &1.441 & Definition and Validation of & Definition and Validation of Dynamic \\
Definition and Validation of Dynamic &1.2 & Definition and Validation of  & Definition and Validation of \\
\bottomrule
\end{tabulary}
\end{table}

\end{document}


You can also use dcolumn, instead of siunitx (but I recommend updating your TeX distribution anyway).

\documentclass{article}

\usepackage{tabulary,dcolumn,booktabs}

\usepackage{showframe}

\usepackage[newcommands]{ragged2e}

\begin{document}

\begin{table}
\caption{Sample Table 1 }\label{table_specrot}
\medskip
\centering
\begin{tabulary}{0.9\textwidth}{LD{.}{.}{1.3}CL}
\toprule
Definition and Validation of Dynamic Video Reframing based on &1.1 & Definition and Validation of & Definition and Validation of Dynamic \\
\midrule
Definition and Validation of Dynamic Video Reframing based on &1.441 & Definition and Validation of & Definition and Validation of Dynamic \\

• @user52124 Surely not: MiKTeX is currently at version 2.9. I added a version using dcolumn. But update your TeX system nonetheless. – egreg Jul 13 '16 at 12:22