Newline spacing left by 'theorem' environment

  • Topic:
  • Thread starter mathbalarka
  • Start date
  • Tags Tags
    Theorem
7 replies · 4K views · last reply
mathbalarka
Messages
452
Reaction score
0
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

View attachment 1705

Note the spacing appeared in line #2. Is there anyway to remove this?
 
Attachments
  • Rendered LaTeX output: bold 'Theorem 1.' followed by italic 'Some text' on the first line, then 'More text' on a separate line below with a large vertical gap.
    LaTeX.PNG
    4.3 KB · Views: 199
Do you want to remove indentation from all paragraphs ?
 
ZaidAlyafey said:
Do you want to remove indentation from all paragraphs?

Yes.
 
Write the following code preamble.

Code:
\setlength{\parindent}{0pt}
 
No kidding, that works great!

Thanks, Zaid.

PS : I see it doesn't work for the Abstract. Have any ideas on that?
 
mathbalarka said:
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 .
 
When designing theorems, you should check out the package tcolorbox. It has the option newtcbtheorem.