Tag Info

New answers tagged

1

I have sent the author the following MWE: \documentclass{article} \usepackage{amsthm, mdframed} \definecolor{mygray}{gray}{0.95} % % notice how skipbelow is ignored \mdfdefinestyle{mythm}{ backgroundcolor=mygray, linewidth=0pt, innertopmargin=0pt, innerbottommargin=6pt, skipabove=5em, skipbelow=5em, } ...


3

You could use the same mechanism as section titles: \documentclass{article} \usepackage{amsthm} \usepackage{lipsum} \newtheorem{theorem}{Theorem} \makeatletter \newcommand{\proofpart}[2]{% \par \addvspace{\medskipamount}% \noindent\emph{Part #1: #2}\par\nobreak \addvspace{\smallskipamount}% \@afterheading } \makeatother \begin{document} ...


0

I was able to improve the great answer by @T.Verron such that \ref will return the plain counter of the list-environments while \cref will return the complete label compromising type, number of theorem and counter of the list (see my comment on @T.Verron's answer). To do so I set up two new counters \newcounter{listthm} \newcounter{listlem} whose names ...


1

Is that OK? I introduced parameter values that depend on the font, so that you can change it (size, family) without having to recompute them.I defined a labelwidth large enough for the label not to overlap the item body. If you want the labels to begin at a nonzero distance from the left margin, they'd look better right-aligned, in my opinion. I give an ...


4

Let enumitem figure out the leftmargin=* along with align=left: As per you comments if you want it left aligned but with some indent, then you could define a custom alignment: \SetLabelAlign{LeftAlignWithIndent}{\hspace*{2.0ex}\makebox[1.5em][l]{#1}} and then using align=LeftAlignWithIndent you get: Notes: The showframe package was used just to ...


2

The label separation should be zero, and the label width should be the same as the left margin. I also added topsep=0pt so you don't need to guess its value. \documentclass{report} \usepackage{amsthm} \usepackage{enumitem} \usepackage{lipsum} \SetLabelAlign{Center}{\hfil#1\hfil} \newtheoremstyle{theorem}{1em}{}{\itshape}{}{\bfseries}{}{1em} ...


3

\documentclass{report} \usepackage{amsthm,showframe} \usepackage{enumitem} \SetLabelAlign{Center}{\strut{\parbox[t]{\labelwidth} {\centering#1}}% } \newtheoremstyle{theorem}{1em}{}{\itshape}{}{\bfseries}{}{1em} {\thmname{#1}\thmnumber{ #2}\thmnote{ (\normalfont\textit{#3})}} \theoremstyle{theorem} ...


1

Drawing order: The background of the whole frame including the frametitle is filled by backgroundcolor. The default backgroundcolor is white. backgroundcolor=none means fill=none Then the tikzsetting is executed for the whole frame. At the end the frametitlebackground is filled by the frametitlebackgroundcolor. If no frametitlebackgroundcolor is set, ...


3

Immediately after creating the theorem, change the way the theorem number is displayed via a \renewcommand: \renewcommand{\thethm}{\thechapter-\arabic{thm}} Here is a complete minimal example: \documentclass{report} \usepackage{amsthm} \newtheoremstyle{theorem} {1em} % Space above {} % Space below {\itshape} % Body font {} % Indent amount % Indent ...


4

The symbol must be inserted at the end of the environment, 'flushed' right, so use \hfill\myqedsymbol where \myqedsymbol is a macro wrapper for the particular symbol (\triangle in this case) \documentclass{article} \usepackage{amsthm} \usepackage{hyperref} \theoremstyle{plain} \newtheorem{theorem}{Theorem}[section] \theoremstyle{definition} ...


2

I would use cleveref instead, which does understand amsthm. The following is close to the output you were getting above: \documentclass{article} \usepackage{amsthm} \usepackage[colorlinks]{hyperref} \usepackage[capitalize,nameinlink]{cleveref} \theoremstyle{theorem} \newtheorem{theorem}{Theorem} \theoremstyle{definition} ...


3

You can define general statements as you like; there is no predefined theorem-like environment, because people tend to have different expectations about this. \documentclass{article} \usepackage{amsthm} % for \theoremstyle and proof \newtheorem{thm}{Theorem}[section] % theorems will be numbered according to section \newtheorem{lem}[thm]{Lemma} % lemmas ...


2

There are a number of choices. One good one is amsthm. Here is an example. \documentclass{minimal} \usepackage{amsthm} \theoremstyle{plain} \newtheorem{thm}{Theorem} \newtheorem{lem}{Lemma} \newtheorem{cor}{Corollary} \newtheorem{exm}{Example} \usepackage{lipsum} \begin{document} \lipsum[1] \begin{thm} \lipsum[2] \end{thm} \begin{lem} \lipsum[3] ...


0

Here a somewhat "less professional" method that I find quite usefull and easy: Load the hyperref package and insert the following in your preamble \newcommand{\sref}[2]{\hyperref[#2]{#1 \ref{#2}}} Now you can refer to anything by typing \sref{<theorem_description>}{<label_name>}. It the <theorem_description> can be anything you want. I ...


1

Here is a simple solution with ntheorem – which has the advantage of placing automatically the end-of-proof (customisable) symbol, even when the proof ends in a display (group of) equation(s): \documentclass[12pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{amssymb} \usepackage{mathtools, nccmath} ...


2

Okay, I've got it working now, thanks to other posts at this website, help from percusse in the chat: Here is the code, which you can also find here: https://github.com/kasperpeulen/Ross-Theorem-Style \documentclass[12pt]{article} \usepackage{amsmath, amssymb, amsthm} \newtheoremstyle{theorem}% name {}% Space above, empty = `usual value' {}% ...


4

Loop Space's answer is good, but has the disadvantage of clobbering the optional argument, so attribution can't be specified any more. I'd suggest using a mandatory argument. \documentclass{article} \usepackage{amsthm} \swapnumbers % optional, of course \newtheorem{thm}{Theorem}[section] % the main one \newtheorem{lemma}[thm]{Lemma} % other statement ...


-1

I have another solution. I don't use the package theorem. I just change [\cite[page 10]{ABC2011}] to --> {[\cite[page 10]{ABC2011}]}.


3

As Barbara Beeton says this is expected behaviour. However, you can circumvent it by adding \unskip before the \pagebreak: An alternative suggested by egreg is \addpenalty{-10000} instead of the combination \unskip\pagebreak. The code for \addpenalty essentially includes \unskip and \pagebreak (with no argument) is essentially \penalty-10000. ...


3

The idea is to add a conditional that's true when a proof starts and change the code accordingly: if the conditional is false, we're not nesting, so we set \qed@current to \qed@empty, otherwise we use the same mechanism as in the other answer. \documentclass{book} \usepackage{amsthm,xpatch} \makeatletter \let\qed@empty\openbox % <--- change here, if ...



Top 50 recent answers are included