Quantcast
Channel: Active questions tagged styles - TeX - LaTeX Stack Exchange
Viewing all articles
Browse latest Browse all 49

How to indent the first line of body text in a theorem when its style is customly defined by the user?

$
0
0

I have defined a new theorem style using amsthm package and I have noticed that the \parindentI have included in the definition of the style in the line of code with comment indentation amount adds indentation to the head of the theorem instead of the body text of the theorem which is more desirable. I have noticed also that if I use the predefined default style of amsthm it adds indentation to the body of theorem and not to the head as I want. To make my wish clear: I want the head of the theorem with no indentation and the body text of the theorem with indentation. What I am doing wrong and how to control the indentation of the body text of the theorem in the definition of a new theorem style? Looking at the documentation of amsthm package I didn't find anything to help me.

The code:

\documentclass[12pt]{article}\usepackage[a4paper, total={180mm,257mm},left=15mm,top=20mm]{geometry}\usepackage[T1]{fontenc}\usepackage{amsthm}\newtheorem{thm}{Theorem}[section]\newtheoremstyle{mythm}%⟨name⟩{3pt}%⟨Space above⟩{3pt}%⟨Space below⟩{}%⟨Body font⟩{\parindent}%⟨Indent amount){\bfseries\slshape}% ⟨Theorem head font⟩{:}%⟨Punctuation after theorem head⟩{\newline}%⟨Space after theorem head⟩{}%⟨Theorem head spec (can be left empty, meaning ‘normal’)⟩\theoremstyle{mythm}\newtheorem{pytha}{Theorem of Pythagoras}[section]\begin{document}\section{First Section}\begin{pytha}   Let $ABC$ right triangle with $\angle A=90^{\circ}$. Then for the sides of the triangle $AB, AC$ and $BC$ is true that:    \begin{equation}        (BC)^{2}=(AB)^2+(AC)^{2}    \end{equation}\end{pytha}\begin{thm}(Theorem of Pythagoras)    Let $ABC$ right triangle with $\angle A=90^{\circ}$. Then for the sides of the triangle $AB, AC$ and $BC$ is true that:    \begin{equation}        (BC)^{2}=(AB)^2+(AC)^{2}    \end{equation}\end{thm}\end{document}

Viewing all articles
Browse latest Browse all 49

Latest Images

Trending Articles





Latest Images