why the contents table is blank
i am using texmaker , as a result i get contents title and the rest of the page is blank what did i do wrong
...
\documentclass[12pt , a4paper]{report}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\begin{document}
\newcommand{\HRule}{\rule{\linewidth}{1.5 mm}}
\pagenumbering{gobble}
\tableofcontents
\renewcommand{\arraystretch}{1.5}
\pagestyle{empty}
\newpage
~
\pagenumbering{arabic}
\chapter{introduction}
\end{document}
...
Related
\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{multicol}
\usepackage{geometry}
\geometry{margin=1in}
\usepackage[notes,endnotes]{biblatex-chicago}
\usepackage{endnotes}
\addbibresource{test.bib}
\title{Stuff}
\author{Me}
\date{\today}
\begin{document}
\maketitle
\newpage
\tableofcontents
\newpage
\begin{multicols}{2}
\section{Introduction}
Bla Bla bla \autocite{cite1}
\newpage
\printendnotes
\newpage
\printbibliography
\end{document}
For some reason this continues to print everything out as foot notes instead of end notes. I've tried changing \autocite to \endcite but it doesn't seem to make any difference.
A couple of syntax errors:
the \begin{multicols}{2} must be closed at one point (or removed altogether)
\printendnotes is a macro from the enotez package, not from endnotes. Your .log file will tell you that the macro is not defined. You shouldn't simply ignore such errors
your .log will also tell you about the non-existing package options you try to use. Don't ignore such errors!
\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{multicol}
\usepackage{geometry}
\geometry{margin=1in}
\usepackage[notetype=endonly]{biblatex-chicago}
\usepackage{endnotes}
\addbibresource{biblatex-examples.bib}
\title{Stuff}
\author{Me}
\date{\today}
\begin{document}
\maketitle
\newpage
\tableofcontents
\newpage
% \begin{multicols}{2}
\section{Introduction}
Bla Bla bla \autocite{knuth:ct}
\newpage
\theendnotes
\newpage
\printbibliography
\end{document}
I'm trying to remove the space in LoF between different chapters. i have tried different solutions(patching it as well) but it is not working. I have attached the codes below for your reference. Any help or pointers to resolve it would be highly appreciated.
Edit: Link to a minimal working project file depicting the error.
Working Example
\documentclass[twoside, 12pt]{report}
\usepackage[utf8]{inputenc}
\usepackage{pdfpages}
%package for higlighting text
\usepackage{color,soul}
%packages for multicol glossary, bibliography and list
\usepackage[section,numberedsection=autolabel, acronym]{glossaries}
\usepackage{setspace}
\usepackage{enumitem}
\usepackage[style=ieee]{biblatex}
\usepackage{glossary-mcols}
\usepackage{multicol}
%package for comments
\usepackage{verbatim}
%%Random text
\usepackage{lipsum}
%packages for fancy headers
\usepackage{blindtext}
\usepackage{fancyhdr}
\usepackage{tikz}
%package for subfigures
\usepackage{subfigure}
\makeglossaries
% Use package below to change margins and graphics
\usepackage{graphicx}
\usepackage[a4paper,top=25mm,bottom=25mm,left=25mm,right=25mm]{geometry}
% text color package
\usepackage{xcolor}
% use to customize chapter headings of toc lof lot
\usepackage{tocloft}
\renewcommand{\cfttoctitlefont}{\hspace*{\fill}\Large\bfseries}
\renewcommand{\cftaftertoctitle}{\hspace*{\fill}}
\renewcommand{\cftlottitlefont}{\hspace*{\fill}\Large\bfseries}
\renewcommand{\cftafterlottitle}{\hspace*{\fill}}
\renewcommand{\cftloftitlefont}{\hspace*{\fill}\Large\bfseries}
\renewcommand{\cftafterloftitle}{\hspace*{\fill}}
\usepackage{sectsty}
\chapternumberfont{\Large}
\chaptertitlefont{\Large}
\usepackage{hyperref}
%for table
\usepackage{booktabs}
%maths Package
\usepackage{amsmath}
%minted package
\usepackage[]{minted}
\usepackage{fancyvrb}
%for greek words
\usepackage[utf8]{inputenc}
\usepackage[greek,english]{babel}
\usepackage{lmodern}
\usemintedstyle{vs}
\setminted{bgcolor=myGray,
breaklines,
mathescape,
linenos,
numbersep=5pt,
frame=single,
numbersep=5pt,
xleftmargin=0pt,
breaksymbolleft=\raisebox{0.8ex}{
\small\reflectbox{\carriagereturn}},
breaksymbolindentleft=0pt,
breaksymbolsepleft=0pt,
breaksymbolindentright=0pt,
breaksymbolsepright=0pt
}
%for code listing
\usepackage{xcolor}
\usepackage{listings}
\definecolor{myGray}{RGB}{245, 239, 239}
\definecolor{maroon}{RGB}{128,0,0}
\definecolor{forestGreen}{RGB}{1,68,33}
\lstdefinestyle{mystyle}{
backgroundcolor=\color{myGray},
commentstyle=\color{forestGreen},
keywordstyle=\color{blue},
numberstyle=\tiny\color{gray},
stringstyle=\color{maroon},
basicstyle=\ttfamily\small,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
keepspaces=true,
numbers=left,
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2,
frame=single
}
\lstset{style=mystyle}
%Patch to remove the space in LoF, LoT, LoC per chapter basis
\usepackage{etoolbox}% http://ctan.org/pkg/etoolbox
\makeatletter
\patchcmd{\#chapter}{\addtocontents{lof}{\protect\addvspace{10\p#}}}{}{}{}% LoF
\patchcmd{\#chapter}{\addtocontents{lot}{\protect\addvspace{10\p#}}}{}{}{}% LoT
\makeatother
%for custom caption
\usepackage{caption}
% document begins here
\begin{document}
%Footer and header fancy - chapter x. ChapterName format
\fancyhead{}
\fancyhead[RO,LE]{\leftmark}
\fancyfoot{}
\fancyfoot[CE,CO]{\thepage}
\newpage
\phantomsection
\tableofcontents
\addcontentsline{toc}{chapter}{Table of Contents}
\newpage
\listoftables
\phantomsection
\addcontentsline{toc}{chapter}{\listtablename}
\newpage
\listoffigures
\phantomsection
\addcontentsline{toc}{chapter}{\listfigurename}
\newpage
\renewcommand{\lstlistingname}{Code}
\renewcommand{\lstlistlistingname}{List of \lstlistingname s}
\lstlistoflistings
\phantomsection
\addcontentsline{toc}{chapter}{\lstlistlistingname}
%CHAPTERS BEGIN
\pagenumbering{arabic}
\newpage
\input{Chapters/Intro}
\input{Chapters/Results}
\newpage
%%APPENDIX BEGINS
\fancyhead{}
\fancyfoot{}
\end{document}
Please find below the code for respective
The below figures are part of sample Intro file.
\begin{figure}[h]
\centering
\includegraphics[scale=0.5]{<someImage>}
\caption{Software Development Lifecycle}
\label{fig:swCycle}
\end{figure}
\begin{figure}[h]
\centering
\includegraphics[scale=0.5]{<someImage>}
\caption{Software Development Lifecycle2}
\label{fig:swCycle2}
\end{figure}
Results File
\begin{figure}[h]
\centering
\includegraphics[scale=0.5]{<someImage>}
\caption{Software Development Lifecycle3}
\label{fig:swCycle3}
\end{figure}
You could remove the spaces between the list entries of different chapters if you make the patches before you load hyperref:
\documentclass[twoside, 12pt]{report}
% use to customize chapter headings of toc lof lot
\usepackage{tocloft}
\renewcommand{\cfttoctitlefont}{\hspace*{\fill}\Large\bfseries}
\renewcommand{\cftaftertoctitle}{\hspace*{\fill}}
\renewcommand{\cftlottitlefont}{\hspace*{\fill}\Large\bfseries}
\renewcommand{\cftafterlottitle}{\hspace*{\fill}}
\renewcommand{\cftloftitlefont}{\hspace*{\fill}\Large\bfseries}
\renewcommand{\cftafterloftitle}{\hspace*{\fill}}
\usepackage{etoolbox}
\makeatletter
\patchcmd{\#chapter}{\addtocontents{lof}{\protect\addvspace{10\p#}}}{}{}{}
\patchcmd{\#chapter}{\addtocontents{lot}{\protect\addvspace{10\p#}}}{}{}{}
\makeatother
% load hyperref after these patches
\usepackage{hyperref}
\begin{document}
\listoffigures
\chapter{test}
\begin{figure}[htbp]
\caption{heading}
\end{figure}
\chapter{test}
\begin{figure}[htbp]
\caption{heading}
\end{figure}
\end{document}
I trying add some space before TOC , I used \vspace but it doesn't work
\documentclass[12pt, french,a4paper]{report}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\begin{document}
%...
\vspace*{.3\paperheight} %doesn't work
\tableofcontents
%...
\chapter{chapitre}
\section{section}
\subsection{subsection}
\newpage
\chapter{chapitre}
\section{section}
\subsection{subsection}
\end{document}
somebody have solution ?
The toc will automatically start a new chapter on a new page. If you use \vspace before it, this will still be on the previous page and not have any effect on your toc. However, you can change the definition of the toc and add some space there:
\documentclass[12pt, french,a4paper]{report}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\makeatletter
\renewcommand\tableofcontents{%
\if#twocolumn
\#restonecoltrue\onecolumn
\else
\#restonecolfalse
\fi
\chapter*{\vspace{5cm}\contentsname
\#mkboth{%
\MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%
\#starttoc{toc}%
\if#restonecol\twocolumn\fi
}
\makeatother
\begin{document}
%...
\tableofcontents
%...
\chapter{chapitre}
\section{section}
\subsection{subsection}
\newpage
\chapter{chapitre}
\section{section}
\subsection{subsection}
\end{document}
In this MWE the page numbers of the chapters in the TOC are shifted slightly to the right from chapter 2 onwards.
I like the format of the chapter headings, but it would not be a problem if they were formatted differently in the table of contents.
How can I fix the problem?
\documentclass[a4paper,
fontsize=13pt,
paper=A4,
DIV=calc,
headsepline,
plainheadsepline,
numbers=noenddot
]{scrreprt}
\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{4}
\KOMAoptions{toc=chapterentrydotfill}
\usepackage[left=3cm,right=2cm,bottom=3cm]{geometry}
\usepackage[english,ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[normalem]{ulem}
\usepackage[colorlinks=false, pdfborder={0 0 0}]{hyperref}
\usepackage{url}
\usepackage{blindtext}
\newcommand{\changefont}[3]{\fontfamily{#1} \fontseries{#2} \fontshape{#3} \selectfont}
\usepackage{scrlayer-scrpage}
\clearscrheadfoot
\ohead[\pagemark]{\pagemark}
\pagestyle{scrheadings}
\usepackage{setspace}
\renewcommand{\chapterpagestyle}{scrheadings}
\begin{document}
\changefont{cmr}{m}{n} %computer modern %allgemeine Schriftart
\setkomafont{sectioning}{\normalcolor\changefont{cmr}{m}{sc}}
\newpage
\singlespacing
\tableofcontents
\newpage
\Blinddocument
\Blinddocument
\Blinddocument
\end{document}
The numbers will be aligned if you remove all the additional spaces you introduce with your \changefont macro:
\documentclass[a4paper,
fontsize=13pt,
paper=A4,
DIV=calc,
headsepline,
plainheadsepline,
numbers=noenddot
]{scrreprt}
\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{4}
\KOMAoptions{toc=chapterentrydotfill}
\usepackage[left=3cm,right=2cm,bottom=3cm]{geometry}
\usepackage[english,ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[normalem]{ulem}
\usepackage[colorlinks=false, pdfborder={0 0 0}]{hyperref}
\usepackage{url}
\usepackage{blindtext}
\newcommand{\changefont}[3]{\fontfamily{#1}\fontseries{#2}\fontshape{#3}\selectfont}
\usepackage{scrlayer-scrpage}
\clearscrheadfoot
\ohead[\pagemark]{\pagemark}
\pagestyle{scrheadings}
\usepackage{setspace}
\renewcommand{\chapterpagestyle}{scrheadings}
\begin{document}
\changefont{cmr}{m}{n} %computer modern %allgemeine Schriftart
\setkomafont{sectioning}{\normalcolor\changefont{cmr}{m}{sc}}
\newpage
\singlespacing
\tableofcontents
\newpage
\Blinddocument
\Blinddocument
\Blinddocument
\end{document}
Page numbers show correctly up in the table of contents, but not on the pages. How can I make LaTex display them on the pages in the document?
I have tried changing the documentclass from report to article and adding the hyperref package.
\documentclass[12pt]{report}
\usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry}
\usepackage{setspace}
\usepackage{hyperref}
\usepackage[usenames, dvipsnames]{color}
\usepackage{titling}
\usepackage{mathtools}
\usepackage{times}
\usepackage{graphicx}
\usepackage{amsfonts}
\usepackage{booktabs}
\usepackage{hyperref}
\setlength{\droptitle}{-5em}
\setlength{\parindent}{1cm}
\renewcommand{\thesection}{\arabic{section}}
\begin{document}
\thispagestyle{empty}
\newpage
\tableofcontents
\thispagestyle{empty}
\newpage
\doublespacing
\setcounter{page}{1}
I do get page numbers in this minimal example, both for documentclass article as report:
\documentclass{report}
% \documentclass{article}
\begin{document}
\tableofcontents
\section{one}
\newpage
\section{two}
\newpage
\section{three}
\newpage
\end{document}
You may not get a page number because you explicitly say so using \thispagestyle{empty}. Report may also define the first page (of a chapter) as a page without regular head and foot, and hence also without number.
Hyperref has nothing to do with (printed) page numbers.