Newline spacing left by 'theorem' environment

  • Context:
  • Thread starter Thread starter mathbalarka
  • Start date Start date
  • Tags Tags
    Theorem
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
7 replies · 3K views
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

  • LaTeX.PNG
    LaTeX.PNG
    4.3 KB · Views: 181
Physics news on Phys.org
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 .
 
Okay, that works well, thanks.
 
When designing theorems, you should check out the package tcolorbox. It has the option newtcbtheorem.