Adding the abstract to the front page in Latex - latex

Included below is my LaTeX code. By default the abstract is on the first page following the title page. But the title page has lots of space below, and my abstract will be short, so is there anyway to include it below the title page components?
code:
\documentclass[12pt,reqno,a4paper,titlepage]{article}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amssybm}%for math bold
\usepackage[pdftex]{graphicx}
\usepackage{verbatim}
\usepackage[margin=2.5cm]{geometry}%for the margins headers footers etc
\usepackage{hyperref}%for the hyperlinks-COOL and must use
\usepackage[tt]{titlepic}%package i downloaded to put a pic in the titlepage
\usepackage{helvet}
\usepackage[usenames,dvipsnames]{color}%options to use names like redviolet and others
\begin{document}
\title{title}
\titlepic{\setlength\fboxsep{0pt}\setlength\fboxrule{4pt}
\fcolorbox{Plum}{green}{\includegraphics[scale=0.3]{pic}}}
\author{\Huge my name}
\maketitle
\begin{abstract}
abstract text here
\end{abstract}
document text here
\end{document}

Wrap your title page to minipage
\begin{minipage}[h]{\textwidth}
\maketitle
\end{minipage}
Then you can add text below it.

Related

How could I change the numeration style in table of contens in beamer (Latex)?

Hello I am new at beamer (overleaf), so I have learned very much, so I would like to change the design of the numeration in table of contents. I mean with that (see picture attached):
I would like to change to a square, or simply the number. Anyone knows others styles? I am using the \usetheme{CambridgeUS}.
You can set the sections/subsections in toc template to change to e.g. a square or plain numbered sections:
\documentclass{beamer}
\usetheme{CambridgeUS}
\setbeamertemplate{sections/subsections in toc}[square]
%\setbeamertemplate{sections/subsections in toc}[sections numbered]
\begin{document}
\section{title}
\begin{frame}
\tableofcontents
\end{frame}
\end{document}

How can I place a one-column-abstract in a two-column document in Latex?

How can I place a one-column-table in two-column-section in a LaTeX template?
If your document is "short enuogh" to justify this approach, rather than the opposite, you can arrange part of the text on two columns using the environment multicols from the package multicol.
\documentclass{article}
\usepackage{lipsum,multicol}
\begin{document}
\begin{abstract}
\lipsum[1]
\end{abstract}
\begin{multicols}{2}
\lipsum[2-4]
\end{multicols}
\end{document}
Here the package lipsum is only to generate blind text content. The output:

How to change page numbering on chapter bages using scrbook and scrlayer-scrpage

I am currently writing my thesis using scrbook and changed the footer layout. However, I also want to change the footer on Part and Chapter pages as well. What do I need to change for this? Currently, it basically looks like this right now. I want to have the page number in the center of the Chapter/Part page as well.
Example code:
\documentclass[english, 12pt]{scrbook}
\usepackage[utf8]{inputenc}
\usepackage[automark,ilines]{scrlayer-scrpage}
\usepackage{blindtext}
\pagestyle{scrheadings}
\ohead{}
\ihead{\headmark}
\chead{}
\cfoot{-~\pagemark~-}
\ofoot{}
\ifoot{}
\begin{document}
\chapter{Introduction}
\blindtext[5]
\end{document}
Thanks in advance for your help!
You can use an optional argument to set the styles for the plain pages:
\documentclass[english, 12pt]{scrbook}
\usepackage[utf8]{inputenc}
\usepackage[automark,ilines]{scrlayer-scrpage}
\usepackage{blindtext}
\pagestyle{scrheadings}
\ohead[]{}
\ihead[whatever]{\headmark}
\chead[]{}
\cfoot[something]{-~\pagemark~-}
\ofoot[]{}
\ifoot[]{}
\begin{document}
\chapter{Introduction}
\blindtext[5]
\end{document}

LaTeX - two pages "1" with package hyperref

When compiling a LaTeX document, I get two pages numbered at "1": the front page and the first of the table of contents. Here's a MWE:
\documentclass[12pt,a4paper]{report}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{hyperref}
\title{Title}
\begin{document}
\maketitle
\tableofcontents
\chapter{Chapter one}
\end{document}
When compiling this (using simply pdflatex file.tex), I get this:
But when I remove the line \usepackage{hyperref}, page numbers are fine. Note that I need this package to have links to pages in my table of contents, but maybe there's a better way to do so. What is happening here ? How do I get normal page numbers ?
Thanks in advance.
\maketitle under the report class sets the page number to 1 on the title page, but also restarts it from 1 for the following page. That's why you achieve a virtual page number 1 for the title, followed by an actual page number one for the ToC. I emphasize virtual here because \maketitle sets the title on an empty page style so that nothing is printed in the header/footer. However, these page numbers still appear in the toolbar when viewed in Adobe Acrobat.
One way around it would be to manually change the page display to something more appropriate just for the title page. For example, let's make the title page be called T:
\documentclass{report}
\usepackage{hyperref}
\title{Title}
\author{Author}
\begin{document}
\begingroup
\renewcommand{\thepage}{T}
\maketitle % Page T
\endgroup
\tableofcontents % Page 1
\chapter{A chapter} % Page 2
\end{document}

