0

I have a following problem. In my main .tex I use this code:

%-----<<< MAIN MATTER >>>-----
\mainmatter                                                     %start arabic pagination from 1
\autohdr                                                                                %automatic headers for main matter
\input{02_Mainmatter/01_Intro.tex}              %input field
\input{02_Mainmatter/02.tex}
\input{02_Mainmatter/03.tex}
\input{02_Mainmatter/04.tex}
\input{02_Mainmatter/05.tex}
\input{02_Mainmatter/99_Concl.tex}
\clearpage
%-----<<< -------- >>>-----

The problem is that each chapter starts on a new page. Look:

enter image description here

How can I make every chapter to start below the last chapter? Without blank spaces? Thanks a lot.

EDIT: I tried to change \chapter to \section but it totally destroyed my content: enter image description here

EDIT2: Here is the whole code:

%% --------------------------------------------------------------------
%% thesis.tex -- MAIN FILE (the one that you compile with LaTeX)
%% --------------------------------------------------------------------
%% version 1.8.09.02.16 (beta)

%-----<<<<<<<<<<<< START >>>>>>>>>>>>----- \documentclass [a4paper,12pt]{report}
\usepackage[cp1250]{inputenc} %\usepackage[latin2]{inputenc}
\usepackage{multirow}
\usepackage{rotating} \usepackage{graphics} %\usepackage[a-2u]{pdfx} \usepackage{lmodern} \usepackage{comment} \usepackage[T1]{fontenc} %\usepackage{texcomp}
\usepackage[yyyymmdd]{datetime}

                                        %for Czechoslovak characters

%-----<<<<<<<<<<<< STYLES >>>>>>>>>>>>-----
\usepackage{Styles/Head} \usepackage{Styles/Mystyle} \usepackage{hyperref} \usepackage{threeparttable} \usepackage{textcomp} \usepackage{comment}

%-----<<< --------------------------------- >>>-----

%-----<<<<<<<<<<<< DOCUMENT >>>>>>>>>>>>----- \begin{document} \frontmatter %lowercase roman pagination for front matter \clubpenalty 9999 %not so many orphants \widowpenalty 9999 %not so many widows

%-----<<< HEAD >>>----- \pagestyle{empty} %no visible pagination here

%-----<<< TABLE OF CONTENTS >>>----- \pagestyle{fancy} %headers style \fancyhead[LO]{\sffamily Contents} %headers in sans serif and not in uppercase \phantomsection %bookmark anchor \pdfbookmark[0]{Contents}{toc} %add bookmark \tableofcontents \label{toc} %\clearpage %-----<<< ----------------- >>>-----

%-----<<< MAIN MATTER >>>----- \mainmatter %start arabic pagination from 1 %\autohdr

\input{02_Mainmatter/01_Intro.tex} %input field \input{02_Mainmatter/02.tex} \input{02_Mainmatter/03.tex} \input{02_Mainmatter/04.tex} \input{02_Mainmatter/05.tex} \input{02_Mainmatter/99_Concl.tex} \clearpage %-----<<< -------- >>>-----

%-----<<< REFERENCES >>>----- \fancyhead[LO]{\sffamily Bibliography} %headers in sans serif and not in uppercase \bibliographystyle{Styles/Stylebib} %style of literature, you can use e.g. newapa instead of Styles/Stylebib \bibliography{Styles/Bibliography} %bibliography database \addcontentsline{toc}{chapter}{Bibliography} %Add bibliography to the table of contents \clearpage %-----<<< ---------- >>>-----

%-----<<< LIST OF TABLES >>>----- \fancyhead[LO]{\sffamily List of Tables} %headers in sans serif and not in uppercase \phantomsection %bookmark anchor \addcontentsline{toc}{chapter}{List of Tables} %add LofT to the Table of Contents \listoftables \clearpage %-----<<< --------------- >>>-----

%-----<<< LIST OF FIGURES >>>-----
\fancyhead[LO]{\sffamily List of Figures} \phantomsection %bookmark anchor \addcontentsline{toc}{chapter}{List of Figures} %add LofF to the Table of Contents \listoffigures \clearpage %-----<<< ---------------- >>>-----

%-----<<< APPENDIXES >>>----- \backmatter %uppercase roman pagination for back matter; appendices start \autohdr %automatic headers
\input{03_Backmatter/01_App.tex} %input file %input file

\clearpage

\end{document} %-----<<<<<<<<< END OF DOCUMENT >>>>>>>>>-----

vojtam
  • 169
  • 1
    that is unrelated to \input, in most document classes \chapter headings are defined to start a page, but that depends on the docuemnt class which you have not shown – David Carlisle Sep 13 '21 at 09:47
  • simpler would be to use a different document class with \section as the top level not chapter – David Carlisle Sep 13 '21 at 09:48
  • @DavidCarlisle thank you for your answer, see my edit please. – vojtam Sep 13 '21 at 10:13
  • you have still not shown any relevant code. you have 0. in front of the section numbers because you are using a book-level document class that numbers sections within chapters. If you used an article-level document class eg \documentclass{article} then \sectionis the top level and you have no 0. and no page break. But you have not provided any information about your document so impossible to say what to change. – David Carlisle Sep 13 '21 at 10:24
  • @DavidCarlisle see my last edit, please – vojtam Sep 13 '21 at 10:58
  • as I say use \documentclass [a4paper,12pt]{article} instead of \documentclass [a4paper,12pt]{report} unrelated but are you really using the legacy 8 bit encoding \usepackage[cp1250]{inputenc} most editors, and latex and this site all default to UTF-8 these days. – David Carlisle Sep 13 '21 at 11:09
  • Maybe add the option openany to the report class. I know that it works in book and memoir, but I don't remember if it is defined in report – Luis Turcio Sep 13 '21 at 17:05

1 Answers1

0

The memoir class (a superset of book, report, and when using the article option, article classes.

\documentclass[article,...]{memoir}
...
\begin{document}
\chapter{One}  % typesets as a section
  \section{Alpha} % typesets as a subsection
... and so on
\end{document}
Peter Wilson
  • 28,066