Monday, January 29, 2007

New command for keywords for abstract

There is no command and no enviroment for keywords of an abstract in LaTex unless some templates provide it. Here is a simple way to define a new command for keywords.


# code
\newcommand{\Keywords}[1]{\par\noindent
{\small{\em Keywords\/}: #1}}

# usage
\begin{abstract}
blah blah blah

\Keywords{blah.}
\end{abstract}

5 comments:

Yu-Sung Su said...

This is an modification of the code that indent the keywords left and right margin with 1cm.


\newenvironment{keywords}{%
\begin{changemargin}{1cm}{1cm}
\noindent{\bf Keywords:}
}
{\end{changemargin} }

Yu-Sung Su said...

To enable the above code, define changemargin environment as below:

\newenvironment{changemargin}[2]{%
\begin{list}{}{%
\setlength{\topsep}{0pt}%
\setlength{\leftmargin}{#1}%
\setlength{\rightmargin}{#2}%
\setlength{\listparindent}{\parindent}%
\setlength{\itemindent}{\parindent}%
\setlength{\parsep}{\parskip}%
}%
\item[]}{\end{list}}

Lewis Chuang said...

I used this today and it was very helpful. Thank you.

SEBASTIAN said...

Muchas gracias! lo pude aplicar en lyx

SEBASTIAN said...
This comment has been removed by the author.