Newline spacing left by 'theorem' environment

  • Context: MHB 
  • Thread starter Thread starter mathbalarka
  • Start date Start date
  • Tags Tags
    Theorem
Click For Summary

Discussion Overview

The discussion revolves around formatting issues in LaTeX, specifically concerning the newline spacing left by the 'theorem' environment when using the amsthm package. Participants explore solutions for removing unwanted indentation in paragraphs and the Abstract section.

Discussion Character

  • Technical explanation
  • Conceptual clarification
  • Debate/contested

Main Points Raised

  • One participant describes an issue with unwanted spacing after a theorem environment in LaTeX.
  • Another participant asks if the goal is to remove indentation from all paragraphs.
  • A participant confirms the intention to remove indentation from all paragraphs and suggests using the command \setlength{\parindent}{0pt} to achieve this.
  • A later reply expresses satisfaction with the solution but notes that it does not work for the Abstract, prompting a request for further ideas.
  • Another participant mentions that using \noindent text works for the Abstract.
  • One participant suggests exploring the tcolorbox package, which includes the option newtcbtheorem for designing theorems.

Areas of Agreement / Disagreement

Participants generally agree on the solution for removing indentation from paragraphs, but there is no consensus on how to handle the Abstract section, as different methods are proposed.

Contextual Notes

There are limitations regarding the effectiveness of the proposed solutions for the Abstract, and the discussion does not resolve the best approach for that specific case.

Who May Find This Useful

LaTeX users, particularly those working with theorem environments and formatting issues in academic writing.

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: 159
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 ·
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 9 ·
Replies
9
Views
6K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 2 ·
Replies
2
Views
6K
  • · Replies 4 ·
Replies
4
Views
12K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
6K