logo

여러 tex 파일 하나로 합치는 법 📂Writing

여러 tex 파일 하나로 합치는 법

Code

\include

Use the \include command. Create a new tex file in the same folder as the two files, file1.tex and file2.tex, and write as follows. However, note that a page break will be forced between the two files.

\documentclass{article}
\usepackage[a5paper]{geometry}
\usepackage{kotex}

\begin{document}

\include{file1}
\include{file2}

\end{document}

\input

If you want the contents of the two files to seamlessly continue on the same page, use the \input command.

\documentclass{article}
\usepackage[a5paper]{geometry}
\usepackage{kotex}

\begin{document}

\input{file1}
\input{file2}

\end{document}