Latex real textwidth smaller than \textwidth in documentclass article but not in report
1,067
In article class abstract is an environment that typesets the abstract in a narrower width. \abstract
is equivalent to \begin{abstract}
so you never really end the abstract, thus the entire doc is typeset in a narrower width.
Use
\begin{abstract}
...
\end{abstract}
Related videos on Youtube
Author by
Courvoisier
Updated on August 01, 2022Comments
-
Courvoisier over 1 year
I am seeing a weird behavior in the textwidth in Latex. When I use \documentclass[a4paper]{article} the actual text width do not really all the \textwidth. I can see that if I use showframes in geometry. The problem does not occur in \documentclass[a4paper]{report}.
example 1:
\documentclass[a4paper]{article} % use larger type; default would be 10pt \usepackage[top=1in, bottom=1in, left=0.5in, right=0.5in,showframe]{geometry} % to change the page dimensions top=1in, bottom=1in, left=0.5in, right=0.5in, \usepackage{graphicx} \usepackage{lipsum} \usepackage{array} \title{TEST} \author{?} \begin{document} \maketitle \abstract{???} \tableofcontents \newpage \section{Introduction}\label{sec:Introdu} \lipsum \end{document}
example 2:
\documentclass[a4paper]{report} % use larger type; default would be 10pt \usepackage[top=1in, bottom=1in, left=0.5in, right=0.5in,showframe]{geometry} % to change the page dimensions top=1in, bottom=1in, left=0.5in, right=0.5in, \usepackage{graphicx} \usepackage{lipsum} \usepackage{array} \title{TEST} \author{?} \begin{document} \maketitle \abstract{???} \tableofcontents \newpage \section{Introduction}\label{sec:Introdu} \lipsum \end{document}
-
daleif over 7 years@Courvoisier If this solved your problem, then mark the answer as accepted. I've seen this issue before. It is a bit annoying that some classes issues the abstract as a macro argument while most does it as an environment
-
Courvoisier over 7 yearsCouldn't accept before some time for some reason. Thanks for the quick reply