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.

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}
share|improve this question
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? –  Stephan Lehmke Nov 27 '12 at 13:01

1 Answer 1

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}
share|improve this answer
    
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. –  Jupiter Nov 27 '12 at 13:50
    
@Jupiter --- Sorry to be so slow, I have been very busy. I have edited my answer. –  Ian Thompson Dec 4 '12 at 21:01

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.