I wish to number my equations according to their (sub)section so when I reference them it shows for example (1.1) but my sections and subsections should not display their number so the section should look like "SECTION" and not "1 SECTION" as well as the subsections that should look like "SUBSECTION" and not "1.1 SUBSECTION"
this is my current code that does not show the numbers but does not number the equations as wished:
\documentclass[pdftex,10pt,a4paper]{article}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]
{geometry}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{dcolumn}
\usepackage[english]{babel}
\usepackage{siunitx}
\usepackage{mhchem}
%Command to not display numbers of sections and subsections...
\makeatletter
\renewcommand\thesection{}
\renewcommand\thesubsection{}
\renewcommand\thesubsubsection{}
\makeatother
% command to number equations according to the their sections
\numberwithin{equation}{section}
\begin{document}
\section{Introduction}
\subsubsection{Theoretical principles}
here comes some text and the first reference \eqref{eq:lnpp0} the text goes on
then the first eqation is implemented.
\begin{equation}\label{eq:lnpp0}
\mathrm{ln} \dfrac{p}{p_0} \, = \, \dfrac{\Delta_\mathrm{v}H}{R}\left( \dfrac{1}{T_0}-\dfrac{1}{T}\right)
\end{equation}
Rearranging the equation the formula gives you $\Delta_\mathrm{v}H$
for the enthalpy of vaporization which can be used to
determine the entropy of vaporization:
\begin{equation}\label{eq:deltaS}
\Delta_\mathrm{v}S\,=\, \dfrac{\Delta_\mathrm{v}H}{T}
\end{equation}
\section{The second section}
This is the equation i want to reference to \eqref{eq:lnpp0}
\end{document}
This code does not display the numbers of the sections and subsections (as wished) but does not properly number the equations, numbers them (.1) instead of (1.1)
PS: this is my first question so I'm happy about comments for further improvement of my "asking-style"
Best Answer
You should not redefine
thesection
etc in to nothing. But redefine the sectional levels usingtitlesec
I have re-defined all levels for your reference so that no level shows the number.
With this in preamble we get
But this may confuse your readers.
Full code: