MHB Newline spacing left by 'theorem' environment

  • Thread starter Thread starter mathbalarka
  • Start date Start date
  • Tags Tags
    Theorem
AI Thread Summary
The discussion revolves around formatting issues in LaTeX when using the amsthm package to define theorem environments. A user seeks to eliminate unwanted indentation in the output following a theorem declaration. The solution provided is to set the paragraph indentation to zero with the command \setlength{\parindent}{0pt}, which effectively resolves the issue for regular text. However, the same solution does not apply to the Abstract section. Users suggest using \noindent for the Abstract to achieve the desired formatting. Additionally, the tcolorbox package is recommended for designing theorems, as it offers enhanced customization options, including the newtcbtheorem feature.
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: 135
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.
 

Similar threads

Replies
1
Views
2K
Replies
3
Views
3K
Replies
4
Views
3K
Replies
3
Views
3K
Replies
4
Views
12K
Replies
3
Views
2K
Replies
1
Views
6K
Back
Top