How to align this vertical line at the end of the multi-column?
I searched, but I could not find an answer for such problem. This was originated from How to fix this Package array Error: Only one column-spec allowed?
\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[brazil]{babel}
\usepackage[a4paper, margin=2cm]{geometry}
\usepackage{newtxtext,newtxmath}
\usepackage{array,ragged2e,tabularx,multirow}
\begin{document}
\section{Custos}
\begin{tabular}
{|
*1{@{\hspace{3.0pt}}>{ \RaggedRight\arraybackslash\hsize=1.1\hsize }p{3.9cm}|} % Item
*1{@{\hspace{3.0pt}}>{ \RaggedRight\arraybackslash\hsize=1.1\hsize }p{1.9cm}|} % Quantidade
*1{@{\hspace{3.0pt}}>{ \RaggedRight\arraybackslash\hsize=1.1\hsize }p{3.0cm}|} % Valor
*1{@{\hspace{3.0pt}}>{ \RaggedRight\arraybackslash\hsize=1.1\hsize }p{2.6cm}|} % Valor
}
\hline Item & Quantidade & Valor Unitário (R\$) & Valor Total (R\$) \\ \hline
Total & \multicolumn{2}{c|}{} & 165,00 \\ \hline
\end{tabular}
\end{document}
Update 1
I find another question which seems to have the same problem, but it is not easy to understand what they did to fix it. I have to open my diff program to compare the original code and the fixed code:
On the right there is the fixed code, on the left is the original code.
That table goes from this:
Into this:
Update 2
By @David Carlisle comment, I find out that the question mentionated on the Update 1 is different from this one:
the edited question is an entirely different issue, please don't change the question that way invalidating all posted answers. The added question is the common issue of putting | on the wrong side of the cell boundary, the original question is unrelkated to that and just about your mis-use of








\hsize=1.1\hsizeis just wrong. – David Carlisle Apr 27 '17 at 18:56\hsizeI do not know what is it doing exactly. This is the original table: https://tex.stackexchange.com/questions/366155/how-to-write-a-table-a-little-larger-than-the-paragraphs-with-centered-columns, on the answer there, the guy put\hsizeon it, but looks like he did not say why. – user Apr 27 '17 at 19:08|on the wrong side of the cell boundary, the original question is unrelated to that and just about your mis-use of@– David Carlisle Apr 27 '17 at 19:15