I'm writing a draft of my notes with Latex. They are basically definitions related to a particular concept from different sources. Therefore I have used the command \section
to highlight the concept that I'm talking about.
At the same time, I would like to attach right after the title of the section the page number in which I have found the information because it helps me to find it in the bibliography later on. But in doing so, as you would expect, the text appears below the title's section.
Do you know any way to change the \section
command to let me introduce some text without breaking the line?
I have seen some questions related to my post but they use shortcuts to avoid redefining the \section
command (like using lists). I think that the titlesec
package would help me, but I don't know how to use it. In this respect, it would be really helpful if you could help me to understand how to use it properly.
Thank you!
Edit(2): Here is MWE:
\documentclass{article}
\usepackage{titlesec}
\begin{document}
\section*{Name of the section} (page)
\paragraph*{Name of the section} (page)
\titleformat*{\paragraph}{\Large \bfseries}
\paragraph*{Name of the section} (page)
\end{document}
Edit: Regarding @Zarko comment, I would like to use the section command and do what it can be done with the paragraph one. My question it would be how to modify the section command to act as if it was a paragraph with respect to the line breaking of the line after the head of the section.
\documentclass{...}
and ending with\end{document}
.\paragraph{...}
.{\mdseries\protect\cite{...}}
right in the section title?