2
\renewcommand{\thesection}{§\arabic{section}}

I added the section symbol before the section number but the change is made in places where I don't want to see it like for subsections or theorems.

How to restrict the effects to the following two cases only:

  • in the table of contents for sections only,
  • when the section title is displayed (i.e. when I call \section)

I use a custom class based on amsart which does not modify titles style.

10
  • What is your document class?
    – Bernard
    Jan 30, 2020 at 21:24
  • I use a custom class based on amsart
    – user152057
    Jan 30, 2020 at 21:25
  • For the basic article class, you can do what you want easily with titlesec and its companion package titletoc, but I don't know if it is compatible with your class.
    – Bernard
    Jan 30, 2020 at 21:29
  • What I am afraid of is altering default style using those packages.
    – user152057
    Jan 30, 2020 at 21:31
  • You would have anyway to look at the code to check for the vertical spacing, the font size, &c., and reproduce all these characteristics in the titlesec code.
    – Bernard
    Jan 30, 2020 at 21:42

1 Answer 1

2

Ok, if your class doesn't alter amsart too much, you can easily create what you want by redefining \sectionname.

If the space between § and the number isn't wanted use \renewcommand*\sectionname{§\ignorespaces} instead.

\documentclass[]{amsart}

\usepackage{duckuments}

\renewcommand*\sectionname{§}

\begin{document}
\tableofcontents
\duckument
\end{document}

First page of output:

enter image description here

You must log in to answer this question.