# How to remove extra space between the \ref and text

How to remove extra spaces between \ref{...} and text? This is the example:

\begin{table}
\begin{center}
\caption{Some text\label{tab1}}
\begin{tabular*}{500pt}{@{\extracolsep\fill}lccD{.}{.}{3}c@{\extracolsep\fill}}
Table information
\end{tabular*}
\end{center}
\end{table}
(see Table \ref{tab3}, O9)


EDIT

Thats the preambla of my prject:


\usepackage{unicode-math}
\usepackage{float}
\renewcommand{\thempfootnote}{\arabic{mpfootnote}}
\usepackage{placeins}
\usepackage{longtable}
\usepackage{hyperref}
\hypersetup{
filecolor=magenta,
urlcolor=cyan,
}
\usepackage{ltablex}
\usepackage{graphicx}
\usepackage{amsmath}
\articletype{Article Type}%
\usepackage{newunicodechar}
\usepackage{caption}


• Please give a complete example, starting with \documentclass and ending with \end{document}. Normally, what you describe does not happen. So some additional code in your preamble or some package introduce this space. – gernot Dec 27 '20 at 16:12
• Unrelated, but don't use center inside of table, this gives improper spacing. Instead use \centering. – Skillmon Dec 27 '20 at 16:21
• the fragment you show should not produce a space after \ref. Do not post disconnected fragments, post a single small complete example that produces the output shown. – David Carlisle Dec 27 '20 at 17:11
• \articletype is used in several publishers' classes. Without knowing which one you're using it becomes pure guessing. – egreg Dec 27 '20 at 17:23

• Your preamble code fragment is not complete. In it are missed
• document class (assumable article)
• package dcolumn for used D columns in table
• contain undefined command \articletype{Article Type}
• Package hyperref had to ve load tha last in preamble (with rare exceptions which are not present in your code snippets)
• Table is slightly unusual (two @{\extracolsep\fill} instructions)

With completing and correction your preamble and table:

\documentclass{article}
%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%

\usepackage{unicode-math}
\usepackage{newunicodechar}
\usepackage{amsmath}

\usepackage{float}
\renewcommand{\thempfootnote}{\arabic{mpfootnote}}
\usepackage{placeins}
\usepackage{dcolumn, longtable, ltablex}
\usepackage{graphicx}
\usepackage{caption}

\usepackage{hyperref}
\hypersetup{
filecolor=magenta,
urlcolor=cyan,
}

\begin{document}
\begin{table}
\centering
\caption{Some text}
\label{tab1}
\begin{tabular*}{\linewidth}{@{\extracolsep\fill}lccD{.}{.}{3}c@{\extracolsep\fill}}
\hline
Table information & text    & text  & 123.456   \\
\hline
\end{tabular*}
\end{table}
(see Table \ref{tab1}, O9)
\end{document}