Hello Mara,
First off, if I've given offense to you with my earlier posting by
calling something "annoying", I apologize. My main point was to point
out (pun intended) that a seemingly plausible solution can have some
undesirable consequences -- and to provide a different solution,
naturally.
If I understand your follow-up message correctly, you contend that the
code you proposed to the list does not have the "annoying"
consequences I stated it has. I must respectfully disagree. Consider
the following minimal working example (MWE), which contains your code
in the preamble and goes on to put it to the test.
%%% mwe.tex
\documentclass{article}
\renewcommand\thesection{\arabic{section}.}
\renewcommand\thesubsection{\arabic{section}.\arabic{subsection}.}
\renewcommand{\theequation}{\arabic{section}.\arabic{equation}}
\renewcommand{\thefigure}{\arabic{section}.\arabic{figure}}
\begin{document}
\section{First section}\label{sec:1}
\subsection{First subsection of first section}\label{sec:11}
Here's a cross-reference to Section \ref{sec:2}. And here's one to
Section \ref{sec:3}.
\begin{figure}[h]\caption{Empty Figure A}\label{fig:1}\end{figure}
\begin{equation}\label{eq:einstein}
E=m\,c^2
\end{equation}
\section{Second section}\label{sec:2}
As was claimed in Section \ref{sec:1}, we must be careful to \ldots
\begin{figure}[h]\caption{Empty Figure B}\label{fig:2}\end{figure}
\begin{equation}\label{eq:euler}
e^{i\pi}-1=0
\end{equation}
\begin{equation}\label{eq:magritte}
\hbox{``This is not an equation!'' (with apologies to Ren{\'e}
Magritte)}
\end{equation}
\section{Third section}\label{sec:3}
Here's a cross-reference to Subsection \ref{sec:11}.
\begin{figure}[h]\caption{Empty Figure C}\label{fig:3}\end{figure}
\begin{equation}\label{eq:trivial}
1+1=2
\end{equation}
\end{document}
%%% end mwe.tex
Run latex on this file twice (to resolve the cross-references). Study
the output and notice that there are three problems. (i) There are
two consecutive dots when the cross-reference is at the end of a
sentence, and one dot followed immediately by a comma if the cross-
reference is followed by a comma. If the label "annoying" for the
double-dot and dot-comma issues is too harsh, how about "unwelcome" or
"undesirable"? (ii) The figures are numbered 1.1, 2.2, and 3.3,
whereas (I think) most readers would expect them to be numbered 1.1,
2.1, and 3.1. (iii) The same problem applies to the equation numbers,
which ought to appear as (1.1), (2.1), (2.2), and (3.1) but instead
show up as (1.1), (2.2), (2.3), and (3.4).
Obtaining a solution for problem (i) requires code along the lines
that Peter Flynn and I proposed in our earlier messages. Notice that
problems (ii) and (iii) both arise because the equation and figure
numbers are not reset each time a new section starts. Fortunately,
fixing these problems is very easy if the amsmath package is loaded,
by using that package's \numberwithin macro. Consider the following
MWE, in which I've simplified the code relative to the first MWE to
focus on the issue of resetting the figure and equation numbers each
time a new section starts.
%%% mwe2.tex
\documentclass{article}
\usepackage{amsmath}
\numberwithin{figure}{section}
\numberwithin{equation}{section}
\begin{document}
\section{First section}
\begin{figure}[h]\caption{Empty Figure A}\end{figure}
\begin{equation}\label{eq:einstein}
E=m\,c^2
\end{equation}
\section{Second section}
\begin{figure}[h]\caption{Empty Figure B}\end{figure}
\begin{equation}\label{eq:euler}
e^{i\pi}-1=0
\end{equation}
\begin{equation}\label{eq:magritte}
\text{``This is not an equation!'' (with apologies to Ren{\'e}
Magritte)}
\end{equation}
\section{Third section}
\begin{figure}[h]\caption{Empty Figure C}\end{figure}
\begin{equation}\label{eq:trivial}
1+1=2
\end{equation}
\end{document}
%%% end mwe2.tex
Sincerely, Mico.