Welcome to our community

Be a part of something great, join today!

Newline spacing left by 'theorem' environment

mathbalarka

Well-known member
MHB Math Helper
Mar 22, 2013
573
I am using amsthm package in LaTeX, and defined the theorem environment as

Code:
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}
in the usual way. Now if I compile the code

Code:
\begin{theorem}
Some text
\end{theorem}
More text
The output is

LaTeX.PNG

Note the spacing appeared in line #2. Is there anyway to remove this?
 

ZaidAlyafey

Well-known member
MHB Math Helper
Jan 17, 2013
1,667
Do you want to remove indentation from all paragraphs ?
 

mathbalarka

Well-known member
MHB Math Helper
Mar 22, 2013
573
ZaidAlyafey said:
Do you want to remove indentation from all paragraphs?
Yes.
 

ZaidAlyafey

Well-known member
MHB Math Helper
Jan 17, 2013
1,667
Write the following code preamble.

Code:
\setlength{\parindent}{0pt}
 

mathbalarka

Well-known member
MHB Math Helper
Mar 22, 2013
573
No kidding, that works great!

Thanks, Zaid.

PS : I see it doesn't work for the Abstract. Have any ideas on that?
 

ZaidAlyafey

Well-known member
MHB Math Helper
Jan 17, 2013
1,667
No kidding, that works great!

Thanks, Zaid.

PS : I see it doesn't work for the Abstract. Have any ideas on that?
Honestly, I was just trying to do the same for abstract but it didn't work. After a search it seems that

Code:
\noindent text
works fine .
 

mathbalarka

Well-known member
MHB Math Helper
Mar 22, 2013
573
Okay, that works well, thanks.
 

dwsmith

Well-known member
Feb 1, 2012
1,673
When designing theorems, you should check out the package tcolorbox. It has the option newtcbtheorem.