Tag Info

Hot answers tagged

5

Update Since the class used is IEEEtran, the amsthm approach I initially suggested is not the best option (IEEEtran handles theorem-like environments in its own way). In this case, since the class doesn't make provision for unnumbered structures, you can achieve the desired unnumbered structure in a consistent way simply redefining the associated counter ...


5

Here's a possibility using thmtools as a front-end for amsthm: The code (adjust the settings according to your needs; in particular, change \thmindent to get the desired hanging indentation for the theorem-like structures): \documentclass{article} \usepackage{amsmath} \usepackage{amsthm} \usepackage{thmtools} \usepackage{lipsum} \newlength\thmindent ...


4

The error message you're getting should tell you all you need to know: LaTeX Error: Command \def already defined. What's going on? You're trying to set up a new (theorem-like) environment called def. In practice, this means that LaTeX tries to set up an instruction called \def to deal with the instruction \begin{def}. (LateX also sets up a macro ...


4

Use \thetheorem: \documentclass{article} \usepackage{amsmath,amsthm} \usepackage{enumitem} \theoremstyle{plain} \newtheorem{theorem}{Theorem} \newenvironment{thenumerate}[1][] {\enumerate[label=\alph*\textup{)},ref=\thetheorem.\alph*),#1]} {\endenumerate} \begin{document} \begin{theorem}[Great result] \label{th:great} Let $1$ be the number one. Then: ...


4

Supposing you are only using the amsthm package in your document, this is how it can be done. If you want this behavior only for the "plain" theorem style, add the following lines in your preamble to re-define the plain style: \makeatletter \renewcommand{\th@plain}{% \renewcommand\@upn{\textit}% \itshape% } \makeatother and you're done. MWE ...


3

If you're using no package specialized in theorems, you can do \documentclass{article} \usepackage{etoolbox} \makeatletter \patchcmd{\@opargbegintheorem}{#2}{\textit{#2}}{}{} \patchcmd{\@begintheorem}{#2}{\textit{#2}}{}{} \makeatother \newtheorem{thm}{Theorem} \begin{document} \begin{thm} Something \end{thm} \end{document}


3

It's easy with the apptools and chngcntr packages: \documentclass[11pt,a4paper,titlepage,oneside]{article}% \usepackage[utf8]{inputenc} \usepackage{chngcntr} \usepackage{apptools} \AtAppendix{\counterwithin{lemma}{section}} \newtheorem{lemma}{Lemma} \begin{document} \section{A First Section} \begin{lemma} A first lemma. \end{lemma} \appendix \section{An ...


3

Here's a way to do it; this will also comply with lists such as enumerate in the statement, which solutions with \hangindent won't. \documentclass{article} \usepackage{showframe} % just for the example \usepackage{amsthm} \usepackage{enumitem} \usepackage{xparse} \usepackage{lipsum} \newtheoremstyle{fctaylor}% name {\topsep}% Space above ...


3

Here is a way with ntheorem package. I redefine the plain style: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{amsmath} \usepackage{amsfonts} \usepackage[amsthm, thmmarks, thref]{ntheorem} \usepackage{cleveref} \makeatletter \renewtheoremstyle{plain}% {\item[\hskip\labelsep \theorem@headerfont ...


2

This is just an addition to egregs answer. There is no reason to use an extra env for this. Just add the extra configuration whenever we are inside a theorem env. Downside: this has to be added to every thm like env. I use this to control that enumerates are formatted consistently in teaching materials etc. \documentclass{article} ...


2

Simply use: \newtheorem{test}{Theorem} \renewcommand\thetest{\Roman{test}} Defining a new theorem environment test defines a new counter test. The optional argument, such as you used, says the ‘test’ environment shares the counter of another theorem-like environment.


2

You should use them like this. \documentclass{article} \usepackage{amsmath,amsthm} \newtheorem{theorem}{Theorem}[section] \newtheorem{corollary}{Corollary}[section] \newtheorem{proposition}{Proposition}[section] \newtheorem{lemma}{Lemma}[section] \newtheorem{example}{Example}[section] \theoremstyle{definition} \newtheorem{definition}{Definition}[section] ...


2

It can be done with the ntheorem package and its change theoremstyle. The spacing between theorem name and theoremnumber can be adjusted patching the change theorem style: I introduce a new dimension, thlabelsep which defaults to 0.5em and can changed in the preamble: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{amsmath} ...


1

This requires some customisation of the theoremtools files. The way I did it was to copy thm-listof.sty into the same directory as my document and alter it; I was doing this anyway in order to reformat the list of theorems (if you try to override the format in your preamble, it doesn't work due to the packages use of \AtBeginDocument. Then, find the block ...



Only top voted, non community-wiki answers of a minimum length are eligible