# [Tugindia] abstract and figure capton defintion.

Herbert Voss Herbert.Voss at alumni.TU-Berlin.DE
Mon Oct 13 18:29:56 CEST 2003

Dileep Padinjarae Vengasseri schrieb:

> 1. The journal demands that the abstract content
> should be offset by the width of abstract name.
> Soemthing like:
>
> ABSTRACT:
>          This is the abstract of the paper.
>
> How can one do the same?
>
> 2. Figure caption should be in the next line of Figure
> number. Something like:
>
>              FiG:
>          Figure caption
> The journal is asking for a camera ready copy. So it
> would be very helpful if some one can suggest how to
> solve these problems.

hpte, this helps

Herbert

\documentclass{article}
\def\abstractname{ABSTRACT:}
\newlength{\aLength}
\settowidth{\aLength}{\abstractname}
\renewenvironment{abstract}{
\par\medskip
\noindent\abstractname\par
\leftskip=\aLength
\noindent\ignorespaces
}{%
\par\medskip%
}
\def\figurename{Fig}
\makeatletter
\long\def\@makecaption#1#2{%
\vskip\abovecaptionskip
\sbox\@tempboxa{#1:\par#2}% <--- changed
\ifdim \wd\@tempboxa >\hsize
#1:\par #2\par % <--- changed
\else
\global \@minipagefalse
\hb at xt@\hsize{\hfil\box\@tempboxa\hfil}%
\fi
\vskip\belowcaptionskip}
\makeatother
\begin{document}
\title{An Article}
\author{me}
\maketitle

\begin{abstract}
text nad some more text and at least text.
text nad some more text and at least text.
text nad some more text and at least text.
\end{abstract}
text nad some more text and at least text.
text nad some more text and at least text.
text nad some more text and at least text.

\begin{figure}[htb]
\centering
\rule{4cm}{3cm}
\caption{text nad some more text and at least text.
text nad some more text and at least text.}
\end{figure}

\end{document}