How to get heading only for the main matter in the report class?

I am writing my thesis in Latex, document class: report. I have got front matter containing of abstract, acknowledgement and so on.
I want to add header only to my main matter which starts with my first chapter:Introduction. I want the header to be the chapter number without the word "chapter" and the chapter title next to it. I also want the page number to appear in the centre on the bottom of the page in all pages of the main matter.
I don't want any header or line in any page of my front matter.
Can you please guide me? Thanks
Here it is the sample code that I am applying.
\documentclass[a4paper,12pt,titlepage]{report}
\usepackage{amsfonts}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{color}
\usepackage{colordvi}
\usepackage{amssymb}
\usepackage{natbib}
\usepackage[nottoc,notlot,notlof]{tocbibind}
\usepackage{setspace}
\usepackage{amsmath}
\usepackage{theorem}
\usepackage{lineno}
\usepackage{multirow}
\usepackage [toc,page]{appendix}
\usepackage{framed}
\usepackage{setspace}
\doublespacing
\usepackage[left=1.5in,top=2in,right=1in,bottom=2in]{geometry}
\begin{document}
\title{xxx}
\author{xxx}
\date{xxx}
\maketitle
\thispagestyle{empty}
\renewcommand{\thepage}{\roman{page}}
% here it comes my front matter for example:
\clearpage
\addcontentsline{toc}{chapter}{Abstract}
\chapter*{Abstract}
ABSTRACT CONTENTS
%then:
\clearpage
\cleardoublepage
\pagenumbering{arabic}
% here it starts my main matter:
\chapter{Introduction} %first chapter
\chapter{First Esssay in XXX} %second chapter
\end{document}
You have a number of options to set headers in a document. The most frequently-used package is fancyhdr.
First of all, you need to remove the word Chapter from the regular chapter mark. For this, add
\usepackage{etoolbox}
\makeatletter
%\newcommand{\updatechaptermark}{%
\appto\ps#fancy{%
\patchcmd{\chaptermark}% <cmd>
{\#chapapp\ }{}% <search><replace>
{}{}% <success><failure>
}%}
\makeatother
to your preamble. The above strips out \#chapapp\ (note the space) from \chaptermark as part of the call to \pagestyle{fancy}. That's required as fancyhdr may update \chaptermark upon calling \pagestyle{fancy}.
Second, you need to set the headers/footers. Here's a setting that yields what you're after:
\usepackage{fancyhdr}
\fancyhf{}% Clear header/footer
\fancyhead[C]{\leftmark}% Chapter mark
\fancyfoot[C]{\thepage}% Footer contains the page number
\renewcommand{\headrulewidth}{.4pt}% Header rule width
The above sets the header as \leftmark, which contains the \chaptermark setting (since \chaptermark actually issues \markboth{<leftmark>}{<rightmark>} with an empty <rightmark>).
\documentclass{report}
\usepackage{fancyhdr,lipsum}
\usepackage{etoolbox}
\makeatletter
%\newcommand{\updatechaptermark}{%
\appto\ps#fancy{%
\patchcmd{\chaptermark}% <cmd>
{\#chapapp\ }{}% <search><replace>
{}{}% <success><failure>
}%}
\makeatother
\fancyhf{}% Clear header/footer
\fancyhead[C]{\leftmark}
\fancyfoot[C]{\thepage}
\renewcommand{\headrulewidth}{.4pt}
\begin{document}
%\frontmatter
\pagenumbering{roman}
\title{xxx}
\author{xxx}
\date{xxx}
\maketitle
\thispagestyle{empty}
% here it comes my front matter for example:
\cleardoublepage
\tableofcontents
\cleardoublepage
\addcontentsline{toc}{chapter}{Abstract}%
\chapter*{Abstract} \lipsum[1]
\cleardoublepage
\pagenumbering{arabic}
\pagestyle{fancy}
\chapter{Introduction} \lipsum[1-50] % first chapter
\chapter{Methodology} \lipsum[1-50] % second chapter
\chapter{Conclusion} \lipsum[1-50] % last chapter
\end{document}
Note that \chapters are set by default using the plain style. If you wish this to be different, you'll have to redefine the plain page style.
You can achieve the same output using a different header/footer package like titleps.

Resources