GeneralAchemso numbering the sections and cross reference

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
satish2414
Posts: 3
Joined: Thu Nov 03, 2016 5:09 am

Achemso numbering the sections and cross reference

Post by satish2414 »

Hello

At present, the achemso package doesn't number the sections by default in the following MWE. I was wondering how to make the sections numbered such that I can cross-reference sections.

Code: Select all

\documentclass[journal=jpccck,manuscript=article]{achemso}
\usepackage[T1]{fontenc}   
\usepackage[sort&compress,numbers,super]{natbib} 
\AtBeginDocument{\nocite{achemso-control}}
\usepackage{caption}
\usepackage{booktabs}
\DeclareCaptionLabelFormat{myformat}{#1~S#2}
\captionsetup{labelformat=myformat}

\title{Sample Title}
\begin{document}

\section{Section1}
\label{sec1}
This is section 1. 

\section{Section2}
I want to cite the section as Section~\ref{sec1}.
%The last line should ideally be numbered "Section 1". 
\end{document}
Thank you.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Achemso numbering the sections and cross reference

Post by Johannes_B »

Use \SectionNumbersOn in the preamble.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply