Text Formattingdot in theorem environment

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
2szeba
Posts: 10
Joined: Sat Oct 30, 2021 10:50 pm

dot in theorem environment

Post by 2szeba »

Hi.
I have to have dot after number of theorem but before title of theorem.
For example, instead
"Theorem 1.1 (Euler)."
I must do
"Theorem 1.1. (Euler)".
How to do it?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

dot in theorem environment

Post by Stefan Kottwitz »

Hi,

it depends. There are various theorem environments, styles, and packages, such as amsthm, ntheorem, thmtools, or simple LaTeX theorems. What are you using?

Can you post a simple compilable example that shows your theorem (with short dummy text)? Then it should be easy for us to adjust.

Stefan
LaTeX.org admin
2szeba
Posts: 10
Joined: Sat Oct 30, 2021 10:50 pm

dot in theorem environment

Post by 2szeba »

Code: Select all

\documentclass[12pt,a4paper]{article}%
\usepackage{amssymb}
\usepackage[utf8]{inputenc}
\usepackage[T1]{polski}
\usepackage[polish]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}

\usepackage{graphicx}%
\usepackage{amsthm}
\usepackage{thmtools} 
\usepackage{tikz}

\newtheorem{theorem}{Twierdzenie} 
\newtheorem{acknowledgement}[theorem]{Acknowledgement}
\begin{document}
\begin{theorem}[Euler]
$a^2+b^2=c^2$
\end{theorem}
\end{document}
I need dot after number of theorem, not after bracket.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

dot in theorem environment

Post by Stefan Kottwitz »

This removes the dot after the name:

Code: Select all

\usepackage{xpatch}
\makeatletter
\xpatchcmd{\@thm}{.}{}{}{}
\makeatother
The number appearance is like you define as numbering in the document, either with or without dot.

Stefan
LaTeX.org admin
Post Reply