Tag Info

Hot answers tagged

8

This does what you want, though I find it cumbersome and not really informative. \documentclass{book} \usepackage{amsthm,xpatch} \makeatletter \let\qed@empty\openbox % <--- change here, if desired \def\@begintheorem#1#2[#3]{% \deferred@thm@head{% \the\thm@headfont\thm@indent \@ifempty{#1} {\let\thmname\@gobble} ...


7

If we use the amsthm package then we can do this by hijacking the \qedsymbol command and hacking the way that the theorem environments are constructed internally. This comes down to adding some code to \@begintheorem to overwrite \qedsymbol so that it becomes a boxed version of the last theorem number. There are two issues with the code below. The first ...


5

Use a variant of the \tmark command defined in my answer to Moving an object to the right margin \documentclass{article} \usepackage{amsthm} \makeatletter \renewcommand\@endtheorem{\vvv@endmarker\endtrivlist\@endpefalse} \newcommand\vvv@endmarker{% {\unskip\nobreak\hfil\penalty50 \hskip2em\vadjust{}\nobreak\hfil\openbox \parfillskip=0pt ...


4

You're on the wrong track. ;-) Just setup a new counter and use it. \documentclass{book} \usepackage{xparse} \newcounter{study} \NewDocumentCommand{\study}{om}{% \refstepcounter{study}\IfValueT{#1}{\label{#1}}% \section{Study \thestudy: #2}% } \begin{document} \frontmatter \tableofcontents \mainmatter \chapter{Title} \section{A regular ...


4

Asssume you are using \newtheorem from amsthm. Here \newtheorem defines new theorem-alike environments and ends them by \@endtheorem. The later is originally defined as \def\@endtheorem{\endtrivlist\@endpefalse } and you can insert your ending symbol here. \documentclass{article} \usepackage{amsthm} \usepackage{manfnt} \makeatletter ...


3

You want to use different \mdcreateextratikz for the two environments: \documentclass[a4paper,10pt]{memoir} \usepackage[utf8]{inputenc} \usepackage{xcolor} \usepackage[framemethod=tikz]{mdframed} \usetikzlibrary{shadows,shadings} \usepackage{lipsum} \usepackage{calc} \usepackage{tikz} \usetikzlibrary{shapes,snakes} \newcounter{demo_counter} ...


3

Define a new key and use it for setting the thickness of the top rule: \documentclass{report} \usepackage{thmbox} \usepackage{xcolor} \makeatletter \def\thmbox@color{black} \define@key{thmbox}{color}{\def\thmbox@color{#1}} \define@key{thmbox}{topthickness}{\def\thmbox@topthickness{#1}} \def\thmbox@topthickness{\thmbox@thickness}% default ...


3

The following likely won't work in the real world so you'll have to try it and see. However, it does at least produce the right result for the MWE. \documentclass{beamer} \usepackage{lmodern} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[spanish]{babel} \uselanguage{Spanish} \languagepath{Spanish} ...


3

As it has been already explained, Beamer uses translator (its particular babel system). If the dictionary exists, you can active the system introducing the language name in beamer options: \documentclass[spanish]{beamer}. This way spanish is applied to beamer-translator system and babel. If spanish is passed only as babel option, you need to apply it for ...


3

amsthm is a package to create theorems and theorem-related environments. It does not do this by default. So, you could issue \newtheorem{theorem}{Theorem} to define the theorem environment: \documentclass{article} \usepackage{amsthm} \newtheorem{theorem}{Theorem} \begin{document} \begin{theorem} Test \end{theorem} \end{document}


3

This is adapted from what I have used in the past (not sure where I got it from): Code: \documentclass{article} \usepackage{amsmath} \newcommand*{\QED}[1]{% \ifmmode% Check for math mode. \tag*{\fbox{#1}}% \else% {\rightskip\fill\parfillskip-\rightskip% \linepenalty100% \exhyphenpenalty0% ...


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 ...


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. ...


2

I am not sure that I understand what you are asking as you seem to be saying that you want two theorem 0.1s an two theorem 0.2s. This does not make sense to me, so I think that you probably want something like this: To do this I have defined a fake \section command that uses a mysection counter, which is also used to number the theorems. ...


2

You should add the definition of \@dotsep to your preamble: \makeatletter \newcommand\@dotsep{4.5} \makeatother The above definition is similar to the other sectional units dot separations, which originally was taken from one of the default document classes (see, for example, article.cls).


1

I don't have enough reputation to add a comment to the previous answer, so let me add the following as an answer instead. I found what Philippe Goutet said in the comment to lockstep's answer to be true, namely that a footnote appears in references to the theorem too. Perhaps it is obvious to others how to implement Philippe's fix, but it wasn't to me: it ...


1

changing the format of the \section command is trivial, and a much better approach (as pointed out by ulrike fischer) than skipping that level and using \subsection. this is the definition of \section in amsart.cls: \def\section{\@startsection{section}{1}% \z@{.7\linespacing\@plus\linespacing}{.5\linespacing}% {\normalfont\scshape\centering}} just ...



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