New answers tagged

4

Here is a solution based on atbegshi and answers packages. The idea is to use answers that write contents of theorem, lemma to an external file (mtfile.tex), discard all pages (all contents of the main file http://tex.stackexchange.com/a/267555/71471) and then use the external file to output only theorems. We use a newif test \onlytrue for only theorem and ...


1

The dot seems to be defined in the macro \@thm with the line \thm@headpunct{.}% add period after heading I use xpatch to change that. \documentclass{article} \usepackage{amsthm,xpatch} \makeatletter \xpatchcmd{\@thm}{.}{}{}{} \makeatother \begin{document} \makeatletter \newtheorem*{definition*}{Definition} \begin{definition*} ...


1

The tabular environment can take an optional argument for its vertical alignment w.r.t. the surroundfing text: t (top), c (centred) or b (bottom). Use [t] instead of the default [c]:


2

The theorem environment is designed to continue any text on the leadin-line, unless using an explicitly \par or a \leavevmode command. \par does not work for easylist, the reason why, \lipsum works is an explicit \par in its definition (try to load lipsum package with the nopar option → the lipsum text will start on the header line.) \documentclass{article} ...


3

It is possible with \usepackage{floatrow} that defines a new Option H for \begin{figure}[H]. With this, the figure is not floating and just placed where you include it. You can use caption and label like for floating figures. \documentclass[a4paper,10pt]{book} \usepackage{amsmath} \usepackage{mdframed} \usepackage{graphicx} \usepackage{xcolor} ...


1

Consider protecting the argument passed to thm by wrapping it inside {...}: \documentclass{article} \usepackage{thmtools} \usepackage{xargs} \declaretheorem{thm} \newcommandx{\R}[1][1]{R^{#1}} \begin{document} \begin{thm}[$\R$] This theorem works. \end{thm} \begin{thm}[{$\R[n]$}] This theorem does not work. \end{thm} \end{document}


4

With showlabels \documentclass{article} \usepackage{showlabels} \newtheorem{theorem}{Theorem} \begin{document} \section{Zzzz} zzz \begin{theorem}\label{fact1} Important math statement. \end{theorem} \end{document} or with showkeys \documentclass{article} \usepackage{showkeys} \newtheorem{theorem}{Theorem} \begin{document} \section{Zzzz} zzz ...


3

If you want to allow that the “variant theorem” appears anywhere (maybe even before the standard one), you need to use \label and \ref: \documentclass[11pt]{article} \usepackage{amsmath} \usepackage{amsthm} \newtheorem{thm}{Theorem}[subsection] \newtheorem*{varthm+inner}{\varthmname} \newcommand{\varthmname}{} \newenvironment{varthm}[2][Theorem] ...


1

You can declare a new theorem and just make its counter look like the regular counter with the addition of a *. If you want to refer to a theorem that is somewhere else in the document, use the \label-\ref system and supply the new number via \thmstarnum{\ref{<label>}}: \documentclass{article} \usepackage{amsthm} ...


1

I think you can use the \framebox command in such way: \framebox[width][position]{ \begin{multicols}{2} \begin{thm} Some important theorem. \end{thm} \end{multicols} }


3

You need to use \[...\] for your display math which sets \qedhere at the location you want. For the text-related adjustment, we redefine \qed to not include the \hfill: \documentclass{article} \usepackage{amsmath,amsthm,bm,thmtools} \usepackage{ifthen} \usepackage{calc} \declaretheoremstyle[ spaceabove=10pt, headpunct={}, headformat=\ifthenelse{ ...


3

Either use \renewcommand{\thetheo}{\thechapter.\arabic{theo}}% ...for chapter prefix or \renewcommand{\thetheo}{\thesection.\arabic{theo}}% ...for section prefix together with \refstepcounter instead of just \stepcounter. This allows you to use \label and later \reference the theorem.


1

Minimal example: \documentclass{article} \usepackage{amsmath,amsthm} \begin{document} \[ \mathbb{A} \] \end{document} produces the following error when an attempt is made to compile it: ! Undefined control sequence. l.7 \mathbb {A} ? x This is because \mathbb is not a standard LaTeX command and is not defined by either of the loaded ...


1

Only small changes in preamble are needed: \documentclass[parskip=false,11pt]{book} \usepackage[framemethod=tikz]{mdframed} \mdfsetup{skipabove=\topskip,skipbelow=\topskip} \usepackage{mathtools} \newcommand\ExampleText{% An \textit{inhomogeneous linear} differential equation has the form \begin{align} L[v ] = f, \end{align} ...



Top 50 recent answers are included