0

I have a project like this:

enter image description here

For a better organization, the sections of the paper are separated. I am trying to, for example, in Section III make a reference to Section II. Is there an easy way to do this?

In other words: in Section II I'd like to write something like: as we can see in Section~\ref{sec:name_of_section_III}, blah blah blah.

1 Answer 1

2

\input{filename} inserts the contents of filename.tex as if written in the main file, see

When should I use \input vs. \include?

Therefore, you should just add a label after the section command. Note you will have to process LaTeX twice. Once to put the label into the .aux file and again to get the section number into the output pdf.

\documentclass[12pt]{article}

\begin{document}

\section{Related work}
As we can see in Section~\ref{sec:preliminaries}, blah blah blah.

\section{Preliminaries}\label{sec:preliminaries}
Blah blah blah.

\end{document}
1
  • Thanks a lot, it was really useful.
    – Joncarre
    May 7, 2021 at 14:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .