[Tugindia] abstract and figure
Herbert Voss
Herbert.Voss at alumni.TU-Berlin.DE
Tue Oct 14 00:13:17 CEST 2003
Baburaj A. Puthenveettil schrieb:
> whereas we want FIG2(as well as the text) centered with respect to figure
> Where to give the centering command for both the lines?
loo at example
> Further why is the code being effective only for one page. The rest of the
> pages remains as earlier. I tried the code in preamble as well in seperate
> style file.
I can not see this, see example file
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{\centering #1:\par#2}% <--- changed
\ifdim \wd\@tempboxa >\hsize
\centering #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}
\newpage
\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}
\newpage
\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}
More information about the tugindia
mailing list