Text FormattingDefintion enviroment, parenthesis around definition title

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
hfarrukhn
Posts: 17
Joined: Thu Sep 04, 2008 9:57 pm

Defintion enviroment, parenthesis around definition title

Post by hfarrukhn »

Dear All,
I am using definition environment. For example

Code: Select all

\begin{definition}[Grid Site]
A Grid site is a .......
\end{definition}
By default it produces as
Definition 1.1 (Grid Site) A Grid site is a .......

I want "no parenthesis" around "Grid Site". Please help me how I can do this.

Thanking you.
Regards,
Farrukh

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Stefan Kottwitz
Site Admin
Posts: 10322
Joined: Mon Mar 10, 2008 9:44 pm

Re: Defintion enviroment, parenthesis around definition title

Post by Stefan Kottwitz »

Hi Farrukh,

to provide help we need to know how the definition environment is defined: its code and the package used (amsthm, ntheorem, ...)

Stefan
LaTeX.org admin
hfarrukhn
Posts: 17
Joined: Thu Sep 04, 2008 9:57 pm

Defintion enviroment, parenthesis around definition title

Post by hfarrukhn »

Hi Stefan,
I really don't know which package does this come from. I also don't know how is it defined. I am sorry. What I can tell you is that I am using class "svmono" (attached with this reply). I have the following packages in the header of main file

Code: Select all

\usepackage{amssymb}
\usepackage{amsmath}
%\usepackage{theorem}
\usepackage{longtable}
\usepackage{makeidx}        
\usepackage{graphicx}       
\usepackage{multicol}        
\usepackage{multirow}
\usepackage{subfigure}
\usepackage{multirow}
\usepackage{algorithm}
\usepackage{algorithmic}
\usepackage{setspace}
\usepackage{verbatim}
\usepackage{enumerate}
\usepackage{appendix}
\usepackage{lscape}
\usepackage{titlesec} % to adjust spaces after headings
I also commented the first two packages, but still the definition environment is working fine.

If this information is not enough, please let me know how I can find where is the definition of "definition".

Regards,
Farrukh
Attachments
svmono.cls
(60.11 KiB) Downloaded 403 times
User avatar
Stefan Kottwitz
Site Admin
Posts: 10322
Joined: Mon Mar 10, 2008 9:44 pm

Defintion enviroment, parenthesis around definition title

Post by Stefan Kottwitz »

Hi Farrukh,

that definition was made inside svmono.cls. Try this redefinition in your preamble:

Code: Select all

\makeatletter
\renewcommand*\@spopargbegintheorem[5]{\trivlist
  \item[\hskip\labelsep{#4#1\ #2}]{#4#3\@thmcounterend\ }#5}
\makeatother
Stefan
LaTeX.org admin
hfarrukhn
Posts: 17
Joined: Thu Sep 04, 2008 9:57 pm

Re: Defintion enviroment, parenthesis around definition title

Post by hfarrukhn »

BRAVO. It works perfect. I must say you are of GREAT help ALWAYS.

How can I increase space between definition-number and Definition title. e.g
Definition 1.1~~~Grid Site. Here I have represented space with "~~~"

Thank you.

Farrukh
User avatar
Stefan Kottwitz
Site Admin
Posts: 10322
Joined: Mon Mar 10, 2008 9:44 pm

Defintion enviroment, parenthesis around definition title

Post by Stefan Kottwitz »

You could insert \quad or arbitrary \hspace{...} in the redefinition above:

Code: Select all

...
\item[\hskip\labelsep{#4#1\ #2}]{#4\quad#3\@thmcounterend\ }#5}
...
Stefan
LaTeX.org admin
hfarrukhn
Posts: 17
Joined: Thu Sep 04, 2008 9:57 pm

Re: Defintion enviroment, parenthesis around definition title

Post by hfarrukhn »

Bundle of thanks Stefan.
Post Reply