I am writing a thesis using my institution's template. However, when I use \ref{label}
command, there is a spacing after the label and punctuation/comma. My working is as follows:
\makeatletter
\let\my@xfloat\@xfloat
\makeatother
\documentclass[oneside,12pt,a4paper]{book}
%\documentclass[12pt,a4paper]{book}
\usepackage{UTMThesis, enumerate, amsfonts, longtable, qtree, etoolbox, array, rotating, pgf, tikz, tikz-cd, algorithm, csquotes}
\makeatletter
\def\@xfloat#1[#2]{
\my@xfloat#1[#2]%
\def\baselinestretch{1}%
\@normalsize \normalsize
}
\makeatother
\allowdisplaybreaks
\usetikzlibrary{arrows, matrix, positioning, shapes, shapes.geometric, calc, intersections, decorations.pathreplacing}
\newcommand{\tikznode}[2]{\relax
\ifmmode%
\tikz[remember picture,baseline=(#1.base),inner sep=0pt] \node (#1) {$#2$};
\else
\tikz[remember picture,baseline=(#1.base),inner sep=0pt] \node (#1) {#2};%
\fi}
\let\openbox\relax
\let\iint\relax
\let\iiint\relax
\let\iiiint\relax
\let\idotsint\relax
\newcommand*{\qed}{\hfill\ensuremath{\square}}
%-------------------------------------------------------------
\usepackage{cite} % change cite from [1,2,3] to [1-3] etc for number system
\makeatletter % change from
\renewcommand{\@biblabel}[1]{#1.} % [1] to 1. etc
\makeatother % in list of references
%-----------------------------------------------------------
\setlength{\voffset}{-2.1cm}
\setlength{\hoffset}{-.4cm}
%--------------------------------------------------------
\font\fiverm=cmr5
%\input{Pictex.tex} % using pictex
%---------------------------------------------------------
%\pagestyle{plain}
%-------------------------------------------------------
\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{}
\chead{}
\rhead{}
\lfoot{}
\cfoot{\vspace{-.35cm}\thepage} %
\rfoot{}
\renewcommand{\headrulewidth}{0pt}
%-------------------------------------------------------
\begin{document}
\frontmatter
\chapter{INTRODUCTION}
\section{Background and motivation}
\label{section:background}
In Section \ref{section:background}, we talked about...
\backmatter
\end{document}
that produces:
How can I fix this?
UTMThesis.sty
. Please tell us more about this style file. Is it available online?\renewcommand{\thesection}{\thechapter.\arabic{section}\quad}
withinUTMThesis.sty
. Instead the style should use\@seccntformat
to set the space in the section counter formatting; not set it as part of the representation.