New answers tagged

3

Here's a solution with thmtools, which eases defining new theorem styles: \documentclass{book} \usepackage[utf8]{inputenc} \usepackage{fourier, erewhon, cabin} \usepackage[table, x11names]{xcolor} \usepackage{mathtools} \usepackage{amsthm, thmtools} \usepackage{microtype} \SetTracking[no ligatures = {f}]{encoding = *}{50} \declaretheoremstyle[% ...


0

The title goes in squared brackets at the beginning of the theorem. \begin{mythm}[Here goes the title] Problem statement goes here. But, where does go title? \end{mythm} It doesn't look exactly what your example picture looks like, but as the "Sample Problem 3.1" text is bold making the title also bold wouldn't benefit readability.


1

The name={...} option to the definition in the \declaretheoremstyle command defaults to the theorem name, or it's possible to say name={} to remove the prefix in the List of Theorems, but this has an effect to the body-text display as well. (It's not the best solution) The parentheses can be removed by redefining \thmtformatoptarg to be ...


2

Something like this? \documentclass{report} % document class that features 'chapter' sectioning level \usepackage{amsthm} \theoremstyle{plain} \newtheorem{thm}{Theorem}[section] \renewcommand\thethm{\thechapter-\arabic{section}-\arabic{thm}} \begin{document} \setcounter{chapter}{2} \setcounter{section}{3} \begin{thm} aaa \label{thm:aaa} \end{thm} A ...


0

I solved it myself: \newtheorem{theorem}{Theorem}[section] \renewcommand{\thetheorem}{\thesection-\arabic{theorem}} Anybody knows any better solution? Perhaps defining this in my customized class?


2

here is a mechanism for removing the extra space between the theorem head and the list. i don't really like it, but it will provide necessary information to make this a feature of the ams theorem facility when that is overhauled. (latex doesn't make things like this easy.) \documentclass{amsart} \newtheorem{thm}{Theorem}[section] \begin{document} ...


2

Here is a solution with enumitem. One can define a thmitemise clone, which incorporates by default the given setup, to avoid having to type it each time it is used: \documentclass{book} \usepackage{amsthm} \newtheoremstyle{mystyle}{}{}{}{}{\bf}{}{\newline}{} \theoremstyle{mystyle} \newtheorem*{mythm}{Theorem} \usepackage{enumitem, showframe} ...


3

cleveref is your friend here -- no need to define a \theoremname here -- it's defined by cleveref for many use - cases already. Use \cref for lower case names and \Cref for upper case names. For special names there is no clue for \cleveref to provide the correct name initially, in this case use the setup commands \crefname and \Crefname. The \crefname ...


1

The parskip package sets \topsep to zero, so you get what you were asking for. ;-) The output in your picture was generated with \theoremstyle{pcap}, not with \theoremstyle{plain}. Perhaps you want something like this: \documentclass[10pt,a4paper]{amsbook} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage{amsthm} \usepackage{parskip} ...


0

The claim environment accepts an optional argument, default =, that's used to climb up or down a level. With + you go one level up, with - one level down; it's also possible to jump down two or three levels with -- and ---. \documentclass{article} \usepackage{amsthm,xparse,etoolbox} \newtheorem{theorem}{Theorem} \newtheorem{Claim}{Claim}[theorem] ...


0

Maintaining a stack of such levels is not really easy. I tried to provide this down to six levels, which automatic backup etc. and up/down levelling if needed. There's an issue with a reusage of the claim environment when \holdlevelfalse is used. I'll try to figure out this. Use the command \claimhierarchies{claim}{6}{thm}, meaning six levels, the 'parent' ...


3

Using \newtheorem{theorem}{Theorem}[chapter] (for example) will reset the theorem counter each time a new chapter is started. Omitting [chapter] should provide continuous numbers. If this doesn't help, use \counterwithout{theorem}{chapter} (requires chngcntr package) \documentclass[a4paper]{report} \usepackage{chngcntr} ...


4

First things first: An algorithm most probabilly will never cover all use cases at once. A good rule of thumb is to assume that on average a LaTeX document will reach 90% of the final quality without any direct intervention. That said, inserting a \linebreak here and there should not be the end of the world, i.e. \begin{defn} The double integral of $f$ on ...


-1

\documentclass{article} \usepackage{amsmath} \usepackage{amsthm} \usepackage{mdframed} \theoremstyle{definition} \newtheorem{defn}{Definition} \surroundwithmdframed[leftmargin=-10pt,rightmargin=20pt]{defn} \begin{document} \begin{defn} The double integral of $f$ on $R$, denoted as $\iint_R f(x,y) \, \operatorname{d}\!A$ \end{defn} \end{document} Same code ...


3

Here's the tcolorboxenvironment wrapper style for thm, providing nicer boxes (in my point of view), with effectively one line of code! \documentclass{article} \usepackage{amsmath} \usepackage{amssymb} \usepackage{amsthm} \usepackage{thmtools} \usepackage[dvipsnames]{xcolor} \usepackage[most]{tcolorbox} \colorlet{LightGray}{White!90!Periwinkle} ...


2

Using the mdframed options in the theorem style allows one to set borders of specified size, here set to 6 or 8pt, depending. \documentclass{article} \usepackage{amsmath} \usepackage{amssymb} \usepackage{amsthm} \usepackage{thmtools} \usepackage[dvipsnames]{xcolor} \colorlet{LightGray}{White!90!Periwinkle} \declaretheoremstyle[ name=Theorem, ...


2

Actually I have tried the solution of egreg's, and then find out that you don't need to create the command \spnewtheorem{xx}{XX}[section] It is the option envcountsect in the svjour3 class that really helps. \documentclass[envcountsect]{svjour3} If you look into the file svjour.cls, and seach \spnewtheorem{theorem}{Theorem}, around line 888, you would ...


3

You have two types of theorems in your document -- numbered ones, of type plain, and unnumbered ones, of type named. As you've already discovered and pointed out, it's easy to assign a \label to a numbered theorem and to cross-reference it via \ref, \cref, or \aref. Theorems of the "named" type, in contrast, do not have a counter associated with them. ...


4

The tcolorbox package can be used to provide configurable boxes around the theorems etc.,especially breakability is easy with tcolorbox. The title after break={....} option will display a special title then. Please note, that tcolorbox can setup special theorem boxes of its own,but I kept the original definitions. \documentclass[% a4paper, 11pt ...



Top 50 recent answers are included