If you run this, you can see that all pages after \begin{landscape} are too small."Page 4" at the bottom for example should be 90% into the page, but it's more like 70%. How do I fix this?
\documentclass{exam}
\usepackage{pdflscape}
\usepackage{pdfpages}
\usepackage{lipsum}
\printanswers
\begin{document}
Page1
\newpage
Page2
\begin{landscape}
\begin{solution}
\includegraphics{example-image-a}
\end{solution}
\end{landscape}
\lipsum
\end{document}
Related
So im making a presentation and for some reason, i can't create a new page for my tableofcontents.
The list of the tableofcontents is longer and i need to split it up to two pages to be able to display all informations, but it doesn't work (i tried \clearpage and \newpage without success)
\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage{biblatex}
\addbibresource{sample.bib}
%%%% graphics
\usepackage{graphicx}
%%%START THEME SETTINGS
\usetheme{Dresden}
\usecolortheme{beaver}
\title{stuff}
\begin{document}
\begin{frame}
\titlepage % Print the title page as the first slide
\end{frame}
\begin{frame}{Outline}
\tableofcontents
\end{frame}
\section{x}
\subsection{Introduction}
\subsection{Use Cases}
%------------------------------------------------
\section{xyz}
\subsection{Introduction}
\subsection{Use cases}
\subsection{Hyypervisors}
\subsection{Hypervisors Types}
\subsection{Memory Management}
\subsection{Memory Overcommitment}
\subsection{Memory Compression}
\subsection{Memory Transparent Page Sharing}
\newpage %<- this doesn't work!
%--------------------------------------------
\section{xy}
\subsection{Motivation}
\subsection{Virtualization}
\subsection{Emulation}
\section{xx}
\subsection{CPU}
\subsection{Registers}
\subsection{Memory}
any ideas why this doesn't work?
As mentioned above..
You can add the allowframebreaks option to your outline frame and beamer will automatically break the frame into multiple slides:
\documentclass{beamer}
%\usepackage[utf8]{inputenc}
\usepackage{biblatex}
\addbibresource{sample.bib}
%%%% graphics
%\usepackage{graphicx}
%%%START THEME SETTINGS
\usetheme{Dresden}
\usecolortheme{beaver}
\title{stuff}
\begin{document}
\begin{frame}
\titlepage % Print the title page as the first slide
\end{frame}
\begin{frame}[allowframebreaks]{Outline}
\tableofcontents
\end{frame}
\section{x}\begin{frame}\end{frame}
\subsection{Introduction}\begin{frame}\end{frame}
\subsection{Use Cases}\begin{frame}\end{frame}
%------------------------------------------------
\section{xyz}\begin{frame}\end{frame}
\subsection{Introduction}\begin{frame}\end{frame}
\subsection{Use cases}\begin{frame}\end{frame}
\subsection{Hyypervisors}\begin{frame}\end{frame}
\subsection{Hypervisors Types}\begin{frame}\end{frame}
\subsection{Memory Management}\begin{frame}\end{frame}
\subsection{Memory Overcommitment}\begin{frame}\end{frame}
\subsection{Memory Compression}\begin{frame}\end{frame}
\subsection{Memory Transparent Page Sharing}\begin{frame}\end{frame}
%\newpage %<- this doesn't work!
%--------------------------------------------
\section{xy}\begin{frame}\end{frame}
\subsection{Motivation}\begin{frame}\end{frame}
\subsection{Virtualization}\begin{frame}\end{frame}
\subsection{Emulation}\begin{frame}\end{frame}
\section{xx}\begin{frame}\end{frame}
\subsection{CPU}\begin{frame}\end{frame}
\subsection{Registers}\begin{frame}\end{frame}
\subsection{Memory}\begin{frame}\end{frame}
\end{document}
Or you can manually split your table of contents to get more fine control of the break point:
\documentclass{beamer}
%\usepackage[utf8]{inputenc}
\usepackage{biblatex}
\addbibresource{sample.bib}
%%%% graphics
%\usepackage{graphicx}
%%%START THEME SETTINGS
\usetheme{Dresden}
\usecolortheme{beaver}
\title{stuff}
\begin{document}
\begin{frame}
\titlepage % Print the title page as the first slide
\end{frame}
\begin{frame}{Outline}
\only<1>{\tableofcontents[sections={1-2}]}
\only<2>{\tableofcontents[sections={3-4}]}
\end{frame}
\section{x}\begin{frame}\end{frame}
\subsection{Introduction}\begin{frame}\end{frame}
\subsection{Use Cases}\begin{frame}\end{frame}
%------------------------------------------------
\section{xyz}\begin{frame}\end{frame}
\subsection{Introduction}\begin{frame}\end{frame}
\subsection{Use cases}\begin{frame}\end{frame}
\subsection{Hyypervisors}\begin{frame}\end{frame}
\subsection{Hypervisors Types}\begin{frame}\end{frame}
\subsection{Memory Management}\begin{frame}\end{frame}
\subsection{Memory Overcommitment}\begin{frame}\end{frame}
\subsection{Memory Compression}\begin{frame}\end{frame}
\subsection{Memory Transparent Page Sharing}\begin{frame}\end{frame}
%\newpage %<- this doesn't work!
%--------------------------------------------
\section{xy}\begin{frame}\end{frame}
\subsection{Motivation}\begin{frame}\end{frame}
\subsection{Virtualization}\begin{frame}\end{frame}
\subsection{Emulation}\begin{frame}\end{frame}
\section{xx}\begin{frame}\end{frame}
\subsection{CPU}\begin{frame}\end{frame}
\subsection{Registers}\begin{frame}\end{frame}
\subsection{Memory}\begin{frame}\end{frame}
\end{document}
I am trying to create a custom title page in LaTeX according to my organization's template (in Word).
I managed to get close to it with the following code:
\documentclass{report}
\usepackage[a4paper,twoside,bindingoffset=0cm,nomarginpar,includeheadfoot,headheight=1.25cm,headsep=0cm,top=1cm,bottom=1.8cm,inner=1.75cm,outer=1.75cm,showframe]{geometry}
\usepackage{xcolor}
\usepackage{colortbl}
\usepackage{calc}
\usepackage{graphicx}
\usepackage{tabularx}
\definecolor{greenBE}{RGB}{141,182,60}
\definecolor{blueBE}{RGB}{0,111,144}
\title{La qualité de l'air en Région de Bruxelles-Capitale}
\newcommand{\subtitle}{Rapport annuel 2019}
\author{}
\usepackage{lipsum}
\begin{document}
\makeatletter
\begin{titlepage}
\thispagestyle{empty}
\newlength{\rulewidth}\setlength{\rulewidth}{3cm}%
\newlength{\logowidth}\setlength{\logowidth}{2.5cm}%
\newlength{\logoheight}\setlength{\logoheight}{\logowidth*\ratio{592pt}{1538pt}}% image size : 1538 x 592
\begingroup
\setlength{\tabcolsep}{0pt}
\renewcommand{\arraystretch}{0}
\noindent%
\begin{tabularx}{\textwidth}{p{\rulewidth}c>{\centering}X}
\cellcolor{blueBE}&\includegraphics[width=\logowidth]{ILLU_FR_LogoBE.jpg}&\cellcolor{greenBE}\color{white}{RAPPORT TECHNIQUE}
\end{tabularx}
\endgroup
\vspace*{3cm}
\color{blueBE}
\raggedleft\MakeUppercase{\Large\textbf{\#title}}\\
~\\
\raggedleft\large\textbf{\subtitle}
\vfill
\raggedleft\MakeUppercase{\Large\#date}\\
\vspace*{4cm}
\noindent%
\color{blueBE}{\rule{\textwidth}{\logoheight}}
\end{titlepage}
\makeatother
\restoregeometry
\tableofcontents
\chapter{Prerequisites}\label{prerequisites}
\lipsum
\end{document}
and the image logo ILLU_FR_LogoBE.jpg
However, as you can notice below, the text "RAPPORT TECHNIQUE" on top of the first page is enlarging the height of the row. Instead, I would like to center it vertically in the middle of the logo.
What am I doing wrong ?
Many thanks,
Alessandro
You could use \usepackage[export]{adjustbox} and then play around with different valign options for the graphic.
\documentclass{report}
\usepackage[a4paper,twoside,bindingoffset=0cm,nomarginpar,includeheadfoot,headheight=1.25cm,headsep=0cm,top=1cm,bottom=1.8cm,inner=1.75cm,outer=1.75cm,showframe]{geometry}
\usepackage{xcolor}
\usepackage{colortbl}
\usepackage{calc}
\usepackage{graphicx}
\usepackage{tabularx}
\definecolor{greenBE}{RGB}{141,182,60}
\definecolor{blueBE}{RGB}{0,111,144}
\title{La qualité de l'air en Région de Bruxelles-Capitale}
\newcommand{\subtitle}{Rapport annuel 2019}
\author{}
\usepackage{lipsum}
\usepackage[export]{adjustbox}
\begin{document}
\makeatletter
\begin{titlepage}
\thispagestyle{empty}
\newlength{\rulewidth}\setlength{\rulewidth}{3cm}%
\newlength{\logowidth}\setlength{\logowidth}{2.5cm}%
\newlength{\logoheight}\setlength{\logoheight}{\logowidth*\ratio{592pt}{1538pt}}% image size : 1538 x 592
\begingroup
\setlength{\tabcolsep}{0pt}
%\renewcommand{\arraystretch}{0}
\noindent%
\begin{tabularx}{\textwidth}{p{\rulewidth}c>{\centering}X}
\cellcolor{blueBE}&\includegraphics[width=\logowidth,valign=t]{ILLU_FR_LogoBE.jpg}&\cellcolor{greenBE}\color{white}RAPPORT TECHNIQUE
\end{tabularx}%
\endgroup
\vspace*{3cm}
\color{blueBE}
\raggedleft\MakeUppercase{\Large\textbf{\#title}}\\
~\\
\raggedleft\large\textbf{\subtitle}
\vfill
\raggedleft\MakeUppercase{\Large\#date}\\
\vspace*{4cm}
\noindent%
\color{blueBE}{\rule{\textwidth}{\logoheight}}
\end{titlepage}
\makeatother
\restoregeometry
\tableofcontents
\chapter{Prerequisites}\label{prerequisites}
\lipsum
\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}
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.
I'm trying to vertically center a title on a custom-sized page with latex. I've written the following code, but for some reason it doesn't center. Could someone please point me to what's wrong with it?
Thanks!
\documentclass{article}
\setlength{\pdfpagewidth}{88.184mm}
\setlength{\pdfpageheight}{113.854mm}
\usepackage[margin=0.5cm, paperwidth=88.184mm, paperheight=113.854mm]{geometry}
\title{[[title]]}
\date{[[date]]}
\author{[[author]]}
\begin{document}
\vspace{\fill}
\maketitle
\vspace{\fill}
\newpage
[[text]]
\end{document}
There are two small bugs in your code.
First, if you want the \vspace to work at the beginning or end of a page, you should use the starred version (\vspace*).
This would work, but \maketitle is a pretty complicated macro, and if used like in your example, it just puts the title at the second page. You can use the titlepage environment, which gives you much more command over how the title page looks like -- including the spacing. For example, you could use the following code:
\documentclass{article}
\setlength{\pdfpagewidth}{88.184mm}
\setlength{\pdfpageheight}{113.854mm}
\usepackage[margin=0.5cm, paperwidth=88.184mm, paperheight=113.854mm]{geometry}
\begin{document}
\begin{titlepage}
\vspace*{\fill}
\begin{center}
{Huge [[title]]}\\[0.5cm]
{Large [[author}\\[0.4cm]
[[date]]
\end{center}
\vspace*{\fill}
\end{titlepage}
[[text]]
\end{document}
\null % Empty line
\nointerlineskip % No skip for prev line
\vfill
\let\snewpage \newpage
\let\newpage \relax
\maketitle
\let \newpage \snewpage
\vfill
\break % page break
If you want to make everything work even with \maketitle put your \vspace*{\fill} inside the first and the last attribute, exp:
\title{**\vspace*{\fill}**[[title]]}
\date{[[date]]}
\author{[[author]]**\vspace*{\fill}**[[}
\begin{document}
\maketitle
\newpage
[[text]]
\end{document}
As in the answer by finrod, \maketitle is a pretty complicated macro, this is why I didn't feel like overwriting it myself (\renewcommand\maketitle{...). Nevertheless, copying, pasting and editing lines 170-201 of article.cls documentclass, I could add a new one to customize (\newcommand\mymaketitle{...) as follows:
\documentclass{article}
\setlength{\pdfpagewidth}{88.184mm}
\setlength{\pdfpageheight}{113.854mm}
\usepackage[margin=0.5cm, paperwidth=88.184mm, paperheight=113.854mm]{geometry}
\title{Title}
\date{Date}
\author{Author}
\makeatletter
\newcommand\mymaketitle{%
\begin{titlepage}
\null\vfil\vskip 40\p#
\begin{center}
{\LARGE \#title \par}
\vskip 2.5em
{\large \lineskip .75em \#author \par}
\vskip 1.5em
{\large \#date \par}
\end{center}\par
\#thanks
\vfil\null
\end{titlepage}
}
\makeatother
\begin{document}
\mymaketitle
Text
\end{document}
The output: