14

I want to change margins(or tabulation) for title(and abstract) and put abstract between two lines. How to do it? The example of formatting I want to produce - example

enter image description here

\documentclass[12pt,a4paper]{article}
\usepackage{lipsum}
\usepackage{authblk}
\usepackage[top=2cm, bottom=2cm, left=2cm, right=2cm]{geometry}
\usepackage{fancyhdr}

\pagestyle{fancy}
\begin{document}

%title and author details
\title{This is the title for my work}
\author[1]{Name1}
\author[1]{Name2}
\affil[1]{Address of author}
\date{} %remove date

\maketitle

\abstract{sdfsdf
sdfsdfsdfsdf
sdfsdfsdfsdf
sdfsdf}

\section{section}
\lipsum
\end{document}
1
  • 2
    This looks like the result of a dedicated document class (journal or collection style). Maybe it would be easiest to find and use that class? Commented Nov 27, 2012 at 13:01

1 Answer 1

15

How about this?

\documentclass[12pt,a4paper]{article}
\usepackage{lipsum}
\usepackage{authblk}
\usepackage[top=2cm, bottom=2cm, left=2cm, right=2cm]{geometry}
\usepackage{fancyhdr}
%
\pagestyle{fancy}
%
\renewenvironment{abstract}{%
\hfill\begin{minipage}{0.95\textwidth}
\rule{\textwidth}{1pt}}
{\par\noindent\rule{\textwidth}{1pt}\end{minipage}}
%
\makeatletter
\renewcommand\@maketitle{%
\hfill
\begin{minipage}{0.95\textwidth}
\vskip 2em
\let\footnote\thanks 
{\LARGE \@title \par }
\vskip 1.5em
{\large \@author \par}
\end{minipage}
\vskip 1em \par
}
\makeatother
%
\begin{document}
%
%title and author details
\title{This is the title for my work}
\author[1]{Name1}
\author[2]{Name2}
\affil[1]{Address of author}
\affil[2]{Address of second author}
%
\maketitle
%
\begin{abstract}
\lipsum[1]
\end{abstract}
\section{section}
\lipsum
\end{document}
2
  • It is look like what i want. And how to format title? I need to swap authors and title positions, and set title(with authors) margins same as at abstract. Commented Nov 27, 2012 at 13:50
  • 1
    @Jupiter --- Sorry to be so slow, I have been very busy. I have edited my answer. Commented Dec 4, 2012 at 21:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .