7

The amsthm package provides several "theorem styles". While the default style, also known as the plain style, is programmed to typeset its body in italics, the remark and definition styles employ upright lettering. I therefore suggest that you insert the instruction \theoremstyle{definition} after loading amsthm and before issuing the instruction \...


6

Don't abuse proof: \documentclass{article} \usepackage{amsthm} \theoremstyle{definition} \newtheorem{definition}{Definition}[section] \theoremstyle{plain} \newtheorem{theorem}[definition]{Theorem} \theoremstyle{remark} \newtheorem{innernremark}[definition]{Remark} \newenvironment{nremark} {\par\pushQED{\qed}\renewcommand\qedsymbol{$\diamond$}\...


6

The theorems can be saved in a sequence as before; at end document they can be written to an auxiliary file and \printtheorems inputs it (if it exists). \documentclass{article} \usepackage{amsmath} \usepackage{amsthm} \usepackage{xparse,environ} \ExplSyntaxOn \NewDocumentCommand{\newtheoremx}{smomo} { \IfBooleanTF{#1} { \printthm_nonumber:nn { #...


5

Here is a possible solution. I'm using thmtools' postheadhook key and enumitem's before* key, along with \everypar, to test whether there is a list environment at the start of a theorem and act accordingly. This may seem a little convoluted, but I don't think there's an easy way to do this reliably, and I would argue it's no so bad once you understand it. \...


5

Putting the label at the start of a paragraph is always slightly tricky (latex has to work quite hard to make that not change the spacing normally, and that interacts with showkeys somewhat badly.....) Putting the \label more or less anywhere else is better (perhaps showkeys could catch this case and do better, but not today) \documentclass{article} \...


5

I think that you are looking for output that looks something like this: Assuming so, then the code below does this. \documentclass{article} \usepackage{amsmath, amsthm, amssymb, thmtools} \declaretheorem[numberwithin = section]{theorem} \declaretheorem[sibling = theorem, style = definition]{definition} \declaretheorem[sibling = theorem]{lemma} \...


5

Update: I decided to create a real library out of this project. I'm now uploading it on CTAN, but meanwhile you can find the whole project here https://github.com/leo-colisson/proofAtTheEnd/ The syntax is now an environment, which is clearer I think. To use it in your project, first download it: cd <your project> repopratend="https://raw....


5

It is normally not too hard to prevent a package loading (if necessary by abusing the mechanism latex uses to prevent a package being loaded twice). However amsbook does not load amsthml it has the definition of a theorem mechanism inline within the body of amsbook.cls. The amsthm.sty package is an extraction of a subset of the amsbook code for use in non-...


4

You don't want to play with \counterwithin but use the correct counter (definition): \documentclass[]{article} \usepackage{amsthm} \theoremstyle{definition} \newtheorem{definition}{Definition}[section] \theoremstyle{plain} \newtheorem{theorem}[definition]{Theorem} \newcommand*{\nremarkname}{Remark \textnormal{\thedefinition}} \newenvironment{nremark}[1][\...


4

With \ifstrequal from etoolbox you can test #3 to get the desired problem head color. \documentclass{article} \usepackage{amsmath, amsthm} \usepackage{etoolbox} \usepackage{xcolor} \newtheoremstyle{mystyle}% Name of the style {\topsep}% Space above {\topsep}% Space below {}% Body font {0pt}% Indent amount {\bfseries}% Theorem head font {}% ...


4

To get this to work you will need to redefine \thesection, which is used as part of the counter in your theorem environment, inside the optional sections and then you will have to reset \thesection at the end of such sections. You can presumably do this with some \patchcmd trickery but an more straightforward approach would be to define a new environment for ...


4

Here's an implementation using enumitem. \documentclass{article} \usepackage{amsmath} \usepackage{amsthm} \usepackage{enumitem} \usepackage{lipsum} \newtheorem{theorem}{Theorem}[section] \newtheorem*{main}{Main Theorem} \newenvironment{subtheorems} {\itemize[ nosep,font=\normalfont\bfseries, leftmargin=3em,itemindent=-1em,align=left]} {\...


4

Use number freestyle to format the number. And don't use the ae package - this is obsolete since a long time. \documentclass[12pt, openany]{book} \usepackage[T1]{fontenc} \PassOptionsToPackage{svgnames}{xcolor} \usepackage[round,sort,comma]{natbib} \usepackage{amssymb,amsmath,amsfonts,amsthm,caption,subcaption} \usepackage{mathtools} \usepackage{enumerate} \...


4

You want that the environments share the theo counter: \theoremstyle{definition} \newtheorem{definizione}[theo]{Definizione} \newtheorem{esempio}[theo]{Esempio} \newtheorem{algoritmo}[theo]{Algoritmo} \newtheorem{osservazione}[theo]{Osservazione} \theoremstyle{plain} \newtheorem{corollario}[theo]{Corollario} \newtheorem{proposizione}[theo]{Proposizione} ...


4

What you need is just changing the period with a colon. Unfortunately, amsmath hardwires the period, so we need to patch \proof in order to remove the dependency. The name will switch to “Beweis” as soon as you load babel with an option for German, usually ngerman if you adhere to the “neue Rechtschreibung”. \documentclass{article} \usepackage[T1]{fontenc} ...


4

Several points: The ex environment must go inside the 1st minipage No need for a figure environment, figure has no caption. Even if it did, I would use \captionof inside of 2nd minipage. Top align the minipages, and shift down the \includegraphics. Use enumitem to tailor the enumeration. The MWE: \documentclass{article} \usepackage{amsmath} \usepackage{...


4

When using the enumitem package you can set the format of the references with the option ref=format, see the enumitem manual page 3. In the example below the format is set to \thelemma (\arabic*) which prints \the value of the lemma counter followed by ( and the \arabic representation of the * (=current enumerate) counter followed by ). Code: \...


4

I don't agree that ntheorem is better than amsthm. However, a not thoroughly tested way to remove amsthm from amsbook is as follows. \makeatletter \let\latex@newtheorem\newtheorem \let\latex@thm\@thm \let\latex@xthm\@xthm \let\latex@ythm\@ythm \makeatother \documentclass{amsbook} \makeatletter \let\newtheorem\latex@newtheorem \let\@thm\latex@thm \let\@...


4

\index writes out the value of \thepage. Just change it to \thetheorem. \documentclass[12pt]{article} \usepackage{etoolbox} \usepackage{makeidx} \makeindex \makeatletter \patchcmd\@wrindex{\thepage}{\thetheorem}{}{} \makeatother \newtheorem{theorem}{Theorem} \begin{document} \begin{theorem} This theorem is about apples\index{apple} and bananas\index{...


4

As I said in the comment, the issue is that cleveref's machinery is not expandable (the \@ifnextchar that hyperref complains about, for example, isn't expandable), so it can't be turned into a PDF string. The crossreftools package provides an expandable alternative for cross referencing commands. For cleverref you can replace \cref by \crtcref and \Cref by \...


4

Use \protect\makefirstuc, but in the definition of \ll@theorem: \documentclass{article} \usepackage{suffix} \usepackage{textcase} \usepackage{amsthm} \usepackage{thmtools} \usepackage{mfirstuc} \renewcommand{\listtheoremname}{List of Important Theorems} \renewcommand\thmtformatoptarg[1]{#1} \swapnumbers \makeatletter % \declaretheoremstyle[ headfont= \...


4

You have two main options: \cref (provided by the cleveref package) and \autoref (provided by the hyperref package). Aside: If you don't want to make the cross-references into hyperlinks to their linked-to objects, just write \Cref*{...} and \autoref*{...} instead of \Cref{...} and \autoref{...}. \documentclass{article} % 1. load 'hyperref' after `amsthm` ...


4

You mentioned in a comment that I used a \newtheorem{theorem}{Theorem}[section] command [in the preamble]. But I don't know which counter to use for what I want. Some comments and observations: If you run \newtheorem{theorem}{Theorem} in the preamble, then theorem is both the name of the environment and the name of the counter associated with that ...


4

The following should be close to what your desired output looks like: \documentclass{article} \usepackage{amsthm} \theoremstyle{definition} \newtheorem{defn}{Definition} \usepackage{enumitem} \begin{document} \begin{defn} Let G be a group. \begin{enumerate}[label=(\roman*)] \item first \item second \end{enumerate} \end{defn} \end{document}


4

(All statements in this answer assume “usual circumstances”, whatever that means.) \thesubsection is defined as \thesection.\arabic{subsection}, so it will always print the current \thesection (which in your case seems to be \arabic{section}), a ., and the number of the subsection counter in arabic algarisms. But the subsection counter only steps when you ...


3

You could use the last argument of \newtheoremstyle for this. The arguments of \thmname, \thmnumber and \thmnote are only printed if the relevant field is present. \documentclass{article} \usepackage{amsthm} \usepackage{xcolor} \newtheoremstyle{note}% (name) {}% (space above) {}% (space below) {}% (body font) {}% (indent amount) {\...


3

The optional argument used in second position is for counters of other theorem-like environments, to mean they share the same counter. Resetting to 1 the theorem-like counter at every (sub)section uses the (sub)section counter as an optional argument in third position. Also beware that if the numbering is reset at each subsection the theorem numbers will ...


3

Just add the option use counter from=theorem when defining the new lemma \newtcbtheorem \documentclass{article} \usepackage{tcolorbox} \tcbuselibrary{theorems} \newtcbtheorem[number within=section]{theorem}{Theorem}{}{thm} \newtcbtheorem[number within=section, use counter from=theorem % <---------------- ...


3

With a little tweak on the syntax, where \section*[F]{Title} allows to set a different key instead of the default “E”. \documentclass{book} \usepackage{amsthm} \usepackage{xparse} % save the original meaning of \section \let\latexsection\section % by default, sections are numbered with arabic numbers \newcommand{\defaultsectionkey}{\arabic{section}} % ...


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