Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Somebody noticed that \abstract changes the linewidth for the whole document (here).

The problem was the syntax: with correct syntax as below this is avoided.

\begin{abstract} 
This is an abstract. This is an abstract. 
\end{abstract}

while this keeps the linewith for the rest of the document:

\abstract
This is the abstract

But what if I want to intentionally keep the linewidth the same for the rest of the document, but use correct syntax? Is there a way of knowing the linewidth used in the abstract and setting it manually? This is interesting, if one uses the fancyhdrpackage, and one wants the headers be wider than the text.

share|improve this question
    
changepage package provides an environment adjustwidth which uses different margins than the rest of the document. I guess you can enclose the whole document in that environment. –  JLDiaz Mar 16 '13 at 13:45

3 Answers 3

up vote 1 down vote accepted

Increase margins by 0.35in, and add a \fancyhfoffset[L,R]{0.35in}. The latter makes the fancyheader sticking 0.35 inches into the margins.

The only problem left is the abstract, which has to be sorted out manually, by making it looking like original.

\documentclass[fleqn, a4paper]{article}
\usepackage[top=1.5in,bottom=1.5in,left=1.35in,right=1.35in]{geometry}
\usepackage{lipsum}
\usepackage[english]{babel}

\usepackage[numbered,framed]{mcode} % for Matlab code

\usepackage{fancyhdr}
\setlength{\headheight}{15.2pt} % use \pagestyle{fancy} to activate
\lhead{Lorem ipsum }    \lfoot{dolor sit amet} % \lhead[lh-even]{lh-odd}    \lfoot[lf-even]{lf-odd}
\chead{ }   \cfoot{ } % \chead[ch-even]{ch-odd}     \cfoot[cf-even]{cf-odd}
\rhead{Ut purus elit}   \rfoot{\thepage} % \rhead[rh-even]{rh-odd}  \rfoot[rf-even]{rf-odd}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
\fancyhfoffset[L,R]{0.35in}

\begin{document}

\pagestyle{fancy} 


\small
\begin{center}
\bfseries Abstract \vspace{.5em}
\end{center}
    \lipsum[1]
\normalsize
share|improve this answer

abstract is typeset internally using quotation environment. I guess you can put your whole document inside a quotation, except for the abstract, of course.

\documentclass{article}
\usepackage{fancyhdr}
\usepackage{lipsum}
\pagestyle{fancy}
\title{The title}
\author{The Author}
\date{}

\begin{document}
\maketitle
  \begin{abstract}
  \lipsum[1]
  \end{abstract}

\begin{quotation}
  \section{First}
  \lipsum[2]

  \section{Second}
  \lipsum[3]
  \lipsum[4]
  \begin{itemize}
    \item Foo
    \item Bar
  \end{itemize}
  \lipsum[5]
\end{quotation}
\end{document}

Result

But probably floats will still use the real margins.

share|improve this answer

It can simply be done using the TeX primitives \leftskip and \rightskip

    \leftskip2.5em
    \rightskip\leftskip

Internally that is how lists are built (in a much more complicated way) based on trivlist.

 \documentclass{article}
\usepackage{fancyhdr}
\usepackage{lipsum}
\pagestyle{fancy}
\title{The title}
\author{The Author}
\date{}
\begin{document}
\maketitle
  \begin{abstract}
  \lipsum[1]
  \end{abstract}

\section{One}

\leftskip2.5em
\rightskip\leftskip

  \lipsum[3]
  \lipsum[4]

\end{document}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.