0

I'm TeXing the paper Sur un r ́esultat de Waldspurger by Jacquet, and I found that the paper has the following format:

enter image description here

Here (3.2) stands for the subsection 3.2, and the equation numbering 3.1.11 comes from subsection and corresponding number of it. I know how to handle (3.1.11) for the equation, but I have no idea how to do such a numbering for subsection (3.1). I found this answer which remove subsection title, but then I have to manually put the numbers.


Edit: here are some more about what I've done. As I said, I used the solution in the above linked answer

\newcommand{\fakesubsection}[1]{%
  \par\refstepcounter{subsection}% Increase subsection counter
  \subsectionmark{#1}% Add subsection mark (header)
  \addcontentsline{toc}{subsection}{\protect\numberline{\thesubsection}#1}% Add subsection to ToC
  % Add more content here, if needed.
}

and put this for each subsection. This somewhat generate ghost subsection, which does not have titles but still counts well. Now I want to add small numbering as in the picture I uploaded above, like (3.2) in the second paragraph. I'm using article class but it doesn't matter for me to change this to anything else. Just want to have a consistent numbering as the original paper (link).

  • 1
    Please tell us which document class you employ. – Mico Dec 13 '22 at 10:17
  • 1
    Hi Seewoo Lee and welcome to TeX.SX. In its current form, your question might not receive many answers. Please take a look at the How to Ask-page and try to improve your question according to the guidance found there. This may require you to show some effort on your part in terms of attempting a solution. If you have questions about what to do or if you don't quite understand what this means, please ask for clarification using the add comment function. – Stefan Pinnow Dec 13 '22 at 14:13
  • @Mico I'm using article, but it doesn't matter for me to change this to anything else. – Seewoo Lee Dec 13 '22 at 21:12
  • @StefanPinnow Thanks, I edited. – Seewoo Lee Dec 13 '22 at 21:12

1 Answers1

2

You can use titlesec.

\documentclass[leqno]{article}
\usepackage{amsmath}
\usepackage{titlesec}

\titleformat{\subsection}[runin] {\normalfont\normalsize} {(\thesubsection)} {0pt} {} \titlespacing{\subsection} {\parindent}% space before the title {\topsep}% vertical space above subsections {\fontdimen2\font}% a normal space

\labelformat{equation}{\thesubsection.\theequation} \counterwithin{equation}{subsection} \renewcommand{\theequation}{\arabic{equation}}

\begin{document}

\setcounter{section}{2} % just to reproduce your numbers

\section{Test}

\subsection{} \setcounter{equation}{10} % just to reproduce your numbers

some text for the subsection some text for the subsection some text for the subsection some text for the subsection some text for the subsection some text for the subsection some text before the equation some text before the equation some text before the equation some text before the equation some text before the equation some text before the equation \begin{equation}\label{test} 1=1 \end{equation}

\subsection{}

some text for the subsection with \eqref{test} some text for the subsection some text for the subsection some text for the subsection some text for the subsection some text for the subsection some text for the subsection some text for the subsection

\end{document}

enter image description here

If some of your subsections have a title, it can be managed, but you should point out the desired format.

egreg
  • 1,121,712