-4

I am writing a long lex file, and getting tired of scrolling up and down. So does anyone know if there is a method that can allow me to write multiple short lex files and combine them to generate one pdf file?

1 Answers1

1

Use \input{sub_file} in your main tex file to include the latex content of the sub_file in the main file:

Main file:

\documentclass{article}
\usepackage[utf8]{inputenc}
\begin{document}
    \section{Section 1}
        \input{section1}
\end{document}

Sub file {section1}:

\subsection{A subsection}
Some \LaTeX{} to fill the section
Math
  • 2,399
  • 2
  • 20
  • 